Skip to content

Commit

Permalink
Fix the CI (box-project#424)
Browse files Browse the repository at this point in the history
- Pick a random prefix for the requirement checker when on Travis and for a build outside the repo in order to avoid failures due to API rate limits
- Pin the BetterReflection dependency which is otherwise conflicting
- Fix the PHPUnitBridge deprecation
  • Loading branch information
theofidry authored Jun 4, 2019
1 parent b3bbca5 commit c1a51ad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@
"ext-phar": "*",
"amphp/parallel-functions": "^0.1.3",
"beberlei/assert": "^3.2",
"roave/better-reflection": "~3.5.0",
"composer/semver": "^1.5",
"composer/xdebug-handler": "^1.3.2",
"hoa/compiler": "^3.17",
"humbug/php-scoper": "^0.11",
"humbug/php-scoper": "~0.11",
"justinrainbow/json-schema": "^5.2",
"nikic/iter": "^1.6",
"nikic/php-parser": "^4.2",
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<php>
<env name="BOX_ALLOW_XDEBUG" value="1"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak_vendors" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0" />

<!-- The width is matching the Travis one to avoid any issues with the CI -->
<env name="COLUMNS" value="80" />
Expand Down
6 changes: 6 additions & 0 deletions requirement-checker/scoper.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@

function get_prefix(): string
{
if (false !== getenv('TRAVIS') && false === getenv('GITHUB_TOKEN')) {
// Ignore this PR to avoid too many builds to fail untimely or locally due to API rate limits because the last
// release version could not be retrieved.
return 'HumbugBoxTemporaryPrefix';
}

$gitHubToken = getenv('GITHUB_TOKEN');

$headerOption = false === $gitHubToken || '' === $gitHubToken
Expand Down

0 comments on commit c1a51ad

Please sign in to comment.