Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.41 KB

README.md

File metadata and controls

40 lines (30 loc) · 1.41 KB

Blog App using DDD and API versioning

Just a CRUD Blog web app with written in DDD.

Install

  • composer install
  • add git pre-commit hook

DDD References

Versioning

  • for versioning we need to switch namespaces, tests and translations

Versioning References

Git hooks

We need to have ".php_cs" config otherwise if CS-Fixer tries to lint multiple files it will get error "For multiple paths config parameter is required."

echo "php-cs-fixer pre commit hook start"

PHP_CS_FIXER="vendor/bin/php-cs-fixer"
PHP_CS_CONFIG=".php_cs"
CHANGED_FILES=$(git diff --cached --name-only --diff-filter=ACM -- '*.php')

if [ -n "$CHANGED_FILES" ]; then
    $PHP_CS_FIXER fix --config "$PHP_CS_CONFIG" $CHANGED_FILES;
    git add $CHANGED_FILES;
fi

echo "php-cs-fixer pre commit hook finish"

Laravel Sail and Docker