File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ class Definition
29
29
private $ factoryService ;
30
30
private $ shared = true ;
31
31
private $ deprecated = false ;
32
- private $ deprecationTemplate = ' The "%service_id%" service is deprecated. You should stop using it, as it will soon be removed. ' ;
32
+ private $ deprecationTemplate ;
33
33
private $ scope = ContainerInterface::SCOPE_CONTAINER ;
34
34
private $ properties = array ();
35
35
private $ calls = array ();
@@ -44,6 +44,8 @@ class Definition
44
44
private $ autowired = false ;
45
45
private $ autowiringTypes = array ();
46
46
47
+ private static $ defaultDeprecationTemplate = 'The "%service_id%" service is deprecated. You should stop using it, as it will soon be removed. ' ;
48
+
47
49
protected $ arguments ;
48
50
49
51
/**
@@ -796,7 +798,7 @@ public function isDeprecated()
796
798
*/
797
799
public function getDeprecationMessage ($ id )
798
800
{
799
- return str_replace ('%service_id% ' , $ id , $ this ->deprecationTemplate );
801
+ return str_replace ('%service_id% ' , $ id , $ this ->deprecationTemplate ?: self :: $ defaultDeprecationTemplate );
800
802
}
801
803
802
804
/**
You can’t perform that action at this time.
0 commit comments