diff --git a/.travis.yml b/.travis.yml index 98e9e786e88..22756c1497b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ os: linux -dist: xenial +dist: bionic language: php php: @@ -45,12 +45,10 @@ jobs: name: "Deploy PHAR to https://github.com/rectorphp/rector-prefixed" php: 7.2 script: - - cd compiler - - composer install - - bin/compile + # reuse tmp/rector.phar from previous job - git clone https://${GITHUB_TOKEN}@github.com/rectorphp/rector-prefixed.git rector-prefixed > /dev/null 2>&1 - - cp ../tmp/rector.phar rector-prefixed/rector.phar - - cp ../tmp/rector.phar rector-prefixed/rector + - cp tmp/rector.phar rector-prefixed/rector.phar + - cp tmp/rector.phar rector-prefixed/rector - cd rector-prefixed - git config user.email "travis@travis-ci.org" - git config user.name "Travis CI" @@ -180,9 +178,6 @@ jobs: - name: Documentation - os: windows -matrix: - fast_finish: true - cache: directories: - $HOME/.composer/cache diff --git a/compiler/src/Console/CompileCommand.php b/compiler/src/Console/CompileCommand.php index 41b5e22ddd7..3f5273b1782 100644 --- a/compiler/src/Console/CompileCommand.php +++ b/compiler/src/Console/CompileCommand.php @@ -69,7 +69,12 @@ final class CompileCommand extends Command $composerJsonFile = $this->buildDir . '/composer.json'; $this->fixComposerJson($composerJsonFile); - $this->processFactory->create(['composer', 'update', '--no-dev', '--classmap-authoritative'], $this->buildDir); + // @see https://github.com/dotherightthing/wpdtrt-plugin-boilerplate/issues/52 + $this->processFactory->create( + ['composer', 'update', '--no-dev', '--prefer-dist', '--no-interaction', '--classmap-authoritative'], + $this->buildDir + ); + $this->processFactory->create(['php', 'box.phar', 'compile'], $this->dataDir); $this->restoreComposerJson($composerJsonFile); @@ -101,7 +106,7 @@ final class CompileCommand extends Command $json['repositories'][] = [ 'type' => 'vcs', - 'url' => 'https://github.com/phpstan/phpstan-src', + 'url' => 'https://github.com/phpstan/phpstan-src.git', ]; $encodedJson = Json::encode($json, Json::PRETTY); diff --git a/composer.json b/composer.json index d52fb9de1a2..484a20454f1 100644 --- a/composer.json +++ b/composer.json @@ -20,26 +20,26 @@ "nette/utils": "^3.0", "nikic/php-parser": "^4.3", "ondram/ci-detector": "^3.1", - "phpstan/phpdoc-parser": "0.4 as 0.3.5", - "phpstan/phpstan": "0.12 as 0.11.19", - "phpstan/phpstan-phpunit": "0.12 as 0.11.2", + "phpstan/phpdoc-parser": "^0.4", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", "sebastian/diff": "^3.0", "symfony/console": "^4.4|^5.0", "symfony/dependency-injection": "^4.4|^5.0", "symfony/finder": "^4.4|^5.0", "symfony/process": "^4.4|^5.0", - "symplify/package-builder": "^7.0", - "symplify/set-config-resolver": "^7.0" + "symplify/package-builder": "^7.1", + "symplify/set-config-resolver": "^7.1" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.16", "jetbrains/phpstorm-stubs": "^2019.2", "ocramius/package-versions": "^1.4|^1.5", "phpunit/phpunit": "^8.4", - "symplify/changelog-linker": "^7.0", - "symplify/easy-coding-standard": "^7.0", - "symplify/monorepo-builder": "^7.0", - "symplify/phpstan-extensions": "^7.0", + "symplify/changelog-linker": "^7.1", + "symplify/easy-coding-standard": "^7.1", + "symplify/monorepo-builder": "^7.1", + "symplify/phpstan-extensions": "^7.1", "thecodingmachine/phpstan-strict-rules": "^0.12", "tracy/tracy": "^2.7" }, diff --git a/phpstan.neon b/phpstan.neon index 546b7d9ee6d..622eddcf70d 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -2,7 +2,6 @@ includes: - 'utils/PHPStanExtensions/config/phpstan-extensions.neon' - 'vendor/symplify/phpstan-extensions/config/php.level.neon' - 'vendor/symplify/phpstan-extensions/config/symfony.level.neon' - - 'vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon' parameters: @@ -224,4 +223,4 @@ parameters: - '#Method Rector\\Compiler\\Contract\\Process\\ProcessInterface::getProcess\(\) return type has no value type specified in iterable type Symfony\\Component\\Process\\Process#' # phpstan compiler bug - - '#Parameter \#1 \$docComment of method PhpParser\\Builder\\Property::setDocComment\(\) expects _HumbugBox3be60b26ad9d\\PhpParser\\Comment\\Doc\|string, PhpParser\\Comment\\Doc given#' + - '#Parameter \#1 \$docComment of method PhpParser\\Builder\\Property::setDocComment\(\) expects _HumbugBox(.*?)\\PhpParser\\Comment\\Doc\|string, PhpParser\\Comment\\Doc given#' diff --git a/rector.yaml b/rector.yaml index 1631e8b03fe..c8fb3999d98 100644 --- a/rector.yaml +++ b/rector.yaml @@ -10,8 +10,8 @@ parameters: # autoload-buggy cases - "*.php.inc" - # so Rector code is still PHP 7.1 compatible - php_version_features: '7.1' + # so Rector code is still PHP 7.2 compatible + php_version_features: '7.2' # @see utils/RectorGenerator/config/config.yaml rector_recipe: diff --git a/src/Console/Application.php b/src/Console/Application.php index 7a6f18c53a1..7f64c249881 100644 --- a/src/Console/Application.php +++ b/src/Console/Application.php @@ -17,7 +17,6 @@ use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symplify\PackageBuilder\Console\Command\CommandNaming; use Symplify\SmartFileSystem\SmartFileInfo; @@ -44,14 +43,6 @@ final class Application extends SymfonyApplication $this->configuration = $configuration; } - /** - * @required - */ - public function setDispatcher(EventDispatcherInterface $eventDispatcher): void - { - parent::setDispatcher($eventDispatcher); - } - public function doRun(InputInterface $input, OutputInterface $output): int { // @fixes https://github.com/rectorphp/rector/issues/2205 diff --git a/utils/RectorGenerator/config/config.yaml b/utils/RectorGenerator/config/config.yaml index fb67f668d80..83cb5b6e608 100644 --- a/utils/RectorGenerator/config/config.yaml +++ b/utils/RectorGenerator/config/config.yaml @@ -11,7 +11,7 @@ services: - '../src/ValueObject/*' parameters: - rector_recipe: + rector_recipe: [] # # run "bin/rector create" to create a new Rector + tests from this config # package: "Celebrity" # name: "SplitToExplodeRector"