Skip to content

Commit 8051616

Browse files
authored
Merge pull request #18 from formal-php/next
Next major release
2 parents 3033d0c + 673f7b4 commit 8051616

78 files changed

Lines changed: 990 additions & 952 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.

.github/workflows/ci.yml

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
os: [ubuntu-latest]
11-
php-version: ['8.2', '8.3', '8.4']
11+
php-version: ['8.4', '8.5']
1212
dependency-versions: ['lowest', 'highest']
1313
name: 'BlackBox'
1414
services:
@@ -50,7 +50,7 @@ jobs:
5050
strategy:
5151
matrix:
5252
os: [ubuntu-latest]
53-
php-version: ['8.2', '8.3', '8.4']
53+
php-version: ['8.4', '8.5']
5454
dependency-versions: ['lowest', 'highest']
5555
name: 'Coverage'
5656
services:
@@ -92,41 +92,6 @@ jobs:
9292
with:
9393
token: ${{ secrets.CODECOV_TOKEN }}
9494
psalm:
95-
runs-on: ubuntu-latest
96-
strategy:
97-
matrix:
98-
php-version: ['8.2', '8.3']
99-
dependencies: ['lowest', 'highest']
100-
name: 'Psalm'
101-
steps:
102-
- name: Checkout
103-
uses: actions/checkout@v2
104-
- name: Setup PHP
105-
uses: shivammathur/setup-php@v2
106-
with:
107-
php-version: ${{ matrix.php-version }}
108-
extensions: mbstring, intl
109-
- name: Composer
110-
uses: "ramsey/composer-install@v2"
111-
with:
112-
dependency-versions: ${{ matrix.dependencies }}
113-
- name: Psalm
114-
run: vendor/bin/psalm --shepherd
95+
uses: innmind/github-workflows/.github/workflows/psalm-matrix.yml@main
11596
cs:
116-
runs-on: ubuntu-latest
117-
strategy:
118-
matrix:
119-
php-version: ['8.2']
120-
name: 'CS'
121-
steps:
122-
- name: Checkout
123-
uses: actions/checkout@v2
124-
- name: Setup PHP
125-
uses: shivammathur/setup-php@v2
126-
with:
127-
php-version: ${{ matrix.php-version }}
128-
extensions: mbstring, intl
129-
- name: Composer
130-
uses: "ramsey/composer-install@v2"
131-
- name: CS
132-
run: vendor/bin/php-cs-fixer fix --diff --dry-run
97+
uses: innmind/github-workflows/.github/workflows/cs.yml@main

.github/workflows/documentation.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,9 @@ name: Documentation
22
on:
33
push:
44
branches: [master]
5-
65
permissions:
76
contents: write
87
jobs:
98
deploy:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v4
13-
- name: Configure Git Credentials
14-
run: |
15-
git config user.name github-actions[bot]
16-
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
17-
- uses: actions/setup-python@v5
18-
with:
19-
python-version: 3.x
20-
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
21-
- uses: actions/cache@v4
22-
with:
23-
key: mkdocs-material-${{ env.cache_id }}
24-
path: .cache
25-
restore-keys: |
26-
mkdocs-material-
27-
- run: pip install mkdocs-material
28-
- run: mkdocs gh-deploy --force
9+
uses: innmind/github-workflows/.github/workflows/documentation.yml@main
10+
secrets: inherit

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Create release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
release:
10+
uses: innmind/github-workflows/.github/workflows/release.yml@main
11+
secrets: inherit

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
# Changelog
22

