Symfony Sandbox archive is good for prototyping and evaluation purpose. Although this is not a good practice, but sometimes developers will just hack the Sandbox and turn it into a full fledge web application. And they will regret later when they find that they need to upgrade their Symfony core engines because all the Symfony core files are mixing together with the web app files and there is no way to know which files are Symfony files and which are generated files and which are application-specific files.
I ran into the same problem myself. Initially I was just thinking about playing with Symfony. So I got the Sandbox version and played with it. Little did I realize that the toy application gradually turned into a full web application. And I realized that Symfony has been upgrading the framework at a frantic pace. Not wanting to miss all the new features and bug fixes, I had to do some restructuring to keep the Symfony framework out from my core application.
Here are the steps that I did:
- First, you need to have PEAR package installed. If you are using PHP installer, you need to turn on the PEAR extension during the Installation process. After that, you must install PEAR package manager.
- Now, you must install the PEAR Symfony package. The way to do this is to:
pear channel-discover pear.symfony-project.com pear install symfony/symfony
- You can check the Symfony version by typing in the following command, make sure it's the latest, and that the Symfony file path is correct. In my case it's "C:\Program Files\PHP\PEAR\Symfony"
- OK, so now you have the correct Symfony framework setup at the correct place. It's time to delete the Symfony framework inside your sandbox application. To do this, delete the following folders:
- Now, go to Sanbox_App/config/ProjectConfiguration.class.php, rename
require_once 'C:\Program Files\PHP\PEAR\symfony\autoload\sfCoreAutoload.class.php';
- cd to the Sandbox_App directory, rebuild the model, forms, fitlers, and clear the cache using the following command:
$ php symfony propel:build-model php symfony propel:build-forms php symfony propel:build-filters php symfony cache:clear