diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 189105df..2f3eecb7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,5 +12,3 @@ jobs: uses: innmind/github-workflows/.github/workflows/psalm-matrix.yml@main cs: uses: innmind/github-workflows/.github/workflows/cs.yml@main - with: - php-version: '8.2' diff --git a/CHANGELOG.md b/CHANGELOG.md index 882e3f01..a490095f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [Unreleased] + +### Changed + +- Requires PHP `8.4` +- Requires `innmind/filesystem:~9.0` +- Requires `innmind/time:~1.0` + ## 8.0.0 - 2025-04-20 ### Added diff --git a/composer.json b/composer.json index ce69df50..563733b5 100644 --- a/composer.json +++ b/composer.json @@ -15,14 +15,14 @@ "issues": "http://github.com/Innmind/Http/issues" }, "require": { - "php": "~8.2", - "innmind/url": "~4.0", - "innmind/immutable": "~5.11", - "innmind/filesystem": "~8.0", - "innmind/io": "^3.0.1", - "innmind/time-continuum": "~4.1", - "innmind/media-type": "^2.0.1", - "innmind/validation": "~2.0", + "php": "~8.4", + "innmind/url": "~5.0", + "innmind/immutable": "~6.0", + "innmind/filesystem": "~9.0", + "innmind/io": "~4.0", + "innmind/time": "~1.0", + "innmind/media-type": "~3.0", + "innmind/validation": "~3.0", "ramsey/uuid": "~4.7" }, "autoload": { @@ -36,8 +36,8 @@ } }, "require-dev": { - "innmind/static-analysis": "^1.2.1", - "innmind/black-box": "~6.1", + "innmind/static-analysis": "~1.3", + "innmind/black-box": "~6.5", "innmind/coding-standard": "~2.0", "symfony/process": "^6.2" } diff --git a/src/Content/Multipart/Data.php b/src/Content/Multipart/Data.php index d1259021..9d7c11cb 100644 --- a/src/Content/Multipart/Data.php +++ b/src/Content/Multipart/Data.php @@ -41,7 +41,7 @@ public function size(): Maybe return Maybe::just( $this ->chunks() - ->fold(new Concat) + ->fold(Concat::monoid) ->toEncoding(Str\Encoding::ascii) ->length(), ); diff --git a/src/Content/Multipart/File.php b/src/Content/Multipart/File.php index 1587b527..84648328 100644 --- a/src/Content/Multipart/File.php +++ b/src/Content/Multipart/File.php @@ -41,7 +41,7 @@ public function size(): Maybe { $headers = $this ->headers() - ->fold(new Concat) + ->fold(Concat::monoid) ->toEncoding(Str\Encoding::ascii) ->length(); diff --git a/src/Factory/Files/Native.php b/src/Factory/Files/Native.php index 8d73ec46..ae8f1691 100644 --- a/src/Factory/Files/Native.php +++ b/src/Factory/Files/Native.php @@ -107,9 +107,11 @@ private function buildFile( */ return Either::right(File::named( $name, - Content::atPath( - $this->io, - Path::of($path), + Content::io( + $this + ->io + ->files() + ->read(Path::of($path)), ), MediaType::maybe($media)->match( static fn($media) => $media, diff --git a/src/Factory/Header/Factories.php b/src/Factory/Header/Factories.php index 8ffe2279..c0ab65bc 100644 --- a/src/Factory/Header/Factories.php +++ b/src/Factory/Header/Factories.php @@ -35,10 +35,10 @@ Header\Referrer, Header\Parameter, Header\Parameter\Quality, - TimeContinuum\Format\Http, + Time\Format\Http, Method, }; -use Innmind\TimeContinuum\Clock; +use Innmind\Time\Clock; use Innmind\Validation\Is; use Innmind\MediaType\MediaType; use Innmind\Url\Url; @@ -381,12 +381,12 @@ public function try(Clock $clock, Str $value): Maybe self::date => Is::string()->nonEmpty()($value->toString()) ->maybe() - ->flatMap(static fn($value) => $clock->at($value, Http::new())) + ->flatMap(static fn($value) => $clock->at($value, Http::new())->maybe()) ->map(Date::of(...)), self::expires => Is::string()->nonEmpty()($value->toString()) ->maybe() - ->flatMap(static fn($value) => $clock->at($value, Http::new())) + ->flatMap(static fn($value) => $clock->at($value, Http::new())->maybe()) ->map(Expires::of(...)), self::host => Url::maybe('http://'.$value->toString())->map(static fn($url) => Host::of( @@ -396,17 +396,17 @@ public function try(Clock $clock, Str $value): Maybe self::ifModifiedSince => Is::string()->nonEmpty()($value->toString()) ->maybe() - ->flatMap(static fn($value) => $clock->at($value, Http::new())) + ->flatMap(static fn($value) => $clock->at($value, Http::new())->maybe()) ->map(IfModifiedSince::of(...)), self::ifUnmodifiedSince => Is::string()->nonEmpty()($value->toString()) ->maybe() - ->flatMap(static fn($value) => $clock->at($value, Http::new())) + ->flatMap(static fn($value) => $clock->at($value, Http::new())->maybe()) ->map(IfUnmodifiedSince::of(...)), self::lastModified => Is::string()->nonEmpty()($value->toString()) ->maybe() - ->flatMap(static fn($value) => $clock->at($value, Http::new())) + ->flatMap(static fn($value) => $clock->at($value, Http::new())->maybe()) ->map(LastModified::of(...)), self::link => $value diff --git a/src/Factory/Header/Factory.php b/src/Factory/Header/Factory.php index 23c37883..0511da71 100644 --- a/src/Factory/Header/Factory.php +++ b/src/Factory/Header/Factory.php @@ -7,7 +7,7 @@ Header, Header\Value, }; -use Innmind\TimeContinuum\Clock; +use Innmind\Time\Clock; use Innmind\Immutable\Str; /** diff --git a/src/Factory/Headers/Native.php b/src/Factory/Headers/Native.php index 9b482451..0b69d676 100644 --- a/src/Factory/Headers/Native.php +++ b/src/Factory/Headers/Native.php @@ -7,7 +7,7 @@ Factory\Header\Factory, Headers, }; -use Innmind\TimeContinuum\Clock; +use Innmind\Time\Clock; use Innmind\Immutable\Str; /** diff --git a/src/Factory/HeadersFactory.php b/src/Factory/HeadersFactory.php index 111acc86..20684443 100644 --- a/src/Factory/HeadersFactory.php +++ b/src/Factory/HeadersFactory.php @@ -7,7 +7,7 @@ Headers, Factory\Headers\Native, }; -use Innmind\TimeContinuum\Clock; +use Innmind\Time\Clock; /** * @psalm-immutable diff --git a/src/Factory/ServerRequestFactory.php b/src/Factory/ServerRequestFactory.php index 9c4e337f..7fb75a38 100644 --- a/src/Factory/ServerRequestFactory.php +++ b/src/Factory/ServerRequestFactory.php @@ -9,7 +9,7 @@ ProtocolVersion, Factory, }; -use Innmind\TimeContinuum\Clock; +use Innmind\Time\Clock; use Innmind\Filesystem\File\Content; use Innmind\Url\Url; use Innmind\IO\IO; diff --git a/src/Header/Accept/MediaType.php b/src/Header/Accept/MediaType.php index 3888c8a9..82c701f7 100644 --- a/src/Header/Accept/MediaType.php +++ b/src/Header/Accept/MediaType.php @@ -3,9 +3,7 @@ namespace Innmind\Http\Header\Accept; -use Innmind\Http\{ - Header\Parameter, -}; +use Innmind\Http\Header\Parameter; use Innmind\Immutable\{ Str, Map, diff --git a/src/Header/ContentType.php b/src/Header/ContentType.php index 402cbe91..fef87233 100644 --- a/src/Header/ContentType.php +++ b/src/Header/ContentType.php @@ -33,7 +33,7 @@ public function content(): MediaType #[\Override] public function normalize(): Header { - $mediaType = new MediaType( + $mediaType = MediaType::from( $this->content->topLevel(), $this->content->subType(), $this->content->suffix(), diff --git a/src/Header/ContentType/Boundary.php b/src/Header/ContentType/Boundary.php index 66004c4d..d23db904 100644 --- a/src/Header/ContentType/Boundary.php +++ b/src/Header/ContentType/Boundary.php @@ -67,11 +67,11 @@ public function value(): string public function toHeader(): ContentType { - return ContentType::of(new MediaType\MediaType( - 'multipart', + return ContentType::of(MediaType\MediaType::from( + MediaType\TopLevel::multipart, 'form-data', '', - new MediaType\Parameter( + MediaType\Parameter::from( 'boundary', $this->value, ), diff --git a/src/Header/Date.php b/src/Header/Date.php index 3973f334..f7664f95 100644 --- a/src/Header/Date.php +++ b/src/Header/Date.php @@ -5,10 +5,10 @@ use Innmind\Http\{ Header, - TimeContinuum\Format\Http, + Time\Format\Http, }; -use Innmind\TimeContinuum\{ - PointInTime, +use Innmind\Time\{ + Point, Offset, }; @@ -18,19 +18,19 @@ final class Date implements Custom { private function __construct( - private PointInTime $point, + private Point $point, ) { } /** * @psalm-pure */ - public static function of(PointInTime $point): self + public static function of(Point $point): self { return new self($point); } - public function date(): PointInTime + public function date(): Point { return $this->point; } diff --git a/src/Header/Expires.php b/src/Header/Expires.php index d9f5f13d..2dc62fd1 100644 --- a/src/Header/Expires.php +++ b/src/Header/Expires.php @@ -5,10 +5,10 @@ use Innmind\Http\{ Header, - TimeContinuum\Format\Http, + Time\Format\Http, }; -use Innmind\TimeContinuum\{ - PointInTime, +use Innmind\Time\{ + Point, Offset, }; @@ -18,19 +18,19 @@ final class Expires implements Custom { private function __construct( - private PointInTime $point, + private Point $point, ) { } /** * @psalm-pure */ - public static function of(PointInTime $point): self + public static function of(Point $point): self { return new self($point); } - public function date(): PointInTime + public function date(): Point { return $this->point; } diff --git a/src/Header/IfModifiedSince.php b/src/Header/IfModifiedSince.php index 63c0c57b..19cc8226 100644 --- a/src/Header/IfModifiedSince.php +++ b/src/Header/IfModifiedSince.php @@ -5,10 +5,10 @@ use Innmind\Http\{ Header, - TimeContinuum\Format\Http, + Time\Format\Http, }; -use Innmind\TimeContinuum\{ - PointInTime, +use Innmind\Time\{ + Point, Offset, }; @@ -18,19 +18,19 @@ final class IfModifiedSince implements Custom { private function __construct( - private PointInTime $point, + private Point $point, ) { } /** * @psalm-pure */ - public static function of(PointInTime $point): self + public static function of(Point $point): self { return new self($point); } - public function date(): PointInTime + public function date(): Point { return $this->point; } diff --git a/src/Header/IfUnmodifiedSince.php b/src/Header/IfUnmodifiedSince.php index 1c57a8fd..3110fd8d 100644 --- a/src/Header/IfUnmodifiedSince.php +++ b/src/Header/IfUnmodifiedSince.php @@ -5,10 +5,10 @@ use Innmind\Http\{ Header, - TimeContinuum\Format\Http, + Time\Format\Http, }; -use Innmind\TimeContinuum\{ - PointInTime, +use Innmind\Time\{ + Point, Offset, }; @@ -18,19 +18,19 @@ final class IfUnmodifiedSince implements Custom { private function __construct( - private PointInTime $point, + private Point $point, ) { } /** * @psalm-pure */ - public static function of(PointInTime $point): self + public static function of(Point $point): self { return new self($point); } - public function date(): PointInTime + public function date(): Point { return $this->point; } diff --git a/src/Header/LastModified.php b/src/Header/LastModified.php index 9d6abdc8..81d49edd 100644 --- a/src/Header/LastModified.php +++ b/src/Header/LastModified.php @@ -5,10 +5,10 @@ use Innmind\Http\{ Header, - TimeContinuum\Format\Http, + Time\Format\Http, }; -use Innmind\TimeContinuum\{ - PointInTime, +use Innmind\Time\{ + Point, Offset, }; @@ -18,19 +18,19 @@ final class LastModified implements Custom { private function __construct( - private PointInTime $point, + private Point $point, ) { } /** * @psalm-pure */ - public static function of(PointInTime $point): self + public static function of(Point $point): self { return new self($point); } - public function date(): PointInTime + public function date(): Point { return $this->point; } diff --git a/src/Header/SetCookie/Expires.php b/src/Header/SetCookie/Expires.php index 9dd0710f..93d67878 100644 --- a/src/Header/SetCookie/Expires.php +++ b/src/Header/SetCookie/Expires.php @@ -5,10 +5,10 @@ use Innmind\Http\{ Header\Parameter, - TimeContinuum\Format\Http, + Time\Format\Http, }; -use Innmind\TimeContinuum\{ - PointInTime, +use Innmind\Time\{ + Point, Offset, }; @@ -18,19 +18,19 @@ final class Expires { private function __construct( - private PointInTime $date, + private Point $date, ) { } /** * @psalm-pure */ - public static function at(PointInTime $date): self + public static function at(Point $date): self { return new self($date->changeOffset(Offset::utc())); } - public function date(): PointInTime + public function date(): Point { return $this->date; } diff --git a/src/Response/Sender/Native.php b/src/Response/Sender/Native.php index d7befdd0..77404969 100644 --- a/src/Response/Sender/Native.php +++ b/src/Response/Sender/Native.php @@ -10,7 +10,7 @@ Header\SetCookie, Exception\LogicException, }; -use Innmind\TimeContinuum\{ +use Innmind\Time\{ Clock, Format, }; diff --git a/src/TimeContinuum/Format/Http.php b/src/Time/Format/Http.php similarity index 71% rename from src/TimeContinuum/Format/Http.php rename to src/Time/Format/Http.php index 6e591ae2..506a29c8 100644 --- a/src/TimeContinuum/Format/Http.php +++ b/src/Time/Format/Http.php @@ -1,9 +1,9 @@ assertSame($q, $a->quality()); $this->assertSame('unicode-1-1;q=0.8', $a->toString()); - Charset::maybe('iso-8859-5', Quality::max())->match( + $_ = Charset::maybe('iso-8859-5', Quality::max())->match( static fn($charset) => $charset, static fn() => throw new \Exception, ); - Charset::maybe('Shift_JIS', Quality::max())->match( + $_ = Charset::maybe('Shift_JIS', Quality::max())->match( static fn($charset) => $charset, static fn() => throw new \Exception, ); - Charset::maybe('ISO_8859-9:1989', Quality::max())->match( + $_ = Charset::maybe('ISO_8859-9:1989', Quality::max())->match( static fn($charset) => $charset, static fn() => throw new \Exception, ); - Charset::maybe('NF_Z_62-010_(1973)', Quality::max())->match( + $_ = Charset::maybe('NF_Z_62-010_(1973)', Quality::max())->match( static fn($charset) => $charset, static fn() => throw new \Exception, ); - Charset::maybe('*', Quality::max())->match( + $_ = Charset::maybe('*', Quality::max())->match( static fn($charset) => $charset, static fn() => throw new \Exception, ); diff --git a/tests/Header/AcceptEncodingValueTest.php b/tests/Header/AcceptEncodingValueTest.php index 37f7a22f..c11fd496 100644 --- a/tests/Header/AcceptEncodingValueTest.php +++ b/tests/Header/AcceptEncodingValueTest.php @@ -23,19 +23,19 @@ public function testInterface() $this->assertSame($q, $a->quality()); $this->assertSame('compress;q=1', $a->toString()); - Encoding::maybe('*', Quality::max())->match( + $_ = Encoding::maybe('*', Quality::max())->match( static fn($encoding) => $encoding, static fn() => throw new \Exception, ); - Encoding::maybe('compress', Quality::of(50))->match( + $_ = Encoding::maybe('compress', Quality::of(50))->match( static fn($encoding) => $encoding, static fn() => throw new \Exception, ); - Encoding::maybe('identity', Quality::of(50))->match( + $_ = Encoding::maybe('identity', Quality::of(50))->match( static fn($encoding) => $encoding, static fn() => throw new \Exception, ); - Encoding::maybe('*', Quality::of(0))->match( + $_ = Encoding::maybe('*', Quality::of(0))->match( static fn($encoding) => $encoding, static fn() => throw new \Exception, ); diff --git a/tests/Header/AcceptLanguageValueTest.php b/tests/Header/AcceptLanguageValueTest.php index b5205805..59dc6dad 100644 --- a/tests/Header/AcceptLanguageValueTest.php +++ b/tests/Header/AcceptLanguageValueTest.php @@ -23,19 +23,19 @@ public function testInterface() $this->assertSame($q, $a->quality()); $this->assertSame('en-gb;q=0.8', $a->toString()); - Language::maybe('fr', Quality::max())->match( + $_ = Language::maybe('fr', Quality::max())->match( static fn($language) => $language, static fn() => throw new \Exception, ); - Language::maybe('fr-FR', Quality::max())->match( + $_ = Language::maybe('fr-FR', Quality::max())->match( static fn($language) => $language, static fn() => throw new \Exception, ); - Language::maybe('sgn-CH-DE', Quality::max())->match( + $_ = Language::maybe('sgn-CH-DE', Quality::max())->match( static fn($language) => $language, static fn() => throw new \Exception, ); - Language::maybe('*', Quality::max())->match( + $_ = Language::maybe('*', Quality::max())->match( static fn($language) => $language, static fn() => throw new \Exception, ); diff --git a/tests/Header/AcceptValueTest.php b/tests/Header/AcceptValueTest.php index 6da58996..ee3c876e 100644 --- a/tests/Header/AcceptValueTest.php +++ b/tests/Header/AcceptValueTest.php @@ -33,28 +33,28 @@ public function testInterface() )); $this->assertSame('text/x-c;q=0.8', $a->toString()); - MediaType::maybe( + $_ = MediaType::maybe( '*', '*', )->match( static fn($mediaType) => $mediaType, static fn() => throw new \Exception, ); - MediaType::maybe( + $_ = MediaType::maybe( 'application', '*', )->match( static fn($mediaType) => $mediaType, static fn() => throw new \Exception, ); - MediaType::maybe( + $_ = MediaType::maybe( 'application', 'octet-stream', )->match( static fn($mediaType) => $mediaType, static fn() => throw new \Exception, ); - MediaType::maybe( + $_ = MediaType::maybe( 'application', 'octet-stream', Quality::of(40)->toParameter(), diff --git a/tests/Header/ContentLanguageValueTest.php b/tests/Header/ContentLanguageValueTest.php index c7208f3c..49796b0d 100644 --- a/tests/Header/ContentLanguageValueTest.php +++ b/tests/Header/ContentLanguageValueTest.php @@ -19,15 +19,15 @@ public function testInterface() $this->assertInstanceOf(Language::class, $a); $this->assertSame('en-gb', $a->toString()); - Language::maybe('fr')->match( + $_ = Language::maybe('fr')->match( static fn($language) => $language, static fn() => throw new \Exception, ); - Language::maybe('fr-FR')->match( + $_ = Language::maybe('fr-FR')->match( static fn($language) => $language, static fn() => throw new \Exception, ); - Language::maybe('sgn-CH-DE')->match( + $_ = Language::maybe('sgn-CH-DE')->match( static fn($language) => $language, static fn() => throw new \Exception, ); diff --git a/tests/Header/CookieParameter/ExpiresTest.php b/tests/Header/CookieParameter/ExpiresTest.php index c6264be6..353402d4 100644 --- a/tests/Header/CookieParameter/ExpiresTest.php +++ b/tests/Header/CookieParameter/ExpiresTest.php @@ -4,14 +4,14 @@ namespace Tests\Innmind\Http\Header\CookieParameter; use Innmind\Http\Header\SetCookie\Expires; -use Innmind\TimeContinuum\PointInTime; +use Innmind\Time\Point; use Innmind\BlackBox\PHPUnit\Framework\TestCase; class ExpiresTest extends TestCase { public function testInterface() { - $expires = Expires::at(PointInTime::at( + $expires = Expires::at(Point::at( new \DateTimeImmutable('2018-01-01T12:13:14+0200'), )); diff --git a/tests/Header/DateTest.php b/tests/Header/DateTest.php index 41f92cb0..ec16721b 100644 --- a/tests/Header/DateTest.php +++ b/tests/Header/DateTest.php @@ -7,7 +7,7 @@ Header\Date, Header, }; -use Innmind\TimeContinuum\PointInTime; +use Innmind\Time\Point; use Innmind\BlackBox\PHPUnit\Framework\TestCase; class DateTest extends TestCase @@ -15,7 +15,7 @@ class DateTest extends TestCase public function testInterface() { $h = Date::of( - PointInTime::at( + Point::at( new \DateTimeImmutable('2016-01-01 12:12:12+0200'), ), ); @@ -26,7 +26,7 @@ public function testInterface() public function testOf() { - $header = Date::of(PointInTime::at( + $header = Date::of(Point::at( new \DateTimeImmutable('2016-01-01 12:12:12+0200'), )); diff --git a/tests/Header/ExpiresTest.php b/tests/Header/ExpiresTest.php index a40a2bde..cfbe0792 100644 --- a/tests/Header/ExpiresTest.php +++ b/tests/Header/ExpiresTest.php @@ -7,7 +7,7 @@ Header\Expires, Header, }; -use Innmind\TimeContinuum\PointInTime; +use Innmind\Time\Point; use Innmind\BlackBox\PHPUnit\Framework\TestCase; class ExpiresTest extends TestCase @@ -15,7 +15,7 @@ class ExpiresTest extends TestCase public function testInterface() { $h = Expires::of( - PointInTime::at( + Point::at( new \DateTimeImmutable('2016-01-01 12:12:12+0200'), ), ); @@ -26,7 +26,7 @@ public function testInterface() public function testOf() { - $header = Expires::of(PointInTime::at( + $header = Expires::of(Point::at( new \DateTimeImmutable('2016-01-01 12:12:12+0200'), )); diff --git a/tests/Header/IfModifiedSinceTest.php b/tests/Header/IfModifiedSinceTest.php index 93b22953..dd6d57ce 100644 --- a/tests/Header/IfModifiedSinceTest.php +++ b/tests/Header/IfModifiedSinceTest.php @@ -7,7 +7,7 @@ Header\IfModifiedSince, Header, }; -use Innmind\TimeContinuum\PointInTime; +use Innmind\Time\Point; use Innmind\BlackBox\PHPUnit\Framework\TestCase; class IfModifiedSinceTest extends TestCase @@ -15,7 +15,7 @@ class IfModifiedSinceTest extends TestCase public function testInterface() { $h = IfModifiedSince::of( - PointInTime::at( + Point::at( new \DateTimeImmutable('2016-01-01 12:12:12+0200'), ), ); @@ -26,7 +26,7 @@ public function testInterface() public function testOf() { - $header = IfModifiedSince::of(PointInTime::at( + $header = IfModifiedSince::of(Point::at( new \DateTimeImmutable('2016-01-01 12:12:12+0200'), )); diff --git a/tests/Header/IfUnmodifiedSinceTest.php b/tests/Header/IfUnmodifiedSinceTest.php index 49c36cc1..19153ac9 100644 --- a/tests/Header/IfUnmodifiedSinceTest.php +++ b/tests/Header/IfUnmodifiedSinceTest.php @@ -7,7 +7,7 @@ Header\IfUnmodifiedSince, Header, }; -use Innmind\TimeContinuum\PointInTime; +use Innmind\Time\Point; use Innmind\BlackBox\PHPUnit\Framework\TestCase; class IfUnmodifiedSinceTest extends TestCase @@ -15,7 +15,7 @@ class IfUnmodifiedSinceTest extends TestCase public function testInterface() { $h = IfUnmodifiedSince::of( - PointInTime::at( + Point::at( new \DateTimeImmutable('2016-01-01 12:12:12+0200'), ), ); @@ -26,7 +26,7 @@ public function testInterface() public function testOf() { - $header = IfUnmodifiedSince::of(PointInTime::at( + $header = IfUnmodifiedSince::of(Point::at( new \DateTimeImmutable('2016-01-01 12:12:12+0200'), )); diff --git a/tests/Header/LastModifiedTest.php b/tests/Header/LastModifiedTest.php index 687c3a1e..df106c5d 100644 --- a/tests/Header/LastModifiedTest.php +++ b/tests/Header/LastModifiedTest.php @@ -7,7 +7,7 @@ Header\LastModified, Header, }; -use Innmind\TimeContinuum\PointInTime; +use Innmind\Time\Point; use Innmind\BlackBox\PHPUnit\Framework\TestCase; class LastModifiedTest extends TestCase @@ -15,7 +15,7 @@ class LastModifiedTest extends TestCase public function testInterface() { $h = LastModified::of( - PointInTime::at( + Point::at( new \DateTimeImmutable('2016-01-01 12:12:12+0200'), ), ); @@ -26,7 +26,7 @@ public function testInterface() public function testOf() { - $header = LastModified::of(PointInTime::at( + $header = LastModified::of(Point::at( new \DateTimeImmutable('2016-01-01 12:12:12+0200'), ));