feature #22884 [DI] Add missing deprecation on Extension::getClassesToCompile (nicolas-grekas)

This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Add missing deprecation on Extension::getClassesToCompile

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

Already dropped on master

Commits
-------

95fb929 [DI] Add missing deprecation on Extension::getClassesToCompile
This commit is contained in:
Nicolas Grekas 2017-05-24 12:51:20 +02:00
commit 879c9129b7
4 changed files with 9 additions and 3 deletions

View File

@ -266,7 +266,7 @@ HttpKernel
* Deprecated the `Kernel::getRootDir()` method. Use the new `Kernel::getProjectDir()`
method instead.
* The `Extension::addClassesToCompile()` method has been deprecated and will be removed in 4.0.
* The `Extension::addClassesToCompile()` and `Extension::getClassesToCompile()` methods have been deprecated and will be removed in 4.0.
* The `Psr6CacheClearer::addPool()` method has been deprecated. Pass an array
of pools indexed by name to the constructor instead.

View File

@ -376,7 +376,7 @@ HttpKernel
* Removed the `Kernel::getRootDir()` method. Use the `Kernel::getProjectDir()`
method instead.
* The `Extension::addClassesToCompile()` method has been removed.
* The `Extension::addClassesToCompile()` and `Extension::getClassesToCompile()` methods have been removed.
* Possibility to pass non-scalar values as URI attributes to the ESI and SSI
renderers has been removed. The inline fragment renderer should be used with

View File

@ -10,7 +10,7 @@ CHANGELOG
* deprecated the special `SYMFONY__` environment variables
* added the possibility to change the query string parameter used by `UriSigner`
* deprecated `LazyLoadingFragmentHandler::addRendererService()`
* deprecated `Extension::addClassesToCompile()`
* deprecated `Extension::addClassesToCompile()` and `Extension::getClassesToCompile()`
* deprecated `Psr6CacheClearer::addPool()`
3.2.0

View File

@ -27,9 +27,15 @@ abstract class Extension extends BaseExtension
* Gets the classes to cache.
*
* @return array An array of classes
*
* @deprecated since version 3.3, to be removed in 4.0.
*/
public function getClassesToCompile()
{
if (PHP_VERSION_ID >= 70000) {
@trigger_error(__METHOD__.'() is deprecated since version 3.3, to be removed in 4.0.', E_USER_DEPRECATED);
}
return $this->classes;
}