optimize rector by using conlite autoloader

This commit is contained in:
o.pinke 2023-07-19 18:43:26 +02:00
parent a96777d29c
commit ccff65a4e9
2 changed files with 23 additions and 0 deletions

View file

@ -6,6 +6,16 @@ use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
return static function (RectorConfig $rectorConfig): void {
/*
$rectorConfig->autoloadPaths([
__DIR__ . '/conlite',
__DIR__ . '/conlib',
__DIR__ . '/setup',
]);
*/
$rectorConfig->bootstrapFiles([
__DIR__ . '/rector_cl_autoload.php',
]);
$rectorConfig->parallel();
$rectorConfig->paths([
__DIR__.'/conlite',

13
rector_cl_autoload.php Normal file
View file

@ -0,0 +1,13 @@
<?php
if (!defined("CON_FRAMEWORK")) {
define("CON_FRAMEWORK", true);
}
include_once('conlite/classes/class.autoload.php');
$cfg = [
'path' => [
'config' => dirname(__FILE__) . '/data/config/production/',
'contenido' => dirname(__FILE__) . '/conlite/',
],
];
cAutoload::initialize($cfg);