Issue #3427744 by longwave: Add void return to Drupal\Component\DependencyInjection\Container::reset()

merge-requests/7033/merge
Alex Pott 2024-03-14 10:03:48 +00:00
parent 6663e6489c
commit dafe1f367f
No known key found for this signature in database
GPG Key ID: BDA67E7EE836E5CE
2 changed files with 1 additions and 4 deletions

View File

@ -41,9 +41,6 @@
%Expecting E_WARNING and E_USER_WARNING is deprecated and will no longer be possible in PHPUnit 10%
%Expecting E_ERROR and E_USER_ERROR is deprecated and will no longer be possible in PHPUnit 10%
# Symfony 7.
%Method "Symfony\\Contracts\\Service\\ResetInterface::reset\(\)" might add "void" as a native return type declaration in the future. Do the same in implementation "Drupal\\Component\\DependencyInjection\\Container" now to avoid errors or add an explicit @return annotation to suppress this message.%
# Temporarily for testing Symfony 6.4.
%Since symfony/dependency-injection 6.4: "Symfony\\Component\\DependencyInjection\\ContainerAwareTrait" is deprecated, use dependency injection instead.%
%The ".*" class uses "Symfony\\Component\\DependencyInjection\\ContainerAwareTrait" that is deprecated since Symfony 6.4, use dependency injection instead.%

View File

@ -201,7 +201,7 @@ class Container implements ContainerInterface, ResetInterface {
* ref-counting. A subsequent call to ContainerInterface::get() will recreate
* a new instance of the shared service.
*/
public function reset() {
public function reset(): void {
$this->services = [];
}