mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-01 08:50:50 +00:00
add symfony php config option to allow loading route factory (#2339)
This commit is contained in:
parent
36fd8fa619
commit
fcadc67328
|
@ -178,6 +178,12 @@ final class RectorConfig extends ContainerConfigurator
|
|||
$parameters->set(Option::SYMFONY_CONTAINER_XML_PATH_PARAMETER, $filePath);
|
||||
}
|
||||
|
||||
public function symfonyContainerPhp(string $filePath): void
|
||||
{
|
||||
$parameters = $this->parameters();
|
||||
$parameters->set(Option::SYMFONY_CONTAINER_PHP_PATH_PARAMETER, $filePath);
|
||||
}
|
||||
|
||||
public function symfonyRoutesJson(string $filePath): void
|
||||
{
|
||||
$parameters = $this->parameters();
|
||||
|
|
|
@ -72,6 +72,12 @@ final class Option
|
|||
*/
|
||||
public const SYMFONY_CONTAINER_XML_PATH_PARAMETER = 'symfony_container_xml_path';
|
||||
|
||||
/**
|
||||
* @internal Use @see \Rector\Config\RectorConfig::symfonyContainerPhp()
|
||||
* @var string
|
||||
*/
|
||||
public const SYMFONY_CONTAINER_PHP_PATH_PARAMETER = 'symfony_container_php_path';
|
||||
|
||||
/**
|
||||
* @deprecated Use @see \Rector\Config\RectorConfig::symfonyRoutesJson() instead
|
||||
* @var string
|
||||
|
|
|
@ -21,4 +21,9 @@ final class RectorConfigProvider
|
|||
{
|
||||
return $this->parameterProvider->provideBoolParameter(Option::AUTO_IMPORT_NAMES);
|
||||
}
|
||||
|
||||
public function getSymfonyContainerPhp(): string
|
||||
{
|
||||
return $this->parameterProvider->provideStringParameter(Option::SYMFONY_CONTAINER_PHP_PATH_PARAMETER);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user