Assert PHP-DI Zend Expressive Doctrine PHPUnit Hamcrest Mockery
- Frontend controller: public/index.php
- Application source files: src/App
- Application test files: tests/App
- UTF-8
- PSR-2
- DEV_MODE: boolean - true in dev environment.
- BE_PATH: string - Full path to backend folder.
- build: Used by phpunit to deploy logs and html coverage files.
- cache: Used by some dependencies for cached files
- config: Contains routes and php-di config definitions.
- public: Front controller api accessed from outside.
- script: Useful PHP scripting files.
- src: Entities, services and middleware classes dispatched into modules eg:
- Common: Common classes for all modules
- Entretien: Entretien module:
- Entity: ORM Entity for each table related to entretien.
- Middleware: Middleware Actions and pipes.
- Repository: Sql queries.
- Service: Specific business classes.
- tests: Tests classes.
- vendor: Dependencies classes.
- cli-config.php: Used in testing and doctrine console.
- composer.json: Dependencies configuration.
- phpunit.xml: Phpunit configuration.
- Should be writable
- Must be cleared on each deployment in production
Run composer install
Run composer serve
Run git checkout master
Run git checkout final-project
Run vendor/bin/doctrine list
Run vendor/bin/doctrine orm:convert-mapping --namespace="App\Demo\Entity\\" --force --from-database annotation ./src/
--force
to overwrite existing entities
- On specific entity, run
vendor/bin/doctrine orm:generate-entities --filter=App\Demo\Entity\TCompteurs ./src/
- For all entities, run
vendor/bin/doctrine orm:generate-entities ./src/