mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-19 01:22:22 +00:00
add test case on build Rector for https://github.com/rectorphp/rector/issues/6799
This commit is contained in:
parent
4214801263
commit
4dbfce13a1
33
build/target-repository/.github/workflows/e2e_php74.yaml
vendored
Normal file
33
build/target-repository/.github/workflows/e2e_php74.yaml
vendored
Normal file
|
@ -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
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"require": {
|
||||||
|
"php": "7.4.*",
|
||||||
|
"ruflin/elastica": "6.1.5"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Foo\\": "src"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Rector\Core\Configuration\Option;
|
||||||
|
use Rector\Set\ValueObject\SetList;
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||||
|
$parameters = $containerConfigurator->parameters();
|
||||||
|
$parameters->set(Option::PATHS, [__DIR__.'/src']);
|
||||||
|
|
||||||
|
$containerConfigurator->import(SetList::DEAD_CODE);
|
||||||
|
};
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Foo;
|
||||||
|
|
||||||
|
use Elastica\Query\MatchQuery;
|
||||||
|
|
||||||
|
final class QueryMatching
|
||||||
|
{
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$matchQuery = new MatchQuery();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user