Skip to content

[FrameworkBundle] Remove deprecated code #22800

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 24, 2017
Merged

[FrameworkBundle] Remove deprecated code #22800

merged 1 commit into from
May 24, 2017

Conversation

ogizanagi
Copy link
Contributor

@ogizanagi ogizanagi commented May 20, 2017

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets N/A
License MIT
Doc PR N/A

Remove deprecated code in the FrameworkBundle (except compiler passes and stuff already removed by #22749):

  • Removed cache:clear warmup part along with the --no-optional-warmers option.
  • Removed core form types services registration when unnecessary
  • Removed framework.serializer.cache option and serializer.mapping.cache.apc, serializer.mapping.cache.doctrine.apc services
  • Removed ConstraintValidatorFactory::$validators and ConstraintValidatorFactory::$container protected properties
  • Removed class parameters related to routing
  • Removed absolute template paths support in the template name parser

@@ -33,10 +30,6 @@ protected function configure()
{
$this
->setName('cache:clear')
->setDefinition(array(
new InputOption('no-warmup', '', InputOption::VALUE_NONE, 'Do not warm up the cache'),
Copy link
Contributor Author

@ogizanagi ogizanagi May 20, 2017

Choose a reason for hiding this comment

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

What is actually the strategy regarding this option? Removing it entirely is a BC break and it was part of the upgrade path.
Should we just keep it as noop and deprecate it to be removed in 5.0?

Copy link
Contributor

Choose a reason for hiding this comment

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

A similar option in a form was used as a bc layer between 2.8->3.0, it was kept in 3.0 and deprecated in 3.1 only.
So I would just ignore it and deprecate it in 4.1.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the heads up. I'll revert this line then :)

@ogizanagi
Copy link
Contributor Author

I've got a question regarding the ConstraintValidatorFactory (relates to #21730): I don't get the point of keeping the $validators argument in the constructor. A related test uses it for declaring an alias, while we already use the service locator for this purpose in the pass for instance.

So, should we remove it?

ping @GuilhemN

@GuilhemN
Copy link
Contributor

I've got a question regarding the ConstraintValidatorFactory (relates to #21730): I don't get the point of keeping the $validators argument in the constructor. A related test uses it for declaring an alias, while we already use the service locator for this purpose in the pass for instance.

I didn't need to deprecate it in #21730 so I didn't do it. I also thought it might be useful for those who want to use an existing container, but as we're moving more and more to fqcn services maybe it's better to remove it indeed, this does require a bc layer in 3.3 or 3.4 though.

@ogizanagi
Copy link
Contributor Author

I'll submit a PR to suggest deprecating it in 3.4 then. Thank you!

@nicolas-grekas nicolas-grekas modified the milestone: 4.0 May 20, 2017
protected $container;
protected $validators;
private $container;
private $validators;
Copy link
Member

Choose a reason for hiding this comment

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

do we have a notice somewhere about that in a 3.x version?

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 class is marked as @final since 3.3, which should trigger the notice. The upgrade files and changelogs also mention those properties will be removed.

@ogizanagi
Copy link
Contributor Author

See #22808 about the deprecation of ConstraintValidatorFactory::__construct() second argument.

@nicolas-grekas
Copy link
Member

rebase needed

@ogizanagi
Copy link
Contributor Author

Rebased.

* Removed core form types services registration when unnecessary
* Removed `framework.serializer.cache` option and `serializer.mapping.cache.apc`, `serializer.mapping.cache.doctrine.apc` services
* Removed `ConstraintValidatorFactory::$validators` and `ConstraintValidatorFactory::$container` protected properties
* Removed class parameters related to routing
Copy link
Member

Choose a reason for hiding this comment

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

any reference saying this is what we planned to do?

Copy link
Contributor Author

@ogizanagi ogizanagi May 21, 2017

Choose a reason for hiding this comment

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

Sure, it's mentioned in https://github.com/symfony/symfony/blob/master/UPGRADE-3.3.md#frameworkbundle:

Class parameters related to routing have been deprecated and will be removed in 4.0.

ref: #21824

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.

👍

@Tobion
Copy link
Contributor

Tobion commented May 22, 2017

👍

nicolas-grekas added a commit that referenced this pull request May 23, 2017
…or instances/aliases over using the service locator (ogizanagi)

This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle][Validator] Deprecate passing validator instances/aliases over using the service locator

| 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 | #22800 (comment) <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

df747ce [FrameworkBundle][Validator] Deprecate passing validator instances/aliases over using the service locator
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull request May 23, 2017
…or instances/aliases over using the service locator (ogizanagi)

This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle][Validator] Deprecate passing validator instances/aliases over using the service locator

| 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 | symfony/symfony#22800 (comment) <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

df747ce [FrameworkBundle][Validator] Deprecate passing validator instances/aliases over using the service locator
@nicolas-grekas
Copy link
Member

Thank you @ogizanagi.

@nicolas-grekas nicolas-grekas merged commit 531156e into symfony:master May 24, 2017
nicolas-grekas added a commit that referenced this pull request May 24, 2017
This PR was merged into the 4.0-dev branch.

Discussion
----------

[FrameworkBundle] Remove deprecated code

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | yes
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Remove deprecated code in the FrameworkBundle (except compiler passes and stuff already removed by #22749):

 * Removed `cache:clear` warmup part along with the `--no-optional-warmers` option.
 * Removed core form types services registration when unnecessary
 * Removed `framework.serializer.cache` option and `serializer.mapping.cache.apc`, `serializer.mapping.cache.doctrine.apc` services
 * Removed `ConstraintValidatorFactory::$validators` and `ConstraintValidatorFactory::$container` protected properties
 * Removed class parameters related to routing
 * Removed absolute template paths support in the template name parser

Commits
-------

531156e [FrameworkBundle] Remove deprecated code
@ogizanagi ogizanagi deleted the rm_deprec/fwb branch May 24, 2017 09:35
@fabpot fabpot mentioned this pull request Oct 19, 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.

5 participants