Skip to content

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

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

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 force-pushed the patch_shell_exec_49646 branch from f653612 to 141cb0b Compare May 19, 2023 06:28
@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 force-pushed the patch_shell_exec_49646 branch from 141cb0b to ae6c457 Compare May 19, 2023 06:32
@maxbeckers maxbeckers force-pushed the patch_shell_exec_49646 branch from ae6c457 to 1805f29 Compare May 19, 2023 08:19
@maxbeckers maxbeckers changed the title [Console] Remove shell_exec from console component [Console] Remove exec and replace it by shell_exec May 19, 2023
@maxbeckers maxbeckers force-pushed the patch_shell_exec_49646 branch from 1805f29 to e178853 Compare May 19, 2023 08:22
@maxbeckers maxbeckers force-pushed the patch_shell_exec_49646 branch from e178853 to c32e4e1 Compare May 19, 2023 08:35
@maxbeckers maxbeckers closed this May 19, 2023
@maxbeckers maxbeckers force-pushed the patch_shell_exec_49646 branch from c32e4e1 to 6166fc4 Compare May 19, 2023 08:37
@maxbeckers maxbeckers reopened this May 19, 2023
@maxbeckers maxbeckers force-pushed the patch_shell_exec_49646 branch from 18352ae to bf1ae1a Compare May 19, 2023 09:41
@nicolas-grekas
Copy link
Member

Thank you @maxbeckers.

@nicolas-grekas nicolas-grekas merged commit 86119ca into symfony:5.4 May 19, 2023
@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.

4 participants