Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming Doctrine2 to Doctrine #184

Merged
merged 3 commits into from Mar 12, 2024
Merged

Conversation

ThomasLandauer
Copy link
Member

No description provided.

@W0rma
Copy link
Contributor

W0rma commented Feb 22, 2024

@ThomasLandauer I think this PR should also replace "codeception/module-doctrine2" with "codeception/module-doctrine".

Tests are currently failing because "codeception/module-doctrine2" is not compatible with ORMv3/DBALv4.

@ThomasLandauer
Copy link
Member Author

Sorry, don't know what you mean. I changed just the docs.

@W0rma
Copy link
Contributor

W0rma commented Feb 22, 2024

I mean all references to the composer package codeception/module-doctrine2:

Index: composer.json
<+>UTF-8
===================================================================
diff --git a/composer.json b/composer.json
--- a/composer.json	(revision be24b2b64759e5b4dd83ca091ecfe49c26cecc5c)
+++ b/composer.json	(date 1708610763372)
@@ -25,7 +25,7 @@
     },
     "require-dev": {
         "codeception/module-asserts": "^3.0",
-        "codeception/module-doctrine2": "^3.0",
+        "codeception/module-doctrine": "^3.0",
         "doctrine/orm": "^2.10",
         "symfony/browser-kit": "^5.4 | ^6.4 | ^7.0",
         "symfony/cache": "^5.4 | ^6.4 | ^7.0",
Index: .github/workflows/main.yml
<+>UTF-8
===================================================================
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
--- a/.github/workflows/main.yml	(revision be24b2b64759e5b4dd83ca091ecfe49c26cecc5c)
+++ b/.github/workflows/main.yml	(date 1708610763384)
@@ -76,7 +76,7 @@
           composer require symfony/browser-kit=${{ matrix.symfony }} --no-update
           composer require vlucas/phpdotenv --no-update
           composer require codeception/module-asserts="3.*" --no-update
-          composer require codeception/module-doctrine2="3.*" --no-update
+          composer require codeception/module-doctrine="3.*" --no-update
           composer update --prefer-dist --no-progress --no-dev
 
       - name: Validate composer.json and composer.lock
@@ -90,7 +90,7 @@
 
       - name: Install Symfony Sample
         run: |
-          composer remove codeception/codeception codeception/module-asserts codeception/module-doctrine2 codeception/lib-innerbrowser codeception/module-symfony --dev --no-update
+          composer remove codeception/codeception codeception/module-asserts codeception/module-doctrine codeception/lib-innerbrowser codeception/module-symfony --dev --no-update
           composer update --no-progress
         working-directory: framework-tests
 

By replacing them with codeception/module-doctrine the tests should become green again.
They are currently red because codeception/module-doctrine2 is not compatible with ORMv3 and DBALv4

@ThomasLandauer
Copy link
Member Author

OK, thanks, there you go :-)

@W0rma
Copy link
Contributor

W0rma commented Feb 23, 2024

Great, thank you!

Tests still fail but with a different error message:

In ModuleContainer.php line 100:
                                                       
  Module Doctrine2 is not installed.                   
  Use Composer to install corresponding package:       
                                                       
  composer require codeception/module-doctrine2 --dev 

Sounds like this error should be fixed with Codeception/Codeception#6741 which adjusts the module name in codeception/codeception accordingly.

composer.json Outdated Show resolved Hide resolved
@TavoNiievez TavoNiievez changed the title Update Symfony.php: Renaming Doctrine2 -> Doctrine Renaming Doctrine2 to Doctrine Feb 23, 2024
@Naktibalda
Copy link
Member

@W0rma that array in ModuleContainer.php is only used for printing install suggestion in error message.
The problem here is that https://github.com/Codeception/symfony-module-tests still uses module-doctrine2

@TavoNiievez
Copy link
Member

@Naktibalda you are right. I just corrected it in the 5.4 branch,
I will do it in branches 6.4 and 7.0 before the end of the weekend.

@TavoNiievez
Copy link
Member

@Naktibalda I have updated the 3 active branches of the module test project and the tests are passing there.

However, in the module CI there are errors, apparently related to PHPUnit versions.

Perhaps changes need to be made to these lines?

- name: Install PHPUnit 9 for Symfony 5.4
if: "matrix.symfony == '5.4.*'"
run: composer require --dev --no-update "phpunit/phpunit=^9.0"

- name: Install PHPUnit 10 in framework-tests for Symfony 6.4 and 7.0
if: "matrix.symfony == '6.4.*' || matrix.symfony == '7.0.*'"
run: composer require --dev --no-update "phpunit/phpunit=^10.0"

Copy link
Member

@TavoNiievez TavoNiievez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have fixed the tests and this PR is ready to be merged.

@TavoNiievez TavoNiievez merged commit 666c35c into Codeception:main Mar 12, 2024
8 checks passed
@ThomasLandauer ThomasLandauer deleted the patch-3 branch March 12, 2024 09:57
@TavoNiievez TavoNiievez added this to the 3.3.1 milestone Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants