Skip to content

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Dec 2, 2017

Q A
Branch? 4.0
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

Turning this property to protected changes nothing to its visibility in practice as the class is final anyway,
but when migrating to SF4.0 from 3.4, the cache:clear command chokes with "Compile Error: Access level to srcDevDebugProjectContainer::$privates must be protected".

Let's make it protected to remove this WTF.

private \$parameters;
private \$targetDirs = array();
private \$privates = array();
protected \$privates = array();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small comment should be added to explain why this specific one is not private.

@nicolas-grekas nicolas-grekas changed the title [DI] turn $private to protected in dumped container, to make cache:cl… [DI] turn $private to protected in dumped container, to make cache:clear BC Dec 3, 2017
@nicolas-grekas
Copy link
Member Author

Comment added.

Status: needs review

@nicolas-grekas nicolas-grekas changed the base branch from master to 4.0 December 3, 2017 13:22
@fabpot
Copy link
Member

fabpot commented Dec 4, 2017

Thank you @nicolas-grekas.

@fabpot fabpot merged commit c98d967 into symfony:4.0 Dec 4, 2017
fabpot added a commit that referenced this pull request Dec 4, 2017
…ke cache:clear BC (nicolas-grekas)

This PR was merged into the 4.0 branch.

Discussion
----------

[DI] turn $private to protected in dumped container, to make cache:clear BC

| Q             | A
| ------------- | ---
| Branch?       | 4.0
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Turning this property to protected changes nothing to its visibility in practice as the class is final anyway,
but when migrating to SF4.0 from 3.4, the `cache:clear` command chokes with "Compile Error: Access level to srcDevDebugProjectContainer::$privates must be protected".

Let's make it protected to remove this WTF.

Commits
-------

c98d967 [DI] turn $private to protected in dumped container, to make cache:clear BC
@fabpot fabpot mentioned this pull request Dec 5, 2017
@nicolas-grekas nicolas-grekas deleted the di-protected-privates branch December 5, 2017 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants