From ff98fb68f64e2f3b4f03b0300bd34ea022dc8d30 Mon Sep 17 00:00:00 2001 From: W0rma Date: Thu, 13 Nov 2025 07:43:21 +0100 Subject: [PATCH 1/4] Use ulid instead of uuid to fix the CI --- .../data/doctrine_entities/EntityWithUlid.php | 34 +++++++++++++++++++ .../data/doctrine_entities/EntityWithUuid.php | 34 ------------------- .../unit/Codeception/Module/Doctrine2Test.php | 18 +++++----- 3 files changed, 43 insertions(+), 43 deletions(-) create mode 100644 tests/data/doctrine_entities/EntityWithUlid.php delete mode 100644 tests/data/doctrine_entities/EntityWithUuid.php diff --git a/tests/data/doctrine_entities/EntityWithUlid.php b/tests/data/doctrine_entities/EntityWithUlid.php new file mode 100644 index 0000000..f8e9160 --- /dev/null +++ b/tests/data/doctrine_entities/EntityWithUlid.php @@ -0,0 +1,34 @@ +id = new Ulid(); + } + + public function getId(): Ulid + { + return $this->id; + } +} diff --git a/tests/data/doctrine_entities/EntityWithUuid.php b/tests/data/doctrine_entities/EntityWithUuid.php deleted file mode 100644 index eb401a3..0000000 --- a/tests/data/doctrine_entities/EntityWithUuid.php +++ /dev/null @@ -1,34 +0,0 @@ -id = Uuid::v4(); - } - - public function getId(): Uuid - { - return $this->id; - } -} diff --git a/tests/unit/Codeception/Module/Doctrine2Test.php b/tests/unit/Codeception/Module/Doctrine2Test.php index 389a243..216038d 100644 --- a/tests/unit/Codeception/Module/Doctrine2Test.php +++ b/tests/unit/Codeception/Module/Doctrine2Test.php @@ -25,8 +25,8 @@ use QuirkyFieldName\AssociationHost; use QuirkyFieldName\Embeddable; use QuirkyFieldName\EmbeddableHost; -use Symfony\Bridge\Doctrine\Types\UuidType; -use Symfony\Component\Uid\Uuid; +use Symfony\Bridge\Doctrine\Types\UlidType; +use Symfony\Component\Uid\Ulid; final class DoctrineTest extends Unit { @@ -36,8 +36,8 @@ final class DoctrineTest extends Unit protected static function _setUpBeforeClass() { - if (!Type::hasType('uuid')) { - Type::addType('uuid', UuidType::class); + if (!Type::hasType('ulid')) { + Type::addType('ulid', UlidType::class); } } @@ -69,7 +69,7 @@ protected function _setUp() require_once $dir . "/CircularRelations/A.php"; require_once $dir . "/CircularRelations/B.php"; require_once $dir . "/CircularRelations/C.php"; - require_once $dir . '/EntityWithUuid.php'; + require_once $dir . '/EntityWithUlid.php'; $sqliteDriver = 'sqlite3'; // The driver "sqlite3" is only available as-of doctrine/dbal:3.5 @@ -111,7 +111,7 @@ protected function _setUp() $this->em->getClassMetadata(\CircularRelations\A::class), $this->em->getClassMetadata(\CircularRelations\B::class), $this->em->getClassMetadata(\CircularRelations\C::class), - $this->em->getClassMetadata(EntityWithUuid::class), + $this->em->getClassMetadata(EntityWithUlid::class), ]); $container = Stub::make(ModuleContainer::class); @@ -435,13 +435,13 @@ public function testCompositePrimaryKeyWithEntities() /** * The purpose of this test is to verify that entites with object @id, that are - * not entites itself, e.g. Symfony\Component\Uid\Uuid, don't break the debug message. + * not entites itself, e.g. Symfony\Component\Uid\Ulid, don't break the debug message. */ public function testDebugEntityWithNonEntityButObjectId() { - $pk = $this->module->haveInRepository(EntityWithUuid::class); + $pk = $this->module->haveInRepository(EntityWithUlid::class); - self::assertInstanceOf(Uuid::class, $pk); + self::assertInstanceOf(Ulid::class, $pk); } public function testRefresh() From 37b638e813871916705df1ed8a7b17237d459045 Mon Sep 17 00:00:00 2001 From: W0rma Date: Thu, 13 Nov 2025 07:52:24 +0100 Subject: [PATCH 2/4] Bump checkout action version --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c40fa75..9e0ea5c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup PHP uses: shivammathur/setup-php@v2 From 3bf5e148df8fad6edc66dfbe8bcbb3d61b1aea1e Mon Sep 17 00:00:00 2001 From: W0rma Date: Thu, 13 Nov 2025 07:53:44 +0100 Subject: [PATCH 3/4] Drop PHP 8.1 --- .github/workflows/main.yml | 2 +- composer.json | 2 +- readme.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9e0ea5c..825934a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - php: [8.1, 8.2, 8.3, 8.4] + php: [8.2, 8.3, 8.4] composer_flags: [ '', '--prefer-lowest' ] steps: diff --git a/composer.json b/composer.json index c98274b..ccdaeae 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ ], "homepage": "https://codeception.com/", "require": { - "php": "^8.1", + "php": "^8.2", "ext-json": "*", "ext-pdo": "*", "codeception/codeception": "^5.1" diff --git a/readme.md b/readme.md index 484a801..6730645 100644 --- a/readme.md +++ b/readme.md @@ -9,7 +9,7 @@ A Doctrine module for Codeception. ## Requirements -* `PHP 8.1` or higher. +* `PHP 8.2` or higher. ## Installation From 231127181d0714c5b09f3c6ad250552a9ef2245a Mon Sep 17 00:00:00 2001 From: W0rma Date: Thu, 13 Nov 2025 07:56:16 +0100 Subject: [PATCH 4/4] Test against PHP 8.5 --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 825934a..1cce7a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - php: [8.2, 8.3, 8.4] + php: [8.2, 8.3, 8.4, 8.5] composer_flags: [ '', '--prefer-lowest' ] steps: @@ -21,6 +21,10 @@ jobs: php-version: ${{ matrix.php }} extensions: pdo, sqlite coverage: none + # this ini directive seems to be off by default in PHP 8.5 + # see https://github.com/php/php-src/issues/20279 + # enable it because codeception relies on it. + ini-values: register_argc_argv=1 - name: Validate composer.json and composer.lock run: composer validate