Hamilton Turner fdb81acfc6 Download ActiveRecord ORM from composer 10 年 前
..
Yii2 9432a262f1 Move Yii2 into properly-named directory 10 年 前
cakephp 10f6351977 Upgrade CakePHP to latest release - 2.5.7 10 年 前
codeigniter d1e96936f5 Move php-codeigniter to codeigniter 10 年 前
hhvm f1220cd6b3 Started PHP and fixed a Scala 10 年 前
kohana 10cf79915c Renamed php-kohana to kohana 10 年 前
lithium 50d305c87d Remove bash_profiles 10 年 前
php fdb81acfc6 Download ActiveRecord ORM from composer 10 年 前
php-fatfree e7c3473e0a Convert setup.py to setup.sh for php-fatfree 10 年 前
php-fuel bd808a10e6 fix typo in setup.sh for php-fuel 10 年 前
php-laravel e8c09372f2 Convert setup.py to setup.sh for php-laravel. Was unable to fully test due 10 年 前
php-micromvc ba7c9a62e3 Convert setup.py to setup.sh for php-micromvc 10 年 前
php-phalcon 84fc15b090 create stand alone install for php-phalcon (for use with php-phalcon 10 年 前
php-phalcon-micro 84fc15b090 create stand alone install for php-phalcon (for use with php-phalcon 10 年 前
php-phpixie 4a0a073cf9 Convert setup.py to setup.sh for php-phpixie. Includes changes to separate 10 年 前
php-pimf 2f8c92ffa5 Convert setup.py and setup-raw.py to setup.sh and setup-raw.sh. Confirmed 10 年 前
php-senthot 9732233479 Attempts to convert setup.py/setup-raw.py to setup.sh/setup-raw.sh for 10 年 前
php-silex 9732233479 Attempts to convert setup.py/setup-raw.py to setup.sh/setup-raw.sh for 10 年 前
php-silex-orm feb766dcfe Convert setup.py to setup.sh for php-silex-orm 10 年 前
php-silica 5f7ec0f8a8 Convert setup.py to setup.sh for php-silica 10 年 前
php-slim 4d9a515714 Convert setup.py to setup.sh for php-slim. 10 年 前
php-symfony2 c6d25304c1 Convert setup.py to setup.sh for php-symfony2 10 年 前
php-symfony2-stripped 1df2cbaf1f correct typo in setup.sh for php-symfony2-stripped 10 年 前
php-yaf 020891ac3c Convert setup.py to setup.sh for php-yaf 10 年 前
php-zend-framework 7944e5b199 Convert setup.py to setup.sh for ZendFramework and ZendFramework1 10 年 前
php-zend-framework1 7944e5b199 Convert setup.py to setup.sh for ZendFramework and ZendFramework1 10 年 前
phreeze 50d305c87d Remove bash_profiles 10 年 前
README.md 9cadc4c7e2 Download kohana using composer 10 年 前

README.md

Tricks to writing PHP-based Frameworks

Many servers use the php, php-fpm, or other binaries. If your server launches with sudo (e.g. sudo php-fpm) then you should be aware that using sudo resets the $PATH environment variable, and your specific binary may not be the one being used. The solution is to always use sudo <full-path-to-my-binary>. For example, cakephp's bash_profile.sh sets the variable $PHP_FPM to be the full path to the php-fpm binary that cakephp wants, and then uses sudo $PHP_FPM to ensure that the php-fpm binary used by sudo is the exact binary desired.

Dependency Management Using Composer

Many PHP apps use Composer for dependency management. To support this, setup your install.sh with these two commands

# Note the order! Composer depends on PHP so it has to come second
fw_depends php composer 

# Download dependencies
${IROOT}/php-5.5.17/bin/php $IROOT/composer.phar install \
--no-interaction --working-dir $TROOT --no-progress \
--optimize-autoloader 

Add your composer.json file to your framework's folder, e.g. php-fuel/composer.json. After installation runs, your framework folder will have a new vendor folder, e.g. php-fuel/vendor that contains all dependencies.

One-time Composer Setup

Composer uses Github a lot, enough so that it is common for it to exceed the API limit and cause infinite hangs or installation failures. To avoid this, it is necessary to generate a composer.lock file by manually running the installation one time - this file will list the exact github URLs that are needed for this project, which is then used by subsequent composer commands to avoid Github's rate limits. More on this here and here

You need to generate composer.lock manually, and then add it to your framework's folder. This must be done manually because it will require you to provide input. Use these steps

# Run one installation to ensure PHP is installed
cd FrameworkBenchmarks
toolset/run-tests.py --install server --install-only --test <your test>

# Switch to the user that runs tests
sudo su testrunner

# Define the environment variables you need (modify as needed)
export IROOT=/home/you/FrameworkBenchmarks/installs
export TROOT=/home/you/FrameworkBenchmarks/frameworks/PHP/php-yii2

# Run the installation shown above
#
# This will manually prompt you for your Github credentials 
# to avoid the Github rate limit, and when this command
# finishes running you will have a new file composer.lock
${IROOT}/php-5.5.17/bin/php $IROOT/composer.phar install \
  --working-dir $TROOT

# Add the lock file to this repository so it's used for all 
# future installations
git add -f composer.lock

NOTE: You should run this process manually once to generate the composer.lock file

Updating Composer setup

If you update composer.json, you need to re-run the above process to generate a new composer.lock file. If you forget to do this, you will see this error message when running the framework:

Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.

Debugging PHP Frameworks

The first stop for HTTP 500 errors is to enable stack traces. Update config/php-fpm.conf to include php_flag[display_errors] = on.