From afd04c9ede84cd980b016f824262881ff66fc0f2 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 12 Jun 2024 10:28:33 -0700 Subject: [PATCH 1/2] Update test env. Signed-off-by: Matt Friedman --- .github/workflows/tests.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 98bf5c1..4379c66 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,7 +21,7 @@ on: jobs: # START Basic Checks Job (EPV, code sniffer, images check, etc.) basic-checks: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: include: @@ -33,14 +33,14 @@ jobs: steps: - name: Checkout phpBB - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: phpbb/phpbb ref: ${{ env.PHPBB_BRANCH }} path: phpBB3 - name: Checkout extension - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: phpBB3/phpBB/ext/${{ env.EXTNAME }} @@ -89,7 +89,7 @@ jobs: # START MySQL and MariaDB Job mysql-tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: include: @@ -156,14 +156,14 @@ jobs: steps: - name: Checkout phpBB - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: phpbb/phpbb ref: ${{ env.PHPBB_BRANCH }} path: phpBB3 - name: Checkout extension - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: phpBB3/phpBB/ext/${{ env.EXTNAME }} @@ -240,7 +240,7 @@ jobs: # START PostgreSQL Job postgres-tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: include: @@ -301,14 +301,14 @@ jobs: steps: - name: Checkout phpBB - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: phpbb/phpbb ref: ${{ env.PHPBB_BRANCH }} path: phpBB3 - name: Checkout extension - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: phpBB3/phpBB/ext/${{ env.EXTNAME }} @@ -354,7 +354,7 @@ jobs: # START Other Tests Job (SQLite 3 and mssql) other-tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: include: @@ -396,14 +396,14 @@ jobs: steps: - name: Checkout phpBB - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: phpbb/phpbb ref: ${{ env.PHPBB_BRANCH }} path: phpBB3 - name: Checkout extension - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: phpBB3/phpBB/ext/${{ env.EXTNAME }} From dd73251013033aa3989eb41497ef1de8feb18cea Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 12 Jun 2024 10:28:50 -0700 Subject: [PATCH 2/2] Update version constraints Signed-off-by: Matt Friedman --- composer.json | 4 ++-- ext.php | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index d37eee9..844b99e 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "type": "phpbb-extension", "description": "An extension which allows you to add static pages to your phpBB forum", "homepage": "https://www.phpbb.com/customise/db/extension/pages/", - "version": "3.0.0", + "version": "3.0.1-dev", "keywords": ["phpbb", "extension", "static", "pages"], "license": "GPL-2.0-only", "authors": [ @@ -58,7 +58,7 @@ "extra": { "display-name": "Pages", "soft-require": { - "phpbb/phpbb": ">=3.3.2" + "phpbb/phpbb": ">=3.3.2,<4.0.0@dev" }, "version-check": { "host": "www.phpbb.com", diff --git a/ext.php b/ext.php index f133572..dfb7544 100644 --- a/ext.php +++ b/ext.php @@ -26,12 +26,14 @@ class ext extends \phpbb\extension\base * the minimum version required by this extension: * * Requires phpBB 3.3.2 due to using role_exists check in permission migration. + * Not compatible with phpBB 4.0.0-dev due to using updated classes. * * @return bool * @access public */ public function is_enableable() { - return phpbb_version_compare(PHPBB_VERSION, '3.3.2', '>='); + return phpbb_version_compare(PHPBB_VERSION, '3.3.2', '>=') + && phpbb_version_compare(PHPBB_VERSION, '4.0.0-dev', '<'); } }