Skip to content

Commit c98d967

Browse files
[DI] turn $private to protected in dumped container, to make cache:clear BC
1 parent 9857419 commit c98d967

25 files changed

+126
-26
lines changed

src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,11 @@ class $class extends $baseClass
874874
{
875875
private \$parameters;
876876
private \$targetDirs = array();
877-
private \$privates = array();
877+
878+
/*{$this->docStar}
879+
* @internal but protected for BC on cache:clear
880+
*/
881+
protected \$privates = array();
878882
879883
public function __construct()
880884
{
@@ -1058,7 +1062,7 @@ private function addAliases(): string
10581062
return $code." );\n";
10591063
}
10601064

1061-
private function addInlineRequires() :string
1065+
private function addInlineRequires(): string
10621066
{
10631067
if (!$this->hotPathTag || !$this->inlineRequires) {
10641068
return '';

src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ class Container extends \Symfony\Component\DependencyInjection\Dump\AbstractCont
2020
{
2121
private $parameters;
2222
private $targetDirs = array();
23-
private $privates = array();
23+
24+
/**
25+
* @internal but protected for BC on cache:clear
26+
*/
27+
protected $privates = array();
2428

2529
public function __construct()
2630
{

src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ class ProjectServiceContainer extends Container
1818
{
1919
private $parameters;
2020
private $targetDirs = array();
21-
private $privates = array();
21+
22+
/**
23+
* @internal but protected for BC on cache:clear
24+
*/
25+
protected $privates = array();
2226

2327
public function __construct()
2428
{

src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ class ProjectServiceContainer extends Container
1818
{
1919
private $parameters;
2020
private $targetDirs = array();
21-
private $privates = array();
21+
22+
/**
23+
* @internal but protected for BC on cache:clear
24+
*/
25+
protected $privates = array();
2226

2327
public function __construct()
2428
{

src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ class ProjectServiceContainer extends Container
1818
{
1919
private $parameters;
2020
private $targetDirs = array();
21-
private $privates = array();
21+
22+
/**
23+
* @internal but protected for BC on cache:clear
24+
*/
25+
protected $privates = array();
2226

2327
public function __construct()
2428
{

src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ class ProjectServiceContainer extends Container
1818
{
1919
private $parameters;
2020
private $targetDirs = array();
21-
private $privates = array();
21+
22+
/**
23+
* @internal but protected for BC on cache:clear
24+
*/
25+
protected $privates = array();
2226

2327
public function __construct()
2428
{

src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ class ProjectServiceContainer extends Container
1818
{
1919
private $parameters;
2020
private $targetDirs = array();
21-
private $privates = array();
21+
22+
/**
23+
* @internal but protected for BC on cache:clear
24+
*/
25+
protected $privates = array();
2226

2327
public function __construct()
2428
{

src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ class ProjectServiceContainer extends Container
1818
{
1919
private $parameters;
2020
private $targetDirs = array();
21-
private $privates = array();
21+
22+
/**
23+
* @internal but protected for BC on cache:clear
24+
*/
25+
protected $privates = array();
2226

2327
public function __construct()
2428
{

src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ class Symfony_DI_PhpDumper_Test_EnvParameters extends Container
1818
{
1919
private $parameters;
2020
private $targetDirs = array();
21-
private $privates = array();
21+
22+
/**
23+
* @internal but protected for BC on cache:clear
24+
*/
25+
protected $privates = array();
2226

2327
public function __construct()
2428
{

src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services33.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ class ProjectServiceContainer extends Container
1818
{
1919
private $parameters;
2020
private $targetDirs = array();
21-
private $privates = array();
21+
22+
/**
23+
* @internal but protected for BC on cache:clear
24+
*/
25+
protected $privates = array();
2226

2327
public function __construct()
2428
{

0 commit comments

Comments
 (0)