Skip to content

[FrameworkBundle][Validator] Move the PSR-11 factory to the component #22905

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
May 26, 2017
Merged

[FrameworkBundle][Validator] Move the PSR-11 factory to the component #22905

merged 1 commit into from
May 26, 2017

Conversation

ogizanagi
Copy link
Contributor

Q A
Branch? 3.3
Bug fix? no
New feature? no
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets #22887 (comment)
License MIT
Doc PR N/A

Instead of the 3 following deprecations:

  • The ConstraintValidatorFactory::$validators and $container properties
    have been deprecated and will be removed in 4.0.
  • Extending ConstraintValidatorFactory is deprecated and won't be supported in 4.0.
  • Passing an array of validators or validator aliases as the second argument of
    ConstraintValidatorFactory::__construct() is deprecated since 3.3 and will
    be removed in 4.0. Use the service locator instead.

I'd suggest simply deprecating the FrameworkBundle's class in favor of using a new ContainerConstraintValidatorFactory. To me, there is no reason anyone using the validator component without the framework bundle cannot use this PSR-11 compliant implementation, nor I see a reason to make it final.

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

👍 for 3.3

@nicolas-grekas
Copy link
Member

(but missing composer.json update to make deps=low/high tests pass)

@nicolas-grekas
Copy link
Member

good for merge on my side

@stof
Copy link
Member

stof commented May 26, 2017

OK, deps=high failing is because this is not yet merged in 3.4

@stof
Copy link
Member

stof commented May 26, 2017

Thank you @ogizanagi.

@stof stof merged commit 68c1917 into symfony:3.3 May 26, 2017
stof added a commit that referenced this pull request May 26, 2017
…o the component (ogizanagi)

This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle][Validator] Move the PSR-11 factory to the component

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see comment below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | yes <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #22887 (comment) <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Instead of the 3 following deprecations:
 * The `ConstraintValidatorFactory::$validators` and `$container` properties
   have been deprecated and will be removed in 4.0.
 * Extending `ConstraintValidatorFactory` is deprecated and won't be supported in 4.0.
* Passing an array of validators or validator aliases as the second argument of
   `ConstraintValidatorFactory::__construct()` is deprecated since 3.3 and will
   be removed in 4.0. Use the service locator instead.

I'd suggest simply deprecating the FrameworkBundle's class in favor of using a new `ContainerConstraintValidatorFactory`. To me, there is no reason anyone using the validator component without the framework bundle cannot use this PSR-11 compliant implementation, nor I see a reason to make it final.

Commits
-------

68c1917 [FrameworkBundle][Validator] Move the PSR-11 factory to the component
@ogizanagi ogizanagi deleted the mv_container_cons_validator_factory branch May 26, 2017 10:12
@fabpot fabpot mentioned this pull request May 29, 2017
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.

4 participants