-
Notifications
You must be signed in to change notification settings - Fork 92
symfony backward compatibility support #69
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
Conversation
05f6c1b to
de9c418
Compare
|
I didn't give up on it. Fallen into "works on my machine" syndrome. Trying with docker image, no luck so far :-/. Maybe any hints how to reproduce it locally? As I said it works on my Mac. Trying docker image with ubuntu |
|
By using - $this->process = ProcessBuilder::create(\array_merge([$scripts->getMockService()], $this->getArguments()))
+ $this->process = ProcessBuilder::create(\array_merge(['exec', $scripts->getMockService()], $this->getArguments())) |
|
Thanks, will give it a try! I've checked command line from master branch and from my branch and it all look the same. Aso somehow |
|
So I've found now a root cause: symfony/symfony#21474
Thus said it complicates backwards compatibility :-/ |
ff5a6da to
4b38cfe
Compare
Another step towards symfony 2.x support. `php-cs-fixer` has dependencies on symfony 3.x . By using phar instead dependencies are not being leaked to the overall library. This PR includes [tm/tooly-composer-script](https://github.com/tommy-muehle/tooly-composer-script) which actually just installs the same phar in the end of the composer command. PS It looks like `composer fix` haven't been run for a while, but I leave it up to maintainers to define/revisit CS rules and CI pipeline for it
Limit upper bound to latest known dev version of symfony which is known so far - 4.1. It doesn't mean that newer versions won't be supported, but just to keep yourself [on the safe side](https://getcomposer.org/doc/faqs/why-are-unbound-version-constraints-a-bad-idea.md)
|
I've isolated symfony 2.x hack and compatibility in What do you think about current approach? |
|
Re: AppVeyor Chocolatey is down: https://chocolatey.org/packages/php
|
| namespace PhpPact\Standalone\Runner; | ||
|
|
||
| use Symfony\Component\Process\Process; | ||
| use Symfony\Component\Process\ProcessBuilder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought ProcessBuilder was removed in later version of Symphony. Double checking here ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is removed since 4.0. But using namespace doesn't trigger any error.
Another problem is that despite >=2.8 <4.1 version constraint for symfony/process composer still takes 3.3. And composer why doesn't explain why. Same in master branch but probably there are still php-cs-fixer dependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mente,
I can see this returning an error or warning in a later version of PHP. What about using fully qualified names instead of use a namespace?
| } | ||
| } | ||
| if ($useProcess) { | ||
| $process = new Process(\array_merge([$command], $arguments)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$process = new \Symfony\Component\Process(\array_merge([$command], $arguments));
$pb = new \Symfony\Component\Process\ProcessBuilder(\array_merge([$command], $arguments));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i understand the reason behind ProcessBuilder FQCN, but why Process?
PR updated!
So it was this piece of And |
|
I think you got it! |
|
Woohoo, thanks! Now back to upgrading our apps from symfony 2.x to somewhere more relevant :D |
Depends on #68
In the end it was about replacing
ProcesswithProcessBuilder. Other than that works smoothly.WIP until #68 is merged and I have settled out proper travis setup for symfony 2.x/3.x/4.x components