-
Notifications
You must be signed in to change notification settings - Fork 379
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
[Post-Processors] Add timeout option, refactor processors, add tests for all, add/remove/deprecate options #993
Conversation
ad4ea62
to
5af8636
Compare
Very happy to see this as it's been sitting at the top of my ImagineBundle "todo" list for a loooooong time... 🙇 |
7b89554
to
b75a3c6
Compare
@antoligy Glad to hear you're onboard with the goals of this PR! 👍 I finally got around to updating the code here to support PHP 5.3 (I always forget I can't rely on things like closures being bound to their current object scope, or short array syntax, etc). Anyway, tests now pass and Coveralls shows this PR increases code coverage See: https://coveralls.io/jobs/29359232 A brief, initial review with any thoughts, comments, or concerns would be welcome from anyone with the time to do so. |
- refactor post-processors for easier testing and to implement in a more sane manner - add complete post-processor tests - enhance post-processor docs - deprecate all post-processor setter methods - deprecate/add/change some post-processor options - enable passing configuration to process builder on a per-post-processor basis - fix stdin tests and static method calls in closures - fix short array syntax to long array syntax for php 5.3 support - drop hhvm
b75a3c6
to
638a321
Compare
maybe this should go into 2.0 instead now? also note that ProcessBuild is dropped in Symfony 4 |
I think that's an excellent idea; this also relates to the issues we were having with accepting #931. This is old now and was only 90% done at the time, but I'll take some time to go through everything and clean it up shortly. |
@robfrawley is this PR still relevant ? |
@maximgubar Yes; I have a local copy that targets |
This can be close because of with #1219 |
finished in #1219, thanks @robfrawley and @franmomu ! |
This is a large pull request, and it is still a WIP, so I'm not going to go through everything just yet, but for the time being, here is an initial list of changes introduced:
timeout
,prefix
,env
, andoptions
on theProcessBuilder
per-post-processor config entry.ConfigurablePostProcessorInterface
and it'sprocessWithConfiguration()
method. Moving forward, usage ofPostProcessorInterface::process()
without a second parameter (containing an array of options) will throw a deprecation message advising that in2.0
the second parameter is required. We shouldn't need two interfaces for post processors: this should allow us to migrate to one for2.0
.AbstractPostProcessor
that all our core-post-processors inherit from.process()
. These setters provided no value whatsoever and simply expose an additional public method of our API that we cannot change without a major version release. (We should find more instances of useless methods that we can deprecate for removal or change of visibility toprotected/private
in2.0
).2.0
).0%
to100%
.There are other changes, but those are the broad strokes that should help open an initial discussion.