Skip to content

Commit

Permalink
travis: re-use phar from previous job
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Dec 9, 2019
1 parent 51e00e4 commit ac00919
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
13 changes: 4 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
os: linux
dist: xenial
dist: bionic
language: php

php:
Expand Down Expand Up @@ -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 "[email protected]"
- git config user.name "Travis CI"
Expand Down Expand Up @@ -180,9 +178,6 @@ jobs:
- name: Documentation
- os: windows

matrix:
fast_finish: true

cache:
directories:
- $HOME/.composer/cache
Expand Down
9 changes: 7 additions & 2 deletions compiler/src/Console/CompileCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$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);
Expand Down Expand Up @@ -101,7 +106,7 @@ private function fixComposerJson(string $composerJsonFile): void

$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);
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -223,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#'

0 comments on commit ac00919

Please sign in to comment.