optimize rector by using conlite autoloader
This commit is contained in:
parent
a96777d29c
commit
ccff65a4e9
2 changed files with 23 additions and 0 deletions
10
rector.php
10
rector.php
|
@ -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
13
rector_cl_autoload.php
Normal 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);
|
Loading…
Reference in a new issue