Skip to content

Commit d9ffff2

Browse files
authored
Merge pull request #28683 from driesvints/drop-carbon-1-support
[5.9] Drop Carbon v1
2 parents 88c3f53 + ccae6f4 commit d9ffff2

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"erusev/parsedown": "^1.7",
2626
"league/flysystem": "^1.0.8",
2727
"monolog/monolog": "^1.12",
28-
"nesbot/carbon": "^1.26.3 || ^2.0",
28+
"nesbot/carbon": "^2.0",
2929
"opis/closure": "^3.1",
3030
"psr/container": "^1.0",
3131
"psr/simple-cache": "^1.0",

src/Illuminate/Support/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"ext-mbstring": "*",
2020
"doctrine/inflector": "^1.1",
2121
"illuminate/contracts": "5.9.*",
22-
"nesbot/carbon": "^1.26.3 || ^2.0"
22+
"nesbot/carbon": "^2.0"
2323
},
2424
"conflict": {
2525
"tightenco/collect": "<5.5.33"

tests/Support/DateFacadeTest.php

-4
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ public function testUseClassName()
5656

5757
public function testCarbonImmutable()
5858
{
59-
if (! class_exists(CarbonImmutable::class)) {
60-
$this->markTestSkipped('Test for Carbon 2 only');
61-
}
62-
6359
DateFactory::use(CarbonImmutable::class);
6460
$this->assertSame(CarbonImmutable::class, get_class(Date::now()));
6561
DateFactory::use(Carbon::class);

tests/Support/SupportCarbonTest.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use DateTime;
66
use DateTimeInterface;
77
use BadMethodCallException;
8-
use Carbon\CarbonImmutable;
98
use Illuminate\Support\Carbon;
109
use PHPUnit\Framework\TestCase;
1110
use Carbon\Carbon as BaseCarbon;
@@ -87,11 +86,7 @@ public function testCarbonAllowsCustomSerializer()
8786

8887
public function testCarbonCanSerializeToJson()
8988
{
90-
$this->assertSame(class_exists(CarbonImmutable::class) ? '2017-06-27T13:14:15.000000Z' : [
91-
'date' => '2017-06-27 13:14:15.000000',
92-
'timezone_type' => 3,
93-
'timezone' => 'UTC',
94-
], $this->now->jsonSerialize());
89+
$this->assertSame('2017-06-27T13:14:15.000000Z', $this->now->jsonSerialize());
9590
}
9691

9792
public function testSetStateReturnsCorrectType()

0 commit comments

Comments
 (0)