-
-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Core] Fix bootstrap stubs load on PHP 7.2 when vendor/ excluded via …
…skip() (#2394) * [Core] Fix bootstrap stubs load on PHP 7.2 when vendor/ excluded via skip() * [ci-review] Rector Rectify * final touch: call ->getRealPath() to ensure got real path value * really final touch: PHPStan * [ci-review] Rector Rectify * Add e2e test for rector/rector under php 7.2 * final touch: remove unneeded comment * really final touch: eol Co-authored-by: GitHub Action <action@github.com>
- Loading branch information
1 parent
cd405e6
commit 5640d51
Showing
5 changed files
with
80 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: End to End tests on PHP 7.2 | ||
|
||
on: | ||
pull_request: null | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
end_to_end_on_php72: | ||
runs-on: ubuntu-latest | ||
|
||
name: End to end test - PHP 7.2 with load ReflectionUnionType stub | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "7.2" | ||
coverage: none | ||
|
||
# wait for deploy to packagist | ||
- run: sleep 70 | ||
|
||
- | ||
run: composer install --ansi | ||
working-directory: e2e/reflection-union-php72 | ||
|
||
- | ||
run: vendor/bin/rector process --ansi | ||
working-directory: e2e/reflection-union-php72 |
11 changes: 11 additions & 0 deletions
11
build/target-repository/e2e/reflection-union-php72/composer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"autoload": { | ||
"psr-4": { | ||
"App\\": "src/" | ||
} | ||
}, | ||
"require": { | ||
"php": "7.2.*", | ||
"rector/rector": "dev-main" | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
build/target-repository/e2e/reflection-union-php72/rector.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Rector\Config\RectorConfig; | ||
|
||
return static function (RectorConfig $rectorConfig): void { | ||
$rectorConfig->paths([ | ||
__DIR__ . '/src' | ||
]); | ||
|
||
$rectorConfig->skip([ | ||
__DIR__ . '/vendor', | ||
]); | ||
}; |
14 changes: 14 additions & 0 deletions
14
build/target-repository/e2e/reflection-union-php72/src/foo.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
class Foo { | ||
|
||
/** | ||
* @param \DateTime|\DateTimeImmutable $date | ||
* @return string | ||
*/ | ||
public function bar($date) { | ||
return $date->format('C'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters