upgrade to laravel 7 and set branch to v2

This commit is contained in:
2020-12-25 11:22:15 +00:00
parent 516105c492
commit 0ddd298350
4638 changed files with 132501 additions and 190226 deletions
@@ -11,6 +11,8 @@
namespace Symfony\Component\HttpKernel\ControllerMetadata;
use Symfony\Component\HttpKernel\Attribute\ArgumentInterface;
/**
* Responsible for storing metadata of an argument.
*
@@ -24,8 +26,9 @@ class ArgumentMetadata
private $hasDefaultValue;
private $defaultValue;
private $isNullable;
private $attribute;
public function __construct(string $name, ?string $type, bool $isVariadic, bool $hasDefaultValue, $defaultValue, bool $isNullable = false)
public function __construct(string $name, ?string $type, bool $isVariadic, bool $hasDefaultValue, $defaultValue, bool $isNullable = false, ?ArgumentInterface $attribute = null)
{
$this->name = $name;
$this->type = $type;
@@ -33,6 +36,7 @@ class ArgumentMetadata
$this->hasDefaultValue = $hasDefaultValue;
$this->defaultValue = $defaultValue;
$this->isNullable = $isNullable || null === $type || ($hasDefaultValue && null === $defaultValue);
$this->attribute = $attribute;
}
/**
@@ -104,4 +108,12 @@ class ArgumentMetadata
return $this->defaultValue;
}
/**
* Returns the attribute (if any) that was set on the argument.
*/
public function getAttribute(): ?ArgumentInterface
{
return $this->attribute;
}
}