Mirage
Mirage

Reputation: 31548

Do I need to chnage the autoload.php file for composer to work with symfony?

I was using symfony vendors/install to update the new modules. I have downloaded the module but i am confused with composer.

In my deps file i already have many new bundles which i have downloaded.

  1. Now if i use composer how will those bundles gets updated. Do i need to convert the Deps equivalent file for composer.json.
  2. Now do i also need to chnage my autoload.php file to use composer
  3. If i need to install new bundle , then will my old bundles stay as it is which were installed with vendors

Upvotes: 0

Views: 1366

Answers (1)

Jakub Zalas
Jakub Zalas

Reputation: 36201

Now if i use composer how will those bundles gets updated. Do i need to convert the Deps equivalent file for composer.json.

Your deps file needs to be converted into composer.json.

composer.lock is something similar to deps.lock and it's auto-generated. When running install command composer will use composer.lock to install locked versions. Running update command will update packages and store installed versions in composer.lock.

Now do i also need to chnage my autoload.php file to use composer

Only if you transition from using vendors script to composer. You'll have to update your app/autoload.php file just once to include the file generated by composer. Look at an example in symfony-standard (master branch) or here.

Composer will regenerate the autoloader for you each time you run install or update command.

Upvotes: 2

Related Questions