框架升级及修复升级后的bug

This commit is contained in:
Dev
2026-10-16 18:13:09 +08:00
parent dafb0c96c0
commit 2d342bcbd7
537 changed files with 49836 additions and 40933 deletions
+2 -22
View File
@@ -83,27 +83,7 @@ final class InputBag extends ParameterBag
}
/**
* Returns the input value converted to integer.
*
* @throws BadRequestException if the value cannot be converted to integer
*/
public function getInt(string $key, int $default = 0): int
{
return $this->filter($key, $default, \FILTER_VALIDATE_INT, ['flags' => \FILTER_REQUIRE_SCALAR | \FILTER_NULL_ON_FAILURE]) ?? throw new BadRequestException(\sprintf('Input value "%s" cannot be converted to "int".', $key));
}
/**
* Returns the input value converted to boolean.
*
* @throws BadRequestException if the value cannot be converted to a boolean
*/
public function getBoolean(string $key, bool $default = false): bool
{
return $this->filter($key, $default, \FILTER_VALIDATE_BOOL, ['flags' => \FILTER_REQUIRE_SCALAR | \FILTER_NULL_ON_FAILURE]) ?? throw new BadRequestException(\sprintf('Input value "%s" cannot be converted to "bool".', $key));
}
/**
* Returns the input value converted to an enum.
* Returns the parameter value converted to an enum.
*
* @template T of \BackedEnum
*
@@ -126,7 +106,7 @@ final class InputBag extends ParameterBag
}
/**
* Returns the input value converted to string.
* Returns the parameter value converted to string.
*
* @throws BadRequestException if the input contains a non-scalar value
*/