Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11756bdfd2 |
No files matched your search
+3
-3
@@ -10,12 +10,12 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"mcnd/picea": "dev-master"
|
||||
"mcnd/picea": "^1.4.0"
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/mcNdave/picea.git"
|
||||
"type": "composer",
|
||||
"url": "https://git.mcnd.ca/api/packages/mcndave/composer"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
|
||||
@@ -226,7 +226,7 @@ class FormContext implements FormContextInterface
|
||||
is_null($value) => null,
|
||||
enum_exists($e) => ( $value instanceof \BackedEnum ? $value : $e::tryFrom($value) ) ?? throw new \InvalidArgumentException(sprintf("Field '\$$property' awaiting values : '%s'.", implode("', '", array_map(fn($e) => $e->value, $e::cases())))),
|
||||
function_exists($e) => $e($value),
|
||||
class_exists($e) => is_array($value) ? new $e(...$value) : new $e($value),
|
||||
class_exists($e) => new $e(...$value),
|
||||
interface_exists($e) => throw new \InvalidArgumentException("There is no way provided to match an interface object yet."),
|
||||
default => $value
|
||||
};
|
||||
@@ -238,12 +238,11 @@ class FormContext implements FormContextInterface
|
||||
}
|
||||
elseif ($types instanceof \ReflectionIntersectionType || $types instanceof \ReflectionUnionType) {
|
||||
foreach($types->getTypes() as $type) {
|
||||
$value = $cast($type->getName());
|
||||
break;
|
||||
return $cast($type->getName());
|
||||
}
|
||||
}
|
||||
elseif ($types->isBuiltin()) {
|
||||
$value = $cast($types->getName());
|
||||
return $cast($types->getName());
|
||||
}
|
||||
|
||||
return $value;
|
||||
|
||||
@@ -13,7 +13,6 @@ class FormHandler {
|
||||
|
||||
public bool $validateCsrfToken = true;
|
||||
|
||||
# in PHP 8.5, value should be taken directly from a property get within $context->formExecutionStatus
|
||||
public /* mixed */ $executionStatus = null;
|
||||
|
||||
public ? bool $validationStatus = null;
|
||||
|
||||
Reference in new issue
Block a user