From 4dbfce13a1dcfcc34b58951ba3b5dcbbe1353526 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Mon, 13 Dec 2021 21:21:22 +0100 Subject: [PATCH] add test case on build Rector for https://github.com/rectorphp/rector/issues/6799 --- .../.github/workflows/e2e_php74.yaml | 33 +++++++++++++++++++ .../parse-match-class-on-php74/composer.json | 11 +++++++ .../e2e/parse-match-class-on-php74/rector.php | 14 ++++++++ .../src/QueryMatching.php | 15 +++++++++ 4 files changed, 73 insertions(+) create mode 100644 build/target-repository/.github/workflows/e2e_php74.yaml create mode 100644 build/target-repository/e2e/parse-match-class-on-php74/composer.json create mode 100644 build/target-repository/e2e/parse-match-class-on-php74/rector.php create mode 100644 build/target-repository/e2e/parse-match-class-on-php74/src/QueryMatching.php diff --git a/build/target-repository/.github/workflows/e2e_php74.yaml b/build/target-repository/.github/workflows/e2e_php74.yaml new file mode 100644 index 00000000000..db2a864114f --- /dev/null +++ b/build/target-repository/.github/workflows/e2e_php74.yaml @@ -0,0 +1,33 @@ +# This workflow runs system tests: Use the Rector application from the source +# checkout to process "fixture" projects in tests/system-tests +# to see if those can be processed successfully +name: End to End tests on PHP 7.4 + +on: + pull_request: null + push: + branches: + - main + +jobs: + end_to_end_on_php74: + runs-on: ubuntu-latest + + name: End to end test - PHP 7.4 and Match class name + + steps: + - uses: actions/checkout@v2 + + - uses: shivammathur/setup-php@v2 + with: + php-version: "7.4" + coverage: none + + - + run: composer install --ansi + working-directory: e2e/parse-match-class-on-php74 + + - + run: ../../bin/rector process --dry-run --ansi + working-directory: e2e/parse-match-class-on-php74 + diff --git a/build/target-repository/e2e/parse-match-class-on-php74/composer.json b/build/target-repository/e2e/parse-match-class-on-php74/composer.json new file mode 100644 index 00000000000..53e22d406b0 --- /dev/null +++ b/build/target-repository/e2e/parse-match-class-on-php74/composer.json @@ -0,0 +1,11 @@ +{ + "require": { + "php": "7.4.*", + "ruflin/elastica": "6.1.5" + }, + "autoload": { + "psr-4": { + "Foo\\": "src" + } + } +} diff --git a/build/target-repository/e2e/parse-match-class-on-php74/rector.php b/build/target-repository/e2e/parse-match-class-on-php74/rector.php new file mode 100644 index 00000000000..68b98378604 --- /dev/null +++ b/build/target-repository/e2e/parse-match-class-on-php74/rector.php @@ -0,0 +1,14 @@ +parameters(); + $parameters->set(Option::PATHS, [__DIR__.'/src']); + + $containerConfigurator->import(SetList::DEAD_CODE); +}; diff --git a/build/target-repository/e2e/parse-match-class-on-php74/src/QueryMatching.php b/build/target-repository/e2e/parse-match-class-on-php74/src/QueryMatching.php new file mode 100644 index 00000000000..3d1172260dd --- /dev/null +++ b/build/target-repository/e2e/parse-match-class-on-php74/src/QueryMatching.php @@ -0,0 +1,15 @@ +