Skip to content

Commit

Permalink
Merge pull request #180 from iMattPro/updates
Browse files Browse the repository at this point in the history
Trivial Updates
  • Loading branch information
iMattPro committed May 12, 2023
2 parents 780a3e2 + 9d43c00 commit 0724a20
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 23 deletions.
52 changes: 34 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@ on:
jobs:
# START Basic Checks Job (EPV, code sniffer, images check, etc.)
basic-checks:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- php: '7.1'
- php: '7.2'
db: "none"
NOTESTS: 1

name: PHP ${{ matrix.php }} - ${{ matrix.db }}

steps:
- name: Checkout phpBB
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: phpbb/phpbb
ref: ${{ env.PHPBB_BRANCH }}
path: phpBB3

- name: Checkout extension
uses: actions/checkout@v2
uses: actions/checkout@v3
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-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
include:
Expand Down Expand Up @@ -125,6 +125,8 @@ jobs:
db: "mysql:5.7"
- php: '8.1'
db: "mysql:5.7"
- php: '8.2'
db: "mysql:5.7"

name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}

Expand Down Expand Up @@ -154,14 +156,14 @@ jobs:

steps:
- name: Checkout phpBB
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: phpbb/phpbb
ref: ${{ env.PHPBB_BRANCH }}
path: phpBB3

- name: Checkout extension
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: phpBB3/phpBB/ext/${{ env.EXTNAME }}

Expand All @@ -170,7 +172,7 @@ jobs:
MATRIX_DB: ${{ matrix.db }}
run: |
db=$(echo "${MATRIX_DB%%:*}")
echo "::set-output name=db::$db"
echo "db=$db" >> $GITHUB_OUTPUT
- name: Setup PHP
if: ${{ matrix.COVERAGE != 1 }}
Expand Down Expand Up @@ -231,14 +233,14 @@ jobs:

- name: Send code coverage
if: ${{ matrix.COVERAGE == 1 }}
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: ./phpBB3/build/logs/clover.xml
files: ./phpBB3/build/logs/clover.xml
# END MySQL and MariaDB Job

# START PostgreSQL Job
postgres-tests:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
include:
Expand All @@ -254,6 +256,20 @@ jobs:
db: "postgres:12"
- php: '7.1'
db: "postgres:13"
- php: '7.2'
db: "postgres:13"
- php: '7.3'
db: "postgres:13"
- php: '7.4'
db: "postgres:13"
- php: '8.0'
db: "postgres:12"
- php: '8.0'
db: "postgres:13"
- php: '8.1'
db: "postgres:14"
- php: '8.2'
db: "postgres:14"

name: PHP ${{ matrix.php }} - ${{ matrix.db }}

Expand Down Expand Up @@ -285,14 +301,14 @@ jobs:

steps:
- name: Checkout phpBB
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: phpbb/phpbb
ref: ${{ env.PHPBB_BRANCH }}
path: phpBB3

- name: Checkout extension
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: phpBB3/phpBB/ext/${{ env.EXTNAME }}

Expand All @@ -301,7 +317,7 @@ jobs:
MATRIX_DB: ${{ matrix.db }}
run: |
db=$(echo "${MATRIX_DB%%:*}")
echo "::set-output name=db::$db"
echo "db=$db" >> $GITHUB_OUTPUT
- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -338,7 +354,7 @@ jobs:

# START Other Tests Job (SQLite 3 and mssql)
other-tests:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
include:
Expand Down Expand Up @@ -380,14 +396,14 @@ jobs:

steps:
- name: Checkout phpBB
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: phpbb/phpbb
ref: ${{ env.PHPBB_BRANCH }}
path: phpBB3

- name: Checkout extension
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: phpBB3/phpBB/ext/${{ env.EXTNAME }}

Expand All @@ -401,7 +417,7 @@ jobs:
else
db=$(echo "${MATRIX_DB%%:*}")
fi
echo "::set-output name=db::$db"
echo "db=$db" >> $GITHUB_OUTPUT
- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
3 changes: 1 addition & 2 deletions config/location.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,8 @@ services:

phpbb.ads.location.type.pop_up:
class: phpbb\ads\location\type\pop_up
parent: phpbb.ads.location.type.base
arguments:
- '@user'
- '@language'
- '@request'
- '@config'
- '@template'
Expand Down
6 changes: 3 additions & 3 deletions controller/visual_demo_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config
*
* @param string $action enable|disable
* @return \Symfony\Component\HttpFoundation\JsonResponse
* @throws \phpbb\exception\http_exception An http exception
* @throws \phpbb\exception\http_exception http exception
*/
public function handle($action)
{
Expand All @@ -81,7 +81,7 @@ public function handle($action)
{
// Create our cookie and send user to the index page.
$this->user->set_cookie('phpbb_ads_visual_demo', time(), 0);
$redirect = "{$this->root_path}index.{$this->php_ext}";
$redirect = "{$this->root_path}index.$this->php_ext";
}

// Send a JSON response if an AJAX request was used
Expand All @@ -96,7 +96,7 @@ public function handle($action)
$redirect = reapply_sid($redirect);
redirect($redirect);

// We shouldn't get here, but throw an http exception just in case
// We shouldn't get here, but throw http exception just in case
throw new \phpbb\exception\http_exception(500, 'GENERAL_ERROR');
}
}

0 comments on commit 0724a20

Please sign in to comment.