- PHP 8.1
- Symfony client https://symfony.com/downloads
- Postgresql
- Npm
- 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
symfony composer install
symfony serve
npm install
npm run dev
- 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
php ./vendor/bin/dep deploy
# Or using Make
make deploy
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