Sinergi Framework Project bootstrap
Sinergi Framework is a PHP framework built for developers who want control on which package they use in their application.
It is built to really leverage the advantages of Composer, and offers a very flexible structure.
- Optimization for production
Sinergi includes Composer packages for the following features, each package can be replaced by your favorite one:
- Config (included module is Config)
- Routing (included module is klein.php)
- ORM (included module is Doctrine ORM)
- Templating engine (included module is Twig)
- Commands (included module is Symfony Console)
- Gearman Workers (included module is Gearman Handler)
- Unit Testing (included module is PHPUnit)
Sinergi includes a ready to go Vagrant development environment.
- CentOS 6.5
- PHP 5.5
- MySQL 5.5
- nginx 1.6
- Gearman 1.0
- Xdebug 2.2
instead of the files in the
Sinergi is already configured to be able to compile SCSS code.
Compass will concatenate and minimize the files in the
scss directory and put them in the
For specific documentation on the different packages used by Sinergi, please refer to the packages documentation:
It is recommended that you install the Sinergi Framework through composer. To do so, consider the following command:
composer create-project sinergi/sinergi
Alternatively, you can simply download the most recent release.
To get started, boot your Vagrant VM with the following command:
You can then access this VM in your browser by typing
192.168.56.100 in the address bar.
Note to Windows users, the Windows firewall can cause problems with Xdebug and the site may not be accessible, you may have to edit your firewall settings to use Xdebug.
To register a router in your app, edit the
bin/router.php file and add your router:
To register a command in your app, edit the
bin/command.php file and add your command:
To use a command found in your app, enter the following command in a terminal:
php bin/command example
To use the Doctrine Console, simply enter the following command:
php bin/doctrine --list
To use the Gearman commands, simply enter the following command:
sudo php bin/gearman start
This section will be more detailed later.
These optimizations will make your application blazing fast in production:
- Setup Twig cache
- Setup Doctrine cache
- Setup Autoloading with Composer
- Execute Grunt