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

[command] allow to call symfony command from anywhere #367

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

connorhu
Copy link
Collaborator

@connorhu connorhu commented Apr 4, 2024

closes #204

What this cause?
a) cwd is set properly => nothing
b) cwd is not set properly => somewhere something cause error

But it's the caller's responsibility to make sure cwd is set properly.
The symfony command sets cwd anyway:

@connorhu connorhu force-pushed the fix/g204-call-command-anywhere branch from a9e68c0 to a48ed19 Compare April 4, 2024 12:43
@connorhu connorhu force-pushed the fix/g204-call-command-anywhere branch from a48ed19 to cfda1c8 Compare April 4, 2024 12:44
@connorhu connorhu requested a review from thePanz April 4, 2024 12:57
Copy link
Contributor

@alquerci alquerci left a comment

Choose a reason for hiding this comment

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

LGTM, but a BC break concern.

About checkProjectExists()

As a public method, we do not know the usage of this public method.
Changing its behaviour is a BC break.

Only removing its usage, will be enough.

I suggest keeping it untouched OR use config/ProjectConfiguration.class.php like

// project exists?
if (file_exists('config/ProjectConfiguration.class.php'))
{
require_once('config/ProjectConfiguration.class.php');

@connorhu
Copy link
Collaborator Author

connorhu commented Apr 5, 2024

This feature protects the developer during development from doing the inappropriate thing (e.g. calling cli.php in the wrong way). But on a complete system, this method is no longer relevant and as I wrote, the cwd is handled by the symfony script. There are already tools used during development which are not tested and do not work properly under certain circumstances (e.g. #341).

@connorhu connorhu changed the title [command] allow to can call symfony command from anywhere [command] allow to call symfony command from anywhere Apr 9, 2024
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.

symfony as symlink (callable from anywhere)
2 participants