-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Conversation
@@ -24,13 +24,13 @@ class EnvironmentTest extends TestCase | |||
/** | |||
* @var string | |||
*/ | |||
public $rootDir; | |||
public $projectDir; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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).
…1892) Description ----------- See #1891 (review) Commits ------- 4fb8986 Make the $projectDir property of the EnvironmentTest class private
… #1892) Description ----------- See contao/contao#1891 (review) Commits ------- 4fb89860 Make the $projectDir property of the EnvironmentTest class private
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
The
Kernel::getRootDir()
method andkernel.root_dir
parameter are deprecated since Symfony 4.2 and have been removed in Symfony 5. The only place Contao still uses the actualrootDir
was in theContaoModuleBundle
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