Skip to content

Commit

Permalink
Merge pull request #148 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 a67c76b + 746949c commit ea14af2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 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 board-wide announcements for your phpBB forum",
"homepage": "https://www.phpbb.com/customise/db/extension/boardannouncements/",
"version": "1.2.1",
"version": "1.2.2-dev",
"keywords": ["phpbb", "extension", "announcements"],
"license": "GPL-2.0-only",
"authors": [
Expand Down Expand Up @@ -44,7 +44,7 @@
"extra": {
"display-name": "Board Announcements",
"soft-require": {
"phpbb/phpbb": ">=3.3.0"
"phpbb/phpbb": ">=3.3.0,<4.0.0@dev"
},
"version-check": {
"host": "www.phpbb.com",
Expand Down
5 changes: 3 additions & 2 deletions ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ class ext extends \phpbb\extension\base
/**
* Enable extension if phpBB minimum version requirement is met
*
* Requires phpBB 3.3.0
* Requires >= phpBB 3.3.0 and < 4.0.0-dev
*
* @return bool
* @aceess public
*/
public function is_enableable()
{
return phpbb_version_compare(PHPBB_VERSION, '3.3.0', '>=');
return phpbb_version_compare(PHPBB_VERSION, '3.3.0', '>=')
&& phpbb_version_compare(PHPBB_VERSION, '4.0.0-dev', '<');
}
}

0 comments on commit ea14af2

Please sign in to comment.