Skip to content

Commit

Permalink
add symfony php config loader patch
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Apr 7, 2022
1 parent 5941c36 commit 830a869
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions patches/symfony-php-config-loader.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--- /dev/null
+++ ../Loader/PhpFileLoader.php
@@ -11,6 +11,7 @@

namespace Symfony\Component\DependencyInjection\Loader;

+use Rector\Config\RectorConfig;
use Symfony\Component\Config\Builder\ConfigBuilderGenerator;
use Symfony\Component\Config\Builder\ConfigBuilderGeneratorInterface;
use Symfony\Component\Config\Builder\ConfigBuilderInterface;
@@ -64,7 +65,7 @@
$callback = $load($path, $this->env);

if (\is_object($callback) && \is_callable($callback)) {
- $this->executeCallback($callback, new ContainerConfigurator($this->container, $this, $this->instanceof, $path, $resource, $this->env), $path);
+ $this->executeCallback($callback, new RectorConfig($this->container, $this, $this->instanceof, $path, $resource, $this->env), $path);
}
} finally {
$this->instanceof = [];
@@ -121,6 +122,9 @@
}
$type = $reflectionType->getName();
switch ($type) {
+ case RectorConfig::class:
+ $arguments[] = $containerConfigurator;
+ break;
case ContainerConfigurator::class:
$arguments[] = $containerConfigurator;
break;

1 comment on commit 830a869

@TomasVotruba
Copy link
Member Author

Choose a reason for hiding this comment

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

Please sign in to comment.