Skip to content
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

Remove unused RectorServiceConfigurator, use RectorConfig instead #3363

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

TomasVotruba
Copy link
Member

No description provided.

@TomasVotruba TomasVotruba changed the title remove unused RectorServiceConfigurator, use RectorConfig instead Remove unused RectorServiceConfigurator, use RectorConfig instead Feb 8, 2023
@TomasVotruba
Copy link
Member Author

@samsonasik Any ideas how to solve this? The RectorServiceConfigurator is no longer needed, but it still affects the rest of the code.

@samsonasik
Copy link
Member

The Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator probably need to be aliased into Rector\Config\RectorConfig

@samsonasik
Copy link
Member

@TomasVotruba it seems RectorServiceConfigurator return still in vendor under:

  • vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php

@samsonasik
Copy link
Member

@TomasVotruba it still in vendor:

https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/symfony-dependency-injection.patch

to be:

-    final public function set(?string $id, string $class = null): ServiceConfigurator
+    public function set(?string $id, string $class = null): \Rector\Core\DependencyInjection\Loader\Configurator\RectorServiceConfigurator
     {
         $defaults = $this->defaults;
         $definition = new Definition();
@@ -91,7 +91,7 @@
         $definition->setBindings(unserialize(serialize($defaults->getBindings())));
         $definition->setChanges([]);

-        $configurator = new ServiceConfigurator($this->container, $this->instanceof, true, $this, $definition, $id, $defaults->getTags(), $this->path);
+        $configurator = new \Rector\Core\DependencyInjection\Loader\Configurator\RectorServiceConfigurator($this->container, $this->instanceof, true, $this, $definition, $id, $defaults->getTags(), $this->path);

@TomasVotruba TomasVotruba force-pushed the tv-remove-rector-configurator branch from b60a2f4 to 462cfef Compare February 8, 2023 14:30
@TomasVotruba
Copy link
Member Author

@samsonasik Oh, I removed the wrong patch file :D thanks for checking. I think it's near now

@TomasVotruba
Copy link
Member Author

The packages needs the patch to be coming from main, so the merge is needed

@TomasVotruba TomasVotruba merged commit 638a0ad into main Feb 8, 2023
@TomasVotruba TomasVotruba deleted the tv-remove-rector-configurator branch February 8, 2023 14:50
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