composer | laravel 5 - Updating dependencies but the framework itself

大兔子大兔子 提交于 2019-12-04 16:07:13

While the composer update package package ... answer is a good one, another thing you might be able to do is change your Laravel require spec to a specific commit. The Composer documentation mentions how to do this, and I've done it myself on a project (though not with laravel, on my own packages which are also in a breaking/dev state).

"require": {
    "laravel/framework": "dev-master#49e3c77b518547bb661b1de4fda64a3ae0c5c505",
    ...
}

I'd hope that, because laravel/framework 'replaces' the various illuminate/* packages, that any reliance on these (as long as the spec is 5.0-esque) that this would work without downloading the illuminate packages twice.

Doing it this way you can lock your laravel/framework (or any package) at a given commit, but still allow the standard composer update to work.

To find out what commit you're already on, if your laravel/framework dependency spec is a dev one then the vendor/laravel/framework/ directory itself should be a git repo, so just do git status in there to get the HEAD ref. Alternatively, look in composer.lock for the laravel/framework entry's source.reference value.

Composer allows you to do specific package upgrades. I used this literally the other night to upgrade a single package to fix a bug, but I didn't want to change anything else.

composer update <package1> <package2> <...>

So in your case

composer update phpunit/phpunit way/generators fzaninotto/faker

It might be more complicated when you have lots of packages - but it is a solution that works.

Yes, you can simply call

composer update vendor/package

without updating your whole project.

It will work for the packages pulled by yourself and for the dependencies

You can't really. If you use Laravel 5 this is a thing you need to deal with, development versions come with this backdraw.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!