- PHP >=5.3.9 (+pdo, +gd)
- MySQL (recommended: +mysql Workbench)
- Composer
- Create Database(Optional).
- Clone this Repo:
git clone https://github.com/pa-ling/sdf-symfony.git
- Configuration:
- Create file app/config/parameters.yml or copy from app/config/parameters.yml.dist and rename it.
- Set all your local paremeters.
- Install Packages:
composer install
If you have memory issue, use this command:
composer install -dmemory_limit=1G
- Create DB:
php bin/console doctrine:database:create
- Update DB Schema:
php bin/console doctrine:schema:update --force
- Create super admin user:
php bin/console fos:user:create adminuser --super-admin
- Create upload media folder & set permission to 755:
mkdir uploads && mkdir web/uploads/media && chmod 755 web/uploads/*
- Start:
php bin/console server:start
- Stop:
php bin/console server:stop
- Run:
php bin/console server:run
- Open in browser:
http://localhost:8000
- Run all tests in the Util directory:
./vendor/bin/phpunit -c app/ tests/AppBundle/Util --debug
- Run tests for the Calculator class:
./vendor/bin/phpunit -c app/ tests/AppBundle/Util/CalculatorTest.php --debug
- Run all tests for the entire Bundle:
./vendor/bin/phpunit -c app/ tests/AppBundle/ --debug
- Run after install bundle:
php bin/console cache:clear
- Generate AppBundle/Entity:
php bin/console doctrine:generate:entities AppBundle/Entity
- Dump composer Autoload:
composer dump-autoload