mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-03-06 04:44:19 +01:00
Add Symfony container support for Rector configuration
- Introduced `tests/symfony-container.php` for bootstrapping Symfony. - Updated `rector.php` with new container PHP path and kernel modifications. - Registered Symfony routes provider service in Rector.
This commit is contained in:
@@ -3,6 +3,8 @@
|
|||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Rector\Config\RectorConfig;
|
use Rector\Config\RectorConfig;
|
||||||
|
use Rector\Symfony\Bridge\Symfony\Routing\SymfonyRoutesProvider;
|
||||||
|
use Rector\Symfony\Contract\Bridge\Symfony\Routing\SymfonyRoutesProviderInterface;
|
||||||
|
|
||||||
return RectorConfig::configure()
|
return RectorConfig::configure()
|
||||||
->withPaths([
|
->withPaths([
|
||||||
@@ -11,7 +13,9 @@ return RectorConfig::configure()
|
|||||||
__DIR__.'/src',
|
__DIR__.'/src',
|
||||||
__DIR__.'/tests',
|
__DIR__.'/tests',
|
||||||
])
|
])
|
||||||
->withSymfonyContainerXml('var/cache/dev/App_KernelDevDebugContainer.xml')
|
->withSymfonyContainerXml(__DIR__.'/var/cache/dev/Tvdt_KernelDevDebugContainer.xml')
|
||||||
|
->withSymfonyContainerPhp(__DIR__.'/tests/symfony-container.php')
|
||||||
|
->registerService(SymfonyRoutesProvider::class, SymfonyRoutesProviderInterface::class)
|
||||||
->withParallel()
|
->withParallel()
|
||||||
->withPhpSets()
|
->withPhpSets()
|
||||||
->withPreparedSets(
|
->withPreparedSets(
|
||||||
|
|||||||
11
tests/symfony-container.php
Normal file
11
tests/symfony-container.php
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
use Tvdt\Kernel;
|
||||||
|
|
||||||
|
require __DIR__.'/bootstrap.php';
|
||||||
|
|
||||||
|
$appKernel = new Kernel('test', false);
|
||||||
|
$appKernel->boot();
|
||||||
|
|
||||||
|
return $appKernel->getContainer();
|
||||||
Reference in New Issue
Block a user