Skip to content

Commit

Permalink
[Scoped] Add e2e define constant error on php 7.x (#1139)
Browse files Browse the repository at this point in the history
* [Scoped] Add e2e define constant

* [ci-review] Rector Rectify

* define src path

* define src path

* eol

Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
samsonasik and actions-user authored Nov 4, 2021
1 parent e64cf05 commit 444cbd2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/target-repository/.github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 4 additions & 0 deletions build/target-repository/e2e/define-constant/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"autoload": {
}
}
11 changes: 11 additions & 0 deletions build/target-repository/e2e/define-constant/rector.php
Original file line number Diff line number Diff line change
@@ -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']);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

if (! defined('APPPATH')) {
define('APPPATH', realpath(rtrim($paths->appDirectory, '\\/ ')) . DIRECTORY_SEPARATOR);
}

0 comments on commit 444cbd2

Please sign in to comment.