Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Doctrine][DoctrineBridge] Compatibility with ORM 3 and DBAL 4 #51997

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

Closed
wants to merge 2 commits into from

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Oct 11, 2023

Q A
Branch? 6.3
Bug fix? no
New feature? no
Deprecations? no
Tickets Follows #51947
License MIT

This PR makes the 6.3 branch compatible with Doctrine DBAL 4 and ORM 3. It contains all changes from #51947 which does the same on the 5.4 branch.

Please note that I intentionally did not allow DBAL 4 in the dependencies of the monorepo's composer.json. If I did that, we would lose coverage for DBAL 3 completely which would be very unfortunate.

Right now, we should get the following test matrix:

  • same deps: DBAL 3
  • low deps: DBAL 2
  • high deps DBAL 4

@carsonbot carsonbot changed the title Run tests with ORM 3 and DBAL 4 [Doctrine][DoctrineBridge] Run tests with ORM 3 and DBAL 4 Oct 11, 2023
@carsonbot carsonbot added this to the 6.3 milestone Oct 11, 2023
@derrabus derrabus force-pushed the bump/orm-3-on-6.3 branch 4 times, most recently from e6602a9 to a18116a Compare October 11, 2023 15:31
@derrabus derrabus changed the title [Doctrine][DoctrineBridge] Run tests with ORM 3 and DBAL 4 [Doctrine][DoctrineBridge] Compatibility with ORM 3 and DBAL 4 Oct 12, 2023
@nicolas-grekas
Copy link
Member

Thanks for the PR, I used it while merging 5.4 into 6.3 see b691c31

@nicolas-grekas
Copy link
Member

PHP Fatal error: Declaration of Symfony\Bridge\Doctrine\Middleware\Debug\Statement::bindValue(string|int $param, mixed $value, Doctrine\DBAL\ParameterType $type): void must be compatible with Doctrine\DBAL\Driver\Middleware\AbstractStatementMiddleware::bindValue($param, $value, $type = Doctrine\DBAL\ParameterType::STRING) in /home/nicolas/Code/symfony-symfony/src/Symfony/Bridge/Doctrine/Middleware/Debug/Statement.php on line 42

Please note that I pushed 913a317 to fix such messages. Please double-check I did no mistakes.

@derrabus
Copy link
Member Author

PHP Fatal error: Declaration of Symfony\Bridge\Doctrine\Middleware\Debug\Statement::bindValue(string|int $param, mixed $value, Doctrine\DBAL\ParameterType $type): void must be compatible with Doctrine\DBAL\Driver\Middleware\AbstractStatementMiddleware::bindValue($param, $value, $type = Doctrine\DBAL\ParameterType::STRING) in /home/nicolas/Code/symfony-symfony/src/Symfony/Bridge/Doctrine/Middleware/Debug/Statement.php on line 42

Please note that I pushed 913a317 to fix such messages. Please double-check I did no mistakes.

That change does not look correct. My PR introduces dedicates Connection and Statement classes for DBAL 3 and 4. Your error could only occur if the DBAL 4 Statement has been loaded with DBAL 3 installed. We should rather investigate why that happens.

@derrabus derrabus deleted the bump/orm-3-on-6.3 branch October 12, 2023 16:08
@nicolas-grekas
Copy link
Member

I merged everything up to 7.0 but I'm pretty sure I made mistakes - at least this one. I need your help to double check + fix 🙏

@derrabus
Copy link
Member Author

Let's cross fingers for #52022. 🤞🏻

nicolas-grekas added a commit that referenced this pull request Oct 12, 2023
…n tests with ORM 3 and DBAL 4 (derrabus)

This PR was merged into the 6.3 branch.

Discussion
----------

[Doctrine][DoctrineBridge][HttpFoundation][VarDumper] Run tests with ORM 3 and DBAL 4

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Follow-up to #51997
| License       | MIT

Everything that got lost in the merge-up + a fix for the VarDumper testsuite. 😇

Commits
-------

81c40be Run tests with ORM 3 and DBAL 4
nicolas-grekas added a commit that referenced this pull request Oct 13, 2023
This PR was merged into the 5.4 branch.

Discussion
----------

[DoctrineBridge] Fix DBAL 4 compatibility

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | N/A
| License       | MIT

This PR backports DBAL 4 compatibility changes from #51997 that were not in #51947. Sorry for messing this up.

Commits
-------

50c0fbc Fix DBAL 4 compatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants