diff --git a/README.md b/README.md index b053997..09ef710 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,21 @@ Kirby::plugin('bnomei/example', [ ## Settings -The package does come with [default settings](https://github.com/bnomei/autoloader-for-kirby/blob/main/classes/Autoloader.php#L27) to fit most usecases. +The package does come with [default settings](https://github.com/bnomei/autoloader-for-kirby/blob/main/classes/Autoloader.php#L27) to fit most usecases. But you can change them every time you call the `autoloader()`-helper for a different directory (aka in each plugin `index.php`-file). + +**/site/plugins/example/index.php** +```php + [ + // mapping BlockModel class names to file names, like + // MyCustomBlock::class => 'my.custom' (site/blueprints/blocks/my.custom.yml) + 'transform' => fn ($key) => \Bnomei\Autoloader::pascalToDotCase($key), + ], + ])->toArray() +); +``` ## Suggestion diff --git a/classes/Autoloader.php b/classes/Autoloader.php index 49a8cb0..b7988d7 100644 --- a/classes/Autoloader.php +++ b/classes/Autoloader.php @@ -48,7 +48,7 @@ final class Autoloader public function __construct(array $options = []) { - $this->options = array_merge_recursive([ + $this->options = self::array_merge_recursive_distinct([ // we can not read the kirby options since we are loading // while kirby is booting, but once spyc is removed we can // default to symfony yaml @@ -95,7 +95,7 @@ public function __construct(array $options = []) 'name' => self::BLOCK_PHP, 'key' => 'classname', 'require' => false, - 'transform' => fn ($key) => lcfirst($key), + 'transform' => fn ($key) => self::pascalToKebabCase($key), 'map' => [], ], 'pageModels' => [ @@ -427,6 +427,35 @@ public static function pascalToKebabCase(string $string): string return ltrim(strtolower((string) preg_replace('/[A-Z]([A-Z](?![a-z]))*/', '-$0', $string)), '-'); } + public static function pascalToCamelCase(string $string): string + { + return lcfirst($string); + } + + public static function pascalToDotCase(string $string): string + { + return ltrim(strtolower((string) preg_replace('/[A-Z]([A-Z](?![a-z]))*/', '.$0', $string)), '.'); + } + + public static function array_merge_recursive_distinct(array $array1, array $array2) { + $merged = $array1; + + foreach ($array2 as $key => $value) { + if (is_array($value) && isset($merged[$key]) && is_array($merged[$key])) { + $merged[$key] = self::array_merge_recursive_distinct($merged[$key], $value); + } else { + $merged[$key] = $value; + } + } + + return $merged; + } + + public static function singletonClear(): void + { + self::$singleton = null; + } + public static function singleton(array $options = []): self { if (self::$singleton && self::$singleton->dir() === $options['dir']) { diff --git a/composer.json b/composer.json index e989fcf..386ee7a 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "bnomei/autoloader-for-kirby", "type": "project", - "version": "4.3.3", + "version": "4.4.0", "license": "MIT", "description": "Helper to automatically load various Kirby extensions in a plugin", "authors": [ diff --git a/composer.lock b/composer.lock index c02b58f..fe0046e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "80ce6edcbfb58c8da04e04668eadfb58", + "content-hash": "c6cd156a11153030d0ae2c648ba1760e", "packages": [ { "name": "mustangostang/spyc", @@ -129,16 +129,16 @@ }, { "name": "symfony/finder", - "version": "v7.1.1", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "fbb0ba67688b780efbc886c1a0a0948dcf7205d6" + "reference": "717c6329886f32dc65e27461f80f2a465412fdca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/fbb0ba67688b780efbc886c1a0a0948dcf7205d6", - "reference": "fbb0ba67688b780efbc886c1a0a0948dcf7205d6", + "url": "https://api.github.com/repos/symfony/finder/zipball/717c6329886f32dc65e27461f80f2a465412fdca", + "reference": "717c6329886f32dc65e27461f80f2a465412fdca", "shasum": "" }, "require": { @@ -173,7 +173,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.1.1" + "source": "https://github.com/symfony/finder/tree/v7.1.3" }, "funding": [ { @@ -189,7 +189,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-24T07:08:44+00:00" }, { "name": "symfony/polyfill-ctype", @@ -681,16 +681,16 @@ }, { "name": "composer/semver", - "version": "3.4.0", + "version": "3.4.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "url": "https://api.github.com/repos/composer/semver/zipball/c51258e759afdb17f1fd1fe83bc12baaef6309d6", + "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6", "shasum": "" }, "require": { @@ -742,7 +742,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.0" + "source": "https://github.com/composer/semver/tree/3.4.2" }, "funding": [ { @@ -758,7 +758,7 @@ "type": "tidelift" } ], - "time": "2023-08-31T09:50:34+00:00" + "time": "2024-07-12T11:35:52+00:00" }, { "name": "doctrine/deprecations", @@ -1103,22 +1103,22 @@ }, { "name": "getkirby/cms", - "version": "4.3.0", + "version": "4.4.0-rc.1", "source": { "type": "git", "url": "https://github.com/getkirby/kirby.git", - "reference": "f9f00b16a22fe9dbbbddc2bfd4719ca3437cbee9" + "reference": "4d3213fa49c30bd4972d0c72f3ec283a987be776" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getkirby/kirby/zipball/f9f00b16a22fe9dbbbddc2bfd4719ca3437cbee9", - "reference": "f9f00b16a22fe9dbbbddc2bfd4719ca3437cbee9", + "url": "https://api.github.com/repos/getkirby/kirby/zipball/4d3213fa49c30bd4972d0c72f3ec283a987be776", + "reference": "4d3213fa49c30bd4972d0c72f3ec283a987be776", "shasum": "" }, "require": { "christian-riesen/base32": "1.6.0", "claviska/simpleimage": "4.2.0", - "composer/semver": "3.4.0", + "composer/semver": "3.4.2", "ext-ctype": "*", "ext-curl": "*", "ext-dom": "*", @@ -1136,8 +1136,8 @@ "michelf/php-smartypants": "1.8.1", "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "phpmailer/phpmailer": "6.9.1", - "symfony/polyfill-intl-idn": "1.29.0", - "symfony/polyfill-mbstring": "1.29.0", + "symfony/polyfill-intl-idn": "1.30.0", + "symfony/polyfill-mbstring": "1.30.0", "symfony/yaml": "6.4.8" }, "replace": { @@ -1202,7 +1202,7 @@ "type": "custom" } ], - "time": "2024-06-13T09:58:27+00:00" + "time": "2024-08-14T15:50:09+00:00" }, { "name": "getkirby/composer-installer", @@ -1253,16 +1253,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.9.1", + "version": "7.9.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "a629e5b69db96eb4939c1b34114130077dd4c6fc" + "reference": "d281ed313b989f213357e3be1a179f02196ac99b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a629e5b69db96eb4939c1b34114130077dd4c6fc", - "reference": "a629e5b69db96eb4939c1b34114130077dd4c6fc", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b", "shasum": "" }, "require": { @@ -1359,7 +1359,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.9.1" + "source": "https://github.com/guzzle/guzzle/tree/7.9.2" }, "funding": [ { @@ -1375,7 +1375,7 @@ "type": "tidelift" } ], - "time": "2024-07-19T16:19:57+00:00" + "time": "2024-07-24T11:22:20+00:00" }, { "name": "guzzlehttp/promises", @@ -1664,16 +1664,16 @@ }, { "name": "illuminate/bus", - "version": "v11.16.0", + "version": "v11.21.0", "source": { "type": "git", "url": "https://github.com/illuminate/bus.git", - "reference": "9a8649eb57a6621eed87ecc18af7eb84aa180992" + "reference": "808de7c6c4dea7e5cbb37266ddb49aa38281918b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/bus/zipball/9a8649eb57a6621eed87ecc18af7eb84aa180992", - "reference": "9a8649eb57a6621eed87ecc18af7eb84aa180992", + "url": "https://api.github.com/repos/illuminate/bus/zipball/808de7c6c4dea7e5cbb37266ddb49aa38281918b", + "reference": "808de7c6c4dea7e5cbb37266ddb49aa38281918b", "shasum": "" }, "require": { @@ -1713,20 +1713,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-06-28T20:10:30+00:00" + "time": "2024-08-15T18:31:38+00:00" }, { "name": "illuminate/collections", - "version": "v11.16.0", + "version": "v11.21.0", "source": { "type": "git", "url": "https://github.com/illuminate/collections.git", - "reference": "ba2cf689f7d75315f483334b4efc8c6af1d5159c" + "reference": "d373c9f382f38dc5e612dbe1cd196b154cd1063c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/collections/zipball/ba2cf689f7d75315f483334b4efc8c6af1d5159c", - "reference": "ba2cf689f7d75315f483334b4efc8c6af1d5159c", + "url": "https://api.github.com/repos/illuminate/collections/zipball/d373c9f382f38dc5e612dbe1cd196b154cd1063c", + "reference": "d373c9f382f38dc5e612dbe1cd196b154cd1063c", "shasum": "" }, "require": { @@ -1768,11 +1768,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-07-15T21:44:45+00:00" + "time": "2024-08-19T02:05:39+00:00" }, { "name": "illuminate/conditionable", - "version": "v11.16.0", + "version": "v11.21.0", "source": { "type": "git", "url": "https://github.com/illuminate/conditionable.git", @@ -1818,16 +1818,16 @@ }, { "name": "illuminate/console", - "version": "v11.16.0", + "version": "v11.21.0", "source": { "type": "git", "url": "https://github.com/illuminate/console.git", - "reference": "896cc74364c8bc8ecd8adba98278a482c9626b73" + "reference": "5e62f816d1b361e8b7d7649b246b29a66669c462" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/console/zipball/896cc74364c8bc8ecd8adba98278a482c9626b73", - "reference": "896cc74364c8bc8ecd8adba98278a482c9626b73", + "url": "https://api.github.com/repos/illuminate/console/zipball/5e62f816d1b361e8b7d7649b246b29a66669c462", + "reference": "5e62f816d1b361e8b7d7649b246b29a66669c462", "shasum": "" }, "require": { @@ -1880,20 +1880,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-07-15T21:52:09+00:00" + "time": "2024-07-30T07:04:41+00:00" }, { "name": "illuminate/container", - "version": "v11.16.0", + "version": "v11.21.0", "source": { "type": "git", "url": "https://github.com/illuminate/container.git", - "reference": "49183db6643a7efbe9902ca379b8f8a55c802f88" + "reference": "4e353ac5dc1c61eb28e1d3721741989dd692df15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/49183db6643a7efbe9902ca379b8f8a55c802f88", - "reference": "49183db6643a7efbe9902ca379b8f8a55c802f88", + "url": "https://api.github.com/repos/illuminate/container/zipball/4e353ac5dc1c61eb28e1d3721741989dd692df15", + "reference": "4e353ac5dc1c61eb28e1d3721741989dd692df15", "shasum": "" }, "require": { @@ -1931,20 +1931,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-07-03T21:04:00+00:00" + "time": "2024-08-17T21:07:31+00:00" }, { "name": "illuminate/contracts", - "version": "v11.16.0", + "version": "v11.21.0", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "be935e9d9115a57be74d20176f43fa8a207029f3" + "reference": "34ead9385e0eab7e947807d77da66faf9bdf95ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/be935e9d9115a57be74d20176f43fa8a207029f3", - "reference": "be935e9d9115a57be74d20176f43fa8a207029f3", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/34ead9385e0eab7e947807d77da66faf9bdf95ff", + "reference": "34ead9385e0eab7e947807d77da66faf9bdf95ff", "shasum": "" }, "require": { @@ -1979,20 +1979,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-07-09T13:57:38+00:00" + "time": "2024-08-01T19:08:33+00:00" }, { "name": "illuminate/database", - "version": "v11.16.0", + "version": "v11.21.0", "source": { "type": "git", "url": "https://github.com/illuminate/database.git", - "reference": "cf816e7e0d08e2a75b233ad061eed85dd8b6b37f" + "reference": "9df2b37cf3cee3962b26f3598718dcb2631561a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/database/zipball/cf816e7e0d08e2a75b233ad061eed85dd8b6b37f", - "reference": "cf816e7e0d08e2a75b233ad061eed85dd8b6b37f", + "url": "https://api.github.com/repos/illuminate/database/zipball/9df2b37cf3cee3962b26f3598718dcb2631561a8", + "reference": "9df2b37cf3cee3962b26f3598718dcb2631561a8", "shasum": "" }, "require": { @@ -2047,20 +2047,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-07-15T22:28:28+00:00" + "time": "2024-08-15T18:42:07+00:00" }, { "name": "illuminate/events", - "version": "v11.16.0", + "version": "v11.21.0", "source": { "type": "git", "url": "https://github.com/illuminate/events.git", - "reference": "2ca94accf7e30e478a1cb2b0501c5be4478cb717" + "reference": "cfd8a636234cc5b5f736f2987f33b0d471d974b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/events/zipball/2ca94accf7e30e478a1cb2b0501c5be4478cb717", - "reference": "2ca94accf7e30e478a1cb2b0501c5be4478cb717", + "url": "https://api.github.com/repos/illuminate/events/zipball/cfd8a636234cc5b5f736f2987f33b0d471d974b3", + "reference": "cfd8a636234cc5b5f736f2987f33b0d471d974b3", "shasum": "" }, "require": { @@ -2102,11 +2102,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-06-28T20:10:30+00:00" + "time": "2024-08-07T14:43:54+00:00" }, { "name": "illuminate/filesystem", - "version": "v11.16.0", + "version": "v11.21.0", "source": { "type": "git", "url": "https://github.com/illuminate/filesystem.git", @@ -2173,16 +2173,16 @@ }, { "name": "illuminate/http", - "version": "v11.16.0", + "version": "v11.21.0", "source": { "type": "git", "url": "https://github.com/illuminate/http.git", - "reference": "63072ea6bcbd75b75655e0bb2854150a0ed886d3" + "reference": "19e976d575cd9f1951ef84c1d9c1de3c5e0f83a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/http/zipball/63072ea6bcbd75b75655e0bb2854150a0ed886d3", - "reference": "63072ea6bcbd75b75655e0bb2854150a0ed886d3", + "url": "https://api.github.com/repos/illuminate/http/zipball/19e976d575cd9f1951ef84c1d9c1de3c5e0f83a4", + "reference": "19e976d575cd9f1951ef84c1d9c1de3c5e0f83a4", "shasum": "" }, "require": { @@ -2230,11 +2230,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-07-10T19:27:29+00:00" + "time": "2024-08-07T21:08:03+00:00" }, { "name": "illuminate/macroable", - "version": "v11.16.0", + "version": "v11.21.0", "source": { "type": "git", "url": "https://github.com/illuminate/macroable.git", @@ -2280,7 +2280,7 @@ }, { "name": "illuminate/pipeline", - "version": "v11.16.0", + "version": "v11.21.0", "source": { "type": "git", "url": "https://github.com/illuminate/pipeline.git", @@ -2328,16 +2328,16 @@ }, { "name": "illuminate/session", - "version": "v11.16.0", + "version": "v11.21.0", "source": { "type": "git", "url": "https://github.com/illuminate/session.git", - "reference": "b831db344028e665052a4de88fd5590bfa1707c3" + "reference": "cc4be7c46678328858ef2aa692013536717f32ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/session/zipball/b831db344028e665052a4de88fd5590bfa1707c3", - "reference": "b831db344028e665052a4de88fd5590bfa1707c3", + "url": "https://api.github.com/repos/illuminate/session/zipball/cc4be7c46678328858ef2aa692013536717f32ec", + "reference": "cc4be7c46678328858ef2aa692013536717f32ec", "shasum": "" }, "require": { @@ -2381,20 +2381,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-06-28T20:10:30+00:00" + "time": "2024-08-08T13:30:23+00:00" }, { "name": "illuminate/support", - "version": "v11.16.0", + "version": "v11.21.0", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "4fd85fffd9a4812386b6e10b2a18272ff9040dbe" + "reference": "82e493e7b9bb94d1b065260170e3ecbfd3670126" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/4fd85fffd9a4812386b6e10b2a18272ff9040dbe", - "reference": "4fd85fffd9a4812386b6e10b2a18272ff9040dbe", + "url": "https://api.github.com/repos/illuminate/support/zipball/82e493e7b9bb94d1b065260170e3ecbfd3670126", + "reference": "82e493e7b9bb94d1b065260170e3ecbfd3670126", "shasum": "" }, "require": { @@ -2455,20 +2455,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-07-16T13:48:58+00:00" + "time": "2024-08-20T14:50:34+00:00" }, { "name": "illuminate/view", - "version": "v11.16.0", + "version": "v11.21.0", "source": { "type": "git", "url": "https://github.com/illuminate/view.git", - "reference": "daca4922fdb590144657171a06be7babcc0c910e" + "reference": "1a4d9192a35e5fb6e99de53b8214c7ddc46a1201" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/daca4922fdb590144657171a06be7babcc0c910e", - "reference": "daca4922fdb590144657171a06be7babcc0c910e", + "url": "https://api.github.com/repos/illuminate/view/zipball/1a4d9192a35e5fb6e99de53b8214c7ddc46a1201", + "reference": "1a4d9192a35e5fb6e99de53b8214c7ddc46a1201", "shasum": "" }, "require": { @@ -2509,7 +2509,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-06-28T20:10:30+00:00" + "time": "2024-08-01T18:54:27+00:00" }, { "name": "jean85/pretty-package-versions", @@ -2736,16 +2736,16 @@ }, { "name": "laravel/pint", - "version": "v1.16.2", + "version": "v1.17.2", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "51f1ba679a6afe0315621ad143d788bd7ded0eca" + "reference": "e8a88130a25e3f9d4d5785e6a1afca98268ab110" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/51f1ba679a6afe0315621ad143d788bd7ded0eca", - "reference": "51f1ba679a6afe0315621ad143d788bd7ded0eca", + "url": "https://api.github.com/repos/laravel/pint/zipball/e8a88130a25e3f9d4d5785e6a1afca98268ab110", + "reference": "e8a88130a25e3f9d4d5785e6a1afca98268ab110", "shasum": "" }, "require": { @@ -2756,13 +2756,13 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.59.3", - "illuminate/view": "^10.48.12", - "larastan/larastan": "^2.9.7", + "friendsofphp/php-cs-fixer": "^3.61.1", + "illuminate/view": "^10.48.18", + "larastan/larastan": "^2.9.8", "laravel-zero/framework": "^10.4.0", "mockery/mockery": "^1.6.12", "nunomaduro/termwind": "^1.15.1", - "pestphp/pest": "^2.34.8" + "pestphp/pest": "^2.35.0" }, "bin": [ "builds/pint" @@ -2798,20 +2798,20 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-07-09T15:58:08+00:00" + "time": "2024-08-06T15:11:54+00:00" }, { "name": "laravel/prompts", - "version": "v0.1.24", + "version": "v0.1.25", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "409b0b4305273472f3754826e68f4edbd0150149" + "reference": "7b4029a84c37cb2725fc7f011586e2997040bc95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/409b0b4305273472f3754826e68f4edbd0150149", - "reference": "409b0b4305273472f3754826e68f4edbd0150149", + "url": "https://api.github.com/repos/laravel/prompts/zipball/7b4029a84c37cb2725fc7f011586e2997040bc95", + "reference": "7b4029a84c37cb2725fc7f011586e2997040bc95", "shasum": "" }, "require": { @@ -2854,9 +2854,9 @@ "description": "Add beautiful and user-friendly forms to your command-line applications.", "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.24" + "source": "https://github.com/laravel/prompts/tree/v0.1.25" }, - "time": "2024-06-17T13:58:22+00:00" + "time": "2024-08-12T22:06:33+00:00" }, { "name": "league/color-extractor", @@ -3035,16 +3035,16 @@ }, { "name": "nesbot/carbon", - "version": "3.7.0", + "version": "3.8.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "cb4374784c87d0a0294e8513a52eb63c0aff3139" + "reference": "bbd3eef89af8ba66a3aa7952b5439168fbcc529f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/cb4374784c87d0a0294e8513a52eb63c0aff3139", - "reference": "cb4374784c87d0a0294e8513a52eb63c0aff3139", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/bbd3eef89af8ba66a3aa7952b5439168fbcc529f", + "reference": "bbd3eef89af8ba66a3aa7952b5439168fbcc529f", "shasum": "" }, "require": { @@ -3137,24 +3137,24 @@ "type": "tidelift" } ], - "time": "2024-07-16T22:29:20+00:00" + "time": "2024-08-19T06:22:39+00:00" }, { "name": "nette/utils", - "version": "v4.0.4", + "version": "v4.0.5", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218" + "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/d3ad0aa3b9f934602cb3e3902ebccf10be34d218", - "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218", + "url": "https://api.github.com/repos/nette/utils/zipball/736c567e257dbe0fcf6ce81b4d6dbe05c6899f96", + "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96", "shasum": "" }, "require": { - "php": ">=8.0 <8.4" + "php": "8.0 - 8.4" }, "conflict": { "nette/finder": "<3", @@ -3221,9 +3221,9 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.4" + "source": "https://github.com/nette/utils/tree/v4.0.5" }, - "time": "2024-01-17T16:50:36+00:00" + "time": "2024-08-07T15:39:19+00:00" }, { "name": "nikic/php-parser", @@ -3285,23 +3285,23 @@ }, { "name": "nunomaduro/collision", - "version": "v8.3.0", + "version": "v8.4.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "b49f5b2891ce52726adfd162841c69d4e4c84229" + "reference": "e7d1aa8ed753f63fa816932bbc89678238843b4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/b49f5b2891ce52726adfd162841c69d4e4c84229", - "reference": "b49f5b2891ce52726adfd162841c69d4e4c84229", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/e7d1aa8ed753f63fa816932bbc89678238843b4a", + "reference": "e7d1aa8ed753f63fa816932bbc89678238843b4a", "shasum": "" }, "require": { "filp/whoops": "^2.15.4", "nunomaduro/termwind": "^2.0.1", "php": "^8.2.0", - "symfony/console": "^7.1.2" + "symfony/console": "^7.1.3" }, "conflict": { "laravel/framework": "<11.0.0 || >=12.0.0", @@ -3309,13 +3309,13 @@ }, "require-dev": { "larastan/larastan": "^2.9.8", - "laravel/framework": "^11.16.0", - "laravel/pint": "^1.16.2", - "laravel/sail": "^1.30.2", + "laravel/framework": "^11.19.0", + "laravel/pint": "^1.17.1", + "laravel/sail": "^1.31.0", "laravel/sanctum": "^4.0.2", "laravel/tinker": "^2.9.0", - "orchestra/testbench-core": "^9.2.1", - "pestphp/pest": "^2.34.9 || ^3.0.0", + "orchestra/testbench-core": "^9.2.3", + "pestphp/pest": "^2.35.0 || ^3.0.0", "sebastian/environment": "^6.1.0 || ^7.0.0" }, "type": "library", @@ -3378,7 +3378,7 @@ "type": "patreon" } ], - "time": "2024-07-16T22:41:01+00:00" + "time": "2024-08-03T15:32:23+00:00" }, { "name": "nunomaduro/termwind", @@ -3470,21 +3470,21 @@ }, { "name": "pestphp/pest", - "version": "v2.34.9", + "version": "v2.35.0", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "ef120125e036bf84c9e46a9e62219702f5b92e16" + "reference": "d0ff2c8ec294b7aa7fcb0f3ddc4fdec864234646" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/ef120125e036bf84c9e46a9e62219702f5b92e16", - "reference": "ef120125e036bf84c9e46a9e62219702f5b92e16", + "url": "https://api.github.com/repos/pestphp/pest/zipball/d0ff2c8ec294b7aa7fcb0f3ddc4fdec864234646", + "reference": "d0ff2c8ec294b7aa7fcb0f3ddc4fdec864234646", "shasum": "" }, "require": { "brianium/paratest": "^7.3.1", - "nunomaduro/collision": "^7.10.0|^8.1.1", + "nunomaduro/collision": "^7.10.0|^8.3.0", "nunomaduro/termwind": "^1.15.1|^2.0.1", "pestphp/pest-plugin": "^2.1.1", "pestphp/pest-plugin-arch": "^2.7.0", @@ -3498,8 +3498,8 @@ }, "require-dev": { "pestphp/pest-dev-tools": "^2.16.0", - "pestphp/pest-plugin-type-coverage": "^2.8.4", - "symfony/process": "^6.4.0|^7.1.1" + "pestphp/pest-plugin-type-coverage": "^2.8.5", + "symfony/process": "^6.4.0|^7.1.3" }, "bin": [ "bin/pest" @@ -3562,7 +3562,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v2.34.9" + "source": "https://github.com/pestphp/pest/tree/v2.35.0" }, "funding": [ { @@ -3574,7 +3574,7 @@ "type": "github" } ], - "time": "2024-07-11T08:36:26+00:00" + "time": "2024-08-02T10:57:29+00:00" }, { "name": "pestphp/pest-plugin", @@ -3789,26 +3789,26 @@ }, { "name": "pestphp/pest-plugin-type-coverage", - "version": "v2.8.4", + "version": "v2.8.5", "source": { "type": "git", "url": "https://github.com/pestphp/pest-plugin-type-coverage.git", - "reference": "ce599efae7c2493e300960cb9c697a9bdd15c44e" + "reference": "147f8b6d5dc180a756aa694d34f606050b823c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest-plugin-type-coverage/zipball/ce599efae7c2493e300960cb9c697a9bdd15c44e", - "reference": "ce599efae7c2493e300960cb9c697a9bdd15c44e", + "url": "https://api.github.com/repos/pestphp/pest-plugin-type-coverage/zipball/147f8b6d5dc180a756aa694d34f606050b823c71", + "reference": "147f8b6d5dc180a756aa694d34f606050b823c71", "shasum": "" }, "require": { "pestphp/pest-plugin": "^2.1.1", "php": "^8.1", - "phpstan/phpstan": "^1.11.6", + "phpstan/phpstan": "^1.11.8", "tomasvotruba/type-coverage": "^0.2.8" }, "require-dev": { - "pestphp/pest": "^2.34.8", + "pestphp/pest": "^2.34.9", "pestphp/pest-dev-tools": "^2.16.0" }, "type": "library", @@ -3842,7 +3842,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest-plugin-type-coverage/issues", - "source": "https://github.com/pestphp/pest-plugin-type-coverage/tree/v2.8.4" + "source": "https://github.com/pestphp/pest-plugin-type-coverage/tree/v2.8.5" }, "funding": [ { @@ -3858,7 +3858,7 @@ "type": "patreon" } ], - "time": "2024-07-01T17:18:50+00:00" + "time": "2024-07-24T12:09:30+00:00" }, { "name": "phar-io/manifest", @@ -4236,16 +4236,16 @@ }, { "name": "phpmyadmin/sql-parser", - "version": "5.9.0", + "version": "5.9.1", "source": { "type": "git", "url": "https://github.com/phpmyadmin/sql-parser.git", - "reference": "011fa18a4e55591fac6545a821921dd1d61c6984" + "reference": "169a9f11f1957ea36607c9b29eac1b48679f1ecc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/011fa18a4e55591fac6545a821921dd1d61c6984", - "reference": "011fa18a4e55591fac6545a821921dd1d61c6984", + "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/169a9f11f1957ea36607c9b29eac1b48679f1ecc", + "reference": "169a9f11f1957ea36607c9b29eac1b48679f1ecc", "shasum": "" }, "require": { @@ -4263,8 +4263,7 @@ "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.9.12", "phpstan/phpstan-phpunit": "^1.3.3", - "phpunit/php-code-coverage": "*", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "phpunit/phpunit": "^8.5 || ^9.6", "psalm/plugin-phpunit": "^0.16.1", "vimeo/psalm": "^4.11", "zumba/json-serializer": "~3.0.2" @@ -4320,7 +4319,7 @@ "type": "other" } ], - "time": "2024-01-20T20:34:02+00:00" + "time": "2024-08-13T19:01:01+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -4371,16 +4370,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.11.7", + "version": "1.11.11", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "52d2bbfdcae7f895915629e4694e9497d0f8e28d" + "reference": "707c2aed5d8d0075666e673a5e71440c1d01a5a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/52d2bbfdcae7f895915629e4694e9497d0f8e28d", - "reference": "52d2bbfdcae7f895915629e4694e9497d0f8e28d", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/707c2aed5d8d0075666e673a5e71440c1d01a5a3", + "reference": "707c2aed5d8d0075666e673a5e71440c1d01a5a3", "shasum": "" }, "require": { @@ -4425,7 +4424,7 @@ "type": "github" } ], - "time": "2024-07-06T11:17:41+00:00" + "time": "2024-08-19T14:37:29+00:00" }, { "name": "phpunit/php-code-coverage", @@ -5656,16 +5655,16 @@ }, { "name": "sebastian/comparator", - "version": "5.0.1", + "version": "5.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2db5010a484d53ebf536087a70b4a5423c102372" + "reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", - "reference": "2db5010a484d53ebf536087a70b4a5423c102372", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53", + "reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53", "shasum": "" }, "require": { @@ -5676,7 +5675,7 @@ "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^10.3" + "phpunit/phpunit": "^10.4" }, "type": "library", "extra": { @@ -5721,7 +5720,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.2" }, "funding": [ { @@ -5729,7 +5728,7 @@ "type": "github" } ], - "time": "2023-08-14T13:18:12+00:00" + "time": "2024-08-12T06:03:08+00:00" }, { "name": "sebastian/complexity", @@ -6676,16 +6675,16 @@ }, { "name": "symfony/console", - "version": "v7.1.2", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0aa29ca177f432ab68533432db0de059f39c92ae" + "reference": "cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0aa29ca177f432ab68533432db0de059f39c92ae", - "reference": "0aa29ca177f432ab68533432db0de059f39c92ae", + "url": "https://api.github.com/repos/symfony/console/zipball/cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9", + "reference": "cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9", "shasum": "" }, "require": { @@ -6749,7 +6748,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.1.2" + "source": "https://github.com/symfony/console/tree/v7.1.3" }, "funding": [ { @@ -6765,20 +6764,20 @@ "type": "tidelift" } ], - "time": "2024-06-28T10:03:55+00:00" + "time": "2024-07-26T12:41:01+00:00" }, { "name": "symfony/error-handler", - "version": "v7.1.2", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "2412d3dddb5c9ea51a39cfbff1c565fc9844ca32" + "reference": "432bb369952795c61ca1def65e078c4a80dad13c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/2412d3dddb5c9ea51a39cfbff1c565fc9844ca32", - "reference": "2412d3dddb5c9ea51a39cfbff1c565fc9844ca32", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/432bb369952795c61ca1def65e078c4a80dad13c", + "reference": "432bb369952795c61ca1def65e078c4a80dad13c", "shasum": "" }, "require": { @@ -6824,7 +6823,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.1.2" + "source": "https://github.com/symfony/error-handler/tree/v7.1.3" }, "funding": [ { @@ -6840,7 +6839,7 @@ "type": "tidelift" } ], - "time": "2024-06-25T19:55:06+00:00" + "time": "2024-07-26T13:02:51+00:00" }, { "name": "symfony/event-dispatcher", @@ -7000,16 +6999,16 @@ }, { "name": "symfony/http-foundation", - "version": "v7.1.1", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "74d171d5b6a1d9e4bfee09a41937c17a7536acfa" + "reference": "f602d5c17d1fa02f8019ace2687d9d136b7f4a1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/74d171d5b6a1d9e4bfee09a41937c17a7536acfa", - "reference": "74d171d5b6a1d9e4bfee09a41937c17a7536acfa", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f602d5c17d1fa02f8019ace2687d9d136b7f4a1a", + "reference": "f602d5c17d1fa02f8019ace2687d9d136b7f4a1a", "shasum": "" }, "require": { @@ -7057,7 +7056,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.1.1" + "source": "https://github.com/symfony/http-foundation/tree/v7.1.3" }, "funding": [ { @@ -7073,20 +7072,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-26T12:41:01+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.1.2", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "ae3fa717db4d41a55d14c2bd92399e37cf5bc0f6" + "reference": "db9702f3a04cc471ec8c70e881825db26ac5f186" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ae3fa717db4d41a55d14c2bd92399e37cf5bc0f6", - "reference": "ae3fa717db4d41a55d14c2bd92399e37cf5bc0f6", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/db9702f3a04cc471ec8c70e881825db26ac5f186", + "reference": "db9702f3a04cc471ec8c70e881825db26ac5f186", "shasum": "" }, "require": { @@ -7171,7 +7170,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.1.2" + "source": "https://github.com/symfony/http-kernel/tree/v7.1.3" }, "funding": [ { @@ -7187,7 +7186,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T13:13:31+00:00" + "time": "2024-07-26T14:58:15+00:00" }, { "name": "symfony/mime", @@ -7353,16 +7352,16 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "a287ed7475f85bf6f61890146edbc932c0fff919" + "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a287ed7475f85bf6f61890146edbc932c0fff919", - "reference": "a287ed7475f85bf6f61890146edbc932c0fff919", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", + "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", "shasum": "" }, "require": { @@ -7417,7 +7416,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.30.0" }, "funding": [ { @@ -7433,7 +7432,7 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -7518,16 +7517,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { @@ -7578,7 +7577,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, "funding": [ { @@ -7594,7 +7593,7 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/polyfill-php80", @@ -7754,16 +7753,16 @@ }, { "name": "symfony/process", - "version": "v7.1.1", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "febf90124323a093c7ee06fdb30e765ca3c20028" + "reference": "7f2f542c668ad6c313dc4a5e9c3321f733197eca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/febf90124323a093c7ee06fdb30e765ca3c20028", - "reference": "febf90124323a093c7ee06fdb30e765ca3c20028", + "url": "https://api.github.com/repos/symfony/process/zipball/7f2f542c668ad6c313dc4a5e9c3321f733197eca", + "reference": "7f2f542c668ad6c313dc4a5e9c3321f733197eca", "shasum": "" }, "require": { @@ -7795,7 +7794,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.1.1" + "source": "https://github.com/symfony/process/tree/v7.1.3" }, "funding": [ { @@ -7811,7 +7810,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-26T12:44:47+00:00" }, { "name": "symfony/service-contracts", @@ -7960,16 +7959,16 @@ }, { "name": "symfony/string", - "version": "v7.1.2", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8" + "reference": "ea272a882be7f20cad58d5d78c215001617b7f07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/14221089ac66cf82e3cf3d1c1da65de305587ff8", - "reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8", + "url": "https://api.github.com/repos/symfony/string/zipball/ea272a882be7f20cad58d5d78c215001617b7f07", + "reference": "ea272a882be7f20cad58d5d78c215001617b7f07", "shasum": "" }, "require": { @@ -8027,7 +8026,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.1.2" + "source": "https://github.com/symfony/string/tree/v7.1.3" }, "funding": [ { @@ -8043,20 +8042,20 @@ "type": "tidelift" } ], - "time": "2024-06-28T09:27:18+00:00" + "time": "2024-07-22T10:25:37+00:00" }, { "name": "symfony/translation", - "version": "v7.1.1", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "cf5ae136e124fc7681b34ce9fac9d5b9ae8ceee3" + "reference": "8d5e50c813ba2859a6dfc99a0765c550507934a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/cf5ae136e124fc7681b34ce9fac9d5b9ae8ceee3", - "reference": "cf5ae136e124fc7681b34ce9fac9d5b9ae8ceee3", + "url": "https://api.github.com/repos/symfony/translation/zipball/8d5e50c813ba2859a6dfc99a0765c550507934a1", + "reference": "8d5e50c813ba2859a6dfc99a0765c550507934a1", "shasum": "" }, "require": { @@ -8121,7 +8120,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v7.1.1" + "source": "https://github.com/symfony/translation/tree/v7.1.3" }, "funding": [ { @@ -8137,7 +8136,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-26T12:41:01+00:00" }, { "name": "symfony/translation-contracts", @@ -8219,16 +8218,16 @@ }, { "name": "symfony/var-dumper", - "version": "v7.1.2", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "5857c57c6b4b86524c08cf4f4bc95327270a816d" + "reference": "86af4617cca75a6e28598f49ae0690f3b9d4591f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/5857c57c6b4b86524c08cf4f4bc95327270a816d", - "reference": "5857c57c6b4b86524c08cf4f4bc95327270a816d", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/86af4617cca75a6e28598f49ae0690f3b9d4591f", + "reference": "86af4617cca75a6e28598f49ae0690f3b9d4591f", "shasum": "" }, "require": { @@ -8282,7 +8281,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.1.2" + "source": "https://github.com/symfony/var-dumper/tree/v7.1.3" }, "funding": [ { @@ -8298,7 +8297,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T08:00:31+00:00" + "time": "2024-07-26T12:41:01+00:00" }, { "name": "ta-tikoma/phpunit-architecture-test", diff --git a/tests/AutoloaderTest.php b/tests/AutoloaderTest.php index b639b13..a935538 100644 --- a/tests/AutoloaderTest.php +++ b/tests/AutoloaderTest.php @@ -10,6 +10,8 @@ $this->dir = __DIR__.'/site/plugins/example'; $this->dir2 = __DIR__.'/site/plugins/another'; $this->dir3 = __DIR__.'/site/plugins/routastic'; + + Autoloader::singletonClear(); // force reset singleton for this test }); test('singleton', function () { // create @@ -98,7 +100,7 @@ $models = $autoloader->blockModels(); expect($models)->toBeArray(); - expect($models)->toHaveKey('veryAmaze'); + expect($models)->toHaveKey('very-amaze'); expect($models)->toHaveKey('bloba'); expect(class_exists('VeryAmazeBlock'))->toBeTrue(); @@ -184,6 +186,22 @@ expect($translations['jp']['lang'])->toEqual('日本語'); }); +it('has a helper to transform the key', function () { + expect(Autoloader::pascalToKebabCase('SomeName'))->toBe('some-name') + ->and(Autoloader::pascalToCamelCase('SomeName'))->toBe('someName') + ->and(Autoloader::pascalToDotCase('SomeName'))->toBe('some.name'); +}); + +it('can merge options', function () { + $autoloader = autoloader($this->dir, [ + 'blockModels' => [ + 'transform' => fn ($key) => md5($key), + ], + ])->toArray(); + + expect($autoloader['blockModels'])->toHaveKey(md5('Bloba')); +}); + it('can merge roots', function () { $autoloader = autoloader($this->dir)->toArray([ 'options' => [ diff --git a/tests/site/plugins/example/blueprints/blocks/bloba.yml b/tests/site/plugins/example/blueprints/blocks/bloba.yml new file mode 100644 index 0000000..e69de29 diff --git a/tests/site/plugins/example/blueprints/blocks/very-amaze.yml b/tests/site/plugins/example/blueprints/blocks/very-amaze.yml new file mode 100644 index 0000000..77fdcd0 --- /dev/null +++ b/tests/site/plugins/example/blueprints/blocks/very-amaze.yml @@ -0,0 +1,2 @@ +# if you want dot notation, see readme on how to change to Autoloader::pascalToDotCase() +# if you want camel notation, see readme on how to change to Autoloader::pascalToCamelCase() diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 45f38d2..399cc05 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,8 +1,8 @@ array( 'name' => 'bnomei/autoloader-for-kirby', - 'pretty_version' => '4.3.3', - 'version' => '4.3.3.0', + 'pretty_version' => '4.4.0', + 'version' => '4.4.0.0', 'reference' => null, 'type' => 'project', 'install_path' => __DIR__ . '/../../', @@ -11,8 +11,8 @@ ), 'versions' => array( 'bnomei/autoloader-for-kirby' => array( - 'pretty_version' => '4.3.3', - 'version' => '4.3.3.0', + 'pretty_version' => '4.4.0', + 'version' => '4.4.0.0', 'reference' => null, 'type' => 'project', 'install_path' => __DIR__ . '/../../', @@ -38,9 +38,9 @@ 'dev_requirement' => false, ), 'symfony/finder' => array( - 'pretty_version' => 'v7.1.1', - 'version' => '7.1.1.0', - 'reference' => 'fbb0ba67688b780efbc886c1a0a0948dcf7205d6', + 'pretty_version' => 'v7.1.3', + 'version' => '7.1.3.0', + 'reference' => '717c6329886f32dc65e27461f80f2a465412fdca', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(),