From bb654786a0c362454215bc95ac9a36296cf07056 Mon Sep 17 00:00:00 2001 From: Tom Boothman Date: Sat, 7 Jan 2023 21:33:20 +0000 Subject: [PATCH 1/7] Test against all versions of php --- .github/workflows/test.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3e5039a5..bd4a3dbb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: Testing on: push: - branches: [ master ] + branches: [ master, php-versions ] pull_request: branches: [ master ] schedule: @@ -13,13 +13,17 @@ jobs: runs-on: ubuntu-latest + strategy: + matrix: + php-version: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2] + steps: - uses: actions/checkout@v1 - - name: Setup PHP 7.4 with PECL extension + - name: Setup PHP ${{ matrix.php-version }} with PECL extension uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: ${{ matrix.php-version }} extensions: curl, dom, json tools: composer From e83e5d8f617f1f8d20e56a4d5991cffbfdffd677 Mon Sep 17 00:00:00 2001 From: Tom Boothman Date: Sat, 7 Jan 2023 21:42:41 +0000 Subject: [PATCH 2/7] Do less on old phps --- .github/workflows/test.yml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bd4a3dbb..64845cb1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,13 +9,43 @@ on: - cron: '11 20 * * *' jobs: + old-compat: + + runs-on: ubuntu-latest + + strategy: + matrix: + php-version: [5.6, 7.0, 7.1, 7.2, 7.3] + + steps: + - uses: actions/checkout@v1 + + - name: Setup PHP ${{ matrix.php-version }} with PECL extension + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: curl, dom, json + tools: composer, phpunit + + - name: Runs on php ${{ matrix.php-version }}? + run: php bootstrap.php + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest --no-dev + + - name: Test + run: composer test + build: runs-on: ubuntu-latest strategy: matrix: - php-version: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2] + php-version: [7.4, 8.0, 8.1, 8.2] steps: - uses: actions/checkout@v1 From 7e166ce9f38511089e380c770b25b32d17f25384 Mon Sep 17 00:00:00 2001 From: Tom Boothman Date: Sat, 7 Jan 2023 21:46:28 +0000 Subject: [PATCH 3/7] Some not backwards compatible code --- src/Imdb/Title.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Imdb/Title.php b/src/Imdb/Title.php index a681207e..2972fcb6 100755 --- a/src/Imdb/Title.php +++ b/src/Imdb/Title.php @@ -23,7 +23,7 @@ */ class Title extends MdbBase { - const MOVIE = 'Movie'; + public const MOVIE = 'Movie'; const TV_SERIES = 'TV Series'; const TV_EPISODE = 'TV Episode'; const TV_MINI_SERIES = 'TV Mini Series'; From f7419e601377e441c3323719c507eff95abbd85c Mon Sep 17 00:00:00 2001 From: Tom Boothman Date: Sat, 7 Jan 2023 21:46:39 +0000 Subject: [PATCH 4/7] Remove phpunit for old versions --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 64845cb1..b7eed5d4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,8 +36,8 @@ jobs: - name: Install dependencies run: composer install --prefer-dist --no-progress --no-suggest --no-dev - - name: Test - run: composer test +# - name: Test +# run: composer test build: From 0f20bce003d3bf0bdbd435afcc698b14392fcbfb Mon Sep 17 00:00:00 2001 From: Tom Boothman Date: Sat, 7 Jan 2023 22:09:58 +0000 Subject: [PATCH 5/7] Remove incompat code. Remove 8.2 --- .github/workflows/test.yml | 4 ++-- src/Imdb/Title.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b7eed5d4..429299c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ on: - cron: '11 20 * * *' jobs: - old-compat: + compatibility-check: runs-on: ubuntu-latest @@ -45,7 +45,7 @@ jobs: strategy: matrix: - php-version: [7.4, 8.0, 8.1, 8.2] + php-version: [7.4, 8.0, 8.1] steps: - uses: actions/checkout@v1 diff --git a/src/Imdb/Title.php b/src/Imdb/Title.php index 2972fcb6..a681207e 100755 --- a/src/Imdb/Title.php +++ b/src/Imdb/Title.php @@ -23,7 +23,7 @@ */ class Title extends MdbBase { - public const MOVIE = 'Movie'; + const MOVIE = 'Movie'; const TV_SERIES = 'TV Series'; const TV_EPISODE = 'TV Episode'; const TV_MINI_SERIES = 'TV Mini Series'; From b2259fbd0b5adb5b606241eb066db9f155c4a8c3 Mon Sep 17 00:00:00 2001 From: Tom Boothman Date: Sat, 7 Jan 2023 22:34:49 +0000 Subject: [PATCH 6/7] try phpunit --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 429299c6..cb987762 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ on: - cron: '11 20 * * *' jobs: - compatibility-check: + syntax-check: runs-on: ubuntu-latest @@ -36,8 +36,8 @@ jobs: - name: Install dependencies run: composer install --prefer-dist --no-progress --no-suggest --no-dev -# - name: Test -# run: composer test + - name: Test + run: composer test build: From 2a9fac54d67800cbdf25ade5eefd8cbbd43e13eb Mon Sep 17 00:00:00 2001 From: Tom Boothman Date: Sat, 7 Jan 2023 22:53:24 +0000 Subject: [PATCH 7/7] Tidy --- .github/workflows/test.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cb987762..cb59170b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: Testing on: push: - branches: [ master, php-versions ] + branches: [ master ] pull_request: branches: [ master ] schedule: @@ -25,20 +25,11 @@ jobs: with: php-version: ${{ matrix.php-version }} extensions: curl, dom, json - tools: composer, phpunit + tools: composer - name: Runs on php ${{ matrix.php-version }}? run: php bootstrap.php - - name: Validate composer.json and composer.lock - run: composer validate - - - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-suggest --no-dev - - - name: Test - run: composer test - build: runs-on: ubuntu-latest