Skip to content

Commit 9703d14

Browse files
authored
Merge pull request #501: Support PHP 8.4
2 parents e42905c + a6f46a3 commit 9703d14

File tree

412 files changed

+11261
-9556
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

412 files changed

+11261
-9556
lines changed

.editorconfig

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# editorconfig.org
2-
31
root = true
42

53
[*]
@@ -10,5 +8,11 @@ indent_style = space
108
indent_size = 4
119
trim_trailing_whitespace = true
1210

13-
[*.yml]
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
1415
indent_size = 2
16+
17+
[Makefile]
18+
indent_style = tab

.gitattributes

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
/.github export-ignore
2-
/.editorconfig export-ignore
3-
/.gitattributes export-ignore
4-
/.gitignore export-ignore
5-
/tests export-ignore
1+
/.* export-ignore
2+
/tests export-ignore
3+
/*.xml export-ignore
4+
/*.yml export-ignore
5+
/*.lock export-ignore
6+
/*.dist export-ignore

.github/workflows/ci-mssql.yml

Lines changed: 9 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,16 @@
1-
on:
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
24
push:
35
branches:
4-
- '2.*'
6+
- '*.*'
7+
- '*.*.*'
58
pull_request: null
69

7-
name: ci-mssql
10+
name: MSSQL
811

912
jobs:
10-
tests:
11-
name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql }}
12-
13-
env:
14-
key: cache
15-
16-
runs-on: ubuntu-latest
17-
18-
strategy:
19-
fail-fast: false
20-
matrix:
21-
include:
22-
- php: '8.0'
23-
extensions: pdo, pdo_sqlsrv
24-
mssql: 'server:2017-latest'
25-
- php: '8.0'
26-
extensions: pdo, pdo_sqlsrv
27-
mssql: 'server:2019-CU25-ubuntu-20.04'
28-
- php: '8.1'
29-
extensions: pdo, pdo_sqlsrv
30-
mssql: 'server:2019-CU25-ubuntu-20.04'
31-
- php: '8.2'
32-
extensions: pdo, pdo_sqlsrv
33-
mssql: 'server:2019-CU25-ubuntu-20.04'
34-
- php: '8.3'
35-
extensions: pdo, pdo_sqlsrv
36-
mssql: 'server:2019-CU25-ubuntu-20.04'
37-
38-
services:
39-
mssql:
40-
image: mcr.microsoft.com/mssql/${{ matrix.mssql }}
41-
env:
42-
SA_PASSWORD: SSpaSS__1
43-
ACCEPT_EULA: Y
44-
MSSQL_PID: Developer
45-
ports:
46-
- 11433:1433
47-
options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'SSpaSS__1' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3
48-
49-
steps:
50-
- name: Checkout
51-
uses: actions/checkout@v2.3.4
52-
53-
- name: Install PHP with extensions
54-
uses: shivammathur/setup-php@v2
55-
with:
56-
php-version: ${{ matrix.php }}
57-
extensions: ${{ matrix.extensions }}
58-
ini-values: date.timezone='UTC'
59-
tools: composer:v2, pecl
60-
61-
- name: Determine composer cache directory on Linux
62-
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
63-
64-
- name: Cache dependencies installed with composer
65-
uses: actions/cache@v2
66-
with:
67-
path: ${{ env.COMPOSER_CACHE_DIR }}
68-
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
69-
restore-keys: |
70-
php${{ matrix.php }}-composer-
71-
72-
- name: Update composer
73-
run: composer self-update
74-
75-
- name: Install dependencies with composer
76-
if: matrix.php != '8.4'
77-
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
78-
79-
- name: Install dependencies with composer php 8.4
80-
if: matrix.php == '8.4'
81-
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
13+
phpunit:
14+
uses: cycle/gh-actions/.github/workflows/db-mssql.yml@master
8215

83-
- name: Run tests with phpunit without coverage
84-
env:
85-
DB: sqlserver
86-
run: vendor/bin/phpunit --group driver-sqlserver --colors=always
16+
...

.github/workflows/ci-mysql.yml

Lines changed: 9 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,16 @@
1-
on:
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
24
push:
35
branches:
4-
- '2.*'
6+
- '*.*'
7+
- '*.*.*'
58
pull_request: null
69

7-
name: ci-mysql
10+
name: MySQL
811

912
jobs:
10-
tests:
11-
name: PHP ${{ matrix.php-version }}-mysql-${{ matrix.mysql-version }}
12-
env:
13-
extensions: curl, intl, pdo, pdo_mysql
14-
key: cache-v1
15-
16-
runs-on: ${{ matrix.os }}
17-
18-
strategy:
19-
fail-fast: false
20-
matrix:
21-
os:
22-
- ubuntu-latest
23-
24-
php-version:
25-
- "8.0"
26-
- "8.1"
27-
- "8.2"
28-
- "8.3"
29-
30-
mysql-version:
31-
- "5.7"
32-
- "8.0"
33-
34-
services:
35-
mysql:
36-
image: mysql:${{ matrix.mysql-version }}
37-
env:
38-
MYSQL_ROOT_PASSWORD: root
39-
MYSQL_DATABASE: spiral
40-
MYSQL_AUTHENTICATION_PLUGIN: mysql_native_password
41-
ports:
42-
- 13306:3306
43-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
44-
45-
steps:
46-
- name: Show databases for root user
47-
run: mysql --protocol=tcp -h localhost -P 13306 -u root -proot -e "ALTER DATABASE spiral CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
48-
49-
- name: Checkout
50-
uses: actions/checkout@v2
51-
52-
- name: Setup cache environment
53-
id: cache-env
54-
uses: shivammathur/cache-extensions@v1
55-
with:
56-
php-version: ${{ matrix.php-version }}
57-
extensions: ${{ env.extensions }}
58-
key: ${{ env.key }}
59-
60-
- name: Cache extensions
61-
uses: actions/cache@v2
62-
with:
63-
path: ${{ steps.cache-env.outputs.dir }}
64-
key: ${{ steps.cache-env.outputs.key }}
65-
restore-keys: ${{ steps.cache-env.outputs.key }}
66-
67-
- name: Install PHP with extensions
68-
uses: shivammathur/setup-php@v2
69-
with:
70-
php-version: ${{ matrix.php-version }}
71-
extensions: ${{ env.extensions }}
72-
ini-values: date.timezone='UTC'
73-
coverage: pcov
74-
75-
- name: Determine composer cache directory
76-
if: matrix.os == 'ubuntu-latest'
77-
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
78-
79-
- name: Cache dependencies installed with composer
80-
uses: actions/cache@v2
81-
with:
82-
path: ${{ env.COMPOSER_CACHE_DIR }}
83-
key: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}
84-
restore-keys: |
85-
php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
86-
87-
- name: Install dependencies with composer
88-
if: matrix.php-version != '8.4'
89-
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
90-
91-
- name: Install dependencies with composer php 8.4
92-
if: matrix.php-version == '8.4'
93-
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
13+
phpunit:
14+
uses: cycle/gh-actions/.github/workflows/db-mysql.yml@master
9415

95-
- name: Run mysql tests with phpunit
96-
env:
97-
DB: mysql
98-
MYSQL: ${{ matrix.mysql-version }}
99-
run: vendor/bin/phpunit --group driver-mysql --colors=always
16+
...

.github/workflows/ci-pgsql.yml

Lines changed: 9 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,16 @@
1-
on:
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
24
push:
35
branches:
4-
- '2.*'
6+
- '*.*'
7+
- '*.*.*'
58
pull_request: null
69

7-
name: ci-pgsql
10+
name: Postgres
811

912
jobs:
10-
tests:
11-
name: PHP ${{ matrix.php-version }}-pgsql-${{ matrix.pgsql-version }}
12-
env:
13-
extensions: curl, intl, pdo, pdo_pgsql
14-
key: cache-v1
15-
16-
runs-on: ${{ matrix.os }}
17-
18-
strategy:
19-
fail-fast: false
20-
matrix:
21-
os:
22-
- ubuntu-latest
23-
php-version:
24-
- "8.0"
25-
- "8.1"
26-
- "8.2"
27-
- "8.3"
28-
29-
pgsql-version:
30-
- "10"
31-
- "11"
32-
- "12"
33-
- "13"
34-
35-
services:
36-
postgres:
37-
image: postgres:${{ matrix.pgsql-version }}
38-
env:
39-
POSTGRES_USER: postgres
40-
POSTGRES_PASSWORD: postgres
41-
POSTGRES_DB: spiral
42-
ports:
43-
- 15432:5432
44-
options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
45-
46-
steps:
47-
- name: Checkout
48-
uses: actions/checkout@v2
49-
50-
- name: Setup cache environment
51-
id: cache-env
52-
uses: shivammathur/cache-extensions@v1
53-
with:
54-
php-version: ${{ matrix.php-version }}
55-
extensions: ${{ env.extensions }}
56-
key: ${{ env.key }}
57-
58-
- name: Cache extensions
59-
uses: actions/cache@v2
60-
with:
61-
path: ${{ steps.cache-env.outputs.dir }}
62-
key: ${{ steps.cache-env.outputs.key }}
63-
restore-keys: ${{ steps.cache-env.outputs.key }}
64-
65-
- name: Install PHP with extensions
66-
uses: shivammathur/setup-php@v2
67-
with:
68-
php-version: ${{ matrix.php-version }}
69-
extensions: ${{ env.extensions }}
70-
ini-values: date.timezone='UTC'
71-
coverage: pcov
72-
73-
- name: Determine composer cache directory
74-
if: matrix.os == 'ubuntu-latest'
75-
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
76-
77-
- name: Cache dependencies installed with composer
78-
uses: actions/cache@v2
79-
with:
80-
path: ${{ env.COMPOSER_CACHE_DIR }}
81-
key: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}
82-
restore-keys: |
83-
php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
84-
85-
- name: Install dependencies with composer
86-
if: matrix.php-version != '8.4'
87-
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
88-
89-
- name: Install dependencies with composer php 8.4
90-
if: matrix.php-version == '8.4'
91-
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
13+
phpunit:
14+
uses: cycle/gh-actions/.github/workflows/db-pgsql.yml@master
9215

93-
- name: Run pgsql tests with phpunit
94-
env:
95-
DB: postgres
96-
POSTGRES: ${{ matrix.pgsql-version }}
97-
run: vendor/bin/phpunit --group driver-postgres --colors=always
16+
...

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
- "8.1"
2323
- "8.2"
2424
- "8.3"
25+
- "8.4"
2526
steps:
2627
- name: Checkout
2728
uses: actions/checkout@v2
@@ -81,6 +82,7 @@ jobs:
8182
- "8.1"
8283
- "8.2"
8384
- "8.3"
85+
- "8.4"
8486
steps:
8587
- name: Checkout
8688
uses: actions/checkout@v2

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
.idea/
1+
/.*
2+
!/.github/
3+
/runtime/
4+
/vendor/
25
.env
36
composer.lock
4-
vendor/
57
*.db
68
clover.xml
79
docker-compose.override.yml
8-
.phpunit.result.cache

.php-cs-fixer.dist.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
require_once 'vendor/autoload.php';
6+
7+
return \Spiral\CodeStyle\Builder::create()
8+
->include(__DIR__ . '/src')
9+
->include(__DIR__ . '/tests')
10+
->include(__FILE__)
11+
->cache('./runtime/php-cs-fixer.cache')
12+
->allowRisky(false)
13+
->build();

0 commit comments

Comments
 (0)