How to install symfony 1.4 using composer?

I have some old Symfony 1.4 projects that I would like to improve using the composer.json file for their dependencies.

I was able to configure the composer to use the plugins directory rather than the vendors directory. However, according to the Symfony 1.4 documentation, the library should ideally live in "lib / vendor" from my project root.

If I were to configure my own repository package pointing to the latest 1.4.x svn file in my composer.json, how would I get it to install in lib / vendor?

+7
source share
2 answers

Actually, this is actually not a symfony issue outside of lib/vendor . He recommended using it in this way, because in this way it will be automatically loaded. Using vendor-dir in Composer, you can configure where to place your vendor's library. But this is a configuration set with root privileges only, so it cannot be configured for every needs library (at least I think so).

But you can put symfony in your plugins/ directory and then tell your application that you want to autoload everything here using apps/frontend/config/autoload.yml :

 autoload: symfony: path: %SF_PLUGIN_DIR%/symfony/lib recursive: on 

Remember to change the path in config/ProjectConfiguration.class.php :

 <?php require_once dirname(__FILE__).'/../plugins/symfony/lib/autoload/sfCoreAutoload.class.php'; 

That should do the trick.

+7
source

You can write your own composer installer .

+1
source

All Articles