composer update
This commit is contained in:
27
vendor/symfony/service-contracts/Attribute/Required.php
vendored
Normal file
27
vendor/symfony/service-contracts/Attribute/Required.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Contracts\Service\Attribute;
|
||||
|
||||
use Attribute;
|
||||
|
||||
/**
|
||||
* A required dependency.
|
||||
*
|
||||
* This attribute indicates that a property holds a required dependency. The annotated property or method should be
|
||||
* considered during the instantiation process of the containing class.
|
||||
*
|
||||
* @author Alexander M. Turek <me@derrabus.de>
|
||||
*/
|
||||
#[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_PROPERTY)]
|
||||
final class Required
|
||||
{
|
||||
}
|
||||
5
vendor/symfony/service-contracts/CHANGELOG.md
vendored
Normal file
5
vendor/symfony/service-contracts/CHANGELOG.md
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
CHANGELOG
|
||||
=========
|
||||
|
||||
The changelog is maintained for all Symfony contracts at the following URL:
|
||||
https://github.com/symfony/contracts/blob/master/CHANGELOG.md
|
||||
2
vendor/symfony/service-contracts/LICENSE
vendored
2
vendor/symfony/service-contracts/LICENSE
vendored
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2018-2019 Fabien Potencier
|
||||
Copyright (c) 2018-2020 Fabien Potencier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -14,6 +14,10 @@ namespace Symfony\Contracts\Service;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
// Help opcache.preload discover always-needed symbols
|
||||
class_exists(ContainerExceptionInterface::class);
|
||||
class_exists(NotFoundExceptionInterface::class);
|
||||
|
||||
/**
|
||||
* A trait to help implement ServiceProviderInterface.
|
||||
*
|
||||
@@ -83,7 +87,7 @@ trait ServiceLocatorTrait
|
||||
} else {
|
||||
$type = (new \ReflectionFunction($factory))->getReturnType();
|
||||
|
||||
$this->providedTypes[$name] = $type ? ($type->allowsNull() ? '?' : '').$type->getName() : '?';
|
||||
$this->providedTypes[$name] = $type ? ($type->allowsNull() ? '?' : '').($type instanceof \ReflectionNamedType ? $type->getName() : $type) : '?';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ trait ServiceSubscriberTrait
|
||||
}
|
||||
|
||||
if (self::class === $method->getDeclaringClass()->name && ($returnType = $method->getReturnType()) && !$returnType->isBuiltin()) {
|
||||
$services[self::class.'::'.$method->name] = '?'.$returnType->getName();
|
||||
$services[self::class.'::'.$method->name] = '?'.($returnType instanceof \ReflectionNamedType ? $returnType->getName() : $type);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.2.5",
|
||||
"php": ">=7.2.5",
|
||||
"psr/container": "^1.0"
|
||||
},
|
||||
"suggest": {
|
||||
@@ -28,7 +28,11 @@
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0-dev"
|
||||
"dev-master": "2.2-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
"url": "https://github.com/symfony/contracts"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user