diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e520c2..7af1262 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Changed + +- Requires `innmind/foundation:~1.9` + ### Fixed - PHP `8.4` deprecation diff --git a/composer.json b/composer.json index b18cfa7..5423d51 100644 --- a/composer.json +++ b/composer.json @@ -16,10 +16,7 @@ }, "require": { "php": "~8.2", - "innmind/immutable": "~5.7", - "innmind/filesystem": "~7.5", - "innmind/url": "~4.3", - "innmind/operating-system": "~5.2" + "innmind/foundation": "~1.9" }, "autoload": { "psr-4": { diff --git a/src/Theme.php b/src/Theme.php index af63aed..4da70a9 100644 --- a/src/Theme.php +++ b/src/Theme.php @@ -26,10 +26,11 @@ public function load(Filesystem $filesystem): Maybe { return $filesystem ->mount(Path::of(\dirname(__DIR__).'/themes/')) - ->get(Name::of(\sprintf( + ->maybe() + ->flatMap(fn($adapter) => $adapter->get(Name::of(\sprintf( '%s.css', $this->name, - ))) + )))) ->keep(Instance::of(File::class)) ->map(static fn($file) => $file->content()); }