mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-01 17:00:51 +00:00
[Scoped] Add e2e define constant error on php 7.x (#1139)
* [Scoped] Add e2e define constant * [ci-review] Rector Rectify * define src path * define src path * eol Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
parent
e64cf0569d
commit
444cbd20d7
|
@ -18,6 +18,7 @@ jobs:
|
|||
php_version: ['7.1', '7.2', '7.3', '7.4', '8.0']
|
||||
directory:
|
||||
- 'e2e/attributes'
|
||||
- 'e2e/define-constant'
|
||||
- 'e2e/dont-execute-code'
|
||||
- 'e2e/finalize'
|
||||
- 'e2e/parse-php7-code'
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"autoload": {
|
||||
}
|
||||
}
|
11
build/target-repository/e2e/define-constant/rector.php
Normal file
11
build/target-repository/e2e/define-constant/rector.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
$parameters->set(Option::PATHS, [__DIR__ . '/src']);
|
||||
};
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
if (! defined('APPPATH')) {
|
||||
define('APPPATH', realpath(rtrim($paths->appDirectory, '\\/ ')) . DIRECTORY_SEPARATOR);
|
||||
}
|
Loading…
Reference in New Issue
Block a user