Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename all occurrences of rootDir to projectDir #1891

Merged
merged 1 commit into from
Jul 2, 2020

Conversation

aschempp
Copy link
Member

@aschempp aschempp commented Jul 1, 2020

The Kernel::getRootDir() method and kernel.root_dir parameter are deprecated since Symfony 4.2 and have been removed in Symfony 5. The only place Contao still uses the actual rootDir was in the ContaoModuleBundle class, which has been fixed here to allow either version. I have also renamed all uses of $rootDir to be consistent across the code base.

Road to Symfony 5: #1889

@aschempp aschempp added the bug label Jul 1, 2020
@aschempp aschempp added this to the 4.9 milestone Jul 1, 2020
@aschempp aschempp requested a review from a team July 1, 2020 19:00
@aschempp aschempp self-assigned this Jul 1, 2020
@@ -24,13 +24,13 @@ class EnvironmentTest extends TestCase
/**
* @var string
*/
public $rootDir;
public $projectDir;
Copy link
Member Author

Choose a reason for hiding this comment

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

not sure it's a problem this is a public property?

Copy link
Member

Choose a reason for hiding this comment

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

Since it is a unit test class, it should not be a problem. Not sure why the property is public at all?

Copy link
Member

Choose a reason for hiding this comment

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

While we are on it, let's also fix the visibility (see #1892).

@leofeyer leofeyer merged commit bfc1408 into contao:4.9 Jul 2, 2020
leofeyer added a commit that referenced this pull request Jul 2, 2020
…1892)

Description
-----------

See #1891 (review)

Commits
-------

4fb8986 Make the $projectDir property of the EnvironmentTest class private
leofeyer added a commit to contao/core-bundle that referenced this pull request Jul 2, 2020
… #1892)

Description
-----------

See contao/contao#1891 (review)

Commits
-------

4fb89860 Make the $projectDir property of the EnvironmentTest class private
@aschempp aschempp deleted the bugfix/root-dir branch July 2, 2020 13:17
leofeyer pushed a commit to contao/manager-plugin that referenced this pull request Jul 8, 2020
Description
-----------

~~This requires contao/contao#1891 before the build passes. I assume contao/contao#1891 will be merged into Contao 4.9.4, therefore the conflict rule in `composer.json`.~~

**Road to Symfony 5:** contao/contao#1889

Commits
-------

fa5b6fd Add compatibility with Symfony 5
114ad3b Pass the kernel.root_dir if available
8cbb1d9 Fix tests and CS
a572701 Remove the composer conflict
9709cfb Fix the coding style
6abab3a Fix the unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants