Skip to content

Commit b42ec38

Browse files
committed
feat: use wouterj/eloquent-bundle
1 parent 4d15cac commit b42ec38

File tree

20 files changed

+2279
-327
lines changed

20 files changed

+2279
-327
lines changed

.env

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,12 @@ APP_SECRET=3bUhVCRkHJfT2ZJTqBnvkclRFT1zy1ig
2323
# To test the production environment, run "make go-prod" or "castor symfony:go-prod"
2424

2525
# To come back to the development environment, run "make go-dev" or "castor symfony:go-dev"
26+
27+
###> wouterj/eloquent-bundle ###
28+
DB_CONNECTION=sqlite
29+
#DB_HOST=127.0.0.1
30+
#DB_PORT=3306
31+
DB_DATABASE=var/data.db
32+
#DB_USERNAME=root
33+
#DB_PASSWORD=
34+
###< wouterj/eloquent-bundle ###

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ help: ## Outputs this help screen
88
.PHONY: version-php version-composer version-symfony version-phpunit version-phpstan version-php-cs-fixer check-requirements
99

1010
# You can modify the coverage threshold here
11-
COVERAGE_THRESHOLD = 100
11+
COVERAGE_THRESHOLD = 80
1212

1313
## —— Symfony binary 💻 ————————————————————————————————————————————————————————
1414
start: ## Serve the application with the Symfony binary
@@ -36,13 +36,18 @@ warmup: ## Warmup the dev cache for the static analysis
3636
purge: ## Purge all Symfony cache and logs
3737
@rm -rf ./var/cache/* ./var/logs/* ./var/coverage/*
3838

39+
load-fixtures: ## Reset migrations and load the database fixtures
40+
@rm -f ./var/data.db
41+
@touch ./var/data.db
42+
@bin/console eloquent:migrate:fresh --seed
43+
3944

4045
## —— Tests ✅ —————————————————————————————————————————————————————————————————
41-
test: ## Run all PHPUnit tests
46+
test: purge load-fixtures ## Run all PHPUnit tests
4247
@vendor/bin/phpunit
4348

4449
coverage: ## Generate the HTML PHPUnit code coverage report (stored in var/coverage)
45-
coverage: purge
50+
coverage: purge load-fixtures
4651
@XDEBUG_MODE=coverage php -d xdebug.enable=1 -d memory_limit=-1 vendor/bin/phpunit --coverage-html=var/coverage --coverage-clover=var/coverage/clover.xml
4752
@php bin/coverage-checker.php var/coverage/clover.xml $(COVERAGE_THRESHOLD)
4853

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ These branches will be rebased after each release so they are always up to date.
186186

187187
## References 📚
188188

189+
* [WouterJ/WouterJEloquentBundle](https://github.com/WouterJ/WouterJEloquentBundle) (github.com)
189190
* [A better ADR pattern for your Symfony controllers](https://www.strangebuzz.com/en/blog/a-better-adr-pattern-for-your-symfony-controllers) (strangebuzz.com) (coming soon)
190191
* [My Taskfile configuration for Symfony](https://jmsche.fr/en/blog/my-taskfile-configuration-for-symfony) (jmsche.fr)
191192
* [You should be using PHPStans bleeding edge](https://backendtea.com/post/use-phpstan-bleeding-edge/) (backendtea.com)

castor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// use function Castor\parallel;
1717

1818
// You can modify the coverage threshold here
19-
const COVERAGE_THRESHOLD = 100;
19+
const COVERAGE_THRESHOLD = 80;
2020

2121
function title(string $name): void
2222
{

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"ext-libxml": "*",
2222
"ext-simplexml": "*",
2323
"ext-xml": "*",
24+
"laravel/serializable-closure": "^1.3",
2425
"league/commonmark": "^2.4",
2526
"symfony/asset": "~7.1.0",
2627
"symfony/asset-mapper": "~7.1.0",
@@ -44,10 +45,12 @@
4445
"symfony/yaml": "~7.1.0",
4546
"twig/extra-bundle": "^3.0",
4647
"twig/markdown-extra": "^3.7",
47-
"twig/twig": "^3.0"
48+
"twig/twig": "^3.0",
49+
"wouterj/eloquent-bundle": "^2.7"
4850
},
4951
"require-dev": {
5052
"bamarni/composer-bin-plugin": "^1.8",
53+
"fakerphp/faker": "^1.23",
5154
"phpstan/extension-installer": "^1.3",
5255
"phpstan/phpstan-symfony": "^1.3",
5356
"phpunit/phpunit": "^11.0",

0 commit comments

Comments
 (0)