From fece87bca86f1c4e21d5231cb93876db85695a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Pa=C5=82asz?= Date: Fri, 4 Nov 2022 11:54:19 +0100 Subject: [PATCH 1/3] Add GHA workflow --- .github/workflows/test.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..0b2638e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,34 @@ +name: Run tests and analytics +on: + pull_request: + branches: + - 'master' + - 'develop' + - 'v*.*.*' + +jobs: + test: + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + php_version: [7.0, 7.1, 7.2] + coverage: [none, pcov] + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Setup PHP with composer. + uses: shivammathur/setup-php@2.22.0 + with: + php-version: ${{matrix.php_version}} + tools: composer:v2 + coverage: ${{matrix.coverage}} # XDebug disabled + - name: Install composer dependencies + run: | + cp phpunit.xml.dist phpunit.xml + composer install + composer require --dev phpstan/phpstan + - name: Run tests and analytics + run: | + vendor/phpunit/phpunit/phpunit -c phpunit.xml tests/ + vendor/bin/phpstan analyse -l 7 lib/ \ No newline at end of file From f6e581f20d93a80f2aaba91f8a2100fb65767338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20K=C5=82oda?= Date: Mon, 12 Dec 2022 11:43:59 +0100 Subject: [PATCH 2/3] Composer prefer-lowest and lower phpstan level --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0b2638e..29efda2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,8 +27,9 @@ jobs: run: | cp phpunit.xml.dist phpunit.xml composer install + composer update --prefer-lowest composer require --dev phpstan/phpstan - name: Run tests and analytics run: | vendor/phpunit/phpunit/phpunit -c phpunit.xml tests/ - vendor/bin/phpstan analyse -l 7 lib/ \ No newline at end of file + vendor/bin/phpstan analyse -l 1 lib/ \ No newline at end of file From e4571c4900872e53669a5d164d3fa8f8ce5dde9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20K=C5=82oda?= Date: Mon, 12 Dec 2022 11:48:34 +0100 Subject: [PATCH 3/3] Allow Symfony 5 as dependency for symfony/property-access --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8047bcb..4d88f08 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "symfony/property-access": "^3.0|^4.0" + "symfony/property-access": "^3.0|^4.0|^5.0" }, "require-dev": { "doctrine/orm": "^2.4,>=2.4.5",