laravel 5.1 installation issue with php 7.1 , cannot install carbon 2

71 Views Asked by At
  • composer install error on carbon 1 is deprecated SO, how can i run my vagrant with laravel 5.1 with carbon 1 and I have try find from stackoverflow and other site but no helps comes up . every thing is done but shows carbon 1 is deprecated
1

There are 1 best solutions below

2
KyleK On

As per https://carbon.nesbot.com/

You can install Carbon 2:

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

But such an old stack will gives you so much trouble. Laravel 5.1 and PHP 7.1 are both in end of life (no longer maintained). You should upgrade the whole stack. At this point having Carbon 1 would make little difference. If you're fine with having old stuff, no longer matching their documentation, then you can ignore deprecation notices.