Skip to content

Commit 5ea912c

Browse files
authored
Initial implementation (#1)
1 parent f589401 commit 5ea912c

File tree

47 files changed

+2893
-0
lines changed

Some content is hidden

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

47 files changed

+2893
-0
lines changed

.editorconfig

Lines changed: 7 additions & 0 deletions
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

Lines changed: 12 additions & 0 deletions
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

Lines changed: 51 additions & 0 deletions
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: Update 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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/cache
2+
/vendor
3+
/phpstan.neon
4+
/composer.lock

cache/.gitkeep

Whitespace-only changes.

composer.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"name": "shipmonk/doctrine-entity-preloader",
3+
"description": "Efficient & easy to use solution to n+1 problem in Doctrine ORM",
4+
"license": [
5+
"MIT"
6+
],
7+
"require": {
8+
"php": "^8.1",
9+
"doctrine/orm": "^3",
10+
"doctrine/persistence": "^3.1"
11+
},
12+
"require-dev": {
13+
"doctrine/dbal": "^4",
14+
"editorconfig-checker/editorconfig-checker": "^10.6.0",
15+
"ergebnis/composer-normalize": "^2.42.0",
16+
"nette/utils": "^4",
17+
"phpstan/phpstan": "^1.10.67",
18+
"phpstan/phpstan-phpunit": "^1.3.16",
19+
"phpstan/phpstan-strict-rules": "^1.5.5",
20+
"phpunit/phpunit": "^10.5",
21+
"psr/log": "^3",
22+
"shipmonk/composer-dependency-analyser": "^1.5",
23+
"shipmonk/name-collision-detector": "^2.1.1",
24+
"shipmonk/phpstan-rules": "^3.2",
25+
"slevomat/coding-standard": "^8.15.0",
26+
"symfony/cache": "^6 || ^7"
27+
},
28+
"autoload": {
29+
"psr-4": {
30+
"ShipMonk\\DoctrineEntityPreloader\\": "src/"
31+
}
32+
},
33+
"autoload-dev": {
34+
"psr-4": {
35+
"ShipMonkTests\\DoctrineEntityPreloader\\": "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)