Skip to content

Latest commit

 

History

History
85 lines (65 loc) · 1.3 KB

README.md

File metadata and controls

85 lines (65 loc) · 1.3 KB

Setup

Requirements

Database

  • Install Psql
  • Connect to postgres psql
  • Create a db, user, and grant privileges
CREATE USER mpb WITH PASSWORD 'mpb';
CREATE DATABASE mpb;
GRANT ALL PRIVILEGES ON DATABASE "mpb" to mpb;
  • Run migrations
symfony console doctrine:migrations:migrate

Run

symfony composer install
symfony serve
npm install
npm run dev 

Tests

  • Create test database
CREATE DATABASE mpb_test;
GRANT ALL PRIVILEGES ON DATABASE "mpb_test" TO mpb;
  • Load fixtures
symfony console doctrine:migrations:migrate --env=test
symfony console doctrine:fixtures:load --env=test
  • Use phpunit to run tests
php ./vendor/bin/simple-phpunit tests
# Or using makefile
make test

Deployment

php ./vendor/bin/dep deploy
# Or using Make
make deploy

Code quality standards

We use php-cs-fixer, rector, and phpstan

php ./vendor/bin/rector process
php ./vendor/bin/phpstan analyse
php ./vendor/bin/php-cs-fixer fix src --allow-risky=yes
php ./vendor/bin/php-cs-fixer fix tests --allow-risky=yes
# Or using Make
make rector
make stan
make lint
# Or running all at once
make cs