From 72fdbbec42d8ecd435c9cbab7c27e01714295ddf Mon Sep 17 00:00:00 2001 From: j3nsch Date: Wed, 23 Nov 2022 14:36:31 +0100 Subject: [PATCH 1/7] #13 Updates for PHP 8 Fix coding style, setup testing --- .github/workflows/php.yml | 22 +++++++++++++++++----- composer.json | 13 +++++++++---- src/Client.php | 6 +++++- src/ClientException.php | 2 +- 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 7a16248..6f02f54 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -12,18 +12,30 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 + + strategy: + matrix: + php-versions: ['7.1', '7.4', '8.1'] + + name: PHP ${{ matrix.php-versions }} Test steps: - uses: actions/checkout@v2 - - name: Setup PHP 7.1 + - name: Setup PHP ${{ matrix.php-versions }} uses: shivammathur/setup-php@v2 with: - php-version: '7.1' + php-version: ${{ matrix.php-versions }} + + - name: Check PHP Version + run: php -v - name: Install Composer and Dependencies run: curl -s http://getcomposer.org/installer | php && php composer.phar self-update && php composer.phar install - - name: Full Analysis with Coverage - run: php composer.phar check \ No newline at end of file + - name: Tests + run: php composer.phar test + + - name: Coding Standard Check + run: php composer.phar cs-check diff --git a/composer.json b/composer.json index 46ad6e9..89dd7ca 100644 --- a/composer.json +++ b/composer.json @@ -9,11 +9,11 @@ ], "homepage": "http://www.opus-repository.org", "require": { - "zendframework/zendframework1": "1.12.*" + "shardj/zf1-future": "1.21.*" }, "require-dev": { - "phpunit/phpunit": "6.*", - "laminas/laminas-coding-standard": "<2.3" + "phpunit/phpunit": "<9", + "opus4-repo/codesniffer": "dev-laminas" }, "autoload": { "psr-4": { @@ -34,5 +34,10 @@ "test-coverage": "phpunit --colors=always --coverage-clover build/clover.xml", "cs-check": "phpcs", "cs-fix": "phpcbf" + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } -} \ No newline at end of file +} diff --git a/src/Client.php b/src/Client.php index 87c0c2f..2296d0b 100644 --- a/src/Client.php +++ b/src/Client.php @@ -26,7 +26,7 @@ * along with OPUS; if not, write to the Free Software Foundation, Inc., 51 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @copyright Copyright (c) 2018-2022, OPUS 4 development team + * @copyright Copyright (c) 2018, OPUS 4 development team * @license http://www.gnu.org/licenses/gpl.html General Public License */ @@ -39,12 +39,16 @@ class Client { + /** @var string */ private $username; + /** @var string */ private $password; + /** @var string */ private $serviceUrl; + /** @var Zend_Log */ private $log; /** diff --git a/src/ClientException.php b/src/ClientException.php index 54a202e..24399a1 100644 --- a/src/ClientException.php +++ b/src/ClientException.php @@ -26,7 +26,7 @@ * along with OPUS; if not, write to the Free Software Foundation, Inc., 51 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @copyright Copyright (c) 2018-2022, OPUS 4 development team + * @copyright Copyright (c) 2018, OPUS 4 development team * @license http://www.gnu.org/licenses/gpl.html General Public License */ From 0426b6e322a2b932f42c260e2fa269e1613da505 Mon Sep 17 00:00:00 2001 From: j3nsch Date: Wed, 23 Nov 2022 14:36:57 +0100 Subject: [PATCH 2/7] #13 Configure coding style check --- phpcs.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpcs.xml b/phpcs.xml index 12eccb8..8e14b2a 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,6 +1,6 @@ - - + + src test \ No newline at end of file From dc2a62175196b17837d6a23eebceb2a9850b8707 Mon Sep 17 00:00:00 2001 From: j3nsch Date: Wed, 23 Nov 2022 14:45:44 +0100 Subject: [PATCH 3/7] #13 Ignore new PHPUnit file --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 68bbad2..ec044e9 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ build # Other **/.DS_Store +.phpunit.result.cache From 0db826b0a5473f4a60b84c49d71afdb28ee799e4 Mon Sep 17 00:00:00 2001 From: j3nsch Date: Wed, 23 Nov 2022 14:48:45 +0100 Subject: [PATCH 4/7] #13 Fix coding style --- test/ClientTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ClientTest.php b/test/ClientTest.php index 5f677c1..2e173e7 100644 --- a/test/ClientTest.php +++ b/test/ClientTest.php @@ -26,7 +26,7 @@ * along with OPUS; if not, write to the Free Software Foundation, Inc., 51 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @copyright Copyright (c) 2018-2022, OPUS 4 development team + * @copyright Copyright (c) 2018, OPUS 4 development team * @license http://www.gnu.org/licenses/gpl.html General Public License */ From af29e2ab5b4d59967ab835ec7cb5e7ec056654ec Mon Sep 17 00:00:00 2001 From: j3nsch Date: Fri, 3 Feb 2023 16:59:31 +0100 Subject: [PATCH 5/7] #13 Use zf1-future fork --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 89dd7ca..2b09044 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ ], "homepage": "http://www.opus-repository.org", "require": { - "shardj/zf1-future": "1.21.*" + "opus4/zf1-future": "1.21.*" }, "require-dev": { "phpunit/phpunit": "<9", From 8e3c04ed42a22948fc7c65a8d04a450b51770471 Mon Sep 17 00:00:00 2001 From: j3nsch Date: Fri, 3 Feb 2023 17:01:29 +0100 Subject: [PATCH 6/7] #13 Fix file ending --- phpcs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpcs.xml b/phpcs.xml index 8e14b2a..62cf58e 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -3,4 +3,4 @@ src test - \ No newline at end of file + From e6874bf431dc261577c2e2c95be484e3a6f9e068 Mon Sep 17 00:00:00 2001 From: j3nsch Date: Fri, 3 Feb 2023 17:02:40 +0100 Subject: [PATCH 7/7] #13 Allow dev packages --- composer.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/composer.json b/composer.json index 2b09044..ca66793 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,8 @@ "phpunit/phpunit": "<9", "opus4-repo/codesniffer": "dev-laminas" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Opus\\Doi\\": "src/"