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

[Console] Remove exec and replace it by shell_exec #50338

Merged
merged 1 commit into from
May 19, 2023

Conversation

maxbeckers
Copy link
Contributor

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #49646
License MIT
Doc PR n/a

It could happen an error like Error: Call to undefined function Symfony\Component\Console\shell_exec() in /{path_to_project}/vendor/symfony/console/Application.php:989 when exec is available but shell_exec not. There is very often used the check Terminal::hasSttyAvailable() in the symfony codebase and then shell_exec used.

More Details see in the issue #49646.

@nicolas-grekas
Copy link
Member

Can't we use exec everywhere instead?

@maxbeckers
Copy link
Contributor Author

I could try this ... give me a bit of time for that, could become a bigger PR :)

@maxbeckers maxbeckers changed the title [Console] Add shell_exec check to Terminal::hasSttyAvailable() [Console] Remove shell_exec from console component May 19, 2023
@maxbeckers maxbeckers changed the title [Console] Remove shell_exec from console component [Console] Remove exec and replace it by shell_exec May 19, 2023
@nicolas-grekas
Copy link
Member

Thank you @maxbeckers.

@nicolas-grekas nicolas-grekas merged commit 86119ca into symfony:5.4 May 19, 2023
10 of 11 checks passed
@fabpot fabpot mentioned this pull request May 22, 2023
This was referenced May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants