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

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

Merged
merged 1 commit into from May 26, 2017

Conversation

Projects
None yet
4 participants
@ogizanagi
Member

ogizanagi commented May 25, 2017

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.

@nicolas-grekas

👍 for 3.3

@nicolas-grekas

This comment has been minimized.

Show comment
Hide comment
@nicolas-grekas

nicolas-grekas May 25, 2017

Member

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

Member

nicolas-grekas commented May 25, 2017

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

@nicolas-grekas

This comment has been minimized.

Show comment
Hide comment
@nicolas-grekas

nicolas-grekas May 26, 2017

Member

good for merge on my side

Member

nicolas-grekas commented May 26, 2017

good for merge on my side

@stof

This comment has been minimized.

Show comment
Hide comment
@stof

stof May 26, 2017

Member

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

Member

stof commented May 26, 2017

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

@stof

stof approved these changes May 26, 2017

@stof

This comment has been minimized.

Show comment
Hide comment
@stof

stof May 26, 2017

Member

Thank you @ogizanagi.

Member

stof commented May 26, 2017

Thank you @ogizanagi.

@stof stof merged commit 68c1917 into symfony:3.3 May 26, 2017

1 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
fabbot.io Your code looks good.
Details

stof added a commit that referenced this pull request May 26, 2017

feature #22905 [FrameworkBundle][Validator] Move the PSR-11 factory t…
…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 ogizanagi:mv_container_cons_validator_factory branch May 26, 2017

@fabpot fabpot referenced this pull request May 29, 2017

Merged

Release v3.3.0 #22949

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment