Update vendor folder

This commit is contained in:
Frédéric Guillot
2020-06-17 18:12:25 -07:00
parent 8397f5732e
commit 1ce8da901d
10 changed files with 30 additions and 26 deletions

View File

@@ -1,3 +1,7 @@
* 3.2.3 (2017-XX-XX)
* n/a
* 3.2.2 (2017-07-23)
* reverted extending a protected closure throws an exception (deprecated it instead)

View File

@@ -108,7 +108,7 @@ If you change the ``session_storage`` service definition like below:
};
You can now easily change the cookie name by overriding the
``session_storage_class`` parameter instead of redefining the service
``cookie_name`` parameter instead of redefining the service
definition.
Protecting Parameters

View File

@@ -41,7 +41,7 @@ extern zend_module_entry pimple_module_entry;
#include "TSRM.h"
#endif
#define PIMPLE_VERSION "3.2.2-DEV"
#define PIMPLE_VERSION "3.2.3-DEV"
#define PIMPLE_NS "Pimple"
#define PSR_CONTAINER_NS "Psr\\Container"

View File

@@ -103,9 +103,9 @@ class Container implements \ArrayAccess
if (
isset($this->raw[$id])
|| !is_object($this->values[$id])
|| !\is_object($this->values[$id])
|| isset($this->protected[$this->values[$id]])
|| !method_exists($this->values[$id], '__invoke')
|| !\method_exists($this->values[$id], '__invoke')
) {
return $this->values[$id];
}
@@ -143,7 +143,7 @@ class Container implements \ArrayAccess
public function offsetUnset($id)
{
if (isset($this->keys[$id])) {
if (is_object($this->values[$id])) {
if (\is_object($this->values[$id])) {
unset($this->factories[$this->values[$id]], $this->protected[$this->values[$id]]);
}
@@ -162,7 +162,7 @@ class Container implements \ArrayAccess
*/
public function factory($callable)
{
if (!method_exists($callable, '__invoke')) {
if (!\method_exists($callable, '__invoke')) {
throw new ExpectedInvokableException('Service definition is not a Closure or invokable object.');
}
@@ -184,7 +184,7 @@ class Container implements \ArrayAccess
*/
public function protect($callable)
{
if (!method_exists($callable, '__invoke')) {
if (!\method_exists($callable, '__invoke')) {
throw new ExpectedInvokableException('Callable is not a Closure or invokable object.');
}
@@ -241,15 +241,15 @@ class Container implements \ArrayAccess
throw new FrozenServiceException($id);
}
if (!is_object($this->values[$id]) || !method_exists($this->values[$id], '__invoke')) {
if (!\is_object($this->values[$id]) || !\method_exists($this->values[$id], '__invoke')) {
throw new InvalidServiceIdentifierException($id);
}
if (isset($this->protected[$this->values[$id]])) {
@trigger_error(sprintf('How Pimple behaves when extending protected closures will be fixed in Pimple 4. Are you sure "%s" should be protected?', $id), E_USER_DEPRECATED);
@\trigger_error(\sprintf('How Pimple behaves when extending protected closures will be fixed in Pimple 4. Are you sure "%s" should be protected?', $id), \E_USER_DEPRECATED);
}
if (!is_object($callable) || !method_exists($callable, '__invoke')) {
if (!\is_object($callable) || !\method_exists($callable, '__invoke')) {
throw new ExpectedInvokableException('Extension service definition is not a Closure or invokable object.');
}
@@ -274,7 +274,7 @@ class Container implements \ArrayAccess
*/
public function keys()
{
return array_keys($this->values);
return \array_keys($this->values);
}
/**

View File

@@ -40,6 +40,6 @@ class FrozenServiceException extends \RuntimeException implements ContainerExcep
*/
public function __construct($id)
{
parent::__construct(sprintf('Cannot override frozen service "%s".', $id));
parent::__construct(\sprintf('Cannot override frozen service "%s".', $id));
}
}

View File

@@ -40,6 +40,6 @@ class InvalidServiceIdentifierException extends \InvalidArgumentException implem
*/
public function __construct($id)
{
parent::__construct(sprintf('Identifier "%s" does not contain an object definition.', $id));
parent::__construct(\sprintf('Identifier "%s" does not contain an object definition.', $id));
}
}

View File

@@ -40,6 +40,6 @@ class UnknownIdentifierException extends \InvalidArgumentException implements No
*/
public function __construct($id)
{
parent::__construct(sprintf('Identifier "%s" is not defined.', $id));
parent::__construct(\sprintf('Identifier "%s" is not defined.', $id));
}
}

View File

@@ -49,7 +49,7 @@ class ServiceLocator implements ContainerInterface
$this->container = $container;
foreach ($ids as $key => $id) {
$this->aliases[is_int($key) ? $id : $key] = $id;
$this->aliases[\is_int($key) ? $id : $key] = $id;
}
}

View File

@@ -44,26 +44,26 @@ final class ServiceIterator implements \Iterator
public function rewind()
{
reset($this->ids);
\reset($this->ids);
}
public function current()
{
return $this->container[current($this->ids)];
return $this->container[\current($this->ids)];
}
public function key()
{
return current($this->ids);
return \current($this->ids);
}
public function next()
{
next($this->ids);
\next($this->ids);
}
public function valid()
{
return null !== key($this->ids);
return null !== \key($this->ids);
}
}