Fix and update Composer autoload
This commit is contained in:
committed by
Frédéric Guillot
parent
3e139ab6f4
commit
4cfdb88813
47
vendor/pimple/pimple/.github/workflows/tests.yml
vendored
Normal file
47
vendor/pimple/pimple/.github/workflows/tests.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
name: "Tests"
|
||||
|
||||
on:
|
||||
- pull_request
|
||||
- push
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: PHP ${{ matrix.php }} - ${{ matrix.dependencies }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php:
|
||||
- "7.2"
|
||||
- "7.3"
|
||||
- "7.4"
|
||||
- "8.0"
|
||||
- "8.1"
|
||||
dependencies:
|
||||
- "psr/container:^1.1"
|
||||
- "psr/container:^2.0"
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP ${{ matrix.php }}
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
ini-values: display_errors=off, log_errors=on
|
||||
extensions: :xdebug
|
||||
env:
|
||||
# https://github.com/shivammathur/setup-php/issues/407#issuecomment-773675741
|
||||
fail-fast: true
|
||||
|
||||
- name: Validate composer.json
|
||||
run: composer validate --strict --no-check-lock
|
||||
|
||||
- name: Install dependencies +${{ matrix.dependencies }}
|
||||
run: |
|
||||
composer require --no-update ${{ matrix.dependencies }}
|
||||
composer update --prefer-dist --no-progress
|
||||
|
||||
- name: Run PHPUnit tests
|
||||
run: vendor/bin/simple-phpunit --verbose
|
||||
1
vendor/pimple/pimple/.gitignore
vendored
1
vendor/pimple/pimple/.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
phpunit.xml
|
||||
.phpunit.result.cache
|
||||
composer.lock
|
||||
/vendor/
|
||||
|
||||
18
vendor/pimple/pimple/.travis.yml
vendored
18
vendor/pimple/pimple/.travis.yml
vendored
@@ -1,18 +0,0 @@
|
||||
language: php
|
||||
|
||||
env:
|
||||
global:
|
||||
- REPORT_EXIT_STATUS=1
|
||||
|
||||
php:
|
||||
- 7.2
|
||||
- 7.3
|
||||
- 7.4
|
||||
- nightly
|
||||
|
||||
before_script:
|
||||
- composer self-update
|
||||
- COMPOSER_ROOT_VERSION=dev-master composer install
|
||||
|
||||
script:
|
||||
- ./vendor/bin/simple-phpunit
|
||||
8
vendor/pimple/pimple/CHANGELOG
vendored
8
vendor/pimple/pimple/CHANGELOG
vendored
@@ -1,3 +1,11 @@
|
||||
* 3.4.0 (2021-03-06)
|
||||
|
||||
* Implement version 1.1 of PSR-11
|
||||
|
||||
* 3.3.1 (2020-11-24)
|
||||
|
||||
* Add support for PHP 8
|
||||
|
||||
* 3.3.0 (2020-03-03)
|
||||
|
||||
* Drop PHP extension
|
||||
|
||||
4
vendor/pimple/pimple/README.rst
vendored
4
vendor/pimple/pimple/README.rst
vendored
@@ -5,7 +5,7 @@ Pimple
|
||||
|
||||
Pimple is now closed for changes. No new features will be added and no
|
||||
cosmetic changes will be accepted either. The only accepted changes are
|
||||
compatiblity with newer PHP versions and security issue fixes.
|
||||
compatibility with newer PHP versions and security issue fixes.
|
||||
|
||||
.. caution::
|
||||
|
||||
@@ -308,7 +308,7 @@ when iterated over:
|
||||
public function canAccess($resource)
|
||||
{
|
||||
foreach ($this->voters as $voter) {
|
||||
if (true === $voter->canAccess($resource) {
|
||||
if (true === $voter->canAccess($resource)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
6
vendor/pimple/pimple/composer.json
vendored
6
vendor/pimple/pimple/composer.json
vendored
@@ -13,17 +13,17 @@
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"psr/container": "^1.0"
|
||||
"psr/container": "^1.1 || ^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "^5.0"
|
||||
"symfony/phpunit-bridge": "^5.4@dev"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": { "Pimple": "src/" }
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.3.x-dev"
|
||||
"dev-master": "3.4.x-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
11
vendor/pimple/pimple/src/Pimple/Container.php
vendored
11
vendor/pimple/pimple/src/Pimple/Container.php
vendored
@@ -74,8 +74,11 @@ class Container implements \ArrayAccess
|
||||
* @param string $id The unique identifier for the parameter or object
|
||||
* @param mixed $value The value of the parameter or a closure to define an object
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws FrozenServiceException Prevent override of a frozen service
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetSet($id, $value)
|
||||
{
|
||||
if (isset($this->frozen[$id])) {
|
||||
@@ -95,6 +98,7 @@ class Container implements \ArrayAccess
|
||||
*
|
||||
* @throws UnknownIdentifierException If the identifier is not defined
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($id)
|
||||
{
|
||||
if (!isset($this->keys[$id])) {
|
||||
@@ -130,6 +134,7 @@ class Container implements \ArrayAccess
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetExists($id)
|
||||
{
|
||||
return isset($this->keys[$id]);
|
||||
@@ -139,7 +144,10 @@ class Container implements \ArrayAccess
|
||||
* Unsets a parameter or an object.
|
||||
*
|
||||
* @param string $id The unique identifier for the parameter or object
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetUnset($id)
|
||||
{
|
||||
if (isset($this->keys[$id])) {
|
||||
@@ -280,8 +288,7 @@ class Container implements \ArrayAccess
|
||||
/**
|
||||
* Registers a service provider.
|
||||
*
|
||||
* @param ServiceProviderInterface $provider A ServiceProviderInterface instance
|
||||
* @param array $values An array of values that customizes the provider
|
||||
* @param array $values An array of values that customizes the provider
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
|
||||
@@ -43,12 +43,12 @@ final class Container implements ContainerInterface
|
||||
$this->pimple = $pimple;
|
||||
}
|
||||
|
||||
public function get($id)
|
||||
public function get(string $id)
|
||||
{
|
||||
return $this->pimple[$id];
|
||||
}
|
||||
|
||||
public function has($id)
|
||||
public function has(string $id): bool
|
||||
{
|
||||
return isset($this->pimple[$id]);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ class ServiceLocator implements ContainerInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get($id)
|
||||
public function get(string $id)
|
||||
{
|
||||
if (!isset($this->aliases[$id])) {
|
||||
throw new UnknownIdentifierException($id);
|
||||
@@ -68,7 +68,7 @@ class ServiceLocator implements ContainerInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function has($id)
|
||||
public function has(string $id): bool
|
||||
{
|
||||
return isset($this->aliases[$id]) && isset($this->container[$this->aliases[$id]]);
|
||||
}
|
||||
|
||||
@@ -42,26 +42,46 @@ final class ServiceIterator implements \Iterator
|
||||
$this->ids = $ids;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function rewind()
|
||||
{
|
||||
\reset($this->ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function current()
|
||||
{
|
||||
return $this->container[\current($this->ids)];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function key()
|
||||
{
|
||||
return \current($this->ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function next()
|
||||
{
|
||||
\next($this->ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function valid()
|
||||
{
|
||||
return null !== \key($this->ids);
|
||||
|
||||
@@ -39,8 +39,6 @@ interface ServiceProviderInterface
|
||||
*
|
||||
* This method should only be used to configure services and parameters.
|
||||
* It should not get services.
|
||||
*
|
||||
* @param Container $pimple A container instance
|
||||
*/
|
||||
public function register(Container $pimple);
|
||||
}
|
||||
|
||||
@@ -36,8 +36,6 @@ class PimpleServiceProvider implements ServiceProviderInterface
|
||||
*
|
||||
* This method should only be used to configure services and parameters.
|
||||
* It should not get services.
|
||||
*
|
||||
* @param Container $pimple An Container instance
|
||||
*/
|
||||
public function register(Container $pimple)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user