Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HttpKernel] remove AddAnnotatedClassesToCachePass and related methods #60853

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
Jun 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions UPGRADE-8.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ HttpClient
* Remove support for amphp/http-client < 5
* Remove setLogger() methods on decorators; configure the logger on the wrapped client directly instead

HttpKernel
----------

* Remove `AddAnnotatedClassesToCachePass`
* Remove `Extension::getAnnotatedClassesToCompile()` and `Extension::addAnnotatedClassesToCompile()`
* Remove `Kernel::getAnnotatedClassesToCompile()` and `Kernel::setAnnotatedClassCache()`

Ldap
----

Expand Down
7 changes: 7 additions & 0 deletions src/Symfony/Component/HttpKernel/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
CHANGELOG
=========

8.0
---

* Remove `AddAnnotatedClassesToCachePass`
* Remove `Extension::getAnnotatedClassesToCompile()` and `Extension::addAnnotatedClassesToCompile()`
* Remove `Kernel::getAnnotatedClassesToCompile()` and `Kernel::setAnnotatedClassCache()`

7.3
---

Expand Down

This file was deleted.

29 changes: 0 additions & 29 deletions src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,4 @@
*/
abstract class Extension extends BaseExtension
{
private array $annotatedClasses = [];

/**
* Gets the annotated classes to cache.
*
* @return string[]
*
* @deprecated since Symfony 7.1, to be removed in 8.0
*/
public function getAnnotatedClassesToCompile(): array
{
trigger_deprecation('symfony/http-kernel', '7.1', 'The "%s()" method is deprecated since Symfony 7.1 and will be removed in 8.0.', __METHOD__);

return $this->annotatedClasses;
}

/**
* Adds annotated classes to the class cache.
*
* @param string[] $annotatedClasses An array of class patterns
*
* @deprecated since Symfony 7.1, to be removed in 8.0
*/
public function addAnnotatedClassesToCompile(array $annotatedClasses): void
{
trigger_deprecation('symfony/http-kernel', '7.1', 'The "%s()" method is deprecated since Symfony 7.1 and will be removed in 8.0.', __METHOD__);

$this->annotatedClasses = array_merge($this->annotatedClasses, $annotatedClasses);
}
}
26 changes: 0 additions & 26 deletions src/Symfony/Component/HttpKernel/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,18 +275,6 @@ public function getContainer(): ContainerInterface
return $this->container;
}

/**
* @internal
*
* @deprecated since Symfony 7.1, to be removed in 8.0
*/
public function setAnnotatedClassCache(array $annotatedClasses): void
{
trigger_deprecation('symfony/http-kernel', '7.1', 'The "%s()" method is deprecated since Symfony 7.1 and will be removed in 8.0.', __METHOD__);

file_put_contents(($this->warmupDir ?: $this->getBuildDir()).'/annotations.map', \sprintf('<?php return %s;', var_export($annotatedClasses, true)));
}

public function getStartTime(): float
{
return $this->debug && null !== $this->startTime ? $this->startTime : -\INF;
Expand All @@ -313,20 +301,6 @@ public function getCharset(): string
return 'UTF-8';
}

/**
* Gets the patterns defining the classes to parse and cache for annotations.
*
* @return string[]
*
* @deprecated since Symfony 7.1, to be removed in 8.0
*/
public function getAnnotatedClassesToCompile(): array
{
trigger_deprecation('symfony/http-kernel', '7.1', 'The "%s()" method is deprecated since Symfony 7.1 and will be removed in 8.0.', __METHOD__);

return [];
}

/**
* Initializes bundles.
*
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion src/Symfony/Component/HttpKernel/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"require": {
"php": ">=8.4",
"psr/log": "^1|^2|^3",
"symfony/deprecation-contracts": "^2.5|^3",
"symfony/error-handler": "^7.4|^8.0",
"symfony/event-dispatcher": "^7.4|^8.0",
"symfony/http-foundation": "^7.4|^8.0",
Expand Down
Loading