Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FrameworkBundle] Add a doctrine cache service definition for validator mapping#14429

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@jakzal
Copy link
Contributor

QA
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PRsymfony/symfony-docs#5409

Following#12975, this PR only registers a new service so it's possible to use the new doctrine based cache implementation instead of the deprecated one. To use it, the end user would need to configure it in hisconfig.yml:

framework:validation:cache:validator.mapping.cache.doctrine.apc

In 3.0 we'll be able to replace the deprecated definition by aliasingvalidator.mapping.cache.apc tovalidator.mapping.cache.doctrine.apc.

I thought of automatic wrapping of services which implement doctrine interface, but decided it would be too magic.

I'm not convinced if APC is a good default anymore and hope for some discussion. I've used it as it's also used in serializer, and probably translation (see#13986). Since there's a built in opcache in more recent PHP versions, and apcu doesn't seem to be stable, there are better choices. Perhaps a better default would be a filesystem cache (not better performing, but it works anywhere).

@cordoval
Copy link
Contributor

@jakzal
Copy link
ContributorAuthor

@cordoval documenting is not enough imho. We need to provide an upgrade path.

@dunglas
Copy link
Member

👍

@xabbuh
Copy link
Member

👍 We should just add this to the docs after merging.

@fabpot
Copy link
Member

Can we have the doc PR before merging?

@xabbuh
Copy link
Member

yes, we can (seesymfony/symfony-docs#5409)

@jakzal
Copy link
ContributorAuthor

I'm not convinced if APC is a good default anymore and hope for some discussion.

Any feedback on this one?

@fabpot
Copy link
Member

👍 Does not hurt to have this extra service anyway. Having some other alternatives would be good as well but out of the scope of this PR.

@jakzal
Copy link
ContributorAuthor

Ok then. Let's merge :)

@fabpot
Copy link
Member

Thank you@jakzal.

@fabpotfabpot merged commit0642911 intosymfony:2.8Jun 23, 2015
fabpot added a commit that referenced this pull requestJun 23, 2015
…ion for validator mapping (jakzal)This PR was merged into the 2.8 branch.Discussion----------[FrameworkBundle] Add a doctrine cache service definition for validator mapping| Q             | A| ------------- | ---| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        |symfony/symfony-docs#5409Following#12975, this PR only registers a new service so it's possible to use the new doctrine based cache implementation instead of the deprecated one. To use it, the end user would need to configure it in his `config.yml`:```yamlframework:    validation:        cache: validator.mapping.cache.doctrine.apc```In 3.0 we'll be able to replace the deprecated definition by aliasing `validator.mapping.cache.apc` to `validator.mapping.cache.doctrine.apc`.I thought of automatic wrapping of services which implement doctrine interface, but decided it would be too magic.I'm not convinced if APC is a good default anymore and hope for some discussion. I've used it as it's also used in serializer, and probably translation (see#13986). Since there's a built in opcache in more recent PHP versions, and apcu doesn't seem to be stable, there are better choices. Perhaps a better default would be a filesystem cache (not better performing, but it works anywhere).Commits-------0642911 [FrameworkBundle] Add a doctrine cache service definition for validator mapping
@jakzaljakzal deleted the validator/mapping-doctrine-cache branchJune 24, 2015 12:47
@stof
Copy link
Member

@jakzal I think we should also provide an easy way to configure a DoctrineCache wrapping an existing service. This would allow people to configure their cache service thanks to DoctrineCacheBundle (included by default in the SE as it is a dependency of DoctrineBundle), giving them support for any cache backend supported in Doctrine, and then having Frameworkbundle only dealing with configuring the Symfony adapter wrapping it (we could also do this in other places allowing to use doctrine-based cache adapter btw).

@jakzal
Copy link
ContributorAuthor

@stof the only reason why I haven't done this yet is I couldn't decide how to configure it.

Would this be acceptable?

framework:    validation:        cache:             doctrine: some.doctrine_cache.service

Socache might be a service id or an array.

weaverryan added a commit to symfony/symfony-docs that referenced this pull requestJun 28, 2015
…bbuh)This PR was merged into the 2.8 branch.Discussion----------[Reference] document new Doctrine APC cache service| Q             | A| ------------- | ---| Doc fix?      | no| New docs?     | yes (symfony/symfony#14429)| Applies to    | 2.8+| Fixed tickets |Commits-------485c8a0 document new Doctrine APC cache service
@fabpotfabpot mentioned this pull requestNov 16, 2015
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@jakzal@cordoval@dunglas@xabbuh@fabpot@stof@webmozart

[8]ページ先頭

©2009-2025 Movatter.jp