Tagged: composer-plugin

Laravel composer update failed with carbon extension

Problem: Run composer update failed with a message “providing support and update for 1.x versions, please upgrade to Carbon 2.”

This is because of carbon version 1 is deprecated, you have to use Carbon 2, but Carbon requires Laravel 5.8

Solution: According to the official Carbon website, you can just update composer.json with below content:

    "require": {
        "nesbot/carbon": "2.25.0 as 1.39.0"
        "kylekatarnls/laravel-carbon-2": "^1.0.0"

In this case, you can still be using other versions of Laravel