Skip to content

Commit d4ae2ab

Browse files
committed
Merge branch '4.x' into fix/jti-parent-columns-duplication
# Conflicts: # tests/Annotated/Fixtures/Fixtures16/Person.php # tests/Annotated/Functional/Driver/Common/BaseTestCase.php # tests/Annotated/Functional/Driver/Common/InheritanceTestCase.php # tests/docker-compose.yml
2 parents 8da78c1 + 7564927 commit d4ae2ab

File tree

135 files changed

+1581
-764
lines changed

Some content is hidden

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

135 files changed

+1581
-764
lines changed

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.{yml, yaml, sh, conf, neon*}]
12+
indent_size = 2
13+
14+
[*.http]
15+
end_of_line = crlf
16+
17+
[*.md]
18+
trim_trailing_whitespace = false
19+
20+
[Makefile]
21+
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/cs-fix.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
4+
push:
5+
branches:
6+
- '*'
7+
8+
name: Fix Code Style
9+
10+
jobs:
11+
cs-fix:
12+
permissions:
13+
contents: write
14+
uses: spiral/gh-actions/.github/workflows/cs-fix.yml@master
15+
16+
...

.github/workflows/main.yml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,33 @@ jobs:
77
name: Test PHP ${{ matrix.php-version }} with Code Coverage
88
runs-on: ubuntu-latest
99
strategy:
10-
fail-fast: false
1110
matrix:
12-
php-version: ['8.1', '8.2', '8.3']
11+
php-version: ['8.1', '8.2', '8.3', '8.4']
1312
steps:
13+
- name: Install ODBC driver.
14+
run: |
15+
sudo curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
16+
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18
1417
- name: Checkout
1518
uses: actions/checkout@v2
1619
- name: Setup DB services
1720
run: |
1821
cd tests
19-
docker-compose up -d
22+
docker compose up -d
2023
cd ..
2124
- name: Setup PHP ${{ matrix.php-version }}
2225
uses: shivammathur/setup-php@v2
2326
with:
2427
php-version: ${{ matrix.php-version }}
2528
coverage: pcov
2629
tools: pecl
27-
extensions: mbstring, pdo, pdo_sqlite, pdo_pgsql, pdo_sqlsrv-5.11, pdo_mysql
28-
- name: Get Composer Cache Directory
29-
id: composer-cache
30-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
31-
- name: Restore Composer Cache
32-
uses: actions/cache@v2
33-
with:
34-
path: ${{ steps.composer-cache.outputs.dir }}
35-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
36-
restore-keys: ${{ runner.os }}-composer-
30+
extensions: mbstring, pdo, pdo_sqlite, pdo_pgsql, pdo_sqlsrv, pdo_mysql
3731

38-
- name: Install dependencies with composer
39-
if: matrix.php-version != '8.4'
40-
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
32+
- name: Validate composer.json and composer.lock
33+
run: composer validate --ansi --strict
4134

42-
- name: Install dependencies with composer php 8.4
43-
if: matrix.php-version == '8.4'
44-
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
35+
- name: Install dependencies with composer
36+
uses: ramsey/composer-install@v3
4537

4638
- name: Execute Tests
4739
run: |

.github/workflows/psalm.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
on:
2-
pull_request:
2+
pull_request: null
33
push:
44
branches:
5+
- master
56
- '*.*'
67

78
name: static analysis

.gitignore

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
.idea/
2-
.env
1+
/.*/
2+
!/.github/
3+
/runtime/
4+
/vendor/
35
composer.lock
4-
vendor/
5-
*.db
6-
clover.xml
7-
.php_cs.cache
8-
.phpunit.cache
9-
build

.idea/icon.svg

Lines changed: 15 additions & 0 deletions
Loading

.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();

.styleci.yml

Lines changed: 0 additions & 81 deletions
This file was deleted.

composer.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,19 @@
3838
],
3939
"require": {
4040
"php": ">=8.1",
41-
"cycle/orm": "^2.7",
42-
"cycle/schema-builder": "^2.8",
41+
"cycle/database": "^2.15",
42+
"cycle/orm": "^2.9.2",
43+
"cycle/schema-builder": "^2.11.1",
4344
"spiral/attributes": "^2.8|^3.0",
4445
"spiral/tokenizer": "^2.8|^3.0",
4546
"doctrine/inflector": "^2.0"
4647
},
4748
"require-dev": {
4849
"doctrine/annotations": "^1.14.3 || ^2.0.1",
4950
"phpunit/phpunit": "^10.1",
50-
"vimeo/psalm": "^5.11"
51+
"vimeo/psalm": "^5.26 || ^6.0",
52+
"spiral/code-style": "^2.2",
53+
"spiral/dumper": "^3.3"
5154
},
5255
"autoload": {
5356
"psr-4": {
@@ -58,5 +61,12 @@
5861
"psr-4": {
5962
"Cycle\\Annotated\\Tests\\": "tests/Annotated/"
6063
}
64+
},
65+
"scripts": {
66+
"cs:diff": "php-cs-fixer fix --dry-run -v --diff",
67+
"cs:fix": "php-cs-fixer fix -v",
68+
"psalm": "psalm",
69+
"psalm:baseline": "psalm --set-baseline=psalm-baseline.xml",
70+
"test": "phpunit --color=always"
6171
}
6272
}

0 commit comments

Comments
 (0)