Rector is breaking symfony service definitions that use `factory()`
Bug Report
| Subject | Details |
|---|---|
| Rector version | 1.2.10 |
Rector is changing symfony service factory calls and breaking them.
Uncaught Error: Symfony\Component\DependencyInjection\Loader\Configurator\ServiceConfigurator::factory(): Argument #1 ($factory) must be of type Symfony\Component\DependencyInjection\Loader\Configurator\ReferenceConfigurator|Symfony\Component\ExpressionLanguage\Expression|array|string, Closure give
Minimal PHP Code Causing Issue
->set(EventPublisher::class, GuzzleEventPublisher::class)
->factory([
Guzzle::class,
'eventPublisher',
]);
I didn't post a link to the demo because this requires Symfony. It's also straight forward enough that I'm assuming a reproducer isn't needed.
Expected Behaviour
Skip it
Thank you for your report!
We'll need an isolated failing demo link from: http://getrector.com/demo, that way we can reproduce the bug.
I am closing it as lack of feedback and don't have simple repository to reproduce, feel free to re-open the issue with provide simple reproducible repo so we can check if the issue persist. Thank you.