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

Replace kernel.root_dir with kernel.project_dir #522

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

franmomu
Copy link
Contributor

@franmomu franmomu commented Feb 24, 2020

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License Apache2

Description

kernel.root_dir was deprecated in Symfony 4.2 and is removed in 5.0. This PR tries to replace kernel.root_dir by kernel.project_dir wherever is possible and do not use kernel.root_dir if is not defined. I also changed the docs to reference the translations folder at the root directory of the project (which is the recommended place).

After this one (and #523), I think the only left to do to be able to use SF5 are commands, I'll take a look then.

@@ -78,7 +86,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$files = $this->retrieveFiles($dirs);

foreach ($files as $file) {
$path = str_replace($basePath, '%kernel.root_dir%', $file);
$path = str_replace($basePath, '%kernel.project_dir%', $file);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess this wasn't working before because it was replacing $basePath which contained '%kernel.root_dir%/..' with '%kernel.root_dir%'

@goetas
Copy link
Collaborator

goetas commented Mar 3, 2020

can you please rebase this?

@goetas goetas merged commit 2f7fb19 into schmittjoh:master Mar 3, 2020
@goetas
Copy link
Collaborator

goetas commented Mar 3, 2020

thanks!

@franmomu franmomu deleted the use_project_dir branch March 3, 2020 21:04
@greg0ire
Copy link
Contributor

@goetas can you please tag a new release with this?

@goetas
Copy link
Collaborator

goetas commented Mar 15, 2020

Will prepare it in the next days.

@franmomu is there something that you have still planned to do? What do you think about?

@franmomu
Copy link
Contributor Author

Will prepare it in the next days.

@franmomu is there something that you have still planned to do? What do you think about?

I don't have anything more planned to do, I think it's ready to tag a new release.

@goetas
Copy link
Collaborator

goetas commented Mar 15, 2020

Ok, then I have it on my todo list.
Will have to go throughout the changes and see if a feature release is safe enough.

(I hope so),... The last feature release was years ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants