data
4 years ago
lib
4 years ago
.coveralls.github-actions.yml
4 years ago
.php_cs.dist
4 years ago
LICENSE
6 years ago
Makefile
4 years ago
VERSION
4 years ago
build.php
4 years ago
init.php
4 years ago
phpdoc.dist.xml
4 years ago
phpstan-baseline.neon
4 years ago
phpstan.neon.dist
4 years ago
update_certs.php
4 years ago
build.php
26 lines
| 1 | #!/usr/bin/env php |
| 2 | <?php |
| 3 | \chdir(__DIR__); |
| 4 | |
| 5 | $autoload = (int) $argv[1]; |
| 6 | $returnStatus = null; |
| 7 | |
| 8 | if (!$autoload) { |
| 9 | // Modify composer to not autoload Stripe |
| 10 | $composer = \json_decode(\file_get_contents('composer.json'), true); |
| 11 | unset($composer['autoload'], $composer['autoload-dev']); |
| 12 | |
| 13 | \file_put_contents('composer.json', \json_encode($composer, \JSON_PRETTY_PRINT)); |
| 14 | } |
| 15 | |
| 16 | \passthru('composer update', $returnStatus); |
| 17 | if (0 !== $returnStatus) { |
| 18 | exit(1); |
| 19 | } |
| 20 | |
| 21 | $config = $autoload ? 'phpunit.xml' : 'phpunit.no_autoload.xml'; |
| 22 | \passthru("./vendor/bin/phpunit -c {$config}", $returnStatus); |
| 23 | if (0 !== $returnStatus) { |
| 24 | exit(1); |
| 25 | } |
| 26 |