You must first sign up to be able to contribute.

Version 3 (modified by synace, 11 years ago)
yourproject path more obvious

In order to develop a branch of symfony, you will need to be able to run it, and run a test project with it.

First, create a working directory, in which your symfony checkout, and your test projects will go.

mkdir /path/to/your/working_directory
cd /path/to/your/working_directory

Checkout your branch into a new directory on your server.

mkdir /path/to/your/working_directory/symfony
cd /path/to/your/working_directory/symfony
svn checkout

Now, edit the following files:


# Shell wrapper for symfony (based on Phing shell wrapper)
# $Id: 500 2006-01-23 09:15:57Z fabien $
# This script will do the following:
# - check for PHP_COMMAND env, if found, use it.
#   - if not found assume php is on the path
# - check for SYMFONY_HOME env, if found use it
#   - if not look for it
# - check for PHP_CLASSPATH, if found use it
#   - if not found set it using SYMFONY_HOME/lib


if (test -z "$PHP_COMMAND") ; then
  # echo "WARNING: PHP_COMMAND environment not set. (Assuming php on PATH)"
  export PHP_COMMAND=php

$PHP_COMMAND -d html_errors=off -qC $SYMFONY_HOME/symfony.php $*


Index: symfony.php
--- symfony.php	(revision 1651)
+++ symfony.php	(working copy)
@@ -6,8 +6,8 @@
 // define some PEAR directory constants
-define('PAKEFILE_LIB_DIR',  '@PEAR-DIR@');
+define('PAKEFILE_LIB_DIR',  '/usr/share/pear');
+define('PAKEFILE_DATA_DIR', '/usr/share/pear/data');
 define('PAKEFILE_SYMLINK',  false);


Index: pear.php
--- pear.php	(revision 1651)
+++ pear.php	(working copy)
@@ -1,7 +1,7 @@
-$sf_symfony_lib_dir  = '@PEAR-DIR@/symfony';
-$sf_symfony_data_dir = '@DATA-DIR@/symfony';
+$sf_symfony_lib_dir  = '/path/to/your/working_directory/symfony/lib';
+$sf_symfony_data_dir = '/path/to/your/working_directory/symfony/data';
 $sf_version          = '@SYMFONY-VERSION@';
 return 'OK';

Now, inside your working directory make a new directory called "project"

mkdir /path/to/your/working_directory/yourproject
cd /path/to/your/working_directory/yourproject

Link the symfony shell script to a local file 'symfony', for easy access from within the project directory and make the executable.

ln -s /path/to/your/working_directory/symfony/bin/ symfony
chmod a+x /path/to/your/working_directory/symfony/bin/ 

Make sure you're using the proper version now.

./symfony -V
symfony version @SYMFONY-VERSION@

Create a folder and Initialize the project

mkdir /path/to
./symfony init-project yourproject

Create symlinks for the lib and data dirs.

cd /path/to/your/working_directory/yourproject/lib
ln -s /path/to/your/working_directory/symfony/lib symfony

cd /path/to/your/working_directory/yourproject/data
ln -s /path/to/your/working_directory/symfony/data symfony

Make the log and cache directories writable

chmod 0777 -R /path/to/your/working_directory/yourproject/logs
chmod 0777 -R /path/to/your/working_directory/yourproject/cache

Create your application

./symfony init-app yourapplication

You now have a project and application running under your checked out version of symfony.

Configure apache to use the /path/to/your/working_directory/yourproject/web directory as the document root and open your browser to the page.