diff --git a/composer.lock b/composer.lock index a173c46..57ccce8 100644 --- a/composer.lock +++ b/composer.lock @@ -1661,16 +1661,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.9.2", + "version": "7.9.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", "shasum": "" }, "require": { @@ -1767,7 +1767,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + "source": "https://github.com/guzzle/guzzle/tree/7.9.3" }, "funding": [ { @@ -1783,20 +1783,20 @@ "type": "tidelift" } ], - "time": "2024-07-24T11:22:20+00:00" + "time": "2025-03-27T13:37:11+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.4", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "url": "https://api.github.com/repos/guzzle/promises/zipball/7c69f28996b0a6920945dd20b3857e499d9ca96c", + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c", "shasum": "" }, "require": { @@ -1850,7 +1850,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.4" + "source": "https://github.com/guzzle/promises/tree/2.2.0" }, "funding": [ { @@ -1866,20 +1866,20 @@ "type": "tidelift" } ], - "time": "2024-10-17T10:06:22+00:00" + "time": "2025-03-27T13:27:01+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.7.0", + "version": "2.7.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/c2270caaabe631b3b44c85f99e5a04bbb8060d16", + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16", "shasum": "" }, "require": { @@ -1966,7 +1966,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.7.0" + "source": "https://github.com/guzzle/psr7/tree/2.7.1" }, "funding": [ { @@ -1982,7 +1982,7 @@ "type": "tidelift" } ], - "time": "2024-07-18T11:15:46+00:00" + "time": "2025-03-27T12:30:47+00:00" }, { "name": "guzzlehttp/uri-template", @@ -8211,16 +8211,16 @@ }, { "name": "filp/whoops", - "version": "2.17.0", + "version": "2.18.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "075bc0c26631110584175de6523ab3f1652eb28e" + "reference": "a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/075bc0c26631110584175de6523ab3f1652eb28e", - "reference": "075bc0c26631110584175de6523ab3f1652eb28e", + "url": "https://api.github.com/repos/filp/whoops/zipball/a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e", + "reference": "a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e", "shasum": "" }, "require": { @@ -8270,7 +8270,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.17.0" + "source": "https://github.com/filp/whoops/tree/2.18.0" }, "funding": [ { @@ -8278,20 +8278,20 @@ "type": "github" } ], - "time": "2025-01-25T12:00:00+00:00" + "time": "2025-03-15T12:00:00+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.69.0", + "version": "v3.75.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "630a59448c00729bc235d5e95cfedefeaca37523" + "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/630a59448c00729bc235d5e95cfedefeaca37523", - "reference": "630a59448c00729bc235d5e95cfedefeaca37523", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/399a128ff2fdaf4281e4e79b755693286cdf325c", + "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c", "shasum": "" }, "require": { @@ -8299,6 +8299,7 @@ "composer/semver": "^3.4", "composer/xdebug-handler": "^3.0.3", "ext-filter": "*", + "ext-hash": "*", "ext-json": "*", "ext-tokenizer": "*", "fidry/cpu-core-counter": "^1.2", @@ -8321,18 +8322,18 @@ "symfony/stopwatch": "^5.4 || ^6.4 || ^7.0" }, "require-dev": { - "facile-it/paraunit": "^1.3.1 || ^2.5", - "infection/infection": "^0.29.10", - "justinrainbow/json-schema": "^5.3 || ^6.0", + "facile-it/paraunit": "^1.3.1 || ^2.6", + "infection/infection": "^0.29.14", + "justinrainbow/json-schema": "^5.3 || ^6.2", "keradus/cli-executor": "^2.1", "mikey179/vfsstream": "^1.6.12", "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", - "phpunit/phpunit": "^9.6.22 || ^10.5.45 || ^11.5.7", - "symfony/var-dumper": "^5.4.48 || ^6.4.18 || ^7.2.0", - "symfony/yaml": "^5.4.45 || ^6.4.18 || ^7.2.0" + "phpunit/phpunit": "^9.6.22 || ^10.5.45 || ^11.5.12", + "symfony/var-dumper": "^5.4.48 || ^6.4.18 || ^7.2.3", + "symfony/yaml": "^5.4.45 || ^6.4.18 || ^7.2.3" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -8373,7 +8374,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.69.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.75.0" }, "funding": [ { @@ -8381,7 +8382,7 @@ "type": "github" } ], - "time": "2025-02-14T16:19:23+00:00" + "time": "2025-03-31T18:40:42+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -8434,18 +8435,59 @@ }, "time": "2020-07-09T08:09:16+00:00" }, + { + "name": "iamcal/sql-parser", + "version": "v0.5", + "source": { + "type": "git", + "url": "https://github.com/iamcal/SQLParser.git", + "reference": "644fd994de3b54e5d833aecf406150aa3b66ca88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/iamcal/SQLParser/zipball/644fd994de3b54e5d833aecf406150aa3b66ca88", + "reference": "644fd994de3b54e5d833aecf406150aa3b66ca88", + "shasum": "" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^1.0", + "phpunit/phpunit": "^5|^6|^7|^8|^9" + }, + "type": "library", + "autoload": { + "psr-4": { + "iamcal\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cal Henderson", + "email": "cal@iamcal.com" + } + ], + "description": "MySQL schema parser", + "support": { + "issues": "https://github.com/iamcal/SQLParser/issues", + "source": "https://github.com/iamcal/SQLParser/tree/v0.5" + }, + "time": "2024-03-22T22:46:32+00:00" + }, { "name": "jean85/pretty-package-versions", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/Jean85/pretty-package-versions.git", - "reference": "3c4e5f62ba8d7de1734312e4fff32f67a8daaf10" + "reference": "4d7aa5dab42e2a76d99559706022885de0e18e1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/3c4e5f62ba8d7de1734312e4fff32f67a8daaf10", - "reference": "3c4e5f62ba8d7de1734312e4fff32f67a8daaf10", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/4d7aa5dab42e2a76d99559706022885de0e18e1a", + "reference": "4d7aa5dab42e2a76d99559706022885de0e18e1a", "shasum": "" }, "require": { @@ -8455,8 +8497,9 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^3.2", "jean85/composer-provided-replaced-stub-package": "^1.0", - "phpstan/phpstan": "^1.4", + "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^7.5|^8.5|^9.6", + "rector/rector": "^2.0", "vimeo/psalm": "^4.3 || ^5.0" }, "type": "library", @@ -8489,40 +8532,40 @@ ], "support": { "issues": "https://github.com/Jean85/pretty-package-versions/issues", - "source": "https://github.com/Jean85/pretty-package-versions/tree/2.1.0" + "source": "https://github.com/Jean85/pretty-package-versions/tree/2.1.1" }, - "time": "2024-11-18T16:19:46+00:00" + "time": "2025-03-19T14:43:43+00:00" }, { "name": "larastan/larastan", - "version": "v2.9.14", + "version": "v2.10.0", "source": { "type": "git", "url": "https://github.com/larastan/larastan.git", - "reference": "78f7f8da613e54edb2ab4afa5bede045228fb843" + "reference": "05519d721277604487a3ca71bdee87739d8d8716" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/larastan/larastan/zipball/78f7f8da613e54edb2ab4afa5bede045228fb843", - "reference": "78f7f8da613e54edb2ab4afa5bede045228fb843", + "url": "https://api.github.com/repos/larastan/larastan/zipball/05519d721277604487a3ca71bdee87739d8d8716", + "reference": "05519d721277604487a3ca71bdee87739d8d8716", "shasum": "" }, "require": { "ext-json": "*", - "illuminate/console": "^9.52.16 || ^10.28.0 || ^11.16", - "illuminate/container": "^9.52.16 || ^10.28.0 || ^11.16", - "illuminate/contracts": "^9.52.16 || ^10.28.0 || ^11.16", - "illuminate/database": "^9.52.16 || ^10.28.0 || ^11.16", - "illuminate/http": "^9.52.16 || ^10.28.0 || ^11.16", - "illuminate/pipeline": "^9.52.16 || ^10.28.0 || ^11.16", - "illuminate/support": "^9.52.16 || ^10.28.0 || ^11.16", + "iamcal/sql-parser": "^0.5.0", + "illuminate/console": "^9.52.20 || ^10.48.28 || ^11.41.3", + "illuminate/container": "^9.52.20 || ^10.48.28 || ^11.41.3", + "illuminate/contracts": "^9.52.20 || ^10.48.28 || ^11.41.3", + "illuminate/database": "^9.52.20 || ^10.48.28 || ^11.41.3", + "illuminate/http": "^9.52.20 || ^10.48.28 || ^11.41.3", + "illuminate/pipeline": "^9.52.20 || ^10.48.28 || ^11.41.3", + "illuminate/support": "^9.52.20 || ^10.48.28 || ^11.41.3", "php": "^8.0.2", - "phpmyadmin/sql-parser": "^5.9.0", "phpstan/phpstan": "^1.12.17" }, "require-dev": { "doctrine/coding-standard": "^12.0", - "laravel/framework": "^9.52.16 || ^10.28.0 || ^11.16", + "laravel/framework": "^9.52.20 || ^10.48.28 || ^11.41.3", "mockery/mockery": "^1.5.1", "nikic/php-parser": "^4.19.1", "orchestra/canvas": "^7.11.1 || ^8.11.0 || ^9.0.2", @@ -8576,7 +8619,7 @@ ], "support": { "issues": "https://github.com/larastan/larastan/issues", - "source": "https://github.com/larastan/larastan/tree/v2.9.14" + "source": "https://github.com/larastan/larastan/tree/v2.10.0" }, "funding": [ { @@ -8584,7 +8627,7 @@ "type": "github" } ], - "time": "2025-02-06T21:03:14+00:00" + "time": "2025-03-14T21:52:58+00:00" }, { "name": "laravel/tinker", @@ -8797,40 +8840,40 @@ }, { "name": "nunomaduro/collision", - "version": "v7.11.0", + "version": "v7.12.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "994ea93df5d4132f69d3f1bd74730509df6e8a05" + "reference": "995245421d3d7593a6960822063bdba4f5d7cf1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/994ea93df5d4132f69d3f1bd74730509df6e8a05", - "reference": "994ea93df5d4132f69d3f1bd74730509df6e8a05", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/995245421d3d7593a6960822063bdba4f5d7cf1a", + "reference": "995245421d3d7593a6960822063bdba4f5d7cf1a", "shasum": "" }, "require": { - "filp/whoops": "^2.16.0", - "nunomaduro/termwind": "^1.15.1", + "filp/whoops": "^2.17.0", + "nunomaduro/termwind": "^1.17.0", "php": "^8.1.0", - "symfony/console": "^6.4.12" + "symfony/console": "^6.4.17" }, "conflict": { "laravel/framework": ">=11.0.0" }, "require-dev": { - "brianium/paratest": "^7.3.1", - "laravel/framework": "^10.48.22", - "laravel/pint": "^1.18.1", - "laravel/sail": "^1.36.0", + "brianium/paratest": "^7.4.8", + "laravel/framework": "^10.48.29", + "laravel/pint": "^1.21.2", + "laravel/sail": "^1.41.0", "laravel/sanctum": "^3.3.3", - "laravel/tinker": "^2.10.0", - "nunomaduro/larastan": "^2.9.8", - "orchestra/testbench-core": "^8.28.3", - "pestphp/pest": "^2.35.1", + "laravel/tinker": "^2.10.1", + "nunomaduro/larastan": "^2.10.0", + "orchestra/testbench-core": "^8.35.0", + "pestphp/pest": "^2.36.0", "phpunit/phpunit": "^10.5.36", "sebastian/environment": "^6.1.0", - "spatie/laravel-ignition": "^2.8.0" + "spatie/laravel-ignition": "^2.9.1" }, "type": "library", "extra": { @@ -8889,7 +8932,7 @@ "type": "patreon" } ], - "time": "2024-10-15T15:12:40+00:00" + "time": "2025-03-14T22:35:49+00:00" }, { "name": "orchestra/canvas", @@ -9035,29 +9078,83 @@ }, "time": "2023-12-28T01:27:59+00:00" }, + { + "name": "orchestra/sidekick", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/orchestral/sidekick.git", + "reference": "ebdf88caa31735f7d00f289f070d4e9772774174" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/orchestral/sidekick/zipball/ebdf88caa31735f7d00f289f070d4e9772774174", + "reference": "ebdf88caa31735f7d00f289f070d4e9772774174", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.2", + "php": "^8.0", + "symfony/polyfill-php83": "^1.31" + }, + "require-dev": { + "laravel/framework": "^9.52.16|^10.48.29|^11.44.1|^12.1.1|^13.0", + "laravel/pint": "^1.4", + "phpstan/phpstan": "^2.1", + "phpunit/phpunit": "^9.6|^10.0|^11.0|^12.0", + "symfony/process": "^6.0|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/Eloquent/functions.php", + "src/Http/functions.php", + "src/functions.php" + ], + "psr-4": { + "Orchestra\\Sidekick\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mior Muhammad Zaki", + "email": "crynobone@gmail.com" + } + ], + "description": "Packages Toolkit Utilities and Helpers for Laravel", + "support": { + "issues": "https://github.com/orchestral/sidekick/issues", + "source": "https://github.com/orchestral/sidekick/tree/v1.1.1" + }, + "time": "2025-04-05T16:44:56+00:00" + }, { "name": "orchestra/testbench", - "version": "v8.32.0", + "version": "v8.35.0", "source": { "type": "git", "url": "https://github.com/orchestral/testbench.git", - "reference": "238b6433c70b35cceda3099a737b48fe4726e648" + "reference": "8f5b1e0d232481f29f8c081e2e3f1ccd2e314085" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench/zipball/238b6433c70b35cceda3099a737b48fe4726e648", - "reference": "238b6433c70b35cceda3099a737b48fe4726e648", + "url": "https://api.github.com/repos/orchestral/testbench/zipball/8f5b1e0d232481f29f8c081e2e3f1ccd2e314085", + "reference": "8f5b1e0d232481f29f8c081e2e3f1ccd2e314085", "shasum": "" }, "require": { "composer-runtime-api": "^2.2", "fakerphp/faker": "^1.21", - "laravel/framework": "^10.48.28", + "laravel/framework": "^10.48.29", "mockery/mockery": "^1.5.1", - "orchestra/testbench-core": "^8.33.0", - "orchestra/workbench": "^8.17.1", + "orchestra/testbench-core": "^8.36.0", + "orchestra/workbench": "^8.17.5", "php": "^8.1", - "phpunit/phpunit": "^9.6 || ^10.1", + "phpunit/phpunit": "^9.6|^10.1", "symfony/process": "^6.2", "symfony/yaml": "^6.2", "vlucas/phpdotenv": "^5.4.1" @@ -9086,43 +9183,45 @@ ], "support": { "issues": "https://github.com/orchestral/testbench/issues", - "source": "https://github.com/orchestral/testbench/tree/v8.32.0" + "source": "https://github.com/orchestral/testbench/tree/v8.35.0" }, - "time": "2025-02-15T06:54:24+00:00" + "time": "2025-04-06T11:27:49+00:00" }, { "name": "orchestra/testbench-core", - "version": "v8.33.0", + "version": "v8.36.0", "source": { "type": "git", "url": "https://github.com/orchestral/testbench-core.git", - "reference": "af9fee1a4d275daeff87023b668be7531edded67" + "reference": "079d4a7e38324a2d7407c6a1897e8aa081dca59f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/af9fee1a4d275daeff87023b668be7531edded67", - "reference": "af9fee1a4d275daeff87023b668be7531edded67", + "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/079d4a7e38324a2d7407c6a1897e8aa081dca59f", + "reference": "079d4a7e38324a2d7407c6a1897e8aa081dca59f", "shasum": "" }, "require": { "composer-runtime-api": "^2.2", + "orchestra/sidekick": "^1.1.0", "php": "^8.1", + "symfony/deprecation-contracts": "^2.5|^3.0", "symfony/polyfill-php83": "^1.31" }, "conflict": { - "brianium/paratest": "<6.4.0 || >=7.0.0 <7.1.4 || >=8.0.0", - "laravel/framework": "<10.48.28 || >=11.0.0", - "laravel/serializable-closure": "<1.3.0 || >=3.0.0", - "nunomaduro/collision": "<6.4.0 || >=7.0.0 <7.4.0 || >=8.0.0", - "orchestra/testbench-dusk": "<8.32.0 || >=9.0.0", + "brianium/paratest": "<6.4.0|>=7.0.0 <7.1.4|>=8.0.0", + "laravel/framework": "<10.48.29|>=11.0.0", + "laravel/serializable-closure": "<1.3.0|>=3.0.0", + "nunomaduro/collision": "<6.4.0|>=7.0.0 <7.4.0|>=8.0.0", + "orchestra/testbench-dusk": "<8.32.0|>=9.0.0", "orchestra/workbench": "<1.0.0", - "phpunit/phpunit": "<9.6.0 || >=10.3.0 <10.3.3 || >=10.6.0" + "phpunit/phpunit": "<9.6.0|>=10.3.0 <10.3.3|>=10.6.0" }, "require-dev": { "fakerphp/faker": "^1.21", - "laravel/framework": "^10.48.28", + "laravel/framework": "^10.48.29", "laravel/pint": "^1.20", - "laravel/serializable-closure": "^1.3 || ^2.0", + "laravel/serializable-closure": "^1.3|^2.0", "mockery/mockery": "^1.5.1", "phpstan/phpstan": "^2.1", "phpunit/phpunit": "^10.1", @@ -9132,15 +9231,15 @@ "vlucas/phpdotenv": "^5.4.1" }, "suggest": { - "brianium/paratest": "Allow using parallel testing (^6.4 || ^7.1.4).", + "brianium/paratest": "Allow using parallel testing (^6.4|^7.1.4).", "ext-pcntl": "Required to use all features of the console signal trapping.", "fakerphp/faker": "Allow using Faker for testing (^1.21).", - "laravel/framework": "Required for testing (^10.48.28).", + "laravel/framework": "Required for testing (^10.48.29).", "mockery/mockery": "Allow using Mockery for testing (^1.5.1).", - "nunomaduro/collision": "Allow using Laravel style tests output and parallel testing (^6.4 || ^7.4).", + "nunomaduro/collision": "Allow using Laravel style tests output and parallel testing (^6.4|^7.4).", "orchestra/testbench-browser-kit": "Allow using legacy Laravel BrowserKit for testing (^8.0).", "orchestra/testbench-dusk": "Allow using Laravel Dusk for testing (^8.0).", - "phpunit/phpunit": "Allow using PHPUnit for testing (^9.6 || ^10.1).", + "phpunit/phpunit": "Allow using PHPUnit for testing (^9.6|^10.1).", "symfony/process": "Required to use Orchestra\\Testbench\\remote function (^6.2).", "symfony/yaml": "Required for Testbench CLI (^6.2).", "vlucas/phpdotenv": "Required for Testbench CLI (^5.4.1)." @@ -9182,30 +9281,31 @@ "issues": "https://github.com/orchestral/testbench/issues", "source": "https://github.com/orchestral/testbench-core" }, - "time": "2025-02-15T03:47:47+00:00" + "time": "2025-04-06T06:00:41+00:00" }, { "name": "orchestra/workbench", - "version": "v8.17.1", + "version": "v8.17.5", "source": { "type": "git", "url": "https://github.com/orchestral/workbench.git", - "reference": "436ff6c904d1b9d324c382b94f477edf1ab0f222" + "reference": "15a753d0c5c63a54c282765310dbb590ffd61348" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/workbench/zipball/436ff6c904d1b9d324c382b94f477edf1ab0f222", - "reference": "436ff6c904d1b9d324c382b94f477edf1ab0f222", + "url": "https://api.github.com/repos/orchestral/workbench/zipball/15a753d0c5c63a54c282765310dbb590ffd61348", + "reference": "15a753d0c5c63a54c282765310dbb590ffd61348", "shasum": "" }, "require": { "composer-runtime-api": "^2.2", "fakerphp/faker": "^1.21", - "laravel/framework": "^10.48.25", + "laravel/framework": "^10.48.28", "laravel/tinker": "^2.8.2", - "nunomaduro/collision": "^6.4 || ^7.10", - "orchestra/canvas": "^8.11.9", - "orchestra/testbench-core": "^8.32.1", + "nunomaduro/collision": "^6.4|^7.10", + "orchestra/canvas": "^8.12.0", + "orchestra/sidekick": "^1.1.0", + "orchestra/testbench-core": "^8.35.0", "php": "^8.1", "symfony/polyfill-php83": "^1.31", "symfony/process": "^6.2", @@ -9246,9 +9346,9 @@ ], "support": { "issues": "https://github.com/orchestral/workbench/issues", - "source": "https://github.com/orchestral/workbench/tree/v8.17.1" + "source": "https://github.com/orchestral/workbench/tree/v8.17.5" }, - "time": "2025-01-23T04:01:40+00:00" + "time": "2025-04-06T10:51:30+00:00" }, { "name": "pestphp/pest", @@ -9666,105 +9766,18 @@ }, "time": "2025-02-12T04:51:58+00:00" }, - { - "name": "phpmyadmin/sql-parser", - "version": "5.10.3", - "source": { - "type": "git", - "url": "https://github.com/phpmyadmin/sql-parser.git", - "reference": "5346664973d10cf1abff20837fb1183f3c11a055" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/5346664973d10cf1abff20837fb1183f3c11a055", - "reference": "5346664973d10cf1abff20837fb1183f3c11a055", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "phpmyadmin/motranslator": "<3.0" - }, - "require-dev": { - "phpbench/phpbench": "^1.1", - "phpmyadmin/coding-standard": "^3.0", - "phpmyadmin/motranslator": "^4.0 || ^5.0", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.9.12", - "phpstan/phpstan-phpunit": "^1.3.3", - "phpunit/phpunit": "^8.5 || ^9.6", - "psalm/plugin-phpunit": "^0.16.1", - "vimeo/psalm": "^4.11", - "zumba/json-serializer": "~3.0.2" - }, - "suggest": { - "ext-mbstring": "For best performance", - "phpmyadmin/motranslator": "Translate messages to your favorite locale" - }, - "bin": [ - "bin/highlight-query", - "bin/lint-query", - "bin/sql-parser", - "bin/tokenize-query" - ], - "type": "library", - "autoload": { - "psr-4": { - "PhpMyAdmin\\SqlParser\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "authors": [ - { - "name": "The phpMyAdmin Team", - "email": "developers@phpmyadmin.net", - "homepage": "https://www.phpmyadmin.net/team/" - } - ], - "description": "A validating SQL lexer and parser with a focus on MySQL dialect.", - "homepage": "https://github.com/phpmyadmin/sql-parser", - "keywords": [ - "analysis", - "lexer", - "parser", - "query linter", - "sql", - "sql lexer", - "sql linter", - "sql parser", - "sql syntax highlighter", - "sql tokenizer" - ], - "support": { - "issues": "https://github.com/phpmyadmin/sql-parser/issues", - "source": "https://github.com/phpmyadmin/sql-parser" - }, - "funding": [ - { - "url": "https://www.phpmyadmin.net/donate/", - "type": "other" - } - ], - "time": "2025-01-19T04:14:02+00:00" - }, { "name": "phpstan/phpstan", - "version": "1.12.18", + "version": "1.12.23", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "fef9f07814a573399229304bb0046affdf558812" + "reference": "29201e7a743a6ab36f91394eab51889a82631428" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/fef9f07814a573399229304bb0046affdf558812", - "reference": "fef9f07814a573399229304bb0046affdf558812", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/29201e7a743a6ab36f91394eab51889a82631428", + "reference": "29201e7a743a6ab36f91394eab51889a82631428", "shasum": "" }, "require": { @@ -9809,7 +9822,7 @@ "type": "github" } ], - "time": "2025-02-13T12:44:44+00:00" + "time": "2025-03-23T14:57:32+00:00" }, { "name": "phpunit/php-code-coverage", @@ -10235,16 +10248,16 @@ }, { "name": "psy/psysh", - "version": "v0.12.7", + "version": "v0.12.8", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "d73fa3c74918ef4522bb8a3bf9cab39161c4b57c" + "reference": "85057ceedee50c49d4f6ecaff73ee96adb3b3625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/d73fa3c74918ef4522bb8a3bf9cab39161c4b57c", - "reference": "d73fa3c74918ef4522bb8a3bf9cab39161c4b57c", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/85057ceedee50c49d4f6ecaff73ee96adb3b3625", + "reference": "85057ceedee50c49d4f6ecaff73ee96adb3b3625", "shasum": "" }, "require": { @@ -10308,9 +10321,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.12.7" + "source": "https://github.com/bobthecow/psysh/tree/v0.12.8" }, - "time": "2024-12-10T01:58:33+00:00" + "time": "2025-03-16T03:05:19+00:00" }, { "name": "react/cache", @@ -12041,16 +12054,16 @@ }, { "name": "symfony/stopwatch", - "version": "v6.4.13", + "version": "v6.4.19", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "2cae0a6f8d04937d02f6d19806251e2104d54f92" + "reference": "dfe1481c12c06266d0c3d58c0cb4b09bd497ab9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/2cae0a6f8d04937d02f6d19806251e2104d54f92", - "reference": "2cae0a6f8d04937d02f6d19806251e2104d54f92", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/dfe1481c12c06266d0c3d58c0cb4b09bd497ab9c", + "reference": "dfe1481c12c06266d0c3d58c0cb4b09bd497ab9c", "shasum": "" }, "require": { @@ -12083,7 +12096,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.4.13" + "source": "https://github.com/symfony/stopwatch/tree/v6.4.19" }, "funding": [ { @@ -12099,20 +12112,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:18:03+00:00" + "time": "2025-02-21T10:06:30+00:00" }, { "name": "symfony/yaml", - "version": "v6.4.18", + "version": "v6.4.20", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5" + "reference": "28ee818fce4a73ac1474346b94e4b966f665c53f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5", - "reference": "bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5", + "url": "https://api.github.com/repos/symfony/yaml/zipball/28ee818fce4a73ac1474346b94e4b966f665c53f", + "reference": "28ee818fce4a73ac1474346b94e4b966f665c53f", "shasum": "" }, "require": { @@ -12155,7 +12168,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.4.18" + "source": "https://github.com/symfony/yaml/tree/v6.4.20" }, "funding": [ { @@ -12171,7 +12184,7 @@ "type": "tidelift" } ], - "time": "2025-01-07T09:44:41+00:00" + "time": "2025-02-27T20:15:30+00:00" }, { "name": "szepeviktor/phpstan-wordpress", @@ -12389,15 +12402,15 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { "php": ">=8.1" }, - "platform-dev": [], + "platform-dev": {}, "platform-overrides": { "php": "8.1" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/src/Traits/Related.php b/src/Traits/Related.php new file mode 100644 index 0000000..6eb1c35 --- /dev/null +++ b/src/Traits/Related.php @@ -0,0 +1,73 @@ + $postType, + 'post_status' => 'publish', + 'posts_per_page' => $perPage, + 'orderby' => $orderBy, + 'post__not_in' => [$this->id], + ]); + + return new Collection($query->posts); + } + + public function randomPosts(string $postType, int $perPage = 3): Collection + { + return $this->posts($postType, $perPage, 'rand'); + } + + public function nextPosts(string $postType, int $perPage = 3): Collection + { + return $this->posts($postType, $perPage); + } + + public function relatedPostsByTaxonomy(string $postType, string $taxonomyKey, Collection $taxonomyTerms, int $perPage = 3, string $orderBy = 'rand'): Collection + { + if ($taxonomyTerms->isEmpty() || strlen($taxonomyKey) === 0) { + return collect(); + } + + $query = new WP_Query([ + 'post_type' => $postType, + 'post_status' => 'publish', + 'posts_per_page' => $perPage, + 'orderby' => $orderBy, + 'post__not_in' => [$this->id], + 'tax_query' => [ + [ + 'taxonomy' => $taxonomyKey, + 'field' => 'slug', + 'terms' => $taxonomyTerms->pluck('slug')->toArray(), + ], + ], + ]); + + return new Collection($query->posts); + } + + public function relatedPostsBySearchPhrase(string $searchPhrase): Collection + { + $query = new WP_Query([ + 'post_type' => $this->postType, + 'post_status' => 'publish', + 'orderby' => 'title', + 'order' => 'ASC', + 'post__not_in' => [$this->id], + 's' => $searchPhrase, + 'posts_per_page' => 7, + ]); + + return new Collection($query->posts); + } +}