3+
## [Unreleased]
4+
5+
### Added
6+
7+
- `Formal\AccessLayer\Query\Builder`
8+
- `Formal\AccessLayer\Query\SQL` named constructors allow to pass all the parameters at once via the second argument
9+
- `Formal\AccessLayer\Query\Transaction`
10+
11+
### Changed
12+
13+
- Requires PHP `8.4`
14+
- `Formal\AccessLayer\Connection` is now a final class, all previous implementations are now flagged as internal
15+
- `Formal\AccessLayer\Query` is now a final class
16+
- Requires `innmind/black-box:~6.5`
17+
- Requires `innmind/immutable:~6.0`
18+
- Requires `innmind/url:~5.0`
19+
20+
### Deprecated
21+
22+
- `Formal\AccessLayer\Query\Select::onDemand()`, use `::lazily()` instead
23+
- `Formal\AccessLayer\Query\SQL`, use `Formal\AccessLayer\Query` instead
24+
25+
### Removed
26+
27+
- `Formal\AccessLayer\Connection\PDO::persistent()`
28+
- `Formal\AccessLayer\Query\Where::sql()` and `::parameters()`, use `::normalize()` instead
29+
- `Formal\AccessLayer\Query\Commit`, use `Transaction::commit` instead
30+
- `Formal\AccessLayer\Query\StartTransaction`, use `Transaction::start` instead
31+
- `Formal\AccessLayer\Query\Rollback`, use `Transaction::rollback` instead
32+
333
## 4.2.0 - 2025-04-09
434

535
### Added

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"issues": "http://github.com/formal-php/access-layer/issues"
1616
},
1717
"require": {
18-
"php": "~8.2",
19-
"innmind/immutable": "~4.0|~5.0",
20-
"innmind/url": "~4.0",
18+
"php": "~8.4",
19+
"innmind/immutable": "~6.0",
20+
"innmind/url": "~5.0",
2121
"innmind/specification": "~4.1",
2222
"psr/log": "~3.0"
2323
},
@@ -34,17 +34,17 @@
3434
}
3535
},
3636
"require-dev": {
37-
"innmind/static-analysis": "^1.2.1",
38-
"innmind/black-box": "^5.8|^6.0.2",
37+
"innmind/static-analysis": "~1.3",
38+
"innmind/black-box": "~6.5",
3939
"innmind/coding-standard": "~2.0"
4040
},
4141
"conflict": {
42-
"innmind/black-box": "<5.0|~7.0"
42+
"innmind/black-box": "<6.0|~7.0"
4343
},
4444
"suggest": {
4545
"innmind/black-box": "For property based testing"
4646
},
4747
"provide": {
48-
"innmind/black-box-sets": "5.0"
48+
"innmind/black-box-sets": "6.0"
4949
}
5050
}

fixtures/Table/Column.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,19 @@ final class Column
1313
*/
1414
public static function any(?Set $type = null, ?int $max = null): Set
1515
{
16-
return Set\Randomize::of( // randomize to prevent same name used twice
17-
Set\Composite::immutable(
18-
Model::of(...),
19-
Column\Name::any($max),
20-
$type ?? Column\Type::any(),
21-
),
22-
);
16+
return Set::compose(
17+
Model::of(...),
18+
Column\Name::any($max),
19+
$type ?? Column\Type::any(),
20+
)->randomize();
2321
}
2422

2523
/**
2624
* @return Set<list<Model>>
2725
*/
2826
public static function list(): Set
2927
{
30-
return Set\Sequence::of(self::any())
28+
return Set::sequence(self::any())
3129
->between(1, 20)
3230
->map(static function($columns) {
3331
$filtered = [];

fixtures/Table/Column/Name.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ public static function any(?int $max = null): Set
1515
{
1616
$max ??= 64;
1717

18-
return Set\Strings::madeOf(
19-
Set\Chars::alphanumerical(),
20-
Set\Elements::of('é', 'è', 'ê', 'ë', '_'),
21-
)
18+
return Set::strings()
19+
->madeOf(
20+
Set::strings()->chars()->alphanumerical(),
21+
Set::of('é', 'è', 'ê', 'ë', '_'),
22+
)
2223
->between(1, $max)
2324
->filter(static fn($string) => \mb_strlen($string, 'ascii') < $max)
2425
->map(Model::of(...));

0 commit comments

Comments
 (0)