Skip to content

Commit 23813b5

Browse files
authored
laravel-11 (#8)
* laravel-11 * Fix styling --------- Co-authored-by: Ms_Natali <golubkova@greensight.ru> Co-authored-by: MsNatali <MsNatali@users.noreply.github.com>
1 parent 22ec0ce commit 23813b5

20 files changed

+152
-13
lines changed

.github/CONTRIBUTING.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
Please read and understand the contribution guide before creating an issue or pull request.
6+
7+
## Etiquette
8+
9+
This project is open source, and as such, the maintainers give their free time to build and maintain the source code
10+
held within. They make the code freely available in the hope that it will be of use to other developers. It would be
11+
extremely unfair for them to suffer abuse or anger for their hard work.
12+
13+
Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
14+
world that developers are civilized and selfless people.
15+
16+
It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
17+
quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.
18+
19+
## Viability
20+
21+
When requesting or submitting new features, first consider whether it might be useful to others. Open
22+
source projects are used by many developers, who may have entirely different needs to your own. Think about
23+
whether or not your feature is likely to be used by other users of the project.
24+
25+
## Procedure
26+
27+
Before filing an issue:
28+
29+
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
30+
- Check to make sure your feature suggestion isn't already present within the project.
31+
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
32+
- Check the pull requests tab to ensure that the feature isn't already in progress.
33+
34+
Before submitting a pull request:
35+
36+
- Check the codebase to ensure that your feature doesn't already exist.
37+
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
38+
39+
## Requirements
40+
41+
If the project maintainer has any additional requirements, you will find them listed here.
42+
43+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
44+
45+
- **Use hooks!** - You can make use of .git hooks if you install them using `npm i`
46+
47+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
48+
49+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
50+
51+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
52+
53+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
54+
55+
**Happy coding**!

.github/SECURITY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Security Policy
2+
3+
If you discover any security related issues, please email mail@greensight.ru instead of using the issue tracker.

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Check & fix styling
2+
3+
on: [push]
4+
5+
jobs:
6+
php-cs-fixer:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
with:
13+
ref: ${{ github.head_ref }}
14+
15+
- name: Run PHP CS Fixer
16+
uses: docker://oskarstark/php-cs-fixer-ga
17+
with:
18+
args: --config=.php-cs-fixer.php --allow-risky=yes
19+
20+
- name: Commit changes
21+
uses: stefanzweifel/git-auto-commit-action@v4
22+
with:
23+
commit_message: Fix styling

.github/workflows/run-tests.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: run-tests
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
php: [8.1, 8.2, 8.3]
16+
laravel: [9.*, 10.*, 11.*]
17+
include:
18+
- laravel: 9.*
19+
testbench: 7.*
20+
- laravel: 10.*
21+
testbench: 8.*
22+
- laravel: 11.*
23+
testbench: 9.*
24+
exclude:
25+
- laravel: 11.*
26+
php: 8.1
27+
28+
name: P${{ matrix.php }} - L${{ matrix.laravel }}
29+
30+
31+
steps:
32+
- name: Checkout code
33+
uses: actions/checkout@v2
34+
35+
- name: Setup PHP
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: ${{ matrix.php }}
39+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
40+
coverage: none
41+
42+
- name: Setup problem matchers
43+
run: |
44+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
45+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
46+
- name: Install dependencies
47+
run: |
48+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
49+
composer update --prefer-stable --prefer-dist --no-interaction
50+
- name: Execute tests
51+
run: vendor/bin/pest

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111
"license": "MIT",
1212
"require": {
1313
"php": "^8.1",
14-
"laravel/framework": "^9.0 || ^10.0",
14+
"laravel/framework": "^9.0 || ^10.0 || ^11.0",
1515
"spatie/laravel-query-builder": "^5.0"
1616
},
1717
"require-dev": {
1818
"friendsofphp/php-cs-fixer": "^3.9",
1919
"laravel/pint": "^1.0",
20-
"nunomaduro/collision": "^6.0 || ^7.0",
21-
"orchestra/testbench": "^7.0 || ^8.0",
20+
"nunomaduro/collision": "^6.0 || ^7.0 || ^8.1",
21+
"orchestra/testbench": "^6.0||^7.0||^8.0||^9.0",
2222
"pestphp/pest": "^1.21 || ^2.0",
2323
"pestphp/pest-plugin-laravel": "^1.1 || ^2.0",
2424
"phpstan/extension-installer": "^1.3",
25-
"phpunit/phpunit": "^9.5 || ^10.0",
25+
"phpunit/phpunit": "^9.0||^10.0||^11.0",
2626
"spaze/phpstan-disallowed-calls": "^2.16"
2727
},
2828
"autoload": {

src/Filters/ExtraFilter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
namespace Ensi\QueryBuilderHelpers\Filters;
44

55
use Closure;
6+
use Ensi\QueryBuilderHelpers\Enums\LikeMode;
7+
use Ensi\QueryBuilderHelpers\Enums\RangeOperator;
8+
use Ensi\QueryBuilderHelpers\QueryFilters\FiltersArrayContain;
9+
use Ensi\QueryBuilderHelpers\QueryFilters\FiltersArrayExact;
610
use Ensi\QueryBuilderHelpers\QueryFilters\FiltersDateExact;
711
use Ensi\QueryBuilderHelpers\QueryFilters\FiltersDateNot;
812
use Ensi\QueryBuilderHelpers\QueryFilters\FiltersDateRange;
913
use Ensi\QueryBuilderHelpers\QueryFilters\FiltersEmpty;
1014
use Ensi\QueryBuilderHelpers\QueryFilters\FiltersHas;
11-
use Ensi\QueryBuilderHelpers\QueryFilters\FiltersArrayContain;
12-
use Ensi\QueryBuilderHelpers\QueryFilters\FiltersArrayExact;
1315
use Ensi\QueryBuilderHelpers\QueryFilters\FiltersLike;
1416
use Ensi\QueryBuilderHelpers\QueryFilters\FiltersNot;
1517
use Ensi\QueryBuilderHelpers\QueryFilters\FiltersPredefined;
1618
use Ensi\QueryBuilderHelpers\QueryFilters\FiltersRange;
1719
use Ensi\QueryBuilderHelpers\QueryFilters\NestedFilter;
1820
use Ensi\QueryBuilderHelpers\QueryFilters\NestedScope;
19-
use Ensi\QueryBuilderHelpers\Enums\LikeMode;
20-
use Ensi\QueryBuilderHelpers\Enums\RangeOperator;
2121
use Spatie\QueryBuilder\AllowedFilter;
2222

2323
class ExtraFilter

tests/Component/ExtraFilterTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use Ensi\QueryBuilderHelpers\Filters\ExtraFilter;
44
use Ensi\QueryBuilderHelpers\Tests\Models\ParentModel;
5+
56
use function Pest\Laravel\postJson;
67

78
test('one value as array', function (array $filter) {

tests/Component/FiltersDateNotTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use Ensi\QueryBuilderHelpers\Filters\ExtraFilter;
44
use Ensi\QueryBuilderHelpers\Tests\Models\ParentModel;
5+
56
use function Pest\Laravel\postJson;
67

78
test('filter exclude date success', function (string|int|array $value, int $count, bool $timestampMs = true) {

tests/Component/FiltersEmptyTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use Ensi\QueryBuilderHelpers\Filters\ExtraFilter;
44
use Ensi\QueryBuilderHelpers\Tests\Models\ChildModel;
55
use Ensi\QueryBuilderHelpers\Tests\Models\ParentModel;
6+
67
use function Pest\Laravel\postJson;
78

89
test('empty', function (array $filter) {

tests/Component/FiltersHasTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use Ensi\QueryBuilderHelpers\Filters\ExtraFilter;
44
use Ensi\QueryBuilderHelpers\Tests\Models\GrandChildModel;
55
use Ensi\QueryBuilderHelpers\Tests\Models\ParentModel;
6+
67
use function Pest\Laravel\postJson;
78

89
test('has', function (array $filter) {

0 commit comments

Comments
 (0)