Skip to content

Commit

Permalink
Merge pull request #359 from iMattPro/updates
Browse files Browse the repository at this point in the history
Update version constraints
  • Loading branch information
iMattPro authored Jun 12, 2024
2 parents ea76521 + 2f768c2 commit b4053c5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}

Expand Down Expand Up @@ -240,7 +240,7 @@ jobs:

# START PostgreSQL Job
postgres-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
include:
Expand Down Expand Up @@ -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 }}

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "phpbb-extension",
"description": "An extension which allows you to create a set of rules for your phpBB forum",
"homepage": "https://www.phpbb.com/customise/db/extension/boardrules/",
"version": "3.0.1",
"version": "3.0.2-dev",
"keywords": ["phpbb", "extension", "rules"],
"license": "GPL-2.0-only",
"authors": [
Expand Down Expand Up @@ -38,7 +38,7 @@
"extra": {
"display-name": "Board Rules",
"soft-require": {
"phpbb/phpbb": ">=3.3.2"
"phpbb/phpbb": ">=3.3.2,<4.0.0@dev"
},
"version-check": {
"host": "www.phpbb.com",
Expand Down
4 changes: 3 additions & 1 deletion ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ 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 phpBB4 due to use of deprecated or changed functions, classes and Icons
*
* @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', '<');
}

/**
Expand Down

0 comments on commit b4053c5

Please sign in to comment.