Skip to content

Commit 0048b55

Browse files
authored
Merge pull request #110 from samsonasik/samsonasik-patch-1
Add PHP 8.5 to CI build matrix
2 parents ec6a8e0 + 491208f commit 0048b55

16 files changed

Lines changed: 103 additions & 23 deletions

File tree

.github/workflows/ci_build.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php-versions: ['8.2', '8.3', '8.4']
16+
php-versions: ['8.2', '8.3', '8.4', '8.5']
1717
steps:
1818
- name: Setup PHP Action
1919
uses: shivammathur/setup-php@v2
2020
with:
2121
extensions: intl
2222
php-version: "${{ matrix.php-versions }}"
23-
coverage: xdebug
23+
coverage: ${{ matrix.php-versions == '8.4' && 'xdebug' || 'none' }}
2424
- name: Setup MySQL
2525
uses: shogo82148/actions-setup-mysql@v1
2626
with:
@@ -40,11 +40,20 @@ jobs:
4040
run: |
4141
composer phpstan
4242
bin/rector process --dry-run
43-
- name: "Run test suite"
43+
- name: "Run test suite (no coverage)"
44+
if: matrix.php-versions != '8.4'
45+
run: |
46+
composer dump-autoload -o
47+
bin/kahlan
48+
49+
- name: "Run test suite (with coverage)"
50+
if: matrix.php-versions == '8.4'
4451
run: |
4552
composer dump-autoload -o
4653
mkdir -p build/logs && bin/kahlan --coverage=4 --reporter=verbose --clover=build/logs/clover.xml
54+
4755
- name: Upload coverage to Codecov
56+
if: matrix.php-versions == '8.4'
4857
uses: codecov/codecov-action@v1
4958
with:
5059
token: ${{ secrets.CODECOV_TOKEN }}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"require-dev": {
5959
"doctrine/dbal": "^3.9.3",
6060
"doctrine/doctrine-orm-module": "^4.2.1 || ^5.3",
61-
"kahlan/kahlan": "^5.2.8",
61+
"kahlan/kahlan": "^6.1",
6262
"laminas/laminas-cli": "^1.11",
6363
"laminas/laminas-coding-standard": "^3.0",
6464
"laminas/laminas-form": "^2.16 || ^3.21",

spec/Fixture/config/autoload-for-cannot-connect-to-db/error-hero-module.local.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
<?php
22

3+
use Pdo\Mysql;
34
use Laminas\Db\Adapter\AdapterInterface;
45
use Laminas\Mail\Message;
56
use Laminas\Mail\Transport\InMemory;
67
use Laminas\ServiceManager\Factory\InvokableFactory;
78

9+
$pdoMysqlInitCommandAttr = defined(Mysql::class . '::ATTR_INIT_COMMAND')
10+
? Mysql::ATTR_INIT_COMMAND
11+
: PDO::MYSQL_ATTR_INIT_COMMAND;
12+
813
return [
914

1015
'service_manager' => [
@@ -20,7 +25,7 @@
2025
'driver' => 'Pdo',
2126
'dsn' => 'mysql:dbname=errorheromodule;host=127.0.0.1',
2227
'driver_options' => [
23-
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'",
28+
$pdoMysqlInitCommandAttr => "SET NAMES 'UTF8'",
2429
],
2530
],
2631

spec/Fixture/config/autoload-for-enable-display-errors/error-hero-module.local.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
<?php
22

3+
use Pdo\Mysql;
34
use Laminas\Db\Adapter\AdapterInterface;
45
use Laminas\Mail\Message;
56
use Laminas\Mail\Transport\InMemory;
67
use Laminas\ServiceManager\Factory\InvokableFactory;
78

9+
$pdoMysqlInitCommandAttr = defined(Mysql::class . '::ATTR_INIT_COMMAND')
10+
? Mysql::ATTR_INIT_COMMAND
11+
: PDO::MYSQL_ATTR_INIT_COMMAND;
12+
813
return [
914

1015
'service_manager' => [
@@ -20,7 +25,7 @@
2025
'driver' => 'Pdo',
2126
'dsn' => 'mysql:dbname=errorheromodule;host=127.0.0.1',
2227
'driver_options' => [
23-
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'",
28+
$pdoMysqlInitCommandAttr => "SET NAMES 'UTF8'",
2429
],
2530
],
2631

spec/Fixture/config/autoload-for-specific-error-and-exception/error-hero-module.local.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<?php
22

3+
use Pdo\Mysql;
34
use Laminas\Db\Adapter\AdapterInterface;
45

6+
$pdoMysqlInitCommandAttr = defined(Mysql::class . '::ATTR_INIT_COMMAND')
7+
? Mysql::ATTR_INIT_COMMAND
8+
: PDO::MYSQL_ATTR_INIT_COMMAND;
9+
510
return [
611

712
'db' => [
@@ -10,7 +15,7 @@
1015
'driver' => 'Pdo',
1116
'dsn' => 'mysql:dbname=errorheromodule;host=127.0.0.1',
1217
'driver_options' => [
13-
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'",
18+
$pdoMysqlInitCommandAttr => "SET NAMES 'UTF8'",
1419
],
1520
],
1621

spec/Fixture/config/autoload-for-xmlhttprequest-with-non-json-message/error-hero-module.local.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<?php
22

3+
use Pdo\Mysql;
34
use Laminas\Db\Adapter\AdapterInterface;
45

6+
$pdoMysqlInitCommandAttr = defined(Mysql::class . '::ATTR_INIT_COMMAND')
7+
? Mysql::ATTR_INIT_COMMAND
8+
: PDO::MYSQL_ATTR_INIT_COMMAND;
9+
510
return [
611

712
'db' => [
@@ -10,7 +15,7 @@
1015
'driver' => 'Pdo',
1116
'dsn' => 'mysql:dbname=errorheromodule;host=127.0.0.1',
1217
'driver_options' => [
13-
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'",
18+
$pdoMysqlInitCommandAttr => "SET NAMES 'UTF8'",
1419
],
1520
],
1621

spec/Fixture/config/autoload-for-xmlhttprequest/error-hero-module.local.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<?php
22

3+
use Pdo\Mysql;
34
use Laminas\Db\Adapter\AdapterInterface;
45

6+
$pdoMysqlInitCommandAttr = defined(Mysql::class . '::ATTR_INIT_COMMAND')
7+
? Mysql::ATTR_INIT_COMMAND
8+
: PDO::MYSQL_ATTR_INIT_COMMAND;
9+
510
return [
611

712
'db' => [
@@ -10,7 +15,7 @@
1015
'driver' => 'Pdo',
1116
'dsn' => 'mysql:dbname=errorheromodule;host=127.0.0.1',
1217
'driver_options' => [
13-
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'",
18+
$pdoMysqlInitCommandAttr => "SET NAMES 'UTF8'",
1419
],
1520
],
1621

spec/Fixture/config/autoload-with-doctrine/error-hero-module.local.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
<?php
22

3+
use Pdo\Mysql;
34
use Doctrine\DBAL\Driver\PDO\MySql\Driver;
45
use Laminas\Db\Adapter\AdapterInterface;
56

7+
$pdoMysqlInitCommandAttr = defined(Mysql::class . '::ATTR_INIT_COMMAND')
8+
? Mysql::ATTR_INIT_COMMAND
9+
: PDO::MYSQL_ATTR_INIT_COMMAND;
10+
611
return [
712

813
'doctrine' => [
@@ -16,7 +21,7 @@
1621
'host' => '127.0.0.1',
1722
'port' => '3306',
1823
'driverOptions' => [
19-
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'",
24+
$pdoMysqlInitCommandAttr => "SET NAMES 'UTF8'",
2025
],
2126
],
2227
],

spec/Fixture/config/autoload-with-enable-sendmail-with-empty-email-receivers/error-hero-module.local.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
<?php
22

3+
use Pdo\Mysql;
34
use Laminas\Db\Adapter\AdapterInterface;
45
use Laminas\Mail\Message;
56
use Laminas\Mail\Transport\InMemory;
67
use Laminas\ServiceManager\Factory\InvokableFactory;
78

9+
$pdoMysqlInitCommandAttr = defined(Mysql::class . '::ATTR_INIT_COMMAND')
10+
? Mysql::ATTR_INIT_COMMAND
11+
: PDO::MYSQL_ATTR_INIT_COMMAND;
12+
813
return [
914

1015
'service_manager' => [
@@ -20,7 +25,7 @@
2025
'driver' => 'Pdo',
2126
'dsn' => 'mysql:dbname=errorheromodule;host=127.0.0.1',
2227
'driver_options' => [
23-
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'",
28+
$pdoMysqlInitCommandAttr => "SET NAMES 'UTF8'",
2429
],
2530
],
2631

spec/Fixture/config/autoload-with-enable-sendmail/error-hero-module.local.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
<?php
22

3+
use Pdo\Mysql;
34
use Laminas\Db\Adapter\AdapterInterface;
45
use Laminas\Mail\Message;
56
use Laminas\Mail\Transport\InMemory;
67
use Laminas\ServiceManager\Factory\InvokableFactory;
78

9+
$pdoMysqlInitCommandAttr = defined(Mysql::class . '::ATTR_INIT_COMMAND')
10+
? Mysql::ATTR_INIT_COMMAND
11+
: PDO::MYSQL_ATTR_INIT_COMMAND;
12+
813
return [
914

1015
'service_manager' => [
@@ -20,7 +25,7 @@
2025
'driver' => 'Pdo',
2126
'dsn' => 'mysql:dbname=errorheromodule;host=127.0.0.1',
2227
'driver_options' => [
23-
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'",
28+
$pdoMysqlInitCommandAttr => "SET NAMES 'UTF8'",
2429
],
2530
],
2631

0 commit comments

Comments
 (0)