Skip to content

[Cache] Split PdoAdapter into DoctrineDbalAdapter #43362

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

Merged
merged 1 commit into from
Oct 19, 2021

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Oct 7, 2021

Q A
Branch? 5.4
Bug fix? no
New feature? yes
Deprecations? yes
Tickets Fix #42962
License MIT
Doc PR symfony/symfony-docs#15903

@GromNaN GromNaN requested a review from stof October 8, 2021 12:46
@GromNaN GromNaN force-pushed the dbal/cache-pdo-5.4 branch 6 times, most recently from 114ff31 to 6a587b8 Compare October 8, 2021 19:29
@GromNaN
Copy link
Member Author

GromNaN commented Oct 8, 2021

Tests are green.
Tested locally with mysql & postgres.

Comment on lines 26 to 28
if (!class_exists(DoctrineSchemaConfiguratorInterface::class)) {
$this->markTestSkipped('This test requires symfony/cache >=5.4');
}
Copy link
Member

Choose a reason for hiding this comment

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

You've bumped the doctrine/cache dependency to 5.4, so this block should not be needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed this check, but the test will fail till the PR get merged into 5.4

Symfony\Bridge\Doctrine\Tests\SchemaListener\DoctrineDbalCacheAdapterSchemaSubscriberTest::testPostGenerateSchema
PHPUnit\Framework\MockObject\UnknownTypeException: Class or interface "Symfony\Component\Cache\Adapter\DoctrineSchemaConfiguratorInterface" does not exist

@GromNaN GromNaN force-pushed the dbal/cache-pdo-5.4 branch 2 times, most recently from 4c1a11a to f0775df Compare October 11, 2021 19:37
@GromNaN GromNaN requested a review from derrabus October 11, 2021 19:47
@GromNaN GromNaN force-pushed the dbal/cache-pdo-5.4 branch from 2653ea9 to a44a730 Compare October 18, 2021 10:39
@fabpot fabpot force-pushed the dbal/cache-pdo-5.4 branch from a44a730 to db665be Compare October 19, 2021 06:47
@fabpot
Copy link
Member

fabpot commented Oct 19, 2021

Thank you @GromNaN.

@fabpot fabpot merged commit 4418be1 into symfony:5.4 Oct 19, 2021
This was referenced Nov 5, 2021
@ostrolucky
Copy link
Contributor

ostrolucky commented Nov 14, 2021

Would be great if someone changed this in DoctrineBundle. I think that currently this functionality is silently broken with Symfony 6, because in bundle we use class_exists checks for deprecated class that was removed from Symfony 6. This is why I didn't make it easy for symfony folks to declare symfony 6 compatibility btw. This change came after we declared compatibility with Symfony 6 and now constraints are wrong because this is most likely broken.

edit: Ah looks like work is ongoing here already doctrine/DoctrineBundle#1417

@GromNaN GromNaN deleted the dbal/cache-pdo-5.4 branch November 14, 2021 19:13
fabpot added a commit that referenced this pull request Nov 16, 2021
…s (andrew-demb)

This PR was merged into the 5.4 branch.

Discussion
----------

DoctrineDbalAdapter: Fix deprecation message placeholders

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | -  <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | -. <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too.)
 - Features and deprecations must be submitted against branch 5.x.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
-->
Deprecation introduced in #43362 has a typo in interpolation - wrong parameter order

Commits
-------

e3899f5 Fix deprecation message placeholders
fabpot added a commit that referenced this pull request Nov 17, 2021
…ter (GromNaN)

This PR was merged into the 5.4 branch.

Discussion
----------

[FrameworkBundle] Add framework config for DBAL cache adapter

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | doctrine/DoctrineBundle#1417
| License       | MIT
| Doc PR        | -

The framework configuration was missing from #43362.

Additionnaly, the depreciation message on `PdoCacheAdapterDoctrineSchemaSubscriber` must be removed. This class needs to be used in 5.4 whenever a `PdoAdapter` is used, because it could have a DBAL connection and we need to keep the deprecated behavior. A depreciation message is already triggered in the `PdoAdapter` itself when it gets a DBAL connection.

Commits
-------

672545d Add framework config for DBAL cache adapter
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Dec 27, 2021
This PR was merged into the 5.4 branch.

Discussion
----------

[Cache] Split PdoAdapter to DoctrineDbalAdapter

In Symfony 5.4, the `PdoAdapter` is split and `DoctrineDbalAdapter` is created.

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Tickets       | Fix symfony/symfony#42962
| Code PR        | symfony/symfony#43362

Commits
-------

68fed1b [Cache] Split PdoAdapter to DoctrineDbalAdapter
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.

Split PDO and DBAL adapters
6 participants