File tree Expand file tree Collapse file tree
src/Application/FileProcessor Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : End to End tests
2+
3+ on :
4+ pull_request : null
5+ push :
6+ branches :
7+ - main
8+
9+ jobs :
10+ end_to_end :
11+ runs-on : ubuntu-latest
12+ strategy :
13+ fail-fast : false
14+ matrix :
15+ php : ['7.4', '8.0']
16+
17+ name : PHP ${{ matrix.php }} system tests
18+ steps :
19+ - uses : actions/checkout@v2
20+
21+ - uses : shivammathur/setup-php@v2
22+ with :
23+ php-version : ${{ matrix.php }}
24+ coverage : none # disable xdebug, pcov
25+
26+ # This workflow runs system tests: Use the Rector application from the source
27+ # checkout to process "fixture" projects in tests/system-tests
28+ # to see if those can be processed successfully
29+
30+ - name : Generate Composer autoloaders in fixture directories
31+ run : |
32+ for FIXTURE in `find e2e -mindepth 1 -maxdepth 1 -type d`; do
33+ (cd $FIXTURE; composer install --no-progress --ansi)
34+ done
35+
36+ - name : Run system tests
37+ run : |
38+ HAS_FAILURES=0
39+
40+ for FIXTURE in `find e2e -mindepth 1 -maxdepth 1 -type d`; do
41+ echo "-----> Running $FIXTURE <-----"
42+ if (cd $FIXTURE; ../../bin/rector process --dry-run --clear-cache); then
43+ echo "-----> Result: OK <-----"
44+ else
45+ echo "-----> Result: FAILED <-----"
46+ HAS_FAILURES=1
47+ fi
48+ done
49+
50+ exit $HAS_FAILURES
Original file line number Diff line number Diff line change 1+ {
2+ "autoload" : {
3+ "psr-4" : {
4+ "Symfony\\ Component\\ Console\\ Output\\ " : " src"
5+ }
6+ }
7+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ use Rector \Core \Configuration \Option ;
6+ use Rector \Set \ValueObject \SetList ;
7+ use Symfony \Component \DependencyInjection \Loader \Configurator \ContainerConfigurator ;
8+
9+ return static function (ContainerConfigurator $ containerConfigurator ): void {
10+ $ parameters = $ containerConfigurator ->parameters ();
11+ $ parameters ->set (Option::PATHS , [__DIR__ .'/src ' ]);
12+
13+ $ containerConfigurator ->import (SetList::PHP_53 );
14+ };
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+
6+ final class OutputInterface
7+ {
8+
9+ }
Original file line number Diff line number Diff line change 1+ {
2+ "autoload" : {
3+ "psr-4" : {
4+ "Foo\\ " : " src"
5+ }
6+ }
7+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ use Rector \Core \Configuration \Option ;
6+ use Rector \Set \ValueObject \SetList ;
7+ use Symfony \Component \DependencyInjection \Loader \Configurator \ContainerConfigurator ;
8+
9+ return static function (ContainerConfigurator $ containerConfigurator ): void {
10+ $ parameters = $ containerConfigurator ->parameters ();
11+ $ parameters ->set (Option::PATHS , [__DIR__ .'/src ' ]);
12+
13+ $ containerConfigurator ->import (SetList::PHP_53 );
14+ };
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Foo ;
4+
5+ class Foo
6+ {
7+ public function __construct ()
8+ {
9+ $ bar = 'baz ' ;
10+ print $ bar {2 };
11+ }
12+ }
Original file line number Diff line number Diff line change 1+ {
2+ "autoload" : {
3+ "psr-4" : {
4+ "Foo\\ " : " src"
5+ }
6+ }
7+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ use Rector \Core \Configuration \Option ;
6+ use Rector \Set \ValueObject \SetList ;
7+ use Symfony \Component \DependencyInjection \Loader \Configurator \ContainerConfigurator ;
8+
9+ return static function (ContainerConfigurator $ containerConfigurator ): void {
10+ $ parameters = $ containerConfigurator ->parameters ();
11+ $ parameters ->set (Option::PATHS , [__DIR__ .'/src ' ]);
12+
13+ $ containerConfigurator ->import (SetList::PHP_53 );
14+ };
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Foo ;
4+
5+ class Foo
6+ {
7+ public function __construct (
8+ public string $ property = 'value ' ,
9+ ) {}
10+ }
You can’t perform that action at this time.
0 commit comments