From 69a0f7d98a6f852f50689f9644f88597a53f1440 Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Thu, 13 Apr 2023 17:08:26 +0530 Subject: [PATCH 01/17] Initial commit --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ac71993e..2a174cf2 100644 --- a/README.md +++ b/README.md @@ -549,3 +549,4 @@ Professional support, consulting as well as software development services are av https://www.cebe.cc/en/contact Development of this library is sponsored by [cebe.:cloud: "Your Professional Deployment Platform"](https://cebe.cloud). + From 72879d18e6adcd573c71ba439e249f3b94ba75c3 Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Thu, 13 Apr 2023 17:46:37 +0530 Subject: [PATCH 02/17] undo prev commit --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 2a174cf2..ac71993e 100644 --- a/README.md +++ b/README.md @@ -549,4 +549,3 @@ Professional support, consulting as well as software development services are av https://www.cebe.cc/en/contact Development of this library is sponsored by [cebe.:cloud: "Your Professional Deployment Platform"](https://cebe.cloud). - From 62c681410776c404f74267c19ef39ee0b41de1e8 Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Mon, 1 May 2023 12:08:55 +0530 Subject: [PATCH 03/17] Fix failing test caused due to downgrading of PHPUnit from 9 to 8 --- Makefile | 12 ++++----- tests/unit/MultiDbFreshMigrationTest.php | 16 +++++++++--- tests/unit/SchemaToDatabaseTest.php | 33 +++++++++++++++++++----- 3 files changed, 45 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index e550c0f4..c0f9bf0e 100644 --- a/Makefile +++ b/Makefile @@ -44,18 +44,18 @@ up: docker-compose exec -T mysql timeout 60s sh -c "while ! (mysql --execute \"ALTER USER 'dbuser'@'%' IDENTIFIED WITH mysql_native_password BY 'dbpass';\" > /dev/null 2>&1); do echo -n '.'; sleep 0.1 ; done; echo 'ok'" || (docker-compose ps; docker-compose logs; exit 1) cli: - docker-compose exec --user=$(UID) php bash + docker-compose exec --user=$(id -u) php bash migrate: - docker-compose run --user=$(UID) --rm php sh -c 'mkdir -p "tests/tmp/app"' - docker-compose run --user=$(UID) --rm php sh -c 'mkdir -p "tests/tmp/docker_app"' - docker-compose run --user=$(UID) --rm php sh -c 'cd /app/tests && ./yii migrate --interactive=0' + docker-compose run --user=$(id -u) --rm php sh -c 'mkdir -p "tests/tmp/app"' + docker-compose run --user=$(id -u) --rm php sh -c 'mkdir -p "tests/tmp/docker_app"' + docker-compose run --user=$(id -u) --rm php sh -c 'cd /app/tests && ./yii migrate --interactive=0' installdocker: - docker-compose run --user=$(UID) --rm php composer install && chmod +x tests/yii + docker-compose run --user=$(id -u) --rm php composer install && chmod +x tests/yii testdocker: - docker-compose run --user=$(UID) --rm php sh -c 'vendor/bin/phpunit --repeat 3' + docker-compose run --user=$(id -u) --rm php sh -c 'vendor/bin/phpunit --repeat 3' efs: clean_all up migrate # Everything From Scratch diff --git a/tests/unit/MultiDbFreshMigrationTest.php b/tests/unit/MultiDbFreshMigrationTest.php index 5fbd2d49..9964f747 100644 --- a/tests/unit/MultiDbFreshMigrationTest.php +++ b/tests/unit/MultiDbFreshMigrationTest.php @@ -185,8 +185,11 @@ public function testAfterKeyword() $dbSchema, 'tableName', $columnSchema, false, false ); - $this->assertStringContainsString('AFTER username', $column->getCode()); - $this->assertStringNotContainsString('AFTER username', $columnWithoutPreviousCol->getCode()); + // support for PHPUnit 8 + $this->assertSame(strpos($column->getCode(), 'AFTER username'), 28); + // $this->assertStringContainsString('AFTER username', $column->getCode()); + // $this->assertStringNotContainsString('AFTER username', $columnWithoutPreviousCol->getCode()); + $this->assertFalse(strpos($columnWithoutPreviousCol->getCode(), 'AFTER username')); // test `after` for fluent part in function call `after()` unset($column, $columnWithoutPreviousCol); @@ -198,7 +201,12 @@ public function testAfterKeyword() $dbSchema, 'tableName', $columnSchema, true, false ); - $this->assertStringContainsString("->after('username')", $column->getCode()); - $this->assertStringNotContainsString("->after('username')", $columnWithoutPreviousCol->getCode()); + // support for PHPUnit 8 + // $this->assertStringContainsString("->after('username')", $column->getCode()); + $this->assertSame(strpos($column->getCode(), "->after('username')"), 41); + + // support for PHPUnit 8 + // $this->assertStringNotContainsString("->after('username')", $columnWithoutPreviousCol->getCode()); + $this->assertFalse(strpos($columnWithoutPreviousCol->getCode(), "->after('username')")); } } diff --git a/tests/unit/SchemaToDatabaseTest.php b/tests/unit/SchemaToDatabaseTest.php index 4a8441bd..0f4d6957 100644 --- a/tests/unit/SchemaToDatabaseTest.php +++ b/tests/unit/SchemaToDatabaseTest.php @@ -22,14 +22,35 @@ public function testFindJunctionSchemas() //VarDumper::dump($result->indexByJunctionRef()); //VarDumper::dump($result->indexByJunctionSchema()); self::assertInstanceOf(JunctionSchemas::class, $result); - self::assertEqualsCanonicalizing( - ['junction_Photos2Posts', 'junction_PostsGallery', 'junction_PostsAttaches'], - array_keys($result->indexByJunctionSchema()) + + // support for PHPUnit 8 + // self::assertEqualsCanonicalizing( + // ['junction_Photos2Posts', 'junction_PostsGallery', 'junction_PostsAttaches'], + // array_keys($result->indexByJunctionSchema()) + // ); + $juncs = ['junction_Photos2Posts', 'junction_PostsGallery', 'junction_PostsAttaches']; + sort($juncs); + $indexedJuncs = array_keys($result->indexByJunctionSchema()); + sort($indexedJuncs); + self::assertEquals( + $juncs, + $indexedJuncs ); - self::assertEqualsCanonicalizing( - ['Post', 'Photo'], - array_keys($result->indexByClassSchema()) + + // support for PHPUnit 8 + // self::assertEqualsCanonicalizing( + // ['Post', 'Photo'], + // array_keys($result->indexByClassSchema()) + // ); + $model = ['Post', 'Photo']; + sort($model); + $indexedModel = array_keys($result->indexByClassSchema()); + sort($indexedModel); + self::assertEquals( + $model, + $indexedModel ); + self::assertEquals('junction_PostAttaches', $result->addPrefix('PostAttaches')); self::assertEquals('PostAttaches', $result->trimPrefix('junction_PostAttaches')); self::assertTrue($result->isJunctionSchema('PostsAttaches')); From e1bd33da4e13b0d1bf0a10e55cdb53a9bfa2ff5c Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Mon, 1 May 2023 15:46:42 +0530 Subject: [PATCH 04/17] Fix failing tests --- .github/workflows/test.yml | 2 +- src/lib/FakerStubResolver.php | 9 +++++++-- tests/fixtures/blog.php | 8 ++++---- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 15deb812..58464380 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1'] # TODO add '8.2' https://github.com/cebe/yii2-openapi/issues/142 + php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] # TODO use cache steps: diff --git a/src/lib/FakerStubResolver.php b/src/lib/FakerStubResolver.php index a0e029b8..03ab132e 100644 --- a/src/lib/FakerStubResolver.php +++ b/src/lib/FakerStubResolver.php @@ -53,8 +53,13 @@ public function resolve():?string // column name ends with `_id` if (substr($this->attribute->columnName, -strlen('_id'))==='_id') { - return '$faker->randomElement(\\'.$this->config->modelNamespace - . ($this->config->modelNamespace ? '\\' : '') + $config = $this->config; + if (!$config) { + $config = new Config; + } + $mn = $config->modelNamespace; + return '$faker->randomElement(\\'.$mn + . ($mn ? '\\' : '') . ucfirst($this->attribute->reference).'::find()->select("id")->column())'; } diff --git a/tests/fixtures/blog.php b/tests/fixtures/blog.php index 9fa874a5..e7e02534 100644 --- a/tests/fixtures/blog.php +++ b/tests/fixtures/blog.php @@ -73,13 +73,13 @@ ->asReference('Category') ->setRequired() ->setDescription('Category of posts') - ->setFakerStub('$faker->randomElement(\Category::find()->select("id")->column())'), + ->setFakerStub('$faker->randomElement(\app\models\Category::find()->select("id")->column())'), 'created_at' => (new Attribute('created_at', ['phpType' => 'string', 'dbType' => 'date'])) ->setFakerStub('$faker->dateTimeThisCentury->format(\'Y-m-d\')'), 'created_by' => (new Attribute('created_by', ['phpType' => 'int', 'dbType' => 'integer'])) ->asReference('User') ->setDescription('The User') - ->setFakerStub('$faker->randomElement(\User::find()->select("id")->column())'), + ->setFakerStub('$faker->randomElement(\app\models\User::find()->select("id")->column())'), ], 'relations' => [ 'category' => new AttributeRelation('category', @@ -110,12 +110,12 @@ ->setSize(128) ->asReference('Post') ->setDescription('A blog post (uid used as pk for test purposes)') - ->setFakerStub('$faker->randomElement(\Post::find()->select("id")->column())'), + ->setFakerStub('$faker->randomElement(\app\models\Post::find()->select("id")->column())'), 'author' => (new Attribute('author', ['phpType' => 'int', 'dbType' => 'integer'])) ->setRequired() ->asReference('User') ->setDescription('The User') - ->setFakerStub('$faker->randomElement(\User::find()->select("id")->column())'), + ->setFakerStub('$faker->randomElement(\app\models\User::find()->select("id")->column())'), 'message' => (new Attribute('message', ['phpType' => 'array', 'dbType' => 'json', 'xDbType' => 'json'])) ->setRequired()->setDefault([])->setFakerStub('[]'), 'meta_data' => (new Attribute('meta_data', ['phpType' => 'array', 'dbType' => 'json', 'xDbType' => 'json'])) From 48b10ece49d2354902d9d7e123ba72ee94ac3cee Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Tue, 2 May 2023 18:12:10 +0530 Subject: [PATCH 05/17] Fix PHP compatibility issue --- src/lib/ColumnToCode.php | 2 +- tests/unit/XDbTypeTest.php | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/ColumnToCode.php b/src/lib/ColumnToCode.php index c9c1887e..f5bef72e 100644 --- a/src/lib/ColumnToCode.php +++ b/src/lib/ColumnToCode.php @@ -299,7 +299,7 @@ public static function wrapQuotes(string $str, string $quotes = "'", bool $escap public static function enumToString(array $enum):string { - $items = implode(", ", array_map('self::wrapQuotes', $enum)); + $items = implode(", ", array_map(self::class.'::wrapQuotes', $enum)); return self::escapeQuotes($items); } diff --git a/tests/unit/XDbTypeTest.php b/tests/unit/XDbTypeTest.php index 202afed6..2f8149d3 100644 --- a/tests/unit/XDbTypeTest.php +++ b/tests/unit/XDbTypeTest.php @@ -209,11 +209,8 @@ private function createTableForEditColumns() public function testValidationRules() { - $this->deleteTables(); - // remove // $this->removeStaleMigrationsRecords(); - $this->deleteTables(); $testFile = Yii::getAlias("@specs/x_db_type/rules_and_more/x_db_type_mysql.php"); $this->runGenerator($testFile, 'mysql'); From 71ef65b440d9b94be690356d14a5a8f670fc5050 Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Tue, 2 May 2023 20:01:59 +0530 Subject: [PATCH 06/17] Undo Makefile changes --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index c0f9bf0e..e550c0f4 100644 --- a/Makefile +++ b/Makefile @@ -44,18 +44,18 @@ up: docker-compose exec -T mysql timeout 60s sh -c "while ! (mysql --execute \"ALTER USER 'dbuser'@'%' IDENTIFIED WITH mysql_native_password BY 'dbpass';\" > /dev/null 2>&1); do echo -n '.'; sleep 0.1 ; done; echo 'ok'" || (docker-compose ps; docker-compose logs; exit 1) cli: - docker-compose exec --user=$(id -u) php bash + docker-compose exec --user=$(UID) php bash migrate: - docker-compose run --user=$(id -u) --rm php sh -c 'mkdir -p "tests/tmp/app"' - docker-compose run --user=$(id -u) --rm php sh -c 'mkdir -p "tests/tmp/docker_app"' - docker-compose run --user=$(id -u) --rm php sh -c 'cd /app/tests && ./yii migrate --interactive=0' + docker-compose run --user=$(UID) --rm php sh -c 'mkdir -p "tests/tmp/app"' + docker-compose run --user=$(UID) --rm php sh -c 'mkdir -p "tests/tmp/docker_app"' + docker-compose run --user=$(UID) --rm php sh -c 'cd /app/tests && ./yii migrate --interactive=0' installdocker: - docker-compose run --user=$(id -u) --rm php composer install && chmod +x tests/yii + docker-compose run --user=$(UID) --rm php composer install && chmod +x tests/yii testdocker: - docker-compose run --user=$(id -u) --rm php sh -c 'vendor/bin/phpunit --repeat 3' + docker-compose run --user=$(UID) --rm php sh -c 'vendor/bin/phpunit --repeat 3' efs: clean_all up migrate # Everything From Scratch From e11c07e62f65be23f350c9f6137f8c10ede1b219 Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Wed, 31 May 2023 16:51:36 +0530 Subject: [PATCH 07/17] Update Yii2 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4fbfc425..436bc485 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "require": { "php": ">=7.2.0", "cebe/php-openapi": "^1.5.0", - "yiisoft/yii2": "~2.0.15", + "yiisoft/yii2": "~2.0.48", "yiisoft/yii2-gii": "~2.0.0 | ~2.1.0 | ~2.2.0| ~2.3.0", "laminas/laminas-code": "^3.4 | ^4.0", "insolita/yii2-fractal": "^1.0.0", From 82e7f1c47def030068e2fef09bd91202fb3861ba Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Wed, 31 May 2023 17:33:47 +0530 Subject: [PATCH 08/17] Change comments --- tests/unit/MultiDbFreshMigrationTest.php | 6 +++--- tests/unit/SchemaToDatabaseTest.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/unit/MultiDbFreshMigrationTest.php b/tests/unit/MultiDbFreshMigrationTest.php index 9964f747..366bfb0b 100644 --- a/tests/unit/MultiDbFreshMigrationTest.php +++ b/tests/unit/MultiDbFreshMigrationTest.php @@ -185,7 +185,7 @@ public function testAfterKeyword() $dbSchema, 'tableName', $columnSchema, false, false ); - // support for PHPUnit 8 + // https://github.com/cebe/yii2-openapi/pull/141/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R33 $this->assertSame(strpos($column->getCode(), 'AFTER username'), 28); // $this->assertStringContainsString('AFTER username', $column->getCode()); // $this->assertStringNotContainsString('AFTER username', $columnWithoutPreviousCol->getCode()); @@ -201,11 +201,11 @@ public function testAfterKeyword() $dbSchema, 'tableName', $columnSchema, true, false ); - // support for PHPUnit 8 + // https://github.com/cebe/yii2-openapi/pull/141/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R33 // $this->assertStringContainsString("->after('username')", $column->getCode()); $this->assertSame(strpos($column->getCode(), "->after('username')"), 41); - // support for PHPUnit 8 + // https://github.com/cebe/yii2-openapi/pull/141/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R33 // $this->assertStringNotContainsString("->after('username')", $columnWithoutPreviousCol->getCode()); $this->assertFalse(strpos($columnWithoutPreviousCol->getCode(), "->after('username')")); } diff --git a/tests/unit/SchemaToDatabaseTest.php b/tests/unit/SchemaToDatabaseTest.php index 0f4d6957..e18a5c0b 100644 --- a/tests/unit/SchemaToDatabaseTest.php +++ b/tests/unit/SchemaToDatabaseTest.php @@ -23,7 +23,7 @@ public function testFindJunctionSchemas() //VarDumper::dump($result->indexByJunctionSchema()); self::assertInstanceOf(JunctionSchemas::class, $result); - // support for PHPUnit 8 + // https://github.com/cebe/yii2-openapi/pull/141/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R33 // self::assertEqualsCanonicalizing( // ['junction_Photos2Posts', 'junction_PostsGallery', 'junction_PostsAttaches'], // array_keys($result->indexByJunctionSchema()) @@ -37,7 +37,7 @@ public function testFindJunctionSchemas() $indexedJuncs ); - // support for PHPUnit 8 + // https://github.com/cebe/yii2-openapi/pull/141/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R33 // self::assertEqualsCanonicalizing( // ['Post', 'Photo'], // array_keys($result->indexByClassSchema()) From 587e35da3509fe903d05f1e488078782a8f2232c Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Sat, 16 Dec 2023 15:51:00 +0530 Subject: [PATCH 09/17] Enhance docs + run test also PHP 8.3 --- .github/workflows/test.yml | 2 +- CONTRIBUTING.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 58464380..7d67d101 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] # TODO use cache steps: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 695ac503..e1a62b7d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,10 +10,12 @@ cd yii2-openapi make clean_all make up make installdocker +sudo chmod -R 777 tests/tmp/ # https://github.com/cebe/yii2-openapi/issues/156 make migrate # to check everything is setup up correctly ensure all tests passes make cli +# in Docker container ./vendor/bin/phpunit # create new branch from master and Happy contributing! From d1d38ac88ffcc12997551ff4cc123da6d00b1a11 Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Sat, 16 Dec 2023 16:09:15 +0530 Subject: [PATCH 10/17] Run tests in PHP 8.3 in GA --- tests/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile index 796c1f68..640e20d8 100644 --- a/tests/docker/Dockerfile +++ b/tests/docker/Dockerfile @@ -35,7 +35,7 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ # https://xdebug.org/docs/compat \ - && if [ "$BUILD_PHP_VERSION" = "8.2" ] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \ + && if [[ ["8.2" "8.3"][*] =~ "$BUILD_PHP_VERSION" ]] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \ && docker-php-ext-enable xdebug \ && docker-php-ext-install \ zip \ From a645188898aa58afb0173d84cab64c8d26ee2672 Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Sat, 16 Dec 2023 16:16:19 +0530 Subject: [PATCH 11/17] Run tests in PHP 8.3 in GA - Part 2 --- tests/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile index 640e20d8..90556314 100644 --- a/tests/docker/Dockerfile +++ b/tests/docker/Dockerfile @@ -35,7 +35,7 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ # https://xdebug.org/docs/compat \ - && if [[ ["8.2" "8.3"][*] =~ "$BUILD_PHP_VERSION" ]] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \ + && if [[ "[8.2 8.3][*]" =~ "$BUILD_PHP_VERSION" ]] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \ && docker-php-ext-enable xdebug \ && docker-php-ext-install \ zip \ From 334a593669ab575cbf704dd187edd893b4211579 Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Sat, 16 Dec 2023 16:24:53 +0530 Subject: [PATCH 12/17] Run tests in PHP 8.3 in GA - Part 3 --- tests/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile index 90556314..e8670d46 100644 --- a/tests/docker/Dockerfile +++ b/tests/docker/Dockerfile @@ -35,7 +35,7 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ # https://xdebug.org/docs/compat \ - && if [[ "[8.2 8.3][*]" =~ "$BUILD_PHP_VERSION" ]] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \ + && if [ "$BUILD_PHP_VERSION" = "8.2" || "$BUILD_PHP_VERSION" = "8.3" ] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \ && docker-php-ext-enable xdebug \ && docker-php-ext-install \ zip \ From d7aae54117cb206b964f8d22defe3bd5d9ae100e Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Sat, 16 Dec 2023 16:28:43 +0530 Subject: [PATCH 13/17] Run tests in PHP 8.3 in GA - Part 4 --- tests/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile index e8670d46..90556314 100644 --- a/tests/docker/Dockerfile +++ b/tests/docker/Dockerfile @@ -35,7 +35,7 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ # https://xdebug.org/docs/compat \ - && if [ "$BUILD_PHP_VERSION" = "8.2" || "$BUILD_PHP_VERSION" = "8.3" ] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \ + && if [[ "[8.2 8.3][*]" =~ "$BUILD_PHP_VERSION" ]] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \ && docker-php-ext-enable xdebug \ && docker-php-ext-install \ zip \ From a237f603222a47c0ba5d4cdc6195b5de46aaea1c Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Sat, 16 Dec 2023 16:38:24 +0530 Subject: [PATCH 14/17] Run tests in PHP 8.3 in GA - Part 5 --- tests/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile index 90556314..e8670d46 100644 --- a/tests/docker/Dockerfile +++ b/tests/docker/Dockerfile @@ -35,7 +35,7 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ # https://xdebug.org/docs/compat \ - && if [[ "[8.2 8.3][*]" =~ "$BUILD_PHP_VERSION" ]] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \ + && if [ "$BUILD_PHP_VERSION" = "8.2" || "$BUILD_PHP_VERSION" = "8.3" ] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \ && docker-php-ext-enable xdebug \ && docker-php-ext-install \ zip \ From 22bcd4ebd32e1c37f677d8734bc36f86a17afb55 Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Sat, 16 Dec 2023 16:42:01 +0530 Subject: [PATCH 15/17] Run tests in PHP 8.3 in GA - Part 6 --- tests/docker/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile index e8670d46..b07957fb 100644 --- a/tests/docker/Dockerfile +++ b/tests/docker/Dockerfile @@ -35,7 +35,8 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ # https://xdebug.org/docs/compat \ - && if [ "$BUILD_PHP_VERSION" = "8.2" || "$BUILD_PHP_VERSION" = "8.3" ] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \ + && if [ "$BUILD_PHP_VERSION" = "8.2" ] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \ + && if [ "$BUILD_PHP_VERSION" = "8.3" ] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \ && docker-php-ext-enable xdebug \ && docker-php-ext-install \ zip \ From eb455e888a8bd334156c8e01b0f2135b59cf78c5 Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Sat, 16 Dec 2023 16:49:41 +0530 Subject: [PATCH 16/17] Run tests in PHP 8.3 in GA - Part 7 --- tests/docker/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile index b07957fb..84875f3b 100644 --- a/tests/docker/Dockerfile +++ b/tests/docker/Dockerfile @@ -35,8 +35,7 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ # https://xdebug.org/docs/compat \ - && if [ "$BUILD_PHP_VERSION" = "8.2" ] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \ - && if [ "$BUILD_PHP_VERSION" = "8.3" ] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \ + && if [ "$BUILD_PHP_VERSION" = "8.2" ] || [ "$BUILD_PHP_VERSION" = "8.3" ] ; then pecl install xdebug ; else pecl install xdebug-3.1.5 ; fi \ && docker-php-ext-enable xdebug \ && docker-php-ext-install \ zip \ From 6e00666cb316863d10762fbefcac62d6cb37c487 Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Sat, 16 Dec 2023 18:39:00 +0530 Subject: [PATCH 17/17] Support recent version of laminas code --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 436bc485..29cdff30 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "cebe/php-openapi": "^1.5.0", "yiisoft/yii2": "~2.0.48", "yiisoft/yii2-gii": "~2.0.0 | ~2.1.0 | ~2.2.0| ~2.3.0", - "laminas/laminas-code": "^3.4 | ^4.0", + "laminas/laminas-code": ">=3.4 <=4.13", "insolita/yii2-fractal": "^1.0.0", "fakerphp/faker": "^1.9", "sam-it/yii2-mariadb": "^2.0"