Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc0e880e

Browse files
[DI] Add missing deprecation in ContainerBuilder::addCompilerPass
1 parent31d5fff commitc0e880e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎src/Symfony/Component/DependencyInjection/ContainerBuilder.php‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,13 @@ public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig:
316316
if (func_num_args() >=3) {
317317
$priority =func_get_arg(2);
318318
}else {
319+
if (__CLASS__ !==get_class($this)) {
320+
$r =new \ReflectionMethod($this,__FUNCTION__);
321+
if (__CLASS__ !==$r->getDeclaringClass()->getName()) {
322+
@trigger_error(sprintf('Method %s() will have a third `$priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.',get_class($this),__FUNCTION__),E_USER_DEPRECATED);
323+
}
324+
}
325+
319326
$priority =0;
320327
}
321328

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp