Skip to content

Commit 8ac880c

Browse files
authored
Huge cleanup (PHP 8 only; prep. for long term support) (#151)
* huge cleanup * removed failing workflows for now * switch to mariadb 11.0 and show db config * mariadb 11.0 failed too; trying 10.5 * fixed bootstrap * 2. attempt * changed default table engine; fixed CI? * refinements * fixed failing tests * removed further PDOSQLite related code * salvaged old fixes and test * re-added workflows; refined README * refined adapter * fixed get DB version code; added coding style workflow * added DB specific adaptions * fixed getServerVersion calls * refined text * reformat README * README * removed outdated ENV variable * fixed coding style issue
1 parent 586f303 commit 8ac880c

118 files changed

Lines changed: 1597 additions & 3483 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
1-
name: SQLite Tests
1+
name: "Coding Styles"
22

3-
on: push
3+
on: [push, pull_request]
44

55
jobs:
6-
sqlite-in-memory:
7-
name: |
8-
SQLite Tests - PHP ${{ matrix.php }} in memory
6+
tests:
7+
name: Coding Styles
98
runs-on: ubuntu-latest
109

11-
env:
12-
DB_ADAPTER: pdo
13-
DB_PDO_PROTOCOL: sqlite
14-
DB_SQLITE_IN_MEMORY: true
15-
1610
strategy:
17-
# if one of the matrix-entries break, all entries getting canceled.
1811
fail-fast: true
1912
matrix:
2013
php:
21-
- 7.2
22-
- 7.3
23-
- 7.4
24-
- 8.0
14+
- 8.2
2515

2616
steps:
2717
- name: Checkout
@@ -33,9 +23,13 @@ jobs:
3323
php-version: ${{ matrix.php }}
3424
coverage: xdebug
3525
ini-values: memory_limit=1G
26+
tools: cs2pr
27+
28+
- name: Validate Composer files
29+
run: composer validate --no-check-all --strict
3630

3731
- name: Install Composer dependencies
3832
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
3933

40-
- name: Tests
41-
run: vendor/bin/phpunit
34+
- name: Coding styles
35+
run: php vendor/bin/php-cs-fixer fix --verbose --dry-run --format=checkstyle | cs2pr

.github/workflows/mariadb-10.1.yml

Lines changed: 0 additions & 151 deletions
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: MariaDB 10.10 Tests
2+
3+
on: push
4+
5+
jobs:
6+
pdo-mysql:
7+
name: MariaDB 10.10 Tests - PHP ${{ matrix.php }} PDO mysql
8+
runs-on: ubuntu-latest
9+
10+
env:
11+
DB_ADAPTER: pdo
12+
DB_PDO_PROTOCOL: mysql
13+
14+
strategy:
15+
# if one of the matrix-entries break, all entries getting canceled.
16+
fail-fast: true
17+
matrix:
18+
php:
19+
- 8.0
20+
- 8.1
21+
- 8.2
22+
- 8.3
23+
24+
services:
25+
testdb:
26+
image: mariadb:10.10
27+
env:
28+
MYSQL_ROOT_PASSWORD: Pass123
29+
MYSQL_DATABASE: arc2_test
30+
MYSQL_ALLOW_EMPTY_PASSWORD: false
31+
ports:
32+
- 3306
33+
options: --health-cmd="mysqladmin ping" --health-interval=15s --health-timeout=3s --health-retries=4
34+
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v2
38+
39+
- name: Install PHP
40+
uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: ${{ matrix.php }}
43+
ini-values: memory_limit=1G
44+
45+
- name: Install Composer dependencies
46+
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
47+
48+
- name: Tests
49+
run: |
50+
vendor/bin/phpunit
51+
env:
52+
DB_PORT: ${{ job.services.testdb.ports[3306] }}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: MariaDB 10.11 Tests
2+
3+
on: push
4+
5+
jobs:
6+
pdo-mysql:
7+
name: MariaDB 10.11 Tests - PHP ${{ matrix.php }} PDO mysql
8+
runs-on: ubuntu-latest
9+
10+
env:
11+
DB_ADAPTER: pdo
12+
DB_PDO_PROTOCOL: mysql
13+
14+
strategy:
15+
# if one of the matrix-entries break, all entries getting canceled.
16+
fail-fast: true
17+
matrix:
18+
php:
19+
- 8.0
20+
- 8.1
21+
- 8.2
22+
- 8.3
23+
24+
services:
25+
testdb:
26+
image: mariadb:10.11
27+
env:
28+
MYSQL_ROOT_PASSWORD: Pass123
29+
MYSQL_DATABASE: arc2_test
30+
MYSQL_ALLOW_EMPTY_PASSWORD: false
31+
ports:
32+
- 3306
33+
options: --health-cmd="mysqladmin ping" --health-interval=15s --health-timeout=3s --health-retries=4
34+
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v2
38+
39+
- name: Install PHP
40+
uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: ${{ matrix.php }}
43+
ini-values: memory_limit=1G
44+
45+
- name: Install Composer dependencies
46+
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
47+
48+
- name: Tests
49+
run: |
50+
vendor/bin/phpunit
51+
env:
52+
DB_PORT: ${{ job.services.testdb.ports[3306] }}

0 commit comments

Comments
 (0)