"An era is over and another era begins. ”
Framework Interoperability Group (framework Interoperability Group), referred to as FIG, was established in 2009. The FIG was originally initiated by several well-known PHP framework developers, and after absorbing many excellent brains and strong physique, PSR-0 to PSR-4 five sets of PHP unofficial specifications:
1. PSR-0 (autoloading standard) automatic loading standards
2. PSR-1 (Basic Coding Standard) basic coding standards
3. PSR-2 (Coding style guide) Coding Style Wizard
4. PSR-3 (Logger Interface) Log interface
5. PSR-4 (improved autoloading) automatic loading optimization standard
Then, on top of this standard, Composer was born! Composer constructs a thriving PHP ecosystem using PSR-0 and PSR-4 and PHP5.3 's namespaces. Composer, like the famous NPM and RubyGems, provides an exceptionally convenient collaboration channel for massive PHP packages, Composer Hub address: https://packagist.org/. Composer Chinese website: http://www.phpcomposer.com/.
The current Laravel and Symfony are directly based on Composer, we are familiar with the well-known framework CI and Yii development version CodeIgniter 3 and Yii 2 are also based on Composer (Updated: Beijing Time 2014 October 13 Yii 2 has been released). Composer is the future of PHP framework, with it, so that the CI routing and Laravel eloquent ORM collaboration will become very simple.
PHP language itself with strong network functions, file management functions and Rich system api,composer is only a PHP script. Can be called directly using the following command.
PHP Composer.phar Update
Create a new folder in the right place, named MFFC (My first Framework based on Composer), and create a new file Composer.json under the folder:
{ "require": { }}
The command line switches to the MFFC directory and runs:
Composer Update
Wait a moment and the following files and folders will appear:
Using Composer to build your own PHP framework (i)