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

fix: use project_dir if available (Symfony 3+) #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alanpoulain
Copy link

@alanpoulain alanpoulain commented Apr 14, 2022

kernel.root_dir is deprecated since Symfony 4 and removed since Symfony 5.

kernel.project_dir has been introduced in Symfony 3.

See also https://symfony.com/blog/new-in-symfony-3-3-a-simpler-way-to-get-the-project-root-directory.

In this PR, I tried to be compatible with Symfony 2 and Symfony 3+ by using a phobetor_rabbitmq_supervisor.project_dir parameter set in the extension.

The phobetor_rabbitmq_supervisor.project_dir will correspond to the path where the composer.json file is, in all the cases.

The defaults paths for the supervisor configuration will then be at the same place as the composer.json file.
If you prefer to have the defaults paths in the var folder by default, please tell me.

For information:
With Symfony 2 (not flex), kernel.root_dir is used and corresponds to the app directory.
With Symfony 3+ (not flex), kernel.root_dir is also used and corresponds to the app directory.
With Symfony 3+ (flex), kernel.root_dir is used and corresponds to the src directory.
With Symfony 6 (flex), kernel.project_dir is used and corresponds to the directory where the composer.json file is.

@Kitton
Copy link

Kitton commented Oct 23, 2023

@Phobetor any chance for this PR to get merged and released? Also, #69 is related

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.

2 participants