Following the lead of Niko at Prendre un Cafe, I decided that I wanted to experience the new features of Symfony 1.1. First, let me say that I can’t read French, but I got the gist of what to do from the well documented Symfony 1.1 setup steps that Niko provided. Niko’s installation technique allows Symfony 1.0 and Symfony 1.1 to be run in parallel.
Some of the new features of Symfony 1.1:
- Configuration is moving away from the config.php file to a configuration class
- Form and validation classes have been reworked
- Better UJS support
- CLI tasks as classes
I will investigating these changes over the next week or so as I build a test application to explore these changes. For now, though, here is how I installed Symfony 1.1 on Ubuntu. Once again this install process was greatly aided by a post at Prendre un Cafe. Thanks.
First, install Symfony 1.1.
cd /usr/share/php5 , this is where my Symfony 1.0x install resides.
svn co http://svn.symfony-project.com/branches/1.1/ symfony11
Second, hook up the CLI command symfony11 to the right place in the newly installed Symfony 1.1 and verify the command and install.
ln -s /usr/share/php5/symfony11/data/bin/symfony /usr/bin/symfony11
symfony11 -V
The symfony11 -V command should output something similar to “symfony version 1.1.0-DEV (/usr/share/php5/symfony11/lib).”
Next, create a test directory in your Symfony projects directory, generate a test project and an app.
cd /path/to/sf/projects/
mkdir sf11test
cd sf11test
symfony11 generate:project sf11test
symfony11 generate:app frontend
Edit your Apache2 virtual host file.
<VirtualHost *:80>
ServerName local.sf11.com
DocumentRoot "/path/to/symfony/projects/sf11test/web"
DirectoryIndex index.php
Alias /sf /usr/share/php5/symfony11/data/web/sf
<Directory "/usr/share/php5/symfony11/data/web/sf">
AllowOverride All
Allow from All
</Directory>
<Directory "/path/to/symfony/projects/sf11test/web">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
Remember to change /path/to/symfony/projects and /usr/share/php5/symfony11/ to reflect your paths.
Finally, edit your /etc/hosts file to include local.sf11.com or whatever your fake domain happens to be.
You can now surf to local.sf11.com to see your newly installed Symfony 1.1 project.