8000 [FrameworkBundle][Validator] Fix apc cache service & config by ogizanagi · Pull Request #16794 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle][Validator] Fix apc cache service & config #16794

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 1 commit into from
Closed

[FrameworkBundle][Validator] Fix apc cache service & config #16794

wants to merge 1 commit into from

Conversation

ogizanagi
Copy link
Contributor
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #16793
License MIT
Doc PR -

@ogizanagi ogizanagi changed the title [FrameworkBundle][Validation] Fix apc cache service & config [FrameworkBundle][Validator] Fix apc cache service & config Dec 2, 2015
@jderusse
Copy link
Member 8000
jderusse commented Dec 2, 2015

Beware, the new service does not implements the same interface.
Your PR should break here https://github.com/ogizanagi/symfony/blob/ab4262e98a5121144e6d4e129b95e80b55ded08b/src/Symfony/Component/Validator/ValidatorBuilderInterface.php#L130

->scalarNode('cache')
->beforeNormalization()
// Can be removed in 3.0, once ApcCache support is dropped
->ifString()->then(function ($v) { return 'apc' === $v ? 'validator.mapping.cache.apc' : $v; })
Copy link
Member

Choose a reason for hiding this comment

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

This BC break should trigger a deprecation in previous versions right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The deprecation seems to have been triggered through the new validator.mapping.cache.doctrine.apc service in previous versions...
And this service has been removed in 3.0.

I'm getting lost in the operation.
I think something went wrong during a merge or this wasn't expected to be as it is right now:
validator.mapping.cache.doctrine.apc wasn't supposed to be marked as deprecated nor removed IMO.
validator.mapping.cache.apc was.

I'm going to make validator.mapping.cache.apc an alias of the new validator.mapping.cache.doctrine.apc service, but it should probably have been removed instead.

@ogizanagi
Copy link
Contributor Author

Hmm, you're right. It should be based on Symfony\Component\Validator\Mapping\Cache\DoctrineCache which adapts it to this interface.

@ogizanagi
Copy link
Contributor Author

This PR has been submitted by mistake on master. (Bad habit, 3.0 is now released...)
Closing in favor of #16795.

@ogizanagi ogizanagi closed this Dec 2, 2015
@ogizanagi ogizanagi deleted the 16793_apc_cache_service branch December 2, 2015 02:35
fabpot added a commit that referenced this pull request Jan 25, 2016
…g (ogizanagi)

This PR was merged into the 3.0 branch.

Discussion
----------

[FrameworkBundle][Validator] Fix apc cache service & config

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #16793
| License       | MIT
| Doc PR        | -

_Keep track of #16794 (comment)

_NOTE_: This PR is on standby. If #16822 is merged, this one might probably be closed, as everything will be done during the
62D2
 merge.

Commits
-------

94a1728 [FrameworkBundle][Validator] Fix apc cache service & config
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
0