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

Add support for Doctrine DBAL 4 and ORM 3 #1796

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

dmaicher
Copy link
Contributor

@dmaicher dmaicher commented Feb 24, 2024

Subject

I am targeting this branch, because its BC.

Fixes #1774

Changelog

### Added
- compatibility with `doctrine/dbal` 4 and `doctrine/orm` 3

@dmaicher dmaicher force-pushed the orm_dbal_upgrade branch 3 times, most recently from 4718956 to df9a158 Compare February 24, 2024 17:24
@dmaicher
Copy link
Contributor Author

dmaicher commented Feb 25, 2024

I'm blocked by one test fail where I'm not sure if its an ORM bug or an issue on our side 😕

[critical] Uncaught PHP Exception PHPUnit\Framework\Error\Warning: "Undefined property: Doctrine\ORM\Mapping\OneToOneInverseSideMapping::$joinColumns" at IdentityFunction.php line 40

See https://github.com/doctrine/orm/blob/3907872046b9a697860f51266714c2eb8e3b19d0/src/Query/AST/Functions/IdentityFunction.php#L40

Looks more like an ORM issue to me. @greg0ire any idea? Shall I open an issue for it on ORM?

@greg0ire never mind. It was an issue on our end 👍 found it after some more debugging. Sorry for the noise.

@dmaicher
Copy link
Contributor Author

Tests are finally green 😄

Shall we move ahead without sonata-project/EntityAuditBundle#59 ? Shall I maybe create a separate workflow file (not managed by devkit) for the time being so we are running CI on DBAL 4 and ORM 3?

@dmaicher dmaicher mentioned this pull request Feb 25, 2024
$hydrator = $this->createMock(SimpleObjectHydrator::class);
$hydrator
$query = $this->createMock(Query::class);
$query
->expects(static::once())
->method('toIterable')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is final on AbstractHydrator now. So we cannot mock it anymore.

@VincentLanglet
Copy link
Member

Tests are finally green 😄

Shall we move ahead without sonata-project/EntityAuditBundle#59 ? Shall I maybe create a separate workflow file (not managed by devkit) for the time being so we are running CI on DBAL 4 and ORM 3?

I'm ok with this strategy

@dmaicher dmaicher force-pushed the orm_dbal_upgrade branch 2 times, most recently from e07a997 to 2c660d8 Compare February 25, 2024 13:35
@dmaicher dmaicher changed the title Add support for Doctrine DBAL 4 and ORM 3 [WIP] Add support for Doctrine DBAL 4 and ORM 3 Feb 25, 2024
@dmaicher dmaicher marked this pull request as ready for review February 25, 2024 13:38
@dmaicher dmaicher requested a review from a team February 25, 2024 13:38
@dmaicher dmaicher merged commit 1a8616e into sonata-project:4.x Feb 26, 2024
31 checks passed
@dmaicher dmaicher deleted the orm_dbal_upgrade branch February 26, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doctrine ORM 3 support
3 participants