From 4c8282b9cf363eb3bd7f6f7307d50e9dd898abd0 Mon Sep 17 00:00:00 2001 From: Matthew Peveler Date: Fri, 7 Oct 2022 11:40:38 -0400 Subject: [PATCH 1/2] Enable error php.ini directives in GH workflow --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e01d3dce5..7a25e7fd1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,7 @@ jobs: with: php-version: ${{ matrix.php-version }} coverage: pcov + ini-values: zend.assertions=1, error_reporting=-1, display_errors=On - name: Get composer cache directory id: composer-cache @@ -146,7 +147,7 @@ jobs: with: php-version: ${{ env.PHP_VERSION }} extensions: ${{ env.EXTENSIONS }} - ini-values: apc.enable_cli = 1, extension = php_fileinfo.dll + ini-values: apc.enable_cli=1, extension=php_fileinfo.dll, zend.assertions=1, error_reporting=-1, display_errors=On coverage: pcov - name: Setup SQLServer From bed2dae9815e9958782d6d30cd2f020307564d7b Mon Sep 17 00:00:00 2001 From: Matthew Peveler Date: Sun, 9 Oct 2022 14:12:45 +0000 Subject: [PATCH 2/2] use time_nanosleep over sleep --- tests/Phinx/Console/Command/CreateTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Phinx/Console/Command/CreateTest.php b/tests/Phinx/Console/Command/CreateTest.php index 44907da0f..da973a1d7 100644 --- a/tests/Phinx/Console/Command/CreateTest.php +++ b/tests/Phinx/Console/Command/CreateTest.php @@ -149,7 +149,7 @@ public function testExecuteWithDuplicateMigrationNames() $commandTester = new CommandTester($command); $commandTester->execute(['command' => $command->getName(), 'name' => 'MyDuplicateMigration']); - sleep(1.01); // need at least a second due to file naming scheme + time_nanosleep(1, 100000); // need at least a second due to file naming scheme $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('The migration class name "MyDuplicateMigration" already exists'); @@ -181,7 +181,7 @@ public function testExecuteWithDuplicateMigrationNamesWithNamespace() $commandTester = new CommandTester($command); $commandTester->execute(['command' => $command->getName(), 'name' => 'MyDuplicateMigration']); - sleep(1.01); // need at least a second due to file naming scheme + time_nanosleep(1, 100000); // need at least a second due to file naming scheme $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('The migration class name "Foo\Bar\MyDuplicateMigration" already exists');