Skip to content

Latest commit

 

History

History
127 lines (79 loc) · 2.25 KB

README.md

File metadata and controls

127 lines (79 loc) · 2.25 KB

Root Price List

Style checks Security checks Tests

Description

Simple project to display and manage the Root Club price list.

Startup

Start DDEV

ddev start

Install php dependencies

ddev composer install

Migrazione database

The project uses two database:

  • For local environment: db
  • For testing environment: db_test

Migrations on db_test are not required since LazilyRefreshDatabase trait is used. See Resetting The Database After Each Test for more information.

ddev exec php artisan migrate

Run seeders

ddev exec php artisan db:seed

To set up a fresh version of database and run seeders at the same time:

ddev exec php artisan migrate:fresh --seed

Styles and static analyzers

Run checks prior to commit

ddev exec tools/static-analysis.sh

Fix style in project with PHP CS Fixer:

ddev exec tools/fix-style.sh

To run Php Insights with verbose output:

ddev exec ./vendor/bin/phpinsights -v

Testing

Run tests with:

ddev exec vendor/bin/pest

Coverage

Run tests coverage with:

ddev xdebug

and:

ddev exec XDEBUG_MODE=coverage vendor/bin/pest --coverage

Queues

By defaults, queues are sync:

QUEUE_CONNECTION=sync

It's possible to set the async with:

QUEUE_CONNECTION=redis

Redis is used as message queues manager.

Local development

ddev exec php artisan queue:work

Test

During tests, queues are sync since in .env.testing there is:

QUEUE_CONNECTION=sync