Skip to content

Commit b0d519c

Browse files
authored
Merge pull request #8 from maartenpaauw/develop
2 parents 6886fb7 + ccf8d28 commit b0d519c

22 files changed

+177
-64
lines changed

.github/dependabot.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
1-
# Please see the documentation for all configuration options:
2-
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3-
41
version: 2
2+
53
updates:
4+
- package-ecosystem: "composer"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
time: "07:00"
10+
timezone: "Europe/Amsterdam"
11+
labels:
12+
- "dependencies"
13+
- "composer"
14+
assignees:
15+
- "maartenpaauw"
16+
reviewers:
17+
- "maartenpaauw"
618

719
- package-ecosystem: "github-actions"
820
directory: "/"
921
schedule:
1022
interval: "weekly"
23+
day: "monday"
24+
time: "07:00"
25+
timezone: "Europe/Amsterdam"
1126
labels:
12-
- "dependencies"
27+
- "dependencies"
28+
- "github-actions"
29+
assignees:
30+
- "maartenpaauw"
31+
reviewers:
32+
- "maarten"

.github/workflows/code-coverage.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: code-coverage
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- main
8+
pull_request:
9+
branches:
10+
- develop
11+
- main
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
name: Code coverage
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v3
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: 8.1
26+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
27+
coverage: xdebug
28+
29+
- name: Setup problem matchers
30+
run: |
31+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
32+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
33+
34+
- name: Install dependencies
35+
run: composer install --prefer-dist --no-interaction
36+
37+
- name: Execute tests
38+
run: vendor/bin/pest --coverage --coverage-clover coverage.xml
39+
40+
- name: Upload coverage report
41+
uses: codecov/codecov-action@v3
42+
with:
43+
files: coverage.xml
44+
fail_ci_if_error: true

.github/workflows/php-cs-fixer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
steps:
1010
- name: Checkout code
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v3
1212
with:
1313
ref: ${{ github.head_ref }}
1414

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: phpstan
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515

1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2

.github/workflows/run-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ jobs:
1313
fail-fast: true
1414
matrix:
1515
os: [ubuntu-latest, windows-latest]
16-
php: [8.0, 8.1]
17-
laravel: [8.*, 9.*]
16+
php: [8.1, 8.2]
17+
laravel: [9.*, 10.*]
1818
stability: [prefer-lowest, prefer-stable]
1919
include:
20-
- laravel: 8.*
21-
testbench: ^6.23
2220
- laravel: 9.*
2321
testbench: ^7.1
22+
- laravel: 10.*
23+
testbench: ^8.0.10
2424

2525
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2626

2727
steps:
2828
- name: Checkout code
29-
uses: actions/checkout@v2
29+
uses: actions/checkout@v3
3030

3131
- name: Setup PHP
3232
uses: shivammathur/setup-php@v2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ testbench.yaml
1212
vendor
1313
node_modules
1414
.php-cs-fixer.cache
15+
coverage.xml

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22

33
All notable changes to `laravel-specification-pattern` will be documented in this file.
44

5+
## [v2.0.0] - 2023-03-21
6+
7+
### Added
8+
9+
- Support from Laravel 10.
10+
11+
### Changed
12+
13+
- Renamed `SpecificationException` to `DissatisfiedSpecification` and extend from `DomainException`.
14+
- Marked the following classes as final:
15+
- `AndSpecification`.
16+
- `NotSpecification`.
17+
- `OrSpecification`.
18+
- `VerboseSpecification`.
19+
20+
### Removed
21+
22+
- Support for PHP 8.
23+
- Support for Laravel 8.
24+
525
## [v1.1.0] - 2022-03-07
626

727
### Added
@@ -12,5 +32,6 @@ All notable changes to `laravel-specification-pattern` will be documented in thi
1232

1333
- initial release
1434

35+
[v2.0.0]: https://github.com/maartenpaauw/laravel-specification-pattern/compare/v1.1.0...v2.0.0
1536
[v1.1.0]: https://github.com/maartenpaauw/laravel-specification-pattern/compare/v1.0.0...v1.1.0
1637
[v1.0.0]: https://github.com/maartenpaauw/laravel-specification-pattern/releases/tag/v1.0.0

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Laravel specification pattern
22

33
[![Latest Version on Packagist](https://img.shields.io/packagist/v/maartenpaauw/laravel-specification-pattern.svg?style=flat-square)](https://packagist.org/packages/maartenpaauw/laravel-specification-pattern)
4-
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/maartenpaauw/laravel-specification-pattern/run-tests?label=tests)](https://github.com/maartenpaauw/laravel-specification-pattern/actions?query=workflow%3Arun-tests+branch%3Amain)
5-
[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/maartenpaauw/laravel-specification-pattern/Check%20&%20fix%20styling?label=code%20style)](https://github.com/maartenpaauw/laravel-specification-pattern/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amain)
4+
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/maartenpaauw/laravel-specification-pattern/run-tests.yml?label=tests)](https://github.com/maartenpaauw/laravel-specification-pattern/actions?query=workflow%3Arun-tests+branch%3Amain)
5+
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/maartenpaauw/laravel-specification-pattern/php-cs-fixer.yml?label=code%20style)](https://github.com/maartenpaauw/laravel-specification-pattern/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amain)
6+
[![Codecov](https://codecov.io/gh/maartenpaauw/laravel-specification-pattern/branch/develop/graph/badge.svg?token=YM9A0DUA4R)](https://codecov.io/gh/maartenpaauw/laravel-specification-pattern)
67
[![Total Downloads](https://img.shields.io/packagist/dt/maartenpaauw/laravel-specification-pattern.svg?style=flat-square)](https://packagist.org/packages/maartenpaauw/laravel-specification-pattern)
78

89
Filter an Illuminate collection with specifications.

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
"require": {
1919
"php": "^8.0",
2020
"spatie/laravel-package-tools": "^1.9.2",
21-
"illuminate/contracts": "^8.83|^9.2"
21+
"illuminate/contracts": "^9.33|^10.4"
2222
},
2323
"require-dev": {
2424
"nunomaduro/collision": "^5.11|^6.1",
25-
"nunomaduro/larastan": "^1.0",
26-
"orchestra/testbench": "^6.22",
25+
"nunomaduro/larastan": "^1.0|^2.1",
26+
"orchestra/testbench": "^6.22|^7.0",
2727
"pestphp/pest": "^1.21",
2828
"pestphp/pest-plugin-laravel": "^1.1",
2929
"phpstan/extension-installer": "^1.1",
@@ -46,7 +46,7 @@
4646
"scripts": {
4747
"analyse": "vendor/bin/phpstan analyse",
4848
"test": "vendor/bin/pest",
49-
"test-coverage": "vendor/bin/pest coverage"
49+
"test-coverage": "vendor/bin/pest --coverage"
5050
},
5151
"config": {
5252
"sort-packages": true,

config/specification-pattern.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
return [
46
'collection-method' => 'matching',
57
];

0 commit comments

Comments
 (0)