rector/compiler/config/config.php
Tomas Votruba 26e9163a10
[phpstan] add rule to prevent array with string keys (#4012)
* [phpstan] Add ForbiddenArrayWithStringKeysRule

* [compiler] use SmartFileSystem
2020-08-23 13:39:26 +00:00

33 lines
939 B
PHP

<?php
declare(strict_types=1);
use OndraM\CiDetector\CiDetector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\SmartFileSystem\SmartFileSystem;
return static function (ContainerConfigurator $containerConfigurator): void {
$parameters = $containerConfigurator->parameters();
$parameters->set('dataDir', __DIR__ . '/../build');
$parameters->set('buildDir', __DIR__ . '/../..');
$services = $containerConfigurator->services();
$services->defaults()
->public()
->autowire();
$services->load('Rector\Compiler\\', __DIR__ . '/../src')
->exclude([
__DIR__ . '/../src/Exception/*',
__DIR__ . '/../src/DependencyInjection/*',
__DIR__ . '/../src/HttpKernel/*',
__DIR__ . '/../src/PhpScoper/*',
]);
$services->set(SmartFileSystem::class);
$services->set(CiDetector::class);
};