Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composer: Updating a Project Created with `create-project`

Does composer provide a way to update the package a project was created with? i.e., if I create a new laravel project with the following

composer create-project --prefer-dist laravel/laravel blog

Composer will grab the latest version of the laravel/laravel package, unarchive it into the blog folder, and then run composer install from the blog folder.

What I want/need to know is, does composer provide a way for me to update the laravel/laravel package that was downloaded to the blog folder? I know I could run composer update inside the blog folder myself, but this will only update things listed in the compser.json's require property — it will not update the unarchived laravel/laravel in blog (or will it?)

like image 497
Alan Storm Avatar asked Apr 03 '16 23:04

Alan Storm


1 Answers

As far as I know it's not really possible.

Imagine that you create a new as example Laravel project.

The composer create-project creates the skeleton with all initial routes in your configuration etc.

From the very very first moment you are starting to change the default routes, removing the default controllers and changing the default views, your project would be out of sync. because meanwhile laravel changes the skeleton to newer versions with some new default routes etc or event changes directory structure.

It would be really hard to merge those changes over your existing application.

A better solution would be to follow the "Upgrade guides" (laravel: https://laravel.com/docs/5.4/upgrade) and then just commit those changes to your own project.

like image 161
Sander Visser Avatar answered Sep 22 '22 02:09

Sander Visser