Skip to content

Commit e1b225a

Browse files
committed
v1
1 parent 9b48e15 commit e1b225a

22 files changed

+1636
-0
lines changed

.editorconfig

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[*]
2+
charset = utf-8
3+
end_of_line = lf
4+
trim_trailing_whitespace = true
5+
insert_final_newline = true
6+
indent_style = space
7+
indent_size = 4

.gitattributes

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
* text=auto
2+
3+
/.github export-ignore
4+
/cache export-ignore
5+
/tests export-ignore
6+
7+
/.editorconfig export-ignore
8+
/.gitattributes export-ignore
9+
/.gitignore export-ignore
10+
/phpcs.xml.dist export-ignore
11+
/phpstan.neon.dist export-ignore
12+
/phpunit.xml.dist export-ignore

.github/workflows/checks.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Checks
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- "master"
7+
- "v[0-9]"
8+
jobs:
9+
checks:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
steps:
14+
-
15+
name: Checkout code
16+
uses: actions/checkout@v4
17+
-
18+
name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: 8.3
22+
-
23+
name: Install dependencies
24+
run: composer install --no-progress --prefer-dist --no-interaction
25+
26+
-
27+
name: Run checks
28+
run: composer check
29+
30+
tests:
31+
runs-on: ubuntu-latest
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
php-version: [ '8.1', '8.2', '8.3' ]
36+
dependency-version: [ prefer-lowest, prefer-stable ]
37+
steps:
38+
-
39+
name: Checkout code
40+
uses: actions/checkout@v4
41+
-
42+
name: Setup PHP
43+
uses: shivammathur/setup-php@v2
44+
with:
45+
php-version: ${{ matrix.php-version }}
46+
-
47+
name: Install dependencies
48+
run: composer update --no-progress --${{ matrix.dependency-version }} --prefer-dist --no-interaction
49+
-
50+
name: Run tests
51+
run: composer check:tests

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/cache
2+
/vendor
3+
/phpstan.neon
4+
/composer.lock

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Bedabox, LLC dba ShipMonk
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Doctrine Query Checker

composer.json

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"name": "shipmonk/doctrine-query-checker",
3+
"description": "Doctrine Query AST validator",
4+
"license": [
5+
"MIT"
6+
],
7+
"require": {
8+
"php": "^8.1",
9+
"doctrine/dbal": "^4.2",
10+
"doctrine/orm": "^3.2"
11+
},
12+
"require-dev": {
13+
"editorconfig-checker/editorconfig-checker": "^10.6.0",
14+
"ergebnis/composer-normalize": "^2.42.0",
15+
"nette/utils": "^4.0",
16+
"phpstan/phpstan": "^2.0",
17+
"phpstan/phpstan-phpunit": "^2.0",
18+
"phpstan/phpstan-strict-rules": "^2.0",
19+
"phpunit/phpunit": "^10.5",
20+
"ramsey/uuid": "^4.7.6",
21+
"ramsey/uuid-doctrine": "^2.1.0",
22+
"shipmonk/composer-dependency-analyser": "^1.8",
23+
"shipmonk/name-collision-detector": "^2.1",
24+
"shipmonk/phpstan-rules": "^4.1",
25+
"slevomat/coding-standard": "^8.15",
26+
"symfony/cache": "^6.4 || ^7.0"
27+
},
28+
"autoload": {
29+
"psr-4": {
30+
"ShipMonk\\DoctrineQueryChecker\\": "src/"
31+
}
32+
},
33+
"autoload-dev": {
34+
"psr-4": {
35+
"ShipMonkTests\\DoctrineQueryChecker\\": "tests/"
36+
}
37+
},
38+
"config": {
39+
"allow-plugins": {
40+
"dealerdirect/phpcodesniffer-composer-installer": true,
41+
"ergebnis/composer-normalize": true
42+
},
43+
"sort-packages": true
44+
},
45+
"scripts": {
46+
"check": [
47+
"@check:composer",
48+
"@check:ec",
49+
"@check:cs",
50+
"@check:types",
51+
"@check:tests",
52+
"@check:dependencies"
53+
],
54+
"check:composer": [
55+
"composer normalize --dry-run --no-check-lock --no-update-lock",
56+
"composer validate --strict"
57+
],
58+
"check:cs": "phpcs",
59+
"check:dependencies": "composer-dependency-analyser",
60+
"check:ec": "ec src tests",
61+
"check:tests": "phpunit tests",
62+
"check:types": "phpstan analyse -vvv",
63+
"fix:cs": "phpcbf"
64+
}
65+
}

0 commit comments

Comments
 (0)