PST (Propel ORM - Slim Framework - Twig Template Engine) Stack in PHP is the most sophisticated stack to quickly build any kinds of PHP applicaiton. This open source application will let you create your application within maximum 120 seconds (2 minutes) without any hassle. This stack was first created to quickly build any prototype or any quick but powerful web applicaiton within hour or day and after that I made it open source to make your work more easier.
If you have not installed Composer, do that now. I prefer to install Composer globally in /usr/local/bin, but you may also install Composer locally in your current working directory. For this tutorial, I assume you have installed Composer locally.
http://getcomposer.org/doc/00-intro.md#installation
After you install Composer, run this command from the directory in which you want to install your new Propel-Slim-Twig Application stack.
sudo composer create-project previewict/pst-stack [your-app-name]
Replace [your-app-name] with the desired directory name for your new application. You'll want to:
- Point your virtual host document root to your new application's
public/directory. - create a database
- Need to configure Propel and generate it's ORM classes. For now copy/paste
propel.sample,runtime-conf.sample,schema.sampleand rename it topropel.ini,runtime-conf.xml,schema.xml - Replace all
yourdbnameinpropel.ini,runtime-conf.xmlandschema.xmlfile with your new database name. Also replace allyourdbusenamewith your database username andyourdbpasswordwith your database password. - Execute
propel/schema.xmlin your database - Now need to generate Propel ORM classes by the following command
# go into your project root (/var/www/yourprojectdirectory)
cd /var/www/yourprojectdirectory
cd propel
sudo ../vendor/propel/propel/bin/propel sql:build
sudo ../vendor/propel/propel/bin/propel model:build
sudo ../vendor/propel/propel/bin/propel config:convert- Again go to your project root and make
/tmpwritable
cd /var/www/yourprojectdirectory
#need once more composer install command to autoload newly generated propel classmap
sudo composer install
sudo chmod 777 tmp/ -RThat's it! Now go build something cool. Go to your browser and type your application host (according to your virtual host). First it will point you to http://your-virtual.host/login. You can signup and login into the application by yourself.
- Fork the Propel-Slim-Twig Application Stack
- Create a new branch for each feature or improvement
- Send a pull request from each feature branch to the develop branch
It is very important to separate new features or improvements into separate feature branches, and to send a pull request for each branch. This allows us to review and pull in new features or improvements individually.
All pull requests must adhere to the PSR-2 standard.