Optimized composer.json

This commit is contained in:
李铭昕 2023-03-28 15:29:17 +08:00
parent e84615af20
commit 83369af7ce
3 changed files with 3 additions and 8 deletions

View File

@ -20,9 +20,6 @@
"hyperf/contract": "~3.0.0",
"hyperf/macroable": "~3.0.0"
},
"suggest": {
"symfony/var-dumper": "Required to use the dd function (^5.0|^6.0)."
},
"autoload": {
"psr-4": {
"Hyperf\\Collection\\": "src/"

View File

@ -18,6 +18,7 @@
"require": {
"php": ">=7.2",
"doctrine/inflector": "^2.0",
"hyperf/collection": "~3.0.0",
"hyperf/context": "~3.0.0",
"hyperf/contract": "~3.0.0",
"hyperf/coordinator": "~3.0.0",

View File

@ -23,12 +23,8 @@ use Hyperf\Utils\Waiter;
if (! function_exists('value')) {
/**
* Return the default value of the given value.
*
* @param mixed $value
*
* @deprecated since 3.1, use `Hyperf\Collection\value()` instead.
*/
function value($value, ...$args)
function value(mixed $value, ...$args)
{
return $value instanceof Closure ? $value(...$args) : $value;
}
@ -108,6 +104,7 @@ if (! function_exists('collect')) {
/**
* Create a collection from the given value.
*
* @deprecated since 3.1, use \Hyperf\Collection\collect instead.
* @param null|mixed $value
* @return Collection
*/