diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 8edb0ee..81179d8 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -28,8 +28,14 @@ jobs: - name: Validate composer.json and composer.lock run: composer validate --strict + - name: Lint (syntax check only) + if: matrix.php-versions == '7.1' || matrix.php-versions == '7.2' + run: find src tests -name '*.php' -print0 | xargs -0 -n1 php -l + - name: Install Dependencies + if: matrix.php-versions != '7.1' && matrix.php-versions != '7.2' run: composer install --no-interaction --prefer-dist --optimize-autoloader - name: Tests + if: matrix.php-versions != '7.1' && matrix.php-versions != '7.2' run: ./vendor/bin/phpunit ./tests diff --git a/README.md b/README.md index 44ffeba..ec1acec 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,15 @@ Laravel and PHP developers! Contributions are very welcome! There isn't a formal guide, but throw in an Issue or PR, and we'll go from there. +### Running the tests + +```bash +composer install +./vendor/bin/phpunit ./tests +``` + +PHP 7.1 and 7.2 are still supported at runtime, but PHPUnit's current dev-dependency chain no longer installs on them. CI syntax-checks the source on those versions via `php -l` instead of running the test suite — enough to catch any code that wouldn't parse on PHP 7.1/7.2. The full test suite runs on PHP 7.3 and later. + ## Security Vulnerabilities Please report any security vulnerabilities via the [GitHub project](https://github.com/valorin/random) diff --git a/composer.json b/composer.json index bfaa9fd..177e168 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ }, "require-dev": { "illuminate/support": "^5.0 || ^10.0 || ^11.0 || ^12.0", - "phpunit/phpunit": "^7.0 || ^9.6 || ^10.5" + "phpunit/phpunit": "^7.5 || ^9.6 || ^10.5" }, "autoload": { "psr-4": {