diff --git a/bootstrap/app.php b/bootstrap/app.php index 108e63c28a..9516a798a2 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -15,7 +15,7 @@ use Livewire\LivewireServiceProvider; use Orchestra\Testbench\Concerns\CreatesApplication; use Orchestra\Testbench\Foundation\Application; -$basePathLocator = new class() +$basePathLocator = new class { use CreatesApplication; }; diff --git a/composer.lock b/composer.lock index eb1e990ae4..ab12cc25b5 100644 --- a/composer.lock +++ b/composer.lock @@ -9,16 +9,16 @@ "packages-dev": [ { "name": "anourvalar/eloquent-serialize", - "version": "1.2.22", + "version": "1.2.23", "source": { "type": "git", "url": "https://github.com/AnourValar/eloquent-serialize.git", - "reference": "6e91093c10940859c4b0549b6a90f18d8db45998" + "reference": "fd7bc1dc2c98fe705647ab4b81d13ea3d599ea1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/AnourValar/eloquent-serialize/zipball/6e91093c10940859c4b0549b6a90f18d8db45998", - "reference": "6e91093c10940859c4b0549b6a90f18d8db45998", + "url": "https://api.github.com/repos/AnourValar/eloquent-serialize/zipball/fd7bc1dc2c98fe705647ab4b81d13ea3d599ea1f", + "reference": "fd7bc1dc2c98fe705647ab4b81d13ea3d599ea1f", "shasum": "" }, "require": { @@ -69,9 +69,9 @@ ], "support": { "issues": "https://github.com/AnourValar/eloquent-serialize/issues", - "source": "https://github.com/AnourValar/eloquent-serialize/tree/1.2.22" + "source": "https://github.com/AnourValar/eloquent-serialize/tree/1.2.23" }, - "time": "2024-03-22T12:56:46+00:00" + "time": "2024-07-12T10:52:26+00:00" }, { "name": "aws/aws-crt-php", @@ -129,16 +129,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.316.2", + "version": "3.316.9", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "4d8caae512c3be4d59ee6d583b3f82872dde5071" + "reference": "33de264839fdaacf42460ada3b1b262190643b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/4d8caae512c3be4d59ee6d583b3f82872dde5071", - "reference": "4d8caae512c3be4d59ee6d583b3f82872dde5071", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/33de264839fdaacf42460ada3b1b262190643b6a", + "reference": "33de264839fdaacf42460ada3b1b262190643b6a", "shasum": "" }, "require": { @@ -146,9 +146,9 @@ "ext-json": "*", "ext-pcre": "*", "ext-simplexml": "*", - "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5", + "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5 <7.9.0", "guzzlehttp/promises": "^1.4.0 || ^2.0", - "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "guzzlehttp/psr7": "^1.9.1 || ^2.4.5 <2.7.0", "mtdowling/jmespath.php": "^2.6", "php": ">=7.2.5", "psr/http-message": "^1.0 || ^2.0" @@ -218,22 +218,22 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.316.2" + "source": "https://github.com/aws/aws-sdk-php/tree/3.316.9" }, - "time": "2024-07-10T19:16:28+00:00" + "time": "2024-07-29T19:23:04+00:00" }, { "name": "blade-ui-kit/blade-heroicons", - "version": "2.3.0", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/blade-ui-kit/blade-heroicons.git", - "reference": "a265dbcf2a098121aad05752d0bba9f59022e4ba" + "reference": "a7c377a4ef88cd54712e3e15cbed30446820da0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/blade-ui-kit/blade-heroicons/zipball/a265dbcf2a098121aad05752d0bba9f59022e4ba", - "reference": "a265dbcf2a098121aad05752d0bba9f59022e4ba", + "url": "https://api.github.com/repos/blade-ui-kit/blade-heroicons/zipball/a7c377a4ef88cd54712e3e15cbed30446820da0b", + "reference": "a7c377a4ef88cd54712e3e15cbed30446820da0b", "shasum": "" }, "require": { @@ -277,7 +277,7 @@ ], "support": { "issues": "https://github.com/blade-ui-kit/blade-heroicons/issues", - "source": "https://github.com/blade-ui-kit/blade-heroicons/tree/2.3.0" + "source": "https://github.com/blade-ui-kit/blade-heroicons/tree/2.4.0" }, "funding": [ { @@ -289,20 +289,20 @@ "type": "paypal" } ], - "time": "2024-02-07T16:33:46+00:00" + "time": "2024-07-16T07:00:01+00:00" }, { "name": "blade-ui-kit/blade-icons", - "version": "1.6.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/blade-ui-kit/blade-icons.git", - "reference": "89660d93f9897d231e9113ba203cd17f4c5efade" + "reference": "74275f44c71e815b85bf7cea66e3bf98c57fb7e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/blade-ui-kit/blade-icons/zipball/89660d93f9897d231e9113ba203cd17f4c5efade", - "reference": "89660d93f9897d231e9113ba203cd17f4c5efade", + "url": "https://api.github.com/repos/blade-ui-kit/blade-icons/zipball/74275f44c71e815b85bf7cea66e3bf98c57fb7e4", + "reference": "74275f44c71e815b85bf7cea66e3bf98c57fb7e4", "shasum": "" }, "require": { @@ -370,7 +370,7 @@ "type": "paypal" } ], - "time": "2024-02-07T16:09:20+00:00" + "time": "2024-07-29T21:49:30+00:00" }, { "name": "brianium/paratest", @@ -597,16 +597,16 @@ }, { "name": "composer/semver", - "version": "3.4.1", + "version": "3.4.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "8536c1b9103405bcbd310c69e7a5739a1c2b1f0b" + "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/8536c1b9103405bcbd310c69e7a5739a1c2b1f0b", - "reference": "8536c1b9103405bcbd310c69e7a5739a1c2b1f0b", + "url": "https://api.github.com/repos/composer/semver/zipball/c51258e759afdb17f1fd1fe83bc12baaef6309d6", + "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6", "shasum": "" }, "require": { @@ -658,7 +658,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.1" + "source": "https://github.com/composer/semver/tree/3.4.2" }, "funding": [ { @@ -674,7 +674,7 @@ "type": "tidelift" } ], - "time": "2024-07-12T09:13:09+00:00" + "time": "2024-07-12T11:35:52+00:00" }, { "name": "danharrin/livewire-rate-limiting", @@ -1766,24 +1766,24 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.1.2", + "version": "v1.1.3", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862" + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862", - "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.2" + "phpoption/phpoption": "^1.9.3" }, "require-dev": { - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "autoload": { @@ -1812,7 +1812,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" }, "funding": [ { @@ -1824,26 +1824,26 @@ "type": "tidelift" } ], - "time": "2023-11-12T22:16:48+00:00" + "time": "2024-07-20T21:45:45+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.8.1", + "version": "7.8.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" + "reference": "f4152d9eb85c445fe1f992001d1748e8bec070d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4152d9eb85c445fe1f992001d1748e8bec070d2", + "reference": "f4152d9eb85c445fe1f992001d1748e8bec070d2", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.1", - "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^1.9.1 || ^2.6.3", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -1854,9 +1854,9 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "guzzle/client-integration-tests": "3.0.2", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.36 || ^9.6.15", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -1934,7 +1934,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.8.1" + "source": "https://github.com/guzzle/guzzle/tree/7.8.2" }, "funding": [ { @@ -1950,20 +1950,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:35:24+00:00" + "time": "2024-07-18T11:12:18+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", + "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", "shasum": "" }, "require": { @@ -1971,7 +1971,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "type": "library", "extra": { @@ -2017,7 +2017,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.2" + "source": "https://github.com/guzzle/promises/tree/2.0.3" }, "funding": [ { @@ -2033,20 +2033,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:19:20+00:00" + "time": "2024-07-18T10:29:17+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.6.2", + "version": "2.6.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" + "reference": "6de29867b18790c0d2c846af4c13a24cc3ad56f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/6de29867b18790c0d2c846af4c13a24cc3ad56f3", + "reference": "6de29867b18790c0d2c846af4c13a24cc3ad56f3", "shasum": "" }, "require": { @@ -2061,8 +2061,8 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -2133,7 +2133,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.2" + "source": "https://github.com/guzzle/psr7/tree/2.6.3" }, "funding": [ { @@ -2149,7 +2149,7 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:05:35+00:00" + "time": "2024-07-18T09:59:12+00:00" }, { "name": "guzzlehttp/uri-template", @@ -2513,16 +2513,16 @@ }, { "name": "laravel/framework", - "version": "v11.15.0", + "version": "v11.18.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "ba85f1c019bed59b3c736c9c4502805efd0ba84b" + "reference": "b19ba518c56852567e99fbae9321bc436c2cc5a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/ba85f1c019bed59b3c736c9c4502805efd0ba84b", - "reference": "ba85f1c019bed59b3c736c9c4502805efd0ba84b", + "url": "https://api.github.com/repos/laravel/framework/zipball/b19ba518c56852567e99fbae9321bc436c2cc5a8", + "reference": "b19ba518c56852567e99fbae9321bc436c2cc5a8", "shasum": "" }, "require": { @@ -2715,20 +2715,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-07-09T15:38:12+00:00" + "time": "2024-07-26T10:39:29+00:00" }, { "name": "laravel/pint", - "version": "v1.16.2", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "51f1ba679a6afe0315621ad143d788bd7ded0eca" + "reference": "4dba80c1de4b81dc4c4fb10ea6f4781495eb29f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/51f1ba679a6afe0315621ad143d788bd7ded0eca", - "reference": "51f1ba679a6afe0315621ad143d788bd7ded0eca", + "url": "https://api.github.com/repos/laravel/pint/zipball/4dba80c1de4b81dc4c4fb10ea6f4781495eb29f5", + "reference": "4dba80c1de4b81dc4c4fb10ea6f4781495eb29f5", "shasum": "" }, "require": { @@ -2781,7 +2781,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-07-09T15:58:08+00:00" + "time": "2024-07-23T16:40:20+00:00" }, { "name": "laravel/prompts", @@ -2969,16 +2969,16 @@ }, { "name": "league/commonmark", - "version": "2.4.2", + "version": "2.5.1", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf" + "reference": "ac815920de0eff6de947eac0a6a94e5ed0fb147c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/91c24291965bd6d7c46c46a12ba7492f83b1cadf", - "reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/ac815920de0eff6de947eac0a6a94e5ed0fb147c", + "reference": "ac815920de0eff6de947eac0a6a94e5ed0fb147c", "shasum": "" }, "require": { @@ -2991,8 +2991,8 @@ }, "require-dev": { "cebe/markdown": "^1.0", - "commonmark/cmark": "0.30.3", - "commonmark/commonmark.js": "0.30.0", + "commonmark/cmark": "0.31.0", + "commonmark/commonmark.js": "0.31.0", "composer/package-versions-deprecated": "^1.8", "embed/embed": "^4.4", "erusev/parsedown": "^1.0", @@ -3014,7 +3014,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "2.6-dev" } }, "autoload": { @@ -3071,7 +3071,7 @@ "type": "tidelift" } ], - "time": "2024-02-02T11:59:32+00:00" + "time": "2024-07-24T12:52:09+00:00" }, { "name": "league/config", @@ -3662,16 +3662,16 @@ }, { "name": "livewire/livewire", - "version": "v3.5.2", + "version": "v3.5.4", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "636725c1f87bc7844dd80277488268db27eec1aa" + "reference": "b158c6386a892efc6c5e4682e682829baac1f933" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/636725c1f87bc7844dd80277488268db27eec1aa", - "reference": "636725c1f87bc7844dd80277488268db27eec1aa", + "url": "https://api.github.com/repos/livewire/livewire/zipball/b158c6386a892efc6c5e4682e682829baac1f933", + "reference": "b158c6386a892efc6c5e4682e682829baac1f933", "shasum": "" }, "require": { @@ -3726,7 +3726,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v3.5.2" + "source": "https://github.com/livewire/livewire/tree/v3.5.4" }, "funding": [ { @@ -3734,7 +3734,7 @@ "type": "github" } ], - "time": "2024-07-03T17:22:45+00:00" + "time": "2024-07-15T18:27:32+00:00" }, { "name": "maennchen/zipstream-php", @@ -4196,16 +4196,16 @@ }, { "name": "nesbot/carbon", - "version": "3.6.0", + "version": "3.7.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "39c8ef752db6865717cc3fba63970c16f057982c" + "reference": "cb4374784c87d0a0294e8513a52eb63c0aff3139" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/39c8ef752db6865717cc3fba63970c16f057982c", - "reference": "39c8ef752db6865717cc3fba63970c16f057982c", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/cb4374784c87d0a0294e8513a52eb63c0aff3139", + "reference": "cb4374784c87d0a0294e8513a52eb63c0aff3139", "shasum": "" }, "require": { @@ -4298,7 +4298,7 @@ "type": "tidelift" } ], - "time": "2024-06-20T15:52:59+00:00" + "time": "2024-07-16T22:29:20+00:00" }, { "name": "nette/schema", @@ -4508,38 +4508,38 @@ }, { "name": "nunomaduro/collision", - "version": "v8.1.1", + "version": "v8.3.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "13e5d538b95a744d85f447a321ce10adb28e9af9" + "reference": "b49f5b2891ce52726adfd162841c69d4e4c84229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/13e5d538b95a744d85f447a321ce10adb28e9af9", - "reference": "13e5d538b95a744d85f447a321ce10adb28e9af9", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/b49f5b2891ce52726adfd162841c69d4e4c84229", + "reference": "b49f5b2891ce52726adfd162841c69d4e4c84229", "shasum": "" }, "require": { "filp/whoops": "^2.15.4", "nunomaduro/termwind": "^2.0.1", "php": "^8.2.0", - "symfony/console": "^7.0.4" + "symfony/console": "^7.1.2" }, "conflict": { "laravel/framework": "<11.0.0 || >=12.0.0", "phpunit/phpunit": "<10.5.1 || >=12.0.0" }, "require-dev": { - "larastan/larastan": "^2.9.2", - "laravel/framework": "^11.0.0", - "laravel/pint": "^1.14.0", - "laravel/sail": "^1.28.2", - "laravel/sanctum": "^4.0.0", + "larastan/larastan": "^2.9.8", + "laravel/framework": "^11.16.0", + "laravel/pint": "^1.16.2", + "laravel/sail": "^1.30.2", + "laravel/sanctum": "^4.0.2", "laravel/tinker": "^2.9.0", - "orchestra/testbench-core": "^9.0.0", - "pestphp/pest": "^2.34.1 || ^3.0.0", - "sebastian/environment": "^6.0.1 || ^7.0.0" + "orchestra/testbench-core": "^9.2.1", + "pestphp/pest": "^2.34.9 || ^3.0.0", + "sebastian/environment": "^6.1.0 || ^7.0.0" }, "type": "library", "extra": { @@ -4601,7 +4601,7 @@ "type": "patreon" } ], - "time": "2024-03-06T16:20:09+00:00" + "time": "2024-07-16T22:41:01+00:00" }, { "name": "nunomaduro/termwind", @@ -4693,16 +4693,16 @@ }, { "name": "openspout/openspout", - "version": "v4.24.2", + "version": "v4.24.5", "source": { "type": "git", "url": "https://github.com/openspout/openspout.git", - "reference": "24272c1f7d073cc64fa3ecc2a863dc5d13be33a8" + "reference": "393299ae21153f042f48b185f2adeb4b157d1d93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/openspout/openspout/zipball/24272c1f7d073cc64fa3ecc2a863dc5d13be33a8", - "reference": "24272c1f7d073cc64fa3ecc2a863dc5d13be33a8", + "url": "https://api.github.com/repos/openspout/openspout/zipball/393299ae21153f042f48b185f2adeb4b157d1d93", + "reference": "393299ae21153f042f48b185f2adeb4b157d1d93", "shasum": "" }, "require": { @@ -4716,13 +4716,13 @@ }, "require-dev": { "ext-zlib": "*", - "friendsofphp/php-cs-fixer": "^3.59.3", - "infection/infection": "^0.29.5", - "phpbench/phpbench": "^1.2.15", - "phpstan/phpstan": "^1.11.4", + "friendsofphp/php-cs-fixer": "^3.60.0", + "infection/infection": "^0.29.6", + "phpbench/phpbench": "^1.3.1", + "phpstan/phpstan": "^1.11.8", "phpstan/phpstan-phpunit": "^1.4.0", "phpstan/phpstan-strict-rules": "^1.6.0", - "phpunit/phpunit": "^10.5.20 || ^11.2.2" + "phpunit/phpunit": "^10.5.20 || ^11.2.8" }, "suggest": { "ext-iconv": "To handle non UTF-8 CSV files (if \"php-mbstring\" is not already installed or is too limited)", @@ -4770,7 +4770,7 @@ ], "support": { "issues": "https://github.com/openspout/openspout/issues", - "source": "https://github.com/openspout/openspout/tree/v4.24.2" + "source": "https://github.com/openspout/openspout/tree/v4.24.5" }, "funding": [ { @@ -4782,37 +4782,37 @@ "type": "github" } ], - "time": "2024-06-17T08:53:37+00:00" + "time": "2024-07-26T05:48:04+00:00" }, { "name": "orchestra/canvas", - "version": "v9.0.3", + "version": "v9.1.0", "source": { "type": "git", "url": "https://github.com/orchestral/canvas.git", - "reference": "bed541346ffae1b9246afae4d196e8fc10ac9067" + "reference": "fba331ea9dd3bbf96f72aadcb48a77f43c2f4145" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/canvas/zipball/bed541346ffae1b9246afae4d196e8fc10ac9067", - "reference": "bed541346ffae1b9246afae4d196e8fc10ac9067", + "url": "https://api.github.com/repos/orchestral/canvas/zipball/fba331ea9dd3bbf96f72aadcb48a77f43c2f4145", + "reference": "fba331ea9dd3bbf96f72aadcb48a77f43c2f4145", "shasum": "" }, "require": { "composer-runtime-api": "^2.2", "composer/semver": "^3.0", - "illuminate/console": "^11.10", - "illuminate/database": "^11.10", - "illuminate/filesystem": "^11.10", - "illuminate/support": "^11.10", + "illuminate/console": "^11.16", + "illuminate/database": "^11.16", + "illuminate/filesystem": "^11.16", + "illuminate/support": "^11.16", "orchestra/canvas-core": "^9.0", - "orchestra/testbench-core": "^9.0", + "orchestra/testbench-core": "^9.2", "php": "^8.2", "symfony/polyfill-php83": "^1.28", "symfony/yaml": "^7.0" }, "require-dev": { - "laravel/framework": "^11.10", + "laravel/framework": "^11.16", "laravel/pint": "^1.6", "mockery/mockery": "^1.6", "phpstan/phpstan": "^1.11", @@ -4855,9 +4855,9 @@ "description": "Code Generators for Laravel Applications and Packages", "support": { "issues": "https://github.com/orchestral/canvas/issues", - "source": "https://github.com/orchestral/canvas/tree/v9.0.3" + "source": "https://github.com/orchestral/canvas/tree/v9.1.0" }, - "time": "2024-06-18T10:10:33+00:00" + "time": "2024-07-16T23:01:15+00:00" }, { "name": "orchestra/canvas-core", @@ -4929,24 +4929,24 @@ }, { "name": "orchestra/testbench", - "version": "v9.1.2", + "version": "v9.2.0", "source": { "type": "git", "url": "https://github.com/orchestral/testbench.git", - "reference": "e3aa89ddfc76c22c65bf653f220bb906c26726a1" + "reference": "ccf7c9bdb6b15201a9c91a8cd0d60db721147987" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench/zipball/e3aa89ddfc76c22c65bf653f220bb906c26726a1", - "reference": "e3aa89ddfc76c22c65bf653f220bb906c26726a1", + "url": "https://api.github.com/repos/orchestral/testbench/zipball/ccf7c9bdb6b15201a9c91a8cd0d60db721147987", + "reference": "ccf7c9bdb6b15201a9c91a8cd0d60db721147987", "shasum": "" }, "require": { "composer-runtime-api": "^2.2", "fakerphp/faker": "^1.23", - "laravel/framework": "^11.7", + "laravel/framework": "^11.11", "mockery/mockery": "^1.6", - "orchestra/testbench-core": "^9.1.3", + "orchestra/testbench-core": "^9.2", "orchestra/workbench": "^9.1", "php": "^8.2", "phpunit/phpunit": "^10.5 || ^11.0.1", @@ -4978,22 +4978,22 @@ ], "support": { "issues": "https://github.com/orchestral/testbench/issues", - "source": "https://github.com/orchestral/testbench/tree/v9.1.2" + "source": "https://github.com/orchestral/testbench/tree/v9.2.0" }, - "time": "2024-06-04T12:30:43+00:00" + "time": "2024-07-13T07:23:13+00:00" }, { "name": "orchestra/testbench-core", - "version": "v9.1.9", + "version": "v9.2.2", "source": { "type": "git", "url": "https://github.com/orchestral/testbench-core.git", - "reference": "872742adfc2a05c4ae6b0b4f1eb8961575ec2580" + "reference": "e0283b4fadbfa0104ea9ad772a390a5bfec602f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/872742adfc2a05c4ae6b0b4f1eb8961575ec2580", - "reference": "872742adfc2a05c4ae6b0b4f1eb8961575ec2580", + "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/e0283b4fadbfa0104ea9ad772a390a5bfec602f0", + "reference": "e0283b4fadbfa0104ea9ad772a390a5bfec602f0", "shasum": "" }, "require": { @@ -5003,13 +5003,13 @@ }, "conflict": { "brianium/paratest": "<7.3.0 || >=8.0.0", - "laravel/framework": "<11.1.0 || >=12.0.0", + "laravel/framework": "<11.11.0 || >=12.0.0", "nunomaduro/collision": "<8.0.0 || >=9.0.0", "phpunit/phpunit": "<10.5.0 || 11.0.0 || >=11.3.0" }, "require-dev": { "fakerphp/faker": "^1.23", - "laravel/framework": "^11.1", + "laravel/framework": "^11.11", "laravel/pint": "^1.6", "mockery/mockery": "^1.6", "phpstan/phpstan": "^1.11", @@ -5069,7 +5069,7 @@ "issues": "https://github.com/orchestral/testbench/issues", "source": "https://github.com/orchestral/testbench-core" }, - "time": "2024-07-10T01:22:27+00:00" + "time": "2024-07-19T10:35:39+00:00" }, { "name": "orchestra/workbench", @@ -5635,16 +5635,16 @@ }, { "name": "php-di/php-di", - "version": "7.0.6", + "version": "7.0.7", "source": { "type": "git", "url": "https://github.com/PHP-DI/PHP-DI.git", - "reference": "8097948a89f6ec782839b3e958432f427cac37fd" + "reference": "e87435e3c0e8f22977adc5af0d5cdcc467e15cf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/PHP-DI/zipball/8097948a89f6ec782839b3e958432f427cac37fd", - "reference": "8097948a89f6ec782839b3e958432f427cac37fd", + "url": "https://api.github.com/repos/PHP-DI/PHP-DI/zipball/e87435e3c0e8f22977adc5af0d5cdcc467e15cf1", + "reference": "e87435e3c0e8f22977adc5af0d5cdcc467e15cf1", "shasum": "" }, "require": { @@ -5692,7 +5692,7 @@ ], "support": { "issues": "https://github.com/PHP-DI/PHP-DI/issues", - "source": "https://github.com/PHP-DI/PHP-DI/tree/7.0.6" + "source": "https://github.com/PHP-DI/PHP-DI/tree/7.0.7" }, "funding": [ { @@ -5704,7 +5704,7 @@ "type": "tidelift" } ], - "time": "2023-11-02T10:04:50+00:00" + "time": "2024-07-21T15:55:45+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -5971,16 +5971,16 @@ }, { "name": "phpoption/phpoption", - "version": "1.9.2", + "version": "1.9.3", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", - "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", "shasum": "" }, "require": { @@ -5988,13 +5988,13 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { "dev-master": "1.9-dev" @@ -6030,7 +6030,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" }, "funding": [ { @@ -6042,7 +6042,7 @@ "type": "tidelift" } ], - "time": "2023-11-12T21:59:55+00:00" + "time": "2024-07-20T21:41:07+00:00" }, { "name": "phpstan/extension-installer", @@ -7382,16 +7382,16 @@ }, { "name": "rector/rector", - "version": "1.2.0", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "2fa387553db22b6f9bcccf5ff16f2c2c18a52a65" + "reference": "044e6364017882d1e346da8690eeabc154da5495" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/2fa387553db22b6f9bcccf5ff16f2c2c18a52a65", - "reference": "2fa387553db22b6f9bcccf5ff16f2c2c18a52a65", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/044e6364017882d1e346da8690eeabc154da5495", + "reference": "044e6364017882d1e346da8690eeabc154da5495", "shasum": "" }, "require": { @@ -7429,7 +7429,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/1.2.0" + "source": "https://github.com/rectorphp/rector/tree/1.2.2" }, "funding": [ { @@ -7437,7 +7437,7 @@ "type": "github" } ], - "time": "2024-07-01T14:24:45+00:00" + "time": "2024-07-25T07:44:34+00:00" }, { "name": "ryangjchandler/blade-capture-directive", @@ -8435,16 +8435,16 @@ }, { "name": "spatie/backtrace", - "version": "1.6.1", + "version": "1.6.2", "source": { "type": "git", "url": "https://github.com/spatie/backtrace.git", - "reference": "8373b9d51638292e3bfd736a9c19a654111b4a23" + "reference": "1a9a145b044677ae3424693f7b06479fc8c137a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/backtrace/zipball/8373b9d51638292e3bfd736a9c19a654111b4a23", - "reference": "8373b9d51638292e3bfd736a9c19a654111b4a23", + "url": "https://api.github.com/repos/spatie/backtrace/zipball/1a9a145b044677ae3424693f7b06479fc8c137a9", + "reference": "1a9a145b044677ae3424693f7b06479fc8c137a9", "shasum": "" }, "require": { @@ -8482,7 +8482,7 @@ "spatie" ], "support": { - "source": "https://github.com/spatie/backtrace/tree/1.6.1" + "source": "https://github.com/spatie/backtrace/tree/1.6.2" }, "funding": [ { @@ -8494,7 +8494,7 @@ "type": "other" } ], - "time": "2024-04-24T13:22:11+00:00" + "time": "2024-07-22T08:21:24+00:00" }, { "name": "spatie/color", @@ -8631,16 +8631,16 @@ }, { "name": "spatie/image", - "version": "3.6.4", + "version": "3.7.2", "source": { "type": "git", "url": "https://github.com/spatie/image.git", - "reference": "324a7bfc7924f8dc7d90777e33097a63f0199b1c" + "reference": "9c3ec3109b66f38a6427b56f18b9e921a2111be1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/image/zipball/324a7bfc7924f8dc7d90777e33097a63f0199b1c", - "reference": "324a7bfc7924f8dc7d90777e33097a63f0199b1c", + "url": "https://api.github.com/repos/spatie/image/zipball/9c3ec3109b66f38a6427b56f18b9e921a2111be1", + "reference": "9c3ec3109b66f38a6427b56f18b9e921a2111be1", "shasum": "" }, "require": { @@ -8687,7 +8687,7 @@ "spatie" ], "support": { - "source": "https://github.com/spatie/image/tree/3.6.4" + "source": "https://github.com/spatie/image/tree/3.7.2" }, "funding": [ { @@ -8699,7 +8699,7 @@ "type": "github" } ], - "time": "2024-06-03T08:10:31+00:00" + "time": "2024-07-26T13:44:46+00:00" }, { "name": "spatie/image-optimizer", @@ -8817,16 +8817,16 @@ }, { "name": "spatie/laravel-medialibrary", - "version": "11.7.3", + "version": "11.8.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-medialibrary.git", - "reference": "c3828e7558473d9df0803212c68d61d91173a3ab" + "reference": "91a0aaea20f31462bc748c94370eb5fdc0d7e29f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/c3828e7558473d9df0803212c68d61d91173a3ab", - "reference": "c3828e7558473d9df0803212c68d61d91173a3ab", + "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/91a0aaea20f31462bc748c94370eb5fdc0d7e29f", + "reference": "91a0aaea20f31462bc748c94370eb5fdc0d7e29f", "shasum": "" }, "require": { @@ -8910,7 +8910,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-medialibrary/issues", - "source": "https://github.com/spatie/laravel-medialibrary/tree/11.7.3" + "source": "https://github.com/spatie/laravel-medialibrary/tree/11.8.1" }, "funding": [ { @@ -8922,7 +8922,7 @@ "type": "github" } ], - "time": "2024-07-02T13:37:35+00:00" + "time": "2024-07-26T07:43:05+00:00" }, { "name": "spatie/laravel-package-tools", @@ -8986,16 +8986,16 @@ }, { "name": "spatie/laravel-ray", - "version": "1.37.0", + "version": "1.37.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ray.git", - "reference": "f57b294a3815be37effa9d13f54f2fbe5a2fff37" + "reference": "c2bedfd1172648df2c80aaceb2541d70f1d9a5b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/f57b294a3815be37effa9d13f54f2fbe5a2fff37", - "reference": "f57b294a3815be37effa9d13f54f2fbe5a2fff37", + "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/c2bedfd1172648df2c80aaceb2541d70f1d9a5b9", + "reference": "c2bedfd1172648df2c80aaceb2541d70f1d9a5b9", "shasum": "" }, "require": { @@ -9057,7 +9057,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-ray/issues", - "source": "https://github.com/spatie/laravel-ray/tree/1.37.0" + "source": "https://github.com/spatie/laravel-ray/tree/1.37.1" }, "funding": [ { @@ -9069,7 +9069,7 @@ "type": "other" } ], - "time": "2024-07-03T08:48:44+00:00" + "time": "2024-07-12T12:35:17+00:00" }, { "name": "spatie/laravel-tags", @@ -9143,16 +9143,16 @@ }, { "name": "spatie/laravel-translatable", - "version": "6.7.1", + "version": "6.8.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-translatable.git", - "reference": "d55384cbcf867b3cf21ff4d062403596d94acf81" + "reference": "0ef7e8e9d65bb834b7c68f22ec362a6179f50381" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-translatable/zipball/d55384cbcf867b3cf21ff4d062403596d94acf81", - "reference": "d55384cbcf867b3cf21ff4d062403596d94acf81", + "url": "https://api.github.com/repos/spatie/laravel-translatable/zipball/0ef7e8e9d65bb834b7c68f22ec362a6179f50381", + "reference": "0ef7e8e9d65bb834b7c68f22ec362a6179f50381", "shasum": "" }, "require": { @@ -9213,7 +9213,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-translatable/issues", - "source": "https://github.com/spatie/laravel-translatable/tree/6.7.1" + "source": "https://github.com/spatie/laravel-translatable/tree/6.8.0" }, "funding": [ { @@ -9221,7 +9221,7 @@ "type": "github" } ], - "time": "2024-05-14T11:35:51+00:00" + "time": "2024-07-24T14:26:27+00:00" }, { "name": "spatie/macroable", @@ -9486,16 +9486,16 @@ }, { "name": "staudenmeir/eloquent-has-many-deep", - "version": "v1.20.1", + "version": "v1.20.2", "source": { "type": "git", "url": "https://github.com/staudenmeir/eloquent-has-many-deep.git", - "reference": "979108e70a0db274bbf0c3ee58f1b8e96f891d4d" + "reference": "edcce8d8559d9559c997c177de06eb4bc173956d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/staudenmeir/eloquent-has-many-deep/zipball/979108e70a0db274bbf0c3ee58f1b8e96f891d4d", - "reference": "979108e70a0db274bbf0c3ee58f1b8e96f891d4d", + "url": "https://api.github.com/repos/staudenmeir/eloquent-has-many-deep/zipball/edcce8d8559d9559c997c177de06eb4bc173956d", + "reference": "edcce8d8559d9559c997c177de06eb4bc173956d", "shasum": "" }, "require": { @@ -9541,7 +9541,7 @@ "description": "Laravel Eloquent HasManyThrough relationships with unlimited levels", "support": { "issues": "https://github.com/staudenmeir/eloquent-has-many-deep/issues", - "source": "https://github.com/staudenmeir/eloquent-has-many-deep/tree/v1.20.1" + "source": "https://github.com/staudenmeir/eloquent-has-many-deep/tree/v1.20.2" }, "funding": [ { @@ -9549,7 +9549,7 @@ "type": "custom" } ], - "time": "2024-05-25T10:02:04+00:00" + "time": "2024-07-12T22:08:11+00:00" }, { "name": "staudenmeir/eloquent-has-many-deep-contracts", @@ -9668,16 +9668,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": { @@ -9741,7 +9741,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.1.2" + "source": "https://github.com/symfony/console/tree/v7.1.3" }, "funding": [ { @@ -9757,7 +9757,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T10:03:55+00:00" + "time": "2024-07-26T12:41:01+00:00" }, { "name": "symfony/css-selector", @@ -9893,16 +9893,16 @@ }, { "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": { @@ -9948,7 +9948,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": [ { @@ -9964,7 +9964,7 @@ "type": "tidelift" } ], - "time": "2024-06-25T19:55:06+00:00" + "time": "2024-07-26T13:02:51+00:00" }, { "name": "symfony/event-dispatcher", @@ -10124,16 +10124,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": { @@ -10168,7 +10168,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": [ { @@ -10184,7 +10184,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-24T07:08:44+00:00" }, { "name": "symfony/html-sanitizer", @@ -10257,16 +10257,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": { @@ -10314,7 +10314,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": [ { @@ -10330,20 +10330,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": { @@ -10428,7 +10428,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": [ { @@ -10444,7 +10444,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T13:13:31+00:00" + "time": "2024-07-26T14:58:15+00:00" }, { "name": "symfony/mailer", @@ -11402,16 +11402,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": { @@ -11443,7 +11443,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": [ { @@ -11459,20 +11459,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-26T12:44:47+00:00" }, { "name": "symfony/routing", - "version": "v7.1.1", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "60c31bab5c45af7f13091b87deb708830f3c96c0" + "reference": "8a908a3f22d5a1b5d297578c2ceb41b02fa916d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/60c31bab5c45af7f13091b87deb708830f3c96c0", - "reference": "60c31bab5c45af7f13091b87deb708830f3c96c0", + "url": "https://api.github.com/repos/symfony/routing/zipball/8a908a3f22d5a1b5d297578c2ceb41b02fa916d0", + "reference": "8a908a3f22d5a1b5d297578c2ceb41b02fa916d0", "shasum": "" }, "require": { @@ -11524,7 +11524,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v7.1.1" + "source": "https://github.com/symfony/routing/tree/v7.1.3" }, "funding": [ { @@ -11540,7 +11540,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-17T06:10:24+00:00" }, { "name": "symfony/service-contracts", @@ -11689,16 +11689,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": { @@ -11756,7 +11756,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.1.2" + "source": "https://github.com/symfony/string/tree/v7.1.3" }, "funding": [ { @@ -11772,20 +11772,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": { @@ -11850,7 +11850,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": [ { @@ -11866,7 +11866,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-26T12:41:01+00:00" }, { "name": "symfony/translation-contracts", @@ -12022,16 +12022,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": { @@ -12085,7 +12085,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": [ { @@ -12101,7 +12101,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T08:00:31+00:00" + "time": "2024-07-26T12:41:01+00:00" }, { "name": "symfony/yaml", @@ -12384,23 +12384,23 @@ }, { "name": "vlucas/phpdotenv", - "version": "v5.6.0", + "version": "v5.6.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4" + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", - "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.1.2", + "graham-campbell/result-type": "^1.1.3", "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.2", + "phpoption/phpoption": "^1.9.3", "symfony/polyfill-ctype": "^1.24", "symfony/polyfill-mbstring": "^1.24", "symfony/polyfill-php80": "^1.24" @@ -12417,7 +12417,7 @@ "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { "dev-master": "5.6-dev" @@ -12452,7 +12452,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" }, "funding": [ { @@ -12464,7 +12464,7 @@ "type": "tidelift" } ], - "time": "2023-11-12T22:43:29+00:00" + "time": "2024-07-20T21:52:34+00:00" }, { "name": "voku/portable-ascii", @@ -12600,16 +12600,16 @@ }, { "name": "zbateson/mail-mime-parser", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/zbateson/mail-mime-parser.git", - "reference": "6ade63b0a43047935791d7977e22717a68cc388b" + "reference": "9a240522ae5e4eaeb7bf72c9bc88fe89dfb014a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zbateson/mail-mime-parser/zipball/6ade63b0a43047935791d7977e22717a68cc388b", - "reference": "6ade63b0a43047935791d7977e22717a68cc388b", + "url": "https://api.github.com/repos/zbateson/mail-mime-parser/zipball/9a240522ae5e4eaeb7bf72c9bc88fe89dfb014a3", + "reference": "9a240522ae5e4eaeb7bf72c9bc88fe89dfb014a3", "shasum": "" }, "require": { @@ -12672,7 +12672,7 @@ "type": "github" } ], - "time": "2024-04-29T21:53:01+00:00" + "time": "2024-05-01T16:49:29+00:00" }, { "name": "zbateson/mb-wrapper", @@ -12818,5 +12818,5 @@ "composer-runtime-api": "^2.1" }, "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/packages/actions/database/migrations/create_exports_table.php b/packages/actions/database/migrations/create_exports_table.php index 91624d270b..a4aab11e7c 100644 --- a/packages/actions/database/migrations/create_exports_table.php +++ b/packages/actions/database/migrations/create_exports_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { /** * Run the migrations. diff --git a/packages/actions/database/migrations/create_failed_import_rows_table.php b/packages/actions/database/migrations/create_failed_import_rows_table.php index eae8cb2e2e..260507e858 100644 --- a/packages/actions/database/migrations/create_failed_import_rows_table.php +++ b/packages/actions/database/migrations/create_failed_import_rows_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { /** * Run the migrations. diff --git a/packages/actions/database/migrations/create_imports_table.php b/packages/actions/database/migrations/create_imports_table.php index 34c5fc5b55..100b7d9690 100644 --- a/packages/actions/database/migrations/create_imports_table.php +++ b/packages/actions/database/migrations/create_imports_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { /** * Run the migrations. diff --git a/packages/actions/resources/lang/es/import.php b/packages/actions/resources/lang/es/import.php index 0069ccbd16..dc1fea6d4b 100644 --- a/packages/actions/resources/lang/es/import.php +++ b/packages/actions/resources/lang/es/import.php @@ -11,8 +11,14 @@ return [ 'form' => [ 'file' => [ + 'label' => 'Archivo', + 'placeholder' => 'Cargar un archivo CSV', + + 'rules' => [ + 'duplicate_columns' => '{0} El archivo no debe contener más de un encabezado de columna vacío.|{1,*} El archivo no debe contener encabezados de columna duplicados: :columns.', + ], ], 'columns' => [ diff --git a/packages/actions/src/Action.php b/packages/actions/src/Action.php index 53afd8e070..514558962b 100644 --- a/packages/actions/src/Action.php +++ b/packages/actions/src/Action.php @@ -515,12 +515,12 @@ class Action extends ViewComponent implements Arrayable public function cancel(bool $shouldRollBackDatabaseTransaction = false): void { - throw (new Cancel())->rollBackDatabaseTransaction($shouldRollBackDatabaseTransaction); + throw (new Cancel)->rollBackDatabaseTransaction($shouldRollBackDatabaseTransaction); } public function halt(bool $shouldRollBackDatabaseTransaction = false): void { - throw (new Halt())->rollBackDatabaseTransaction($shouldRollBackDatabaseTransaction); + throw (new Halt)->rollBackDatabaseTransaction($shouldRollBackDatabaseTransaction); } /** diff --git a/packages/actions/src/ActionsServiceProvider.php b/packages/actions/src/ActionsServiceProvider.php index b073aa9d41..f12a954a7b 100644 --- a/packages/actions/src/ActionsServiceProvider.php +++ b/packages/actions/src/ActionsServiceProvider.php @@ -44,6 +44,6 @@ class ActionsServiceProvider extends PackageServiceProvider } } - Testable::mixin(new TestsActions()); + Testable::mixin(new TestsActions); } } diff --git a/packages/actions/src/Concerns/CanOpenModal.php b/packages/actions/src/Concerns/CanOpenModal.php index 92c8d5a9fc..4670b40b8d 100644 --- a/packages/actions/src/Concerns/CanOpenModal.php +++ b/packages/actions/src/Concerns/CanOpenModal.php @@ -4,7 +4,6 @@ namespace Filament\Actions\Concerns; use Closure; use Filament\Actions\Action; -use Filament\Actions\Exceptions\ActionNotResolvableException; use Filament\Support\Enums\Alignment; use Filament\Support\Enums\MaxWidth; use Filament\Support\View\Components\Modal; diff --git a/packages/actions/src/Concerns/HasExtraModalWindowAttributes.php b/packages/actions/src/Concerns/HasExtraModalWindowAttributes.php index e4973b7cb9..c970293dec 100644 --- a/packages/actions/src/Concerns/HasExtraModalWindowAttributes.php +++ b/packages/actions/src/Concerns/HasExtraModalWindowAttributes.php @@ -31,7 +31,7 @@ trait HasExtraModalWindowAttributes */ public function getExtraModalWindowAttributes(): array { - $temporaryAttributeBag = new ComponentAttributeBag(); + $temporaryAttributeBag = new ComponentAttributeBag; foreach ($this->extraModalWindowAttributes as $extraModalWindowAttributes) { $temporaryAttributeBag = $temporaryAttributeBag->merge($this->evaluate($extraModalWindowAttributes)); diff --git a/packages/actions/src/CreateAction.php b/packages/actions/src/CreateAction.php index cb990eb691..f1aacfffe8 100644 --- a/packages/actions/src/CreateAction.php +++ b/packages/actions/src/CreateAction.php @@ -78,7 +78,7 @@ class CreateAction extends Action if ($translatableContentDriver = $livewire->makeFilamentTranslatableContentDriver()) { $record = $translatableContentDriver->makeRecord($model, $data); } else { - $record = new $model(); + $record = new $model; $record->fill($data); } diff --git a/packages/actions/src/Exports/Jobs/ExportCsv.php b/packages/actions/src/Exports/Jobs/ExportCsv.php index 3a6cd08eb5..2be8ee2ddc 100644 --- a/packages/actions/src/Exports/Jobs/ExportCsv.php +++ b/packages/actions/src/Exports/Jobs/ExportCsv.php @@ -71,7 +71,7 @@ class ExportCsv implements ShouldQueue $processedRows = 0; $successfulRows = 0; - $csv = Writer::createFromFileObject(new SplTempFileObject()); + $csv = Writer::createFromFileObject(new SplTempFileObject); $csv->setDelimiter($this->exporter::getCsvDelimiter()); $query = EloquentSerializeFacade::unserialize($this->query); diff --git a/packages/actions/src/Exports/Jobs/PrepareCsvExport.php b/packages/actions/src/Exports/Jobs/PrepareCsvExport.php index aca78a6321..3223517608 100644 --- a/packages/actions/src/Exports/Jobs/PrepareCsvExport.php +++ b/packages/actions/src/Exports/Jobs/PrepareCsvExport.php @@ -52,7 +52,7 @@ class PrepareCsvExport implements ShouldQueue public function handle(): void { - $csv = Writer::createFromFileObject(new SplTempFileObject()); + $csv = Writer::createFromFileObject(new SplTempFileObject); $csv->setOutputBOM(ByteSequence::BOM_UTF8); $csv->setDelimiter($this->exporter::getCsvDelimiter()); $csv->insertOne(array_values($this->columnMap)); diff --git a/packages/actions/src/ImportAction.php b/packages/actions/src/ImportAction.php index 0319c0a7ec..77c5207440 100644 --- a/packages/actions/src/ImportAction.php +++ b/packages/actions/src/ImportAction.php @@ -323,7 +323,7 @@ class ImportAction extends Action ->action(function (): StreamedResponse { $columns = $this->getImporter()::getColumns(); - $csv = Writer::createFromFileObject(new SplTempFileObject()); + $csv = Writer::createFromFileObject(new SplTempFileObject); if (filled($csvDelimiter = $this->getCsvDelimiter())) { $csv->setDelimiter($csvDelimiter); diff --git a/packages/actions/src/Imports/Http/Controllers/DownloadImportFailureCsv.php b/packages/actions/src/Imports/Http/Controllers/DownloadImportFailureCsv.php index 8792565b44..68920d40f7 100644 --- a/packages/actions/src/Imports/Http/Controllers/DownloadImportFailureCsv.php +++ b/packages/actions/src/Imports/Http/Controllers/DownloadImportFailureCsv.php @@ -22,7 +22,7 @@ class DownloadImportFailureCsv abort_unless($import->user()->is(auth()->user()), 403); } - $csv = Writer::createFromFileObject(new SplTempFileObject()); + $csv = Writer::createFromFileObject(new SplTempFileObject); $csv->setOutputBOM(ByteSequence::BOM_UTF8); $columnHeaders = array_keys($import->failedRows()->first()->data); diff --git a/packages/forms/.stubs.php b/packages/forms/.stubs.php index 759f98ab3a..5d204e3ffc 100644 --- a/packages/forms/.stubs.php +++ b/packages/forms/.stubs.php @@ -2,7 +2,6 @@ namespace Livewire\Features\SupportTesting { - use Illuminate\Support\Collection; use Closure; class Testable { @@ -31,6 +30,16 @@ namespace Livewire\Features\SupportTesting { public function assertFormComponentExists(string $componentKey, string | Closure $formName = 'form', ?Closure $checkComponentUsing = null): static {} public function assertFormComponentDoesNotExist(string $componentKey, string $formName = 'form'): static {} + + public function goToWizardStep(int $step, string $formName = 'form'): static {} + + public function goToNextWizardStep(string $formName = 'form'): static {} + + public function goToPreviousWizardStep(string $formName = 'form'): static {} + + public function assertWizardStepExists(int $step, string $formName = 'form'): static {} + + public function assertWizardCurrentStep(int $step, string $formName = 'form'): static {} } } diff --git a/packages/forms/docs/09-testing.md b/packages/forms/docs/09-testing.md index 7ea6427bb1..1f11dcfa85 100644 --- a/packages/forms/docs/09-testing.md +++ b/packages/forms/docs/09-testing.md @@ -286,6 +286,56 @@ test('comments section is enabled' function () { }); ``` +### Wizard + +To go to a wizard's next step, use `goToNextWizardStep()`: + +```php +use function Pest\Livewire\livewire; + +it('moves to next wizard step', function () { + livewire(CreatePost::class) + ->goToNextWizardStep() + ->assertHasFormErrors(['title']); +}); +``` + +You can also go to the previous step by calling `goToPreviousWizardStep()`: + +```php +use function Pest\Livewire\livewire; + +it('moves to next wizard step', function () { + livewire(CreatePost::class) + ->goToPreviousWizardStep() + ->assertHasFormErrors(['title']); +}); +``` + +If you want to go to a specific step, use `goToWizardStep()`, then the `assertWizardCurrentStep` method which can ensure you are on the desired step without validation errors from the previous: + +```php +use function Pest\Livewire\livewire; + +it('moves to the wizards second step', function () { + livewire(CreatePost::class) + ->goToWizardStep(2) + ->assertWizardCurrentStep(2); +}); +``` + +If you have multiple forms on a single Livewire component, any of the wizard test helpers can accept a `formName` parameter: + +```php +use function Pest\Livewire\livewire; + +it('moves to next wizard step only for fooForm', function () { + livewire(CreatePost::class) + ->goToNextWizardStep(formName: 'fooForm') + ->assertHasFormErrors(['title'], formName: 'fooForm'); +}); +``` + ## Actions You can call an action by passing its form component name, and then the name of the action to `callFormComponentAction()`: diff --git a/packages/forms/resources/lang/es/components.php b/packages/forms/resources/lang/es/components.php index 22492ee302..df8cee2136 100644 --- a/packages/forms/resources/lang/es/components.php +++ b/packages/forms/resources/lang/es/components.php @@ -11,17 +11,69 @@ return [ ], 'add' => [ + 'label' => 'Añadir a :label', + + 'modal' => [ + + 'heading' => 'Añadir a :label', + + 'actions' => [ + + 'add' => [ + 'label' => 'Añadir', + ], + + ], + + ], + ], 'add_between' => [ - 'label' => 'Insertar', + + 'label' => 'Insertar entre bloques', + + 'modal' => [ + + 'heading' => 'Añadir a :label', + + 'actions' => [ + + 'add' => [ + 'label' => 'Añadir', + ], + + ], + + ], + ], 'delete' => [ 'label' => 'Borrar', ], + 'edit' => [ + + 'label' => 'Editar', + + 'modal' => [ + + 'heading' => 'Editar bloque', + + 'actions' => [ + + 'save' => [ + 'label' => 'Guardar cambios', + ], + + ], + + ], + + ], + 'reorder' => [ 'label' => 'Mover', ], diff --git a/packages/forms/src/Components/Concerns/HasExtraFieldWrapperAttributes.php b/packages/forms/src/Components/Concerns/HasExtraFieldWrapperAttributes.php index 92c2e0dc37..2a0cef7d30 100644 --- a/packages/forms/src/Components/Concerns/HasExtraFieldWrapperAttributes.php +++ b/packages/forms/src/Components/Concerns/HasExtraFieldWrapperAttributes.php @@ -31,7 +31,7 @@ trait HasExtraFieldWrapperAttributes */ public function getExtraFieldWrapperAttributes(): array { - $temporaryAttributeBag = new ComponentAttributeBag(); + $temporaryAttributeBag = new ComponentAttributeBag; foreach ($this->extraFieldWrapperAttributes as $extraFieldWrapperAttributes) { $temporaryAttributeBag = $temporaryAttributeBag->merge($this->evaluate($extraFieldWrapperAttributes)); diff --git a/packages/forms/src/Components/Concerns/HasExtraInputAttributes.php b/packages/forms/src/Components/Concerns/HasExtraInputAttributes.php index 761500520d..351f9359f5 100644 --- a/packages/forms/src/Components/Concerns/HasExtraInputAttributes.php +++ b/packages/forms/src/Components/Concerns/HasExtraInputAttributes.php @@ -31,7 +31,7 @@ trait HasExtraInputAttributes */ public function getExtraInputAttributes(): array { - $temporaryAttributeBag = new ComponentAttributeBag(); + $temporaryAttributeBag = new ComponentAttributeBag; foreach ($this->extraInputAttributes as $extraInputAttributes) { $temporaryAttributeBag = $temporaryAttributeBag->merge($this->evaluate($extraInputAttributes)); diff --git a/packages/forms/src/Components/DateTimePicker.php b/packages/forms/src/Components/DateTimePicker.php index 8b73fea7cd..37c33e9df7 100644 --- a/packages/forms/src/Components/DateTimePicker.php +++ b/packages/forms/src/Components/DateTimePicker.php @@ -369,7 +369,7 @@ class DateTimePicker extends Field implements HasAffixActions */ public function getExtraTriggerAttributes(): array { - $temporaryAttributeBag = new ComponentAttributeBag(); + $temporaryAttributeBag = new ComponentAttributeBag; foreach ($this->extraTriggerAttributes as $extraTriggerAttributes) { $temporaryAttributeBag = $temporaryAttributeBag->merge($this->evaluate($extraTriggerAttributes)); diff --git a/packages/forms/src/Components/Repeater.php b/packages/forms/src/Components/Repeater.php index 94ef9b366c..497eb81170 100644 --- a/packages/forms/src/Components/Repeater.php +++ b/packages/forms/src/Components/Repeater.php @@ -960,7 +960,7 @@ class Repeater extends Field implements CanConcealComponents, HasExtraItemAction if ($translatableContentDriver) { $record = $translatableContentDriver->makeRecord($relatedModel, $itemData); } else { - $record = new $relatedModel(); + $record = new $relatedModel; $record->fill($itemData); } diff --git a/packages/forms/src/FormsServiceProvider.php b/packages/forms/src/FormsServiceProvider.php index 3531cd7023..59a0cf460c 100644 --- a/packages/forms/src/FormsServiceProvider.php +++ b/packages/forms/src/FormsServiceProvider.php @@ -49,7 +49,7 @@ class FormsServiceProvider extends PackageServiceProvider } } - Testable::mixin(new TestsForms()); - Testable::mixin(new TestsFormComponentActions()); + Testable::mixin(new TestsForms); + Testable::mixin(new TestsFormComponentActions); } } diff --git a/packages/forms/src/Testing/TestsForms.php b/packages/forms/src/Testing/TestsForms.php index b42ef1bd1a..7172695f55 100644 --- a/packages/forms/src/Testing/TestsForms.php +++ b/packages/forms/src/Testing/TestsForms.php @@ -7,6 +7,7 @@ use Filament\Forms\Components\Field; use Filament\Forms\Components\TextInput; use Filament\Forms\Contracts\HasForms; use Filament\Schema\Components\Component; +use Filament\Schema\Components\Wizard; use Filament\Schema\Schema; use Illuminate\Http\UploadedFile; use Illuminate\Support\Arr; @@ -401,4 +402,102 @@ class TestsForms return $this; }; } + + public function assertWizardStepExists(): Closure + { + return function (int $step, string $formName = 'form'): static { + /** @phpstan-ignore-next-line */ + $this->assertFormExists($formName); + + /** @var Schema $form */ + $form = $this->instance()->{$formName}; + + /** @var Wizard $wizard */ + $wizard = $form->getComponent(fn (Component $component): bool => $component instanceof Wizard); + Assert::assertArrayHasKey( + $step - 1, + $wizard->getChildComponents(), + "Wizard does not have a step {$step}." + ); + + return $this; + }; + } + + public function assertWizardCurrentStep(): Closure + { + return function (int $step, string $formName = 'form'): static { + /** @phpstan-ignore-next-line */ + $this->assertFormExists($formName); + + /** @var Schema $form */ + $form = $this->instance()->{$formName}; + + /** @var Wizard $wizard */ + $wizard = $form->getComponent(fn (Component $component): bool => $component instanceof Wizard); + Assert::assertEquals( + $step, + $current = $wizard->getCurrentStepIndex() + 1, + "Failed asserting that wizard is on step {$step}, current step is {$current}." + ); + + return $this; + }; + } + + public function goToWizardStep(): Closure + { + return function (int $step, string $formName = 'form'): static { + /** @phpstan-ignore-next-line */ + $this->assertWizardStepExists($step, $formName); + + /** @var Schema $form */ + $form = $this->instance()->{$formName}; + + /** @var Wizard $wizard */ + $wizard = $form->getComponent(fn (Component $component): bool => $component instanceof Wizard); + + $stepIndex = ($step <= 1) ? 0 : $step - 2; + + $this->call('callSchemaComponentMethod', $wizard->getKey(), 'nextStep', [$stepIndex]); + + return $this; + }; + } + + public function goToNextWizardStep(): Closure + { + return function (string $formName = 'form'): static { + /** @phpstan-ignore-next-line */ + $this->assertFormExists($formName); + + /** @var Schema $form */ + $form = $this->instance()->{$formName}; + + /** @var Wizard $wizard */ + $wizard = $form->getComponent(fn (Component $component): bool => $component instanceof Wizard); + + $this->call('callSchemaComponentMethod', $wizard->getKey(), 'nextStep', [$wizard->getCurrentStepIndex()]); + + return $this; + }; + } + + public function goToPreviousWizardStep(): Closure + { + return function (string $formName = 'form'): static { + /** @phpstan-ignore-next-line */ + $this->assertFormExists($formName); + + /** @var Schema $form */ + $form = $this->instance()->{$formName}; + + /** @var Wizard $wizard */ + $wizard = $form->getComponent(fn (Component $component): bool => $component instanceof Wizard); + + $this->call('callSchemaComponentMethod', $wizard->getKey(), 'previousStep', [$wizard->getCurrentStepIndex()]); + + return $this; + }; + } } diff --git a/packages/infolists/src/Components/Concerns/CanFormatState.php b/packages/infolists/src/Components/Concerns/CanFormatState.php index 21e62e32e7..8e01b22e30 100644 --- a/packages/infolists/src/Components/Concerns/CanFormatState.php +++ b/packages/infolists/src/Components/Concerns/CanFormatState.php @@ -204,7 +204,7 @@ trait CanFormatState ); } - $locale = $component->evaluate($locale) ?? Infolist::$defaultNumberLocale ?? config('app.locale'); + $locale = $component->evaluate($locale) ?? Schema::$defaultNumberLocale ?? config('app.locale'); return Number::format($state, $decimalPlaces, $component->evaluate($maxDecimalPlaces), $locale); }); diff --git a/packages/infolists/src/Components/Concerns/HasExtraEntryWrapperAttributes.php b/packages/infolists/src/Components/Concerns/HasExtraEntryWrapperAttributes.php index e3a1b72866..0264244129 100644 --- a/packages/infolists/src/Components/Concerns/HasExtraEntryWrapperAttributes.php +++ b/packages/infolists/src/Components/Concerns/HasExtraEntryWrapperAttributes.php @@ -31,7 +31,7 @@ trait HasExtraEntryWrapperAttributes */ public function getExtraEntryWrapperAttributes(): array { - $temporaryAttributeBag = new ComponentAttributeBag(); + $temporaryAttributeBag = new ComponentAttributeBag; foreach ($this->extraEntryWrapperAttributes as $extraEntryWrapperAttributes) { $temporaryAttributeBag = $temporaryAttributeBag->merge($this->evaluate($extraEntryWrapperAttributes)); diff --git a/packages/infolists/src/InfolistsServiceProvider.php b/packages/infolists/src/InfolistsServiceProvider.php index 2224224e02..c8384a047f 100644 --- a/packages/infolists/src/InfolistsServiceProvider.php +++ b/packages/infolists/src/InfolistsServiceProvider.php @@ -22,6 +22,6 @@ class InfolistsServiceProvider extends PackageServiceProvider public function packageBooted(): void { - Testable::mixin(new TestsInfolistActions()); + Testable::mixin(new TestsInfolistActions); } } diff --git a/packages/notifications/src/Livewire/Notifications.php b/packages/notifications/src/Livewire/Notifications.php index 856afde615..c2e2262941 100644 --- a/packages/notifications/src/Livewire/Notifications.php +++ b/packages/notifications/src/Livewire/Notifications.php @@ -27,7 +27,7 @@ class Notifications extends Component public function mount(): void { - $this->notifications = new Collection(); + $this->notifications = new Collection; $this->pullNotificationsFromSession(); } diff --git a/packages/notifications/src/Notification.php b/packages/notifications/src/Notification.php index bda67dfde1..a4f11cf647 100644 --- a/packages/notifications/src/Notification.php +++ b/packages/notifications/src/Notification.php @@ -236,7 +236,7 @@ class Notification extends ViewComponent implements Arrayable public static function assertNotified(Notification | string | null $notification = null): void { - $notificationsLivewireComponent = new Notifications(); + $notificationsLivewireComponent = new Notifications; $notificationsLivewireComponent->mount(); $notifications = $notificationsLivewireComponent->notifications; @@ -272,7 +272,7 @@ class Notification extends ViewComponent implements Arrayable public static function assertNotNotified(Notification | string | null $notification = null): void { - $notificationsLivewireComponent = new Notifications(); + $notificationsLivewireComponent = new Notifications; $notificationsLivewireComponent->mount(); $notifications = $notificationsLivewireComponent->notifications; diff --git a/packages/notifications/src/NotificationsServiceProvider.php b/packages/notifications/src/NotificationsServiceProvider.php index 7eb7ac3259..b8b5bfe3c1 100644 --- a/packages/notifications/src/NotificationsServiceProvider.php +++ b/packages/notifications/src/NotificationsServiceProvider.php @@ -52,6 +52,6 @@ class NotificationsServiceProvider extends PackageServiceProvider $component->dispatch('notificationsSent'); }); - Testable::mixin(new TestsNotifications()); + Testable::mixin(new TestsNotifications); } } diff --git a/packages/panels/src/FilamentServiceProvider.php b/packages/panels/src/FilamentServiceProvider.php index 66e77a5286..beb5a791b2 100644 --- a/packages/panels/src/FilamentServiceProvider.php +++ b/packages/panels/src/FilamentServiceProvider.php @@ -56,15 +56,15 @@ class FilamentServiceProvider extends PackageServiceProvider public function packageRegistered(): void { $this->app->scoped('filament', function (): FilamentManager { - return new FilamentManager(); + return new FilamentManager; }); $this->app->singleton(PanelRegistry::class, function (): PanelRegistry { - return new PanelRegistry(); + return new PanelRegistry; }); $this->app->scoped(NavigationManager::class, function (): NavigationManager { - return new NavigationManager(); + return new NavigationManager; }); $this->app->bind(EmailVerificationResponseContract::class, EmailVerificationResponse::class); diff --git a/packages/panels/src/Navigation/Concerns/HasExtraSidebarAttributes.php b/packages/panels/src/Navigation/Concerns/HasExtraSidebarAttributes.php index 4c21eeb663..3b3f64177d 100644 --- a/packages/panels/src/Navigation/Concerns/HasExtraSidebarAttributes.php +++ b/packages/panels/src/Navigation/Concerns/HasExtraSidebarAttributes.php @@ -31,7 +31,7 @@ trait HasExtraSidebarAttributes */ public function getExtraSidebarAttributes(): array { - $temporaryAttributeBag = new ComponentAttributeBag(); + $temporaryAttributeBag = new ComponentAttributeBag; foreach ($this->extraSidebarAttributes as $extraSidebarAttributes) { $temporaryAttributeBag = $temporaryAttributeBag->merge($this->evaluate($extraSidebarAttributes)); diff --git a/packages/panels/src/Navigation/Concerns/HasExtraTopbarAttributes.php b/packages/panels/src/Navigation/Concerns/HasExtraTopbarAttributes.php index b9326d1770..4ee704d8d7 100644 --- a/packages/panels/src/Navigation/Concerns/HasExtraTopbarAttributes.php +++ b/packages/panels/src/Navigation/Concerns/HasExtraTopbarAttributes.php @@ -31,7 +31,7 @@ trait HasExtraTopbarAttributes */ public function getExtraTopbarAttributes(): array { - $temporaryAttributeBag = new ComponentAttributeBag(); + $temporaryAttributeBag = new ComponentAttributeBag; foreach ($this->extraTopbarAttributes as $extraTopbarAttributes) { $temporaryAttributeBag = $temporaryAttributeBag->merge($this->evaluate($extraTopbarAttributes)); diff --git a/packages/panels/src/Pages/BasePage.php b/packages/panels/src/Pages/BasePage.php index a6c6c9712c..006b463b15 100644 --- a/packages/panels/src/Pages/BasePage.php +++ b/packages/panels/src/Pages/BasePage.php @@ -126,7 +126,7 @@ abstract class BasePage extends Component implements HasActions, HasForms, HasIn protected function halt(): void { - throw new Halt(); + throw new Halt; } protected function callHook(string $hook): void diff --git a/packages/panels/src/Panel/Concerns/HasRoutes.php b/packages/panels/src/Panel/Concerns/HasRoutes.php index 1527d95cab..f926ca489b 100644 --- a/packages/panels/src/Panel/Concerns/HasRoutes.php +++ b/packages/panels/src/Panel/Concerns/HasRoutes.php @@ -188,7 +188,7 @@ trait HasRoutes Filament::setTenant($tenant, isQuiet: true); } - $this->navigationManager = new NavigationManager(); + $this->navigationManager = new NavigationManager; $navigation = $this->navigationManager->get(); diff --git a/packages/panels/src/Panel/Concerns/HasTenancy.php b/packages/panels/src/Panel/Concerns/HasTenancy.php index 9a9ee1559f..6632a4895c 100644 --- a/packages/panels/src/Panel/Concerns/HasTenancy.php +++ b/packages/panels/src/Panel/Concerns/HasTenancy.php @@ -193,7 +193,7 @@ trait HasTenancy ->resolveRouteBinding($key, $this->getTenantSlugAttribute()); if ($record === null) { - throw (new ModelNotFoundException())->setModel($tenantModel, [$key]); + throw (new ModelNotFoundException)->setModel($tenantModel, [$key]); } return $record; diff --git a/packages/panels/src/Resources/Pages/Concerns/InteractsWithParentRecord.php b/packages/panels/src/Resources/Pages/Concerns/InteractsWithParentRecord.php index 05daf30215..313e0f2fe4 100644 --- a/packages/panels/src/Resources/Pages/Concerns/InteractsWithParentRecord.php +++ b/packages/panels/src/Resources/Pages/Concerns/InteractsWithParentRecord.php @@ -79,7 +79,7 @@ trait InteractsWithParentRecord ); if ($parentRecord === null) { - throw (new ModelNotFoundException())->setModel($parentResource::getModel(), [$parentRecordKey]); + throw (new ModelNotFoundException)->setModel($parentResource::getModel(), [$parentRecordKey]); } if ($previousParentRecord) { diff --git a/packages/panels/src/Resources/Pages/Concerns/InteractsWithRecord.php b/packages/panels/src/Resources/Pages/Concerns/InteractsWithRecord.php index 79129cb19a..e81127c388 100644 --- a/packages/panels/src/Resources/Pages/Concerns/InteractsWithRecord.php +++ b/packages/panels/src/Resources/Pages/Concerns/InteractsWithRecord.php @@ -33,7 +33,7 @@ trait InteractsWithRecord $record = static::getResource()::resolveRecordRouteBinding($key, $modifyQuery); if ($record === null) { - throw (new ModelNotFoundException())->setModel($this->getModel(), [$key]); + throw (new ModelNotFoundException)->setModel($this->getModel(), [$key]); } if ($parentRecord) { diff --git a/packages/panels/src/helpers.php b/packages/panels/src/helpers.php index 03266970bd..1c312932c0 100644 --- a/packages/panels/src/helpers.php +++ b/packages/panels/src/helpers.php @@ -34,7 +34,7 @@ if (! function_exists('Filament\authorize')) { ); if ($response === false) { - throw new AuthorizationException(); + throw new AuthorizationException; } if (! $response instanceof Response) { diff --git a/packages/schema/src/Components/Concerns/EntanglesStateWithSingularRelationship.php b/packages/schema/src/Components/Concerns/EntanglesStateWithSingularRelationship.php index 21dcc86b8a..9ce97fc6a9 100644 --- a/packages/schema/src/Components/Concerns/EntanglesStateWithSingularRelationship.php +++ b/packages/schema/src/Components/Concerns/EntanglesStateWithSingularRelationship.php @@ -65,7 +65,7 @@ trait EntanglesStateWithSingularRelationship if ($translatableContentDriver) { $record = $translatableContentDriver->makeRecord($relatedModel, $data); } else { - $record = new $relatedModel(); + $record = new $relatedModel; $record->fill($data); } @@ -108,7 +108,7 @@ trait EntanglesStateWithSingularRelationship if ($translatableContentDriver) { $record = $translatableContentDriver->makeRecord($relatedModel, $data); } else { - $record = new $relatedModel(); + $record = new $relatedModel; $record->fill($data); } diff --git a/packages/schema/src/Components/Wizard.php b/packages/schema/src/Components/Wizard.php index d47ea84c3d..684614b0bb 100644 --- a/packages/schema/src/Components/Wizard.php +++ b/packages/schema/src/Components/Wizard.php @@ -31,6 +31,8 @@ class Wizard extends Component protected int | Closure $startStep = 1; + protected int $currentStepIndex = 0; + /** * @var view-string */ @@ -61,6 +63,8 @@ class Wizard extends Component $this->key('wizard'); + $this->currentStepIndex($this->getStartStep() - 1); + $this->registerActions([ fn (Wizard $component): Action => $component->getNextAction(), fn (Wizard $component): Action => $component->getPreviousAction(), @@ -82,6 +86,7 @@ class Wizard extends Component /** @var ?Step $nextStep */ $nextStep = $steps[$currentStepIndex + 1] ?? null; + $this->currentStepIndex($currentStepIndex + 1); try { $currentStep->callBeforeValidation(); @@ -98,6 +103,16 @@ class Wizard extends Component $livewire->dispatch('next-wizard-step', key: $this->getKey()); } + #[Exposed] + public function previousStep(int $currentStepIndex): void + { + if ($currentStepIndex < 1) { + $currentStepIndex = 1; + } + + $this->currentStepIndex($currentStepIndex - 1); + } + public function getNextAction(): Action { $action = Action::make($this->getNextActionName()) @@ -243,4 +258,16 @@ class Wizard extends Component { return filled($this->getStepQueryStringKey()); } + + public function getCurrentStepIndex(): int + { + return $this->currentStepIndex; + } + + protected function currentStepIndex(int $index): static + { + $this->currentStepIndex = $index; + + return $this; + } } diff --git a/packages/spatie-laravel-tags-plugin/src/Forms/Components/SpatieTagsInput.php b/packages/spatie-laravel-tags-plugin/src/Forms/Components/SpatieTagsInput.php index ade7620946..3095328df9 100644 --- a/packages/spatie-laravel-tags-plugin/src/Forms/Components/SpatieTagsInput.php +++ b/packages/spatie-laravel-tags-plugin/src/Forms/Components/SpatieTagsInput.php @@ -16,7 +16,7 @@ class SpatieTagsInput extends TagsInput { parent::setUp(); - $this->type(new AllTagTypes()); + $this->type(new AllTagTypes); $this->loadStateFromRelationshipsUsing(static function (SpatieTagsInput $component, ?Model $record): void { if (! method_exists($record, 'tagsWithType')) { diff --git a/packages/spatie-laravel-translatable-plugin/src/SpatieLaravelTranslatableContentDriver.php b/packages/spatie-laravel-translatable-plugin/src/SpatieLaravelTranslatableContentDriver.php index 8b0d28a8e2..35beeb027a 100644 --- a/packages/spatie-laravel-translatable-plugin/src/SpatieLaravelTranslatableContentDriver.php +++ b/packages/spatie-laravel-translatable-plugin/src/SpatieLaravelTranslatableContentDriver.php @@ -30,7 +30,7 @@ class SpatieLaravelTranslatableContentDriver implements TranslatableContentDrive */ public function makeRecord(string $model, array $data): Model { - $record = new $model(); + $record = new $model; if (method_exists($record, 'setLocale')) { $record->setLocale($this->activeLocale); diff --git a/packages/support/resources/views/components/modal/index.blade.php b/packages/support/resources/views/components/modal/index.blade.php index 69a7502d28..883ea14c1e 100644 --- a/packages/support/resources/views/components/modal/index.blade.php +++ b/packages/support/resources/views/components/modal/index.blade.php @@ -179,7 +179,7 @@ x-transition:leave-end="scale-95 opacity-0" @endif {{ - ($extraModalWindowAttributeBag ?? new \Illuminate\View\ComponentAttributeBag())->class([ + ($extraModalWindowAttributeBag ?? new \Illuminate\View\ComponentAttributeBag)->class([ 'fi-modal-window pointer-events-auto relative row-start-2 flex w-full cursor-default flex-col bg-white shadow-xl ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10', 'fi-modal-slide-over-window ms-auto overflow-y-auto' => $slideOver, // Using an arbitrary value instead of the h-dvh class that was added in Tailwind CSS v3.4.0 diff --git a/packages/support/src/Components/ComponentManager.php b/packages/support/src/Components/ComponentManager.php index c2d77935eb..4372cc0df6 100644 --- a/packages/support/src/Components/ComponentManager.php +++ b/packages/support/src/Components/ComponentManager.php @@ -34,7 +34,7 @@ class ComponentManager implements ScopedComponentManager app()->singletonIf( ComponentManager::class, - fn () => new ComponentManager(), + fn () => new ComponentManager, ); return app(ComponentManager::class); diff --git a/packages/support/src/Components/ViewComponent.php b/packages/support/src/Components/ViewComponent.php index b90415bf28..c080cdaea7 100644 --- a/packages/support/src/Components/ViewComponent.php +++ b/packages/support/src/Components/ViewComponent.php @@ -111,7 +111,7 @@ abstract class ViewComponent extends Component implements Htmlable return view( $this->getView(), [ - 'attributes' => new ComponentAttributeBag(), + 'attributes' => new ComponentAttributeBag, ...$this->extractPublicMethods(), ...(isset($this->viewIdentifier) ? [$this->viewIdentifier => $this] : []), ...$this->viewData, diff --git a/packages/support/src/Concerns/HasExtraAlpineAttributes.php b/packages/support/src/Concerns/HasExtraAlpineAttributes.php index 810ce787e3..6333d8c9b9 100644 --- a/packages/support/src/Concerns/HasExtraAlpineAttributes.php +++ b/packages/support/src/Concerns/HasExtraAlpineAttributes.php @@ -31,7 +31,7 @@ trait HasExtraAlpineAttributes */ public function getExtraAlpineAttributes(): array { - $temporaryAttributeBag = new ComponentAttributeBag(); + $temporaryAttributeBag = new ComponentAttributeBag; foreach ($this->extraAlpineAttributes as $extraAlpineAttributes) { $temporaryAttributeBag = $temporaryAttributeBag->merge($this->evaluate($extraAlpineAttributes)); diff --git a/packages/support/src/Concerns/HasExtraAttributes.php b/packages/support/src/Concerns/HasExtraAttributes.php index b01569a444..30bbb170fa 100644 --- a/packages/support/src/Concerns/HasExtraAttributes.php +++ b/packages/support/src/Concerns/HasExtraAttributes.php @@ -31,7 +31,7 @@ trait HasExtraAttributes */ public function getExtraAttributes(): array { - $temporaryAttributeBag = new ComponentAttributeBag(); + $temporaryAttributeBag = new ComponentAttributeBag; foreach ($this->extraAttributes as $extraAttributes) { $temporaryAttributeBag = $temporaryAttributeBag->merge($this->evaluate($extraAttributes)); diff --git a/packages/support/src/SupportServiceProvider.php b/packages/support/src/SupportServiceProvider.php index ac4ec29459..f1f1c3ca54 100644 --- a/packages/support/src/SupportServiceProvider.php +++ b/packages/support/src/SupportServiceProvider.php @@ -60,7 +60,7 @@ class SupportServiceProvider extends PackageServiceProvider { $this->app->scoped( AssetManager::class, - fn () => new AssetManager(), + fn () => new AssetManager, ); $this->app->scoped( @@ -72,23 +72,23 @@ class SupportServiceProvider extends PackageServiceProvider $this->app->scoped( ColorManager::class, - fn () => new ColorManager(), + fn () => new ColorManager, ); $this->app->scoped( IconManager::class, - fn () => new IconManager(), + fn () => new IconManager, ); $this->app->scoped( ViewManager::class, - fn () => new ViewManager(), + fn () => new ViewManager, ); $this->app->scoped( HtmlSanitizerInterface::class, fn (): HtmlSanitizer => new HtmlSanitizer( - (new HtmlSanitizerConfig()) + (new HtmlSanitizerConfig) ->allowSafeElements() ->allowRelativeLinks() ->allowRelativeMedias() @@ -122,7 +122,7 @@ class SupportServiceProvider extends PackageServiceProvider public function packageBooted(): void { - app('livewire')->componentHook(new SupportPartials()); + app('livewire')->componentHook(new SupportPartials); FilamentAsset::register([ Js::make('async-alpine', __DIR__ . '/../dist/async-alpine.js'), diff --git a/packages/support/src/helpers.php b/packages/support/src/helpers.php index d4cb2c3222..7aff65f91c 100644 --- a/packages/support/src/helpers.php +++ b/packages/support/src/helpers.php @@ -51,7 +51,7 @@ if (! function_exists('Filament\Support\get_model_label')) { if (! function_exists('Filament\Support\locale_has_pluralization')) { function locale_has_pluralization(): bool { - return (new MessageSelector())->getPluralIndex(app()->getLocale(), 10) > 0; + return (new MessageSelector)->getPluralIndex(app()->getLocale(), 10) > 0; } } diff --git a/packages/tables/src/Columns/Concerns/HasExtraCellAttributes.php b/packages/tables/src/Columns/Concerns/HasExtraCellAttributes.php index cab2882e3d..1759aba47d 100644 --- a/packages/tables/src/Columns/Concerns/HasExtraCellAttributes.php +++ b/packages/tables/src/Columns/Concerns/HasExtraCellAttributes.php @@ -31,7 +31,7 @@ trait HasExtraCellAttributes */ public function getExtraCellAttributes(): array { - $temporaryAttributeBag = new ComponentAttributeBag(); + $temporaryAttributeBag = new ComponentAttributeBag; foreach ($this->extraCellAttributes as $extraCellAttributes) { $temporaryAttributeBag = $temporaryAttributeBag->merge($this->evaluate($extraCellAttributes)); diff --git a/packages/tables/src/Columns/Concerns/HasExtraHeaderAttributes.php b/packages/tables/src/Columns/Concerns/HasExtraHeaderAttributes.php index 6d47d9be96..0b8c761deb 100644 --- a/packages/tables/src/Columns/Concerns/HasExtraHeaderAttributes.php +++ b/packages/tables/src/Columns/Concerns/HasExtraHeaderAttributes.php @@ -31,7 +31,7 @@ trait HasExtraHeaderAttributes */ public function getExtraHeaderAttributes(): array { - $temporaryAttributeBag = new ComponentAttributeBag(); + $temporaryAttributeBag = new ComponentAttributeBag; foreach ($this->extraHeaderAttributes as $extraHeaderAttributes) { $temporaryAttributeBag = $temporaryAttributeBag->merge($this->evaluate($extraHeaderAttributes)); diff --git a/packages/tables/src/Columns/ImageColumn.php b/packages/tables/src/Columns/ImageColumn.php index 239bcd94fa..a0dd3803bf 100644 --- a/packages/tables/src/Columns/ImageColumn.php +++ b/packages/tables/src/Columns/ImageColumn.php @@ -239,7 +239,7 @@ class ImageColumn extends Column */ public function getExtraImgAttributes(): array { - $temporaryAttributeBag = new ComponentAttributeBag(); + $temporaryAttributeBag = new ComponentAttributeBag; foreach ($this->extraImgAttributes as $extraImgAttributes) { $temporaryAttributeBag = $temporaryAttributeBag->merge($this->evaluate($extraImgAttributes)); diff --git a/packages/tables/src/TablesServiceProvider.php b/packages/tables/src/TablesServiceProvider.php index a7b02ba590..33f5dc70ed 100644 --- a/packages/tables/src/TablesServiceProvider.php +++ b/packages/tables/src/TablesServiceProvider.php @@ -43,11 +43,11 @@ class TablesServiceProvider extends PackageServiceProvider } } - Testable::mixin(new TestsActions()); - Testable::mixin(new TestsBulkActions()); - Testable::mixin(new TestsColumns()); - Testable::mixin(new TestsFilters()); - Testable::mixin(new TestsRecords()); - Testable::mixin(new TestsSummaries()); + Testable::mixin(new TestsActions); + Testable::mixin(new TestsBulkActions); + Testable::mixin(new TestsColumns); + Testable::mixin(new TestsFilters); + Testable::mixin(new TestsRecords); + Testable::mixin(new TestsSummaries); } } diff --git a/tests/database/migrations/create_domain_teams_table.php b/tests/database/migrations/create_domain_teams_table.php index c5a552385e..f4557bcfec 100644 --- a/tests/database/migrations/create_domain_teams_table.php +++ b/tests/database/migrations/create_domain_teams_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/tests/database/migrations/create_posts_table.php b/tests/database/migrations/create_posts_table.php index 3e145b9b14..be3ddc399d 100644 --- a/tests/database/migrations/create_posts_table.php +++ b/tests/database/migrations/create_posts_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/tests/database/migrations/create_teams_table.php b/tests/database/migrations/create_teams_table.php index 04f6e8409b..4dbc3adade 100644 --- a/tests/database/migrations/create_teams_table.php +++ b/tests/database/migrations/create_teams_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/tests/src/Forms/ComponentContainerTest.php b/tests/src/Forms/ComponentContainerTest.php index ebe05648c5..29462a520e 100644 --- a/tests/src/Forms/ComponentContainerTest.php +++ b/tests/src/Forms/ComponentContainerTest.php @@ -23,7 +23,7 @@ it('has components', function () { $components = []; foreach (range(1, $count = rand(2, 10)) as $i) { - $components[] = new Component(); + $components[] = new Component; } $componentsBoundToContainer = ($container = Schema::make(Livewire::make())) @@ -43,7 +43,7 @@ it('has dynamic components', function () { $components = []; foreach (range(1, $count = rand(2, 10)) as $i) { - $components[] = new Component(); + $components[] = new Component; } $componentsBoundToContainer = ($container = Schema::make(Livewire::make())) @@ -61,7 +61,7 @@ it('has dynamic components', function () { it('belongs to parent component', function () { $container = Schema::make(Livewire::make()) - ->parentComponent($component = new Component()); + ->parentComponent($component = new Component); expect($container) ->getParentComponent()->toBe($component); diff --git a/tests/src/Forms/ComponentTest.php b/tests/src/Forms/ComponentTest.php index c36b935b84..7da9dd613a 100644 --- a/tests/src/Forms/ComponentTest.php +++ b/tests/src/Forms/ComponentTest.php @@ -9,7 +9,7 @@ use Illuminate\Support\Str; uses(TestCase::class); it('belongs to container', function () { - $component = (new Component()) + $component = (new Component) ->container($container = Schema::make(Livewire::make())); expect($component) @@ -17,7 +17,7 @@ it('belongs to container', function () { }); it('can access container\'s Livewire component', function () { - $component = (new Component()) + $component = (new Component) ->container(Schema::make($livewire = Livewire::make())); expect($component) @@ -28,10 +28,10 @@ it('has child components', function () { $components = []; foreach (range(1, $count = rand(2, 10)) as $i) { - $components[] = new Component(); + $components[] = new Component; } - $componentsBoundToContainer = ($parentComponent = new Component()) + $componentsBoundToContainer = ($parentComponent = new Component) ->container(Schema::make(Livewire::make())) ->childComponents($components) ->getChildComponentContainer() @@ -47,7 +47,7 @@ it('has child components', function () { }); it('has a label', function () { - $component = (new Component()) + $component = (new Component) ->container(Schema::make(Livewire::make())) ->label($label = Str::random()); @@ -56,7 +56,7 @@ it('has a label', function () { }); it('can have meta', function () { - $component = (new Component()) + $component = (new Component) ->meta('foo', 'bar') ->meta('bob', 'baz'); diff --git a/tests/src/Forms/Fixtures/Livewire.php b/tests/src/Forms/Fixtures/Livewire.php index 2c5a4d355c..c1ceca7f7e 100644 --- a/tests/src/Forms/Fixtures/Livewire.php +++ b/tests/src/Forms/Fixtures/Livewire.php @@ -15,7 +15,7 @@ class Livewire extends Component implements HasForms public static function make(): static { - return new static(); + return new static; } public function mount(): void diff --git a/tests/src/Forms/FormsTest.php b/tests/src/Forms/FormsTest.php index 08ebbe610c..4f8b04679e 100644 --- a/tests/src/Forms/FormsTest.php +++ b/tests/src/Forms/FormsTest.php @@ -2,6 +2,7 @@ use Filament\Forms\Components\TextInput; use Filament\Schema\Components\Section; +use Filament\Schema\Components\Wizard; use Filament\Schema\Schema; use Filament\Tests\Forms\Fixtures\Livewire; use Filament\Tests\TestCase; @@ -108,6 +109,17 @@ it('does not have layout components', function () { ->assertFormComponentDoesNotExist('no-such-section'); }); +it('can go to next wizard step on multiple forms', function () { + livewire(TestComponentWithMultipleWizardForms::class) + ->assertHasNoFormErrors(formName: 'fooForm') + ->assertHasNoFormErrors(formName: 'barForm') + + ->assertWizardStepExists(2, 'fooForm') + ->goToWizardStep(2, formName: 'fooForm') + ->assertHasFormErrors(['title'], 'fooForm') + ->assertHasNoFormErrors(['title'], 'barForm'); +}); + class TestComponentWithForm extends Livewire { public function form(Schema $form): Schema @@ -185,3 +197,52 @@ class TestComponentWithMultipleForms extends Livewire ]; } } + +class TestComponentWithMultipleWizardForms extends Livewire +{ + public $fooData; + + public $barData; + + public function mount(): void + { + $this->fooForm->fill(); + $this->barForm->fill(); + } + + protected function getForms(): array + { + return [ + 'fooForm', + 'barForm', + ]; + } + + public function fooForm(Schema $form): Schema + { + return $form + ->schema($this->getSchemaForForms()) + ->statePath('fooData'); + } + + public function barForm(Schema $form): Schema + { + return $form + ->schema($this->getSchemaForForms()) + ->statePath('barData'); + } + + protected function getSchemaForForms(): array + { + return [ + Wizard::make([ + Wizard\Step::make('step 1')->schema([ + TextInput::make('title')->required(), + ]), + Wizard\Step::make('step 2')->schema([ + TextInput::make('content')->required(), + ]), + ]), + ]; + } +} diff --git a/tests/src/Forms/GridTest.php b/tests/src/Forms/GridTest.php index 60e30e58c9..5f6ebe87c4 100644 --- a/tests/src/Forms/GridTest.php +++ b/tests/src/Forms/GridTest.php @@ -40,7 +40,7 @@ test('can get number of container columns at one breakpoint', function () { test('can get number of container columns from parent component', function () { $container = Schema::make(Livewire::make()) - ->parentComponent((new Component())->columns([ + ->parentComponent((new Component)->columns([ 'default' => $defaultColumns = rand(1, 12), 'sm' => $columnsAtSm = rand(1, 12), 'md' => $columnsAtMd = rand(1, 12), @@ -68,7 +68,7 @@ test('can set number of container columns at `lg` breakpoint', function () { }); test('can get component column span at all breakpoints', function () { - $component = (new Component()) + $component = (new Component) ->container(Schema::make(Livewire::make())) ->columnSpan([ 'default' => $defaultSpan = rand(1, 12), @@ -90,7 +90,7 @@ test('can get component column span at all breakpoints', function () { }); test('can get component column span at one breakpoint', function () { - $component = (new Component()) + $component = (new Component) ->container(Schema::make(Livewire::make())) ->columnSpan([ '2xl' => $spanAt2xl = rand(1, 12), @@ -101,7 +101,7 @@ test('can get component column span at one breakpoint', function () { }); test('can set component column span at `default` breakpoint', function () { - $component = (new Component()) + $component = (new Component) ->container(Schema::make(Livewire::make())) ->columnSpan($defaultSpan = rand(1, 12)); diff --git a/tests/src/Forms/HiddenComponentsTest.php b/tests/src/Forms/HiddenComponentsTest.php index 4deca31531..509a89d870 100644 --- a/tests/src/Forms/HiddenComponentsTest.php +++ b/tests/src/Forms/HiddenComponentsTest.php @@ -10,7 +10,7 @@ use Illuminate\Support\Str; uses(TestCase::class); test('components can be hidden', function () { - $component = (new Component()) + $component = (new Component) ->container(Schema::make(Livewire::make())) ->hidden(); @@ -23,7 +23,7 @@ test('components can be hidden based on condition', function () { $container = Schema::make(Livewire::make()) ->components([ - (new Component()) + (new Component) ->visible(fn (callable $get) => $get($statePath) === false), ]) ->fill([ @@ -34,7 +34,7 @@ test('components can be hidden based on condition', function () { ->toHaveCount(0); $container->components([ - (new Component()) + (new Component) ->whenTruthy($statePath), ]); @@ -42,7 +42,7 @@ test('components can be hidden based on condition', function () { ->toHaveLength(1); $container->components([ - (new Component()) + (new Component) ->whenFalsy($statePath), ]); @@ -51,7 +51,7 @@ test('components can be hidden based on condition', function () { $container ->components([ - (new Component()) + (new Component) ->whenFalsy([$statePath, 'bob']), ]) ->fill([ @@ -63,7 +63,7 @@ test('components can be hidden based on condition', function () { $container ->components([ - (new Component()) + (new Component) ->whenTruthy([$statePath, 'bob']), ]) ->fill([ @@ -78,11 +78,11 @@ test('hidden components are not returned from container', function () { $components = []; foreach (range(1, $visibleCount = rand(2, 10)) as $i) { - $components[] = new Component(); + $components[] = new Component; } foreach (range(1, rand(2, 10)) as $i) { - $components[] = (new Component())->hidden(); + $components[] = (new Component)->hidden(); } $componentsBoundToContainer = ($container = Schema::make(Livewire::make())) diff --git a/tests/src/Forms/ModelTest.php b/tests/src/Forms/ModelTest.php index 8009af1854..8fd99b298a 100644 --- a/tests/src/Forms/ModelTest.php +++ b/tests/src/Forms/ModelTest.php @@ -11,7 +11,7 @@ uses(TestCase::class); test('containers can store a record', function () { $container = Schema::make(Livewire::make()) - ->model($record = new Post()); + ->model($record = new Post); expect($container) ->getRecord()->toBe($record); @@ -24,7 +24,7 @@ test('containers can get their model class', function () { expect($container) ->getModel()->toBe($model); - $container->model(new Post()); + $container->model(new Post); expect($container) ->getModel()->toBe($model); @@ -32,7 +32,7 @@ test('containers can get their model class', function () { test('containers can get an instance of their model', function () { $container = Schema::make(Livewire::make()) - ->model($modelInstance = new Post()); + ->model($modelInstance = new Post); expect($container) ->getModelInstance()->toBe($modelInstance); @@ -44,16 +44,16 @@ test('containers can get an instance of their model', function () { }); test('components can store a record', function () { - $component = (new Component()) + $component = (new Component) ->container(Schema::make(Livewire::make())) - ->model($record = new Post()); + ->model($record = new Post); expect($component) ->getRecord()->toBe($record); }); test('components can get their model class', function () { - $component = (new Component()) + $component = (new Component) ->container(Schema::make(Livewire::make())) ->model($model = Post::class); @@ -62,7 +62,7 @@ test('components can get their model class', function () { }); test('components can get an instance of their model', function () { - $component = (new Component()) + $component = (new Component) ->container(Schema::make(Livewire::make())) ->model($model = Post::class); @@ -71,10 +71,10 @@ test('components can get an instance of their model', function () { }); test('components can inherit their container record', function () { - $component = (new Component()) + $component = (new Component) ->container( Schema::make(Livewire::make()) - ->model($record = new Post()), + ->model($record = new Post), ); expect($component) @@ -82,7 +82,7 @@ test('components can inherit their container record', function () { }); test('components can inherit their container model class', function () { - $component = (new Component()) + $component = (new Component) ->container( Schema::make(Livewire::make()) ->model($model = Post::class), @@ -94,10 +94,10 @@ test('components can inherit their container model class', function () { }); test('components do not inherit their container record if they have their own model defined', function () { - $component = (new Component()) + $component = (new Component) ->container( Schema::make(Livewire::make()) - ->model(new User()), + ->model(new User), ) ->model($model = Post::class); diff --git a/tests/src/Forms/StateBindingModifiersTest.php b/tests/src/Forms/StateBindingModifiersTest.php index e0d67a003a..eb521f91d1 100644 --- a/tests/src/Forms/StateBindingModifiersTest.php +++ b/tests/src/Forms/StateBindingModifiersTest.php @@ -28,14 +28,14 @@ test('fields can have state binding modifiers', function () { }); test('component state binding is deferred by default', function () { - $component = (new Component())->container(Schema::make(Livewire::make())); + $component = (new Component)->container(Schema::make(Livewire::make())); expect($component) ->getStateBindingModifiers()->toBe([]); }); test('component state binding can be live', function () { - $component = (new Component()) + $component = (new Component) ->container(Schema::make(Livewire::make())) ->live(); @@ -44,7 +44,7 @@ test('component state binding can be live', function () { }); test('component state binding can be triggered on blur', function () { - $component = (new Component()) + $component = (new Component) ->container(Schema::make(Livewire::make())) ->live(onBlur: true); @@ -53,7 +53,7 @@ test('component state binding can be triggered on blur', function () { }); test('component state binding can be debounced', function () { - $component = (new Component()) + $component = (new Component) ->container(Schema::make(Livewire::make())) ->live(debounce: '750ms'); @@ -62,11 +62,11 @@ test('component state binding can be debounced', function () { }); test('components inherit their state binding modifiers', function () { - $component = (new Component()) + $component = (new Component) ->container( Schema::make(Livewire::make()) ->parentComponent( - (new Component())->stateBindingModifiers($modifiers = [Str::random()]), + (new Component)->stateBindingModifiers($modifiers = [Str::random()]), ), ); diff --git a/tests/src/Forms/StateTest.php b/tests/src/Forms/StateTest.php index ff937c4300..c28e354d3b 100644 --- a/tests/src/Forms/StateTest.php +++ b/tests/src/Forms/StateTest.php @@ -25,7 +25,7 @@ test('container has state path', function () { test('container has state path and inherits state path from parent component', function () { $container = Schema::make(Livewire::make()) ->parentComponent( - (new Component()) + (new Component) ->container(Schema::make(Livewire::make())) ->statePath($parentComponentStatePath = Str::random()), ) @@ -36,7 +36,7 @@ test('container has state path and inherits state path from parent component', f }); test('component has state path', function () { - $component = (new Component()) + $component = (new Component) ->container(Schema::make(Livewire::make())) ->statePath($componentStatePath = Str::random()); @@ -45,7 +45,7 @@ test('component has state path', function () { }); test('component inherits state path from container', function () { - $component = (new Component()) + $component = (new Component) ->container( Schema::make(Livewire::make()) ->statePath($containerStatePath = Str::random()), @@ -56,7 +56,7 @@ test('component inherits state path from container', function () { }); test('component has state path and inherits state path from container', function () { - $component = (new Component()) + $component = (new Component) ->container( Schema::make(Livewire::make()) ->statePath($containerStatePath = Str::random()), @@ -71,7 +71,7 @@ test('state can be hydrated from array', function () { Schema::make($livewire = Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()), ]) ->fill([$statePath => ($state = Str::random())]); @@ -91,7 +91,7 @@ test('hydrating array state can overwrite existing state', function () { ) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath), ]) ->fill([]); @@ -104,7 +104,7 @@ test('state can be hydrated from defaults', function () { Schema::make($livewire = Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->default($state = Str::random()), ]) @@ -125,7 +125,7 @@ test('hydrating default state can overwrite existing state', function () { ) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath), ]) ->fill(); @@ -138,10 +138,10 @@ test('child component state is not lost by hydrating parent component', function Schema::make($livewire = Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($parentStatePath = Str::random()) ->schema([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->default($state = Str::random()), ]), @@ -156,10 +156,10 @@ test('child component state is not lost by hydrating parent component defaults', Schema::make($livewire = Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($parentStatePath = Str::random()) ->schema([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->default($state = Str::random()), ]) @@ -175,10 +175,10 @@ test('child component state can be hydrated by parent component defaults', funct Schema::make($livewire = Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($parentStatePath = Str::random()) ->schema([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()), ]) ->default([$statePath => ($state = Str::random())]), @@ -193,10 +193,10 @@ test('child component defaults are overwritten by parent component defaults', fu Schema::make($livewire = Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($parentStatePath = Str::random()) ->schema([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->default(Str::random()), ]) @@ -212,10 +212,10 @@ test('missing child component state can be filled with null', function () { Schema::make($livewire = Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($parentStatePath = Str::random()) ->schema([ - (new Component())->statePath($statePath = Str::random()), + (new Component)->statePath($statePath = Str::random()), ]) ->afterStateHydrated(fn (Component $component) => $component->state([])), ]) @@ -229,10 +229,10 @@ test('missing hidden child component state can be filled with null', function () Schema::make($livewire = Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->hidden() ->schema([ - (new Component())->statePath($statePath = Str::random()), + (new Component)->statePath($statePath = Str::random()), ]), ]) ->fill(); @@ -245,7 +245,7 @@ test('custom logic can be executed after state is hydrated', function () { Schema::make($livewire = Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->afterStateHydrated(fn (Component $component, $state) => $component->state(strrev($state))), ]) @@ -259,7 +259,7 @@ test('custom logic can be executed after state is updated', function () { Schema::make($livewire = Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->afterStateUpdated(fn (Component $component, $state) => $component->state(strrev($state))), ]) @@ -274,7 +274,7 @@ test('custom logic can be executed after nested state is updated', function () { Schema::make($livewire = Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->afterStateUpdated(fn (Component $component, $state) => $component->state([strrev($state[0])])), ]) @@ -289,10 +289,10 @@ test('custom logic can be executed after child component state is updated', func Schema::make($livewire = Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->childComponents([ - (new Component()) + (new Component) ->statePath($childComponentStatePath = Str::random()) ->afterStateUpdated(fn (Component $component, $state) => $component->state(strrev($state))), ]), @@ -310,7 +310,7 @@ test('custom logic can be executed only once after nested state is updated', fun Schema::make($livewire = Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->afterStateUpdated(function () use (&$calls) { $calls++; @@ -326,7 +326,7 @@ test('custom logic can be executed more than once after nested state is updated Schema::make($livewire = Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->afterStateUpdated(fn (Component $component, $state) => $component->state([$state[0] + 1])), ]) @@ -342,10 +342,10 @@ test('custom logic on parent component can be executed after child component sta Schema::make($livewire = Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->childComponents([ - (new Component()) + (new Component) ->statePath($childComponentStatePath = Str::random()), ]) ->afterStateUpdated(fn (Component $component, $state) => $component->state([ @@ -363,7 +363,7 @@ test('state can be dehydrated', function () { $container = Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->default($state = Str::random()), ]) @@ -379,7 +379,7 @@ test('state can be dehydrated using custom logic', function () { $container = Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->default($state = Str::random()) ->dehydrateStateUsing(fn ($state) => strrev($state)), @@ -396,7 +396,7 @@ test('custom logic can be executed before state is dehydrated', function () { $container = Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->default($state = Str::random()) ->beforeStateDehydrated(fn (Component $component, $state) => $component->state(strrev($state))), @@ -415,7 +415,7 @@ test('components can be excluded from state dehydration', function () { $container = Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath(Str::random()) ->default(Str::random()) ->dehydrated(false), @@ -430,10 +430,10 @@ test('components can be excluded from state dehydration if their parent componen $container = Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->dehydrated(false) ->schema([ - (new Component()) + (new Component) ->statePath(Str::random()) ->default(Str::random()), ]), @@ -448,7 +448,7 @@ test('hidden components are excluded from state dehydration', function () { $container = Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath(Str::random()) ->default(Str::random()) ->hidden(), @@ -463,10 +463,10 @@ test('hidden components are excluded from state dehydration if their parent comp $container = Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->hidden() ->schema([ - (new Component()) + (new Component) ->statePath(Str::random()) ->default(Str::random()), ]), @@ -481,7 +481,7 @@ test('hidden components are excluded from state dehydration except if they are m $container = Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath(Str::random()) ->default(Str::random()) ->hidden() @@ -497,7 +497,7 @@ test('disabled components are excluded from state dehydration', function () { $container = Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath(Str::random()) ->default(Str::random()) ->disabled(), @@ -512,10 +512,10 @@ test('disabled components are excluded from state dehydration if their parent co $container = Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->disabled() ->schema([ - (new Component()) + (new Component) ->statePath(Str::random()) ->default(Str::random()), ]), @@ -530,7 +530,7 @@ test('disabled components are excluded from state dehydration except if they are $container = Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath(Str::random()) ->default(Str::random()) ->disabled() @@ -546,10 +546,10 @@ test('disabled components are excluded from state dehydration if their parent co $container = Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->disabled() ->schema([ - (new Component()) + (new Component) ->statePath(Str::random()) ->default(Str::random()) ->dehydrated(), @@ -565,7 +565,7 @@ test('dehydrated state can be mutated', function () { $container = Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->default($state = Str::random()) ->mutateDehydratedStateUsing(fn ($state) => strrev($state)), @@ -584,7 +584,7 @@ test('sibling state can be retrieved relatively from another component', functio Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->default($state = Str::random()), $placeholder = Placeholder::make(Str::random()) @@ -600,10 +600,10 @@ test('sibling nested state can be retrieved relatively from another component', Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($parentStatePath = Str::random()) ->schema([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->default($state = Str::random()), ]), @@ -620,10 +620,10 @@ test('parent sibling state can be retrieved relatively from another component', Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->default($state = Str::random()), - (new Component()) + (new Component) ->statePath(Str::random()) ->schema([ $placeholder = Placeholder::make(Str::random()) @@ -640,7 +640,7 @@ test('sibling state can be retrieved absolutely from another component', functio Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->default($state = Str::random()), $placeholder = Placeholder::make(Str::random()) @@ -656,10 +656,10 @@ test('sibling nested state can be retrieved absolutely from another component', Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($parentStatePath = Str::random()) ->schema([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->default($state = Str::random()), ]), @@ -676,10 +676,10 @@ test('parent sibling state can be retrieved absolutely from another component', Schema::make(Livewire::make()) ->statePath('data') ->components([ - (new Component()) + (new Component) ->statePath($statePath = Str::random()) ->default($state = Str::random()), - (new Component()) + (new Component) ->statePath(Str::random()) ->schema([ $placeholder = Placeholder::make(Str::random()) diff --git a/tests/src/Notifications/NotificationTest.php b/tests/src/Notifications/NotificationTest.php index 11e3d844a7..0528face2b 100644 --- a/tests/src/Notifications/NotificationTest.php +++ b/tests/src/Notifications/NotificationTest.php @@ -174,7 +174,7 @@ it('can close notifications', function () { function getLastNotificationAction() { - $notificationsLivewireComponent = new Notifications(); + $notificationsLivewireComponent = new Notifications; $notificationsLivewireComponent->mount(); $notifications = $notificationsLivewireComponent->notifications; diff --git a/tests/src/Panels/Auth/LogoutTest.php b/tests/src/Panels/Auth/LogoutTest.php index 0d0f72d6c0..f3fcfbdca7 100644 --- a/tests/src/Panels/Auth/LogoutTest.php +++ b/tests/src/Panels/Auth/LogoutTest.php @@ -18,7 +18,7 @@ it('can log a user out', function () { }); it('allows a user to override the logout response', function () { - $logoutResponseFake = new class() implements LogoutResponse + $logoutResponseFake = new class implements LogoutResponse { public function toResponse($request): RedirectResponse { diff --git a/tests/src/Panels/Fixtures/Resources/PostResource/Pages/CreatePostUsingWizard.php b/tests/src/Panels/Fixtures/Resources/PostResource/Pages/CreatePostUsingWizard.php new file mode 100644 index 0000000000..060fd0f76c --- /dev/null +++ b/tests/src/Panels/Fixtures/Resources/PostResource/Pages/CreatePostUsingWizard.php @@ -0,0 +1,30 @@ +schema([ + TextInput::make('title')->required(), + ]), + Step::make('Step 2') + ->schema([ + TextInput::make('content')->required(), + ]), + ]; + } +} diff --git a/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php b/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php new file mode 100644 index 0000000000..f81191d810 --- /dev/null +++ b/tests/src/Panels/Resources/Pages/CreateRecordUsingWizardTest.php @@ -0,0 +1,42 @@ +goToWizardStep(2) + ->assertHasFormErrors(['title']) + ->assertHasNoFormErrors(['content']) + ->fillForm(['title' => 'Test title']) + ->goToWizardStep(2) + ->assertHasNoFormErrors(); +}); + +it('it verifies what wizard step we are currently in', function () { + livewire(CreatePostUsingWizard::class) + ->assertWizardCurrentStep(1) + ->fillForm(['title' => 'Test title']) + ->goToWizardStep(2) + ->assertWizardCurrentStep(2); +}); + +it('it goes to the next wizard step', function () { + livewire(CreatePostUsingWizard::class) + ->fillForm(['title' => 'Test title']) + ->goToNextWizardStep() + ->assertWizardCurrentStep(2); +}); + +it('it goes to the previous wizard step', function () { + livewire(CreatePostUsingWizard::class) + ->fillForm(['title' => 'Test title']) + ->goToNextWizardStep() + ->assertWizardCurrentStep(2) + ->goToPreviousWizardStep() + ->assertWizardCurrentStep(1); +});