Skip to content

Use ProcessUtils::escapeArgument() instead of escapeshellarg() #446

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
Dec 11, 2018
Merged

Use ProcessUtils::escapeArgument() instead of escapeshellarg() #446

merged 1 commit into from
Dec 11, 2018

Conversation

nicolas-grekas
Copy link
Member

No description provided.

@nicolas-grekas nicolas-grekas merged commit c4e6c02 into symfony:master Dec 11, 2018
nicolas-grekas added a commit that referenced this pull request Dec 11, 2018
…() (nicolas-grekas)

This PR was merged into the 1.1-dev branch.

Discussion
----------

Use ProcessUtils::escapeArgument() instead of escapeshellarg()

Commits
-------

c4e6c02 Use ProcessUtils::escapeArgument() instead of escapeshellarg()
@@ -15,7 +15,8 @@
},
"require-dev": {
"composer/composer": "^1.0.2",
"symfony/phpunit-bridge": "^3.4.19|^4.1.8"
"symfony/phpunit-bridge": "^3.4.19|^4.1.8",
"symfony/process": "^2.8"
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't it be a non-dev requirement ? Otherwise, the method might be undefined at runtime.

Copy link
Member Author

Choose a reason for hiding this comment

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

It cannot be a non-dev requirement because that would prevent using flex with symfony >=3 apps.
But flex always runs in a composer context where process 2.8 is always available.

Copy link
Member

@stof stof Dec 11, 2018

Choose a reason for hiding this comment

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

but that would break in case Composer updates that (composer itself is already compatible with different versions of symfony/process in case you don't force it to install deps for PHP 5.3)

Copy link
Member Author

Choose a reason for hiding this comment

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

The composer.json of Composer has config.platform.php set to 5.3.9, so that only process 2.8 is ever installed. Its "require" is misleading.

Copy link
Member

Choose a reason for hiding this comment

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

the composer.lock and the platform config only impact the root project (so the composer phar). I know of other projects bringing in composer as a dependency. And then, newer versions can be used.

Copy link
Member

Choose a reason for hiding this comment

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

btw, composer also has its own version of escapeArgument precisely because it could not stop using it easily, while they wanted to add support for newer Symfony versions

Copy link
Member Author

Choose a reason for hiding this comment

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

I missed that one, fixed in #447

@nicolas-grekas nicolas-grekas deleted the escapeshellarg branch December 11, 2018 12:05
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