Skip to content

Commit 4664e27

Browse files
authored
Enable error php.ini directives in GH workflow (cakephp#2113)
1 parent f3e4259 commit 4664e27

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/ci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
with:
4949
php-version: ${{ matrix.php-version }}
5050
coverage: pcov
51+
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
5152

5253
- name: Get composer cache directory
5354
id: composer-cache
@@ -146,7 +147,7 @@ jobs:
146147
with:
147148
php-version: ${{ env.PHP_VERSION }}
148149
extensions: ${{ env.EXTENSIONS }}
149-
ini-values: apc.enable_cli = 1, extension = php_fileinfo.dll
150+
ini-values: apc.enable_cli=1, extension=php_fileinfo.dll, zend.assertions=1, error_reporting=-1, display_errors=On
150151
coverage: pcov
151152

152153
- name: Setup SQLServer

tests/Phinx/Console/Command/CreateTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function testExecuteWithDuplicateMigrationNames()
149149

150150
$commandTester = new CommandTester($command);
151151
$commandTester->execute(['command' => $command->getName(), 'name' => 'MyDuplicateMigration']);
152-
sleep(1.01); // need at least a second due to file naming scheme
152+
time_nanosleep(1, 100000); // need at least a second due to file naming scheme
153153

154154
$this->expectException(InvalidArgumentException::class);
155155
$this->expectExceptionMessage('The migration class name "MyDuplicateMigration" already exists');
@@ -181,7 +181,7 @@ public function testExecuteWithDuplicateMigrationNamesWithNamespace()
181181

182182
$commandTester = new CommandTester($command);
183183
$commandTester->execute(['command' => $command->getName(), 'name' => 'MyDuplicateMigration']);
184-
sleep(1.01); // need at least a second due to file naming scheme
184+
time_nanosleep(1, 100000); // need at least a second due to file naming scheme
185185

186186
$this->expectException(InvalidArgumentException::class);
187187
$this->expectExceptionMessage('The migration class name "Foo\Bar\MyDuplicateMigration" already exists');

0 commit comments

Comments
 (0)