diff options
Diffstat (limited to 'vendor/psr')
26 files changed, 944 insertions, 0 deletions
diff --git a/vendor/psr/cache/CHANGELOG.md b/vendor/psr/cache/CHANGELOG.md new file mode 100644 index 0000000..58ddab0 --- /dev/null +++ b/vendor/psr/cache/CHANGELOG.md | |||
@@ -0,0 +1,16 @@ | |||
1 | # Changelog | ||
2 | |||
3 | All notable changes to this project will be documented in this file, in reverse chronological order by release. | ||
4 | |||
5 | ## 1.0.1 - 2016-08-06 | ||
6 | |||
7 | ### Fixed | ||
8 | |||
9 | - Make spacing consistent in phpdoc annotations php-fig/cache#9 - chalasr | ||
10 | - Fix grammar in phpdoc annotations php-fig/cache#10 - chalasr | ||
11 | - Be more specific in docblocks that `getItems()` and `deleteItems()` take an array of strings (`string[]`) compared to just `array` php-fig/cache#8 - GrahamCampbell | ||
12 | - For `expiresAt()` and `expiresAfter()` in CacheItemInterface fix docblock to specify null as a valid parameters as well as an implementation of DateTimeInterface php-fig/cache#7 - GrahamCampbell | ||
13 | |||
14 | ## 1.0.0 - 2015-12-11 | ||
15 | |||
16 | Initial stable release; reflects accepted PSR-6 specification | ||
diff --git a/vendor/psr/cache/LICENSE.txt b/vendor/psr/cache/LICENSE.txt new file mode 100644 index 0000000..b1c2c97 --- /dev/null +++ b/vendor/psr/cache/LICENSE.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | Copyright (c) 2015 PHP Framework Interoperability Group | ||
2 | |||
3 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
4 | of this software and associated documentation files (the "Software"), to deal | ||
5 | in the Software without restriction, including without limitation the rights | ||
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
7 | copies of the Software, and to permit persons to whom the Software is | ||
8 | furnished to do so, subject to the following conditions: | ||
9 | |||
10 | The above copyright notice and this permission notice shall be included in | ||
11 | all copies or substantial portions of the Software. | ||
12 | |||
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
19 | THE SOFTWARE. | ||
diff --git a/vendor/psr/cache/README.md b/vendor/psr/cache/README.md new file mode 100644 index 0000000..9855a31 --- /dev/null +++ b/vendor/psr/cache/README.md | |||
@@ -0,0 +1,12 @@ | |||
1 | Caching Interface | ||
2 | ============== | ||
3 | |||
4 | This repository holds all interfaces related to [PSR-6 (Caching Interface)][psr-url]. | ||
5 | |||
6 | Note that this is not a Caching implementation of its own. It is merely interfaces that describe the components of a Caching mechanism. | ||
7 | |||
8 | The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. | ||
9 | |||
10 | [psr-url]: https://www.php-fig.org/psr/psr-6/ | ||
11 | [package-url]: https://packagist.org/packages/psr/cache | ||
12 | [implementation-url]: https://packagist.org/providers/psr/cache-implementation | ||
diff --git a/vendor/psr/cache/composer.json b/vendor/psr/cache/composer.json new file mode 100644 index 0000000..4b68797 --- /dev/null +++ b/vendor/psr/cache/composer.json | |||
@@ -0,0 +1,25 @@ | |||
1 | { | ||
2 | "name": "psr/cache", | ||
3 | "description": "Common interface for caching libraries", | ||
4 | "keywords": ["psr", "psr-6", "cache"], | ||
5 | "license": "MIT", | ||
6 | "authors": [ | ||
7 | { | ||
8 | "name": "PHP-FIG", | ||
9 | "homepage": "https://www.php-fig.org/" | ||
10 | } | ||
11 | ], | ||
12 | "require": { | ||
13 | "php": ">=8.0.0" | ||
14 | }, | ||
15 | "autoload": { | ||
16 | "psr-4": { | ||
17 | "Psr\\Cache\\": "src/" | ||
18 | } | ||
19 | }, | ||
20 | "extra": { | ||
21 | "branch-alias": { | ||
22 | "dev-master": "1.0.x-dev" | ||
23 | } | ||
24 | } | ||
25 | } | ||
diff --git a/vendor/psr/cache/src/CacheException.php b/vendor/psr/cache/src/CacheException.php new file mode 100644 index 0000000..bb785f4 --- /dev/null +++ b/vendor/psr/cache/src/CacheException.php | |||
@@ -0,0 +1,10 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Psr\Cache; | ||
4 | |||
5 | /** | ||
6 | * Exception interface for all exceptions thrown by an Implementing Library. | ||
7 | */ | ||
8 | interface CacheException extends \Throwable | ||
9 | { | ||
10 | } | ||
diff --git a/vendor/psr/cache/src/CacheItemInterface.php b/vendor/psr/cache/src/CacheItemInterface.php new file mode 100644 index 0000000..2b2e4bb --- /dev/null +++ b/vendor/psr/cache/src/CacheItemInterface.php | |||
@@ -0,0 +1,105 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Psr\Cache; | ||
4 | |||
5 | /** | ||
6 | * CacheItemInterface defines an interface for interacting with objects inside a cache. | ||
7 | * | ||
8 | * Each Item object MUST be associated with a specific key, which can be set | ||
9 | * according to the implementing system and is typically passed by the | ||
10 | * Cache\CacheItemPoolInterface object. | ||
11 | * | ||
12 | * The Cache\CacheItemInterface object encapsulates the storage and retrieval of | ||
13 | * cache items. Each Cache\CacheItemInterface is generated by a | ||
14 | * Cache\CacheItemPoolInterface object, which is responsible for any required | ||
15 | * setup as well as associating the object with a unique Key. | ||
16 | * Cache\CacheItemInterface objects MUST be able to store and retrieve any type | ||
17 | * of PHP value defined in the Data section of the specification. | ||
18 | * | ||
19 | * Calling Libraries MUST NOT instantiate Item objects themselves. They may only | ||
20 | * be requested from a Pool object via the getItem() method. Calling Libraries | ||
21 | * SHOULD NOT assume that an Item created by one Implementing Library is | ||
22 | * compatible with a Pool from another Implementing Library. | ||
23 | */ | ||
24 | interface CacheItemInterface | ||
25 | { | ||
26 | /** | ||
27 | * Returns the key for the current cache item. | ||
28 | * | ||
29 | * The key is loaded by the Implementing Library, but should be available to | ||
30 | * the higher level callers when needed. | ||
31 | * | ||
32 | * @return string | ||
33 | * The key string for this cache item. | ||
34 | */ | ||
35 | public function getKey(): string; | ||
36 | |||
37 | /** | ||
38 | * Retrieves the value of the item from the cache associated with this object's key. | ||
39 | * | ||
40 | * The value returned must be identical to the value originally stored by set(). | ||
41 | * | ||
42 | * If isHit() returns false, this method MUST return null. Note that null | ||
43 | * is a legitimate cached value, so the isHit() method SHOULD be used to | ||
44 | * differentiate between "null value was found" and "no value was found." | ||
45 | * | ||
46 | * @return mixed | ||
47 | * The value corresponding to this cache item's key, or null if not found. | ||
48 | */ | ||
49 | public function get(): mixed; | ||
50 | |||
51 | /** | ||
52 | * Confirms if the cache item lookup resulted in a cache hit. | ||
53 | * | ||
54 | * Note: This method MUST NOT have a race condition between calling isHit() | ||
55 | * and calling get(). | ||
56 | * | ||
57 | * @return bool | ||
58 | * True if the request resulted in a cache hit. False otherwise. | ||
59 | */ | ||
60 | public function isHit(): bool; | ||
61 | |||
62 | /** | ||
63 | * Sets the value represented by this cache item. | ||
64 | * | ||
65 | * The $value argument may be any item that can be serialized by PHP, | ||
66 | * although the method of serialization is left up to the Implementing | ||
67 | * Library. | ||
68 | * | ||
69 | * @param mixed $value | ||
70 | * The serializable value to be stored. | ||
71 | * | ||
72 | * @return static | ||
73 | * The invoked object. | ||
74 | */ | ||
75 | public function set(mixed $value): static; | ||
76 | |||
77 | /** | ||
78 | * Sets the expiration time for this cache item. | ||
79 | * | ||
80 | * @param ?\DateTimeInterface $expiration | ||
81 | * The point in time after which the item MUST be considered expired. | ||
82 | * If null is passed explicitly, a default value MAY be used. If none is set, | ||
83 | * the value should be stored permanently or for as long as the | ||
84 | * implementation allows. | ||
85 | * | ||
86 | * @return static | ||
87 | * The called object. | ||
88 | */ | ||
89 | public function expiresAt(?\DateTimeInterface $expiration): static; | ||
90 | |||
91 | /** | ||
92 | * Sets the expiration time for this cache item. | ||
93 | * | ||
94 | * @param int|\DateInterval|null $time | ||
95 | * The period of time from the present after which the item MUST be considered | ||
96 | * expired. An integer parameter is understood to be the time in seconds until | ||
97 | * expiration. If null is passed explicitly, a default value MAY be used. | ||
98 | * If none is set, the value should be stored permanently or for as long as the | ||
99 | * implementation allows. | ||
100 | * | ||
101 | * @return static | ||
102 | * The called object. | ||
103 | */ | ||
104 | public function expiresAfter(int|\DateInterval|null $time): static; | ||
105 | } | ||
diff --git a/vendor/psr/cache/src/CacheItemPoolInterface.php b/vendor/psr/cache/src/CacheItemPoolInterface.php new file mode 100644 index 0000000..4b3017c --- /dev/null +++ b/vendor/psr/cache/src/CacheItemPoolInterface.php | |||
@@ -0,0 +1,138 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Psr\Cache; | ||
4 | |||
5 | /** | ||
6 | * CacheItemPoolInterface generates CacheItemInterface objects. | ||
7 | * | ||
8 | * The primary purpose of Cache\CacheItemPoolInterface is to accept a key from | ||
9 | * the Calling Library and return the associated Cache\CacheItemInterface object. | ||
10 | * It is also the primary point of interaction with the entire cache collection. | ||
11 | * All configuration and initialization of the Pool is left up to an | ||
12 | * Implementing Library. | ||
13 | */ | ||
14 | interface CacheItemPoolInterface | ||
15 | { | ||
16 | /** | ||
17 | * Returns a Cache Item representing the specified key. | ||
18 | * | ||
19 | * This method must always return a CacheItemInterface object, even in case of | ||
20 | * a cache miss. It MUST NOT return null. | ||
21 | * | ||
22 | * @param string $key | ||
23 | * The key for which to return the corresponding Cache Item. | ||
24 | * | ||
25 | * @throws InvalidArgumentException | ||
26 | * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException | ||
27 | * MUST be thrown. | ||
28 | * | ||
29 | * @return CacheItemInterface | ||
30 | * The corresponding Cache Item. | ||
31 | */ | ||
32 | public function getItem(string $key): CacheItemInterface; | ||
33 | |||
34 | /** | ||
35 | * Returns a traversable set of cache items. | ||
36 | * | ||
37 | * @param string[] $keys | ||
38 | * An indexed array of keys of items to retrieve. | ||
39 | * | ||
40 | * @throws InvalidArgumentException | ||
41 | * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException | ||
42 | * MUST be thrown. | ||
43 | * | ||
44 | * @return iterable | ||
45 | * An iterable collection of Cache Items keyed by the cache keys of | ||
46 | * each item. A Cache item will be returned for each key, even if that | ||
47 | * key is not found. However, if no keys are specified then an empty | ||
48 | * traversable MUST be returned instead. | ||
49 | */ | ||
50 | public function getItems(array $keys = []): iterable; | ||
51 | |||
52 | /** | ||
53 | * Confirms if the cache contains specified cache item. | ||
54 | * | ||
55 | * Note: This method MAY avoid retrieving the cached value for performance reasons. | ||
56 | * This could result in a race condition with CacheItemInterface::get(). To avoid | ||
57 | * such situation use CacheItemInterface::isHit() instead. | ||
58 | * | ||
59 | * @param string $key | ||
60 | * The key for which to check existence. | ||
61 | * | ||
62 | * @throws InvalidArgumentException | ||
63 | * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException | ||
64 | * MUST be thrown. | ||
65 | * | ||
66 | * @return bool | ||
67 | * True if item exists in the cache, false otherwise. | ||
68 | */ | ||
69 | public function hasItem(string $key): bool; | ||
70 | |||
71 | /** | ||
72 | * Deletes all items in the pool. | ||
73 | * | ||
74 | * @return bool | ||
75 | * True if the pool was successfully cleared. False if there was an error. | ||
76 | */ | ||
77 | public function clear(): bool; | ||
78 | |||
79 | /** | ||
80 | * Removes the item from the pool. | ||
81 | * | ||
82 | * @param string $key | ||
83 | * The key to delete. | ||
84 | * | ||
85 | * @throws InvalidArgumentException | ||
86 | * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException | ||
87 | * MUST be thrown. | ||
88 | * | ||
89 | * @return bool | ||
90 | * True if the item was successfully removed. False if there was an error. | ||
91 | */ | ||
92 | public function deleteItem(string $key): bool; | ||
93 | |||
94 | /** | ||
95 | * Removes multiple items from the pool. | ||
96 | * | ||
97 | * @param string[] $keys | ||
98 | * An array of keys that should be removed from the pool. | ||
99 | * | ||
100 | * @throws InvalidArgumentException | ||
101 | * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException | ||
102 | * MUST be thrown. | ||
103 | * | ||
104 | * @return bool | ||
105 | * True if the items were successfully removed. False if there was an error. | ||
106 | */ | ||
107 | public function deleteItems(array $keys): bool; | ||
108 | |||
109 | /** | ||
110 | * Persists a cache item immediately. | ||
111 | * | ||
112 | * @param CacheItemInterface $item | ||
113 | * The cache item to save. | ||
114 | * | ||
115 | * @return bool | ||
116 | * True if the item was successfully persisted. False if there was an error. | ||
117 | */ | ||
118 | public function save(CacheItemInterface $item): bool; | ||
119 | |||
120 | /** | ||
121 | * Sets a cache item to be persisted later. | ||
122 | * | ||
123 | * @param CacheItemInterface $item | ||
124 | * The cache item to save. | ||
125 | * | ||
126 | * @return bool | ||
127 | * False if the item could not be queued or if a commit was attempted and failed. True otherwise. | ||
128 | */ | ||
129 | public function saveDeferred(CacheItemInterface $item): bool; | ||
130 | |||
131 | /** | ||
132 | * Persists any deferred cache items. | ||
133 | * | ||
134 | * @return bool | ||
135 | * True if all not-yet-saved items were successfully saved or there were none. False otherwise. | ||
136 | */ | ||
137 | public function commit(): bool; | ||
138 | } | ||
diff --git a/vendor/psr/cache/src/InvalidArgumentException.php b/vendor/psr/cache/src/InvalidArgumentException.php new file mode 100644 index 0000000..be7c6fa --- /dev/null +++ b/vendor/psr/cache/src/InvalidArgumentException.php | |||
@@ -0,0 +1,13 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Psr\Cache; | ||
4 | |||
5 | /** | ||
6 | * Exception interface for invalid cache arguments. | ||
7 | * | ||
8 | * Any time an invalid argument is passed into a method it must throw an | ||
9 | * exception class which implements Psr\Cache\InvalidArgumentException. | ||
10 | */ | ||
11 | interface InvalidArgumentException extends CacheException | ||
12 | { | ||
13 | } | ||
diff --git a/vendor/psr/container/.gitignore b/vendor/psr/container/.gitignore new file mode 100644 index 0000000..b2395aa --- /dev/null +++ b/vendor/psr/container/.gitignore | |||
@@ -0,0 +1,3 @@ | |||
1 | composer.lock | ||
2 | composer.phar | ||
3 | /vendor/ | ||
diff --git a/vendor/psr/container/LICENSE b/vendor/psr/container/LICENSE new file mode 100644 index 0000000..2877a48 --- /dev/null +++ b/vendor/psr/container/LICENSE | |||
@@ -0,0 +1,21 @@ | |||
1 | The MIT License (MIT) | ||
2 | |||
3 | Copyright (c) 2013-2016 container-interop | ||
4 | Copyright (c) 2016 PHP Framework Interoperability Group | ||
5 | |||
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
7 | this software and associated documentation files (the "Software"), to deal in | ||
8 | the Software without restriction, including without limitation the rights to | ||
9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
10 | the Software, and to permit persons to whom the Software is furnished to do so, | ||
11 | subject to the following conditions: | ||
12 | |||
13 | The above copyright notice and this permission notice shall be included in all | ||
14 | copies or substantial portions of the Software. | ||
15 | |||
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
19 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
diff --git a/vendor/psr/container/README.md b/vendor/psr/container/README.md new file mode 100644 index 0000000..1b9d9e5 --- /dev/null +++ b/vendor/psr/container/README.md | |||
@@ -0,0 +1,13 @@ | |||
1 | Container interface | ||
2 | ============== | ||
3 | |||
4 | This repository holds all interfaces related to [PSR-11 (Container Interface)][psr-url]. | ||
5 | |||
6 | Note that this is not a Container implementation of its own. It is merely abstractions that describe the components of a Dependency Injection Container. | ||
7 | |||
8 | The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. | ||
9 | |||
10 | [psr-url]: https://www.php-fig.org/psr/psr-11/ | ||
11 | [package-url]: https://packagist.org/packages/psr/container | ||
12 | [implementation-url]: https://packagist.org/providers/psr/container-implementation | ||
13 | |||
diff --git a/vendor/psr/container/composer.json b/vendor/psr/container/composer.json new file mode 100644 index 0000000..baf6cd1 --- /dev/null +++ b/vendor/psr/container/composer.json | |||
@@ -0,0 +1,27 @@ | |||
1 | { | ||
2 | "name": "psr/container", | ||
3 | "type": "library", | ||
4 | "description": "Common Container Interface (PHP FIG PSR-11)", | ||
5 | "keywords": ["psr", "psr-11", "container", "container-interop", "container-interface"], | ||
6 | "homepage": "https://github.com/php-fig/container", | ||
7 | "license": "MIT", | ||
8 | "authors": [ | ||
9 | { | ||
10 | "name": "PHP-FIG", | ||
11 | "homepage": "https://www.php-fig.org/" | ||
12 | } | ||
13 | ], | ||
14 | "require": { | ||
15 | "php": ">=7.4.0" | ||
16 | }, | ||
17 | "autoload": { | ||
18 | "psr-4": { | ||
19 | "Psr\\Container\\": "src/" | ||
20 | } | ||
21 | }, | ||
22 | "extra": { | ||
23 | "branch-alias": { | ||
24 | "dev-master": "2.0.x-dev" | ||
25 | } | ||
26 | } | ||
27 | } | ||
diff --git a/vendor/psr/container/src/ContainerExceptionInterface.php b/vendor/psr/container/src/ContainerExceptionInterface.php new file mode 100644 index 0000000..0f213f2 --- /dev/null +++ b/vendor/psr/container/src/ContainerExceptionInterface.php | |||
@@ -0,0 +1,12 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Psr\Container; | ||
4 | |||
5 | use Throwable; | ||
6 | |||
7 | /** | ||
8 | * Base interface representing a generic exception in a container. | ||
9 | */ | ||
10 | interface ContainerExceptionInterface extends Throwable | ||
11 | { | ||
12 | } | ||
diff --git a/vendor/psr/container/src/ContainerInterface.php b/vendor/psr/container/src/ContainerInterface.php new file mode 100644 index 0000000..b2cad40 --- /dev/null +++ b/vendor/psr/container/src/ContainerInterface.php | |||
@@ -0,0 +1,36 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Psr\Container; | ||
6 | |||
7 | /** | ||
8 | * Describes the interface of a container that exposes methods to read its entries. | ||
9 | */ | ||
10 | interface ContainerInterface | ||
11 | { | ||
12 | /** | ||
13 | * Finds an entry of the container by its identifier and returns it. | ||
14 | * | ||
15 | * @param string $id Identifier of the entry to look for. | ||
16 | * | ||
17 | * @throws NotFoundExceptionInterface No entry was found for **this** identifier. | ||
18 | * @throws ContainerExceptionInterface Error while retrieving the entry. | ||
19 | * | ||
20 | * @return mixed Entry. | ||
21 | */ | ||
22 | public function get(string $id); | ||
23 | |||
24 | /** | ||
25 | * Returns true if the container can return an entry for the given identifier. | ||
26 | * Returns false otherwise. | ||
27 | * | ||
28 | * `has($id)` returning true does not mean that `get($id)` will not throw an exception. | ||
29 | * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`. | ||
30 | * | ||
31 | * @param string $id Identifier of the entry to look for. | ||
32 | * | ||
33 | * @return bool | ||
34 | */ | ||
35 | public function has(string $id): bool; | ||
36 | } | ||
diff --git a/vendor/psr/container/src/NotFoundExceptionInterface.php b/vendor/psr/container/src/NotFoundExceptionInterface.php new file mode 100644 index 0000000..650bf46 --- /dev/null +++ b/vendor/psr/container/src/NotFoundExceptionInterface.php | |||
@@ -0,0 +1,10 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Psr\Container; | ||
4 | |||
5 | /** | ||
6 | * No entry was found in the container. | ||
7 | */ | ||
8 | interface NotFoundExceptionInterface extends ContainerExceptionInterface | ||
9 | { | ||
10 | } | ||
diff --git a/vendor/psr/log/LICENSE b/vendor/psr/log/LICENSE new file mode 100644 index 0000000..474c952 --- /dev/null +++ b/vendor/psr/log/LICENSE | |||
@@ -0,0 +1,19 @@ | |||
1 | Copyright (c) 2012 PHP Framework Interoperability Group | ||
2 | |||
3 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
4 | of this software and associated documentation files (the "Software"), to deal | ||
5 | in the Software without restriction, including without limitation the rights | ||
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
7 | copies of the Software, and to permit persons to whom the Software is | ||
8 | furnished to do so, subject to the following conditions: | ||
9 | |||
10 | The above copyright notice and this permission notice shall be included in | ||
11 | all copies or substantial portions of the Software. | ||
12 | |||
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
19 | THE SOFTWARE. | ||
diff --git a/vendor/psr/log/README.md b/vendor/psr/log/README.md new file mode 100644 index 0000000..a9f20c4 --- /dev/null +++ b/vendor/psr/log/README.md | |||
@@ -0,0 +1,58 @@ | |||
1 | PSR Log | ||
2 | ======= | ||
3 | |||
4 | This repository holds all interfaces/classes/traits related to | ||
5 | [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md). | ||
6 | |||
7 | Note that this is not a logger of its own. It is merely an interface that | ||
8 | describes a logger. See the specification for more details. | ||
9 | |||
10 | Installation | ||
11 | ------------ | ||
12 | |||
13 | ```bash | ||
14 | composer require psr/log | ||
15 | ``` | ||
16 | |||
17 | Usage | ||
18 | ----- | ||
19 | |||
20 | If you need a logger, you can use the interface like this: | ||
21 | |||
22 | ```php | ||
23 | <?php | ||
24 | |||
25 | use Psr\Log\LoggerInterface; | ||
26 | |||
27 | class Foo | ||
28 | { | ||
29 | private $logger; | ||
30 | |||
31 | public function __construct(LoggerInterface $logger = null) | ||
32 | { | ||
33 | $this->logger = $logger; | ||
34 | } | ||
35 | |||
36 | public function doSomething() | ||
37 | { | ||
38 | if ($this->logger) { | ||
39 | $this->logger->info('Doing work'); | ||
40 | } | ||
41 | |||
42 | try { | ||
43 | $this->doSomethingElse(); | ||
44 | } catch (Exception $exception) { | ||
45 | $this->logger->error('Oh no!', array('exception' => $exception)); | ||
46 | } | ||
47 | |||
48 | // do something useful | ||
49 | } | ||
50 | } | ||
51 | ``` | ||
52 | |||
53 | You can then pick one of the implementations of the interface to get a logger. | ||
54 | |||
55 | If you want to implement the interface, you can require this package and | ||
56 | implement `Psr\Log\LoggerInterface` in your code. Please read the | ||
57 | [specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) | ||
58 | for details. | ||
diff --git a/vendor/psr/log/composer.json b/vendor/psr/log/composer.json new file mode 100644 index 0000000..879fc6f --- /dev/null +++ b/vendor/psr/log/composer.json | |||
@@ -0,0 +1,26 @@ | |||
1 | { | ||
2 | "name": "psr/log", | ||
3 | "description": "Common interface for logging libraries", | ||
4 | "keywords": ["psr", "psr-3", "log"], | ||
5 | "homepage": "https://github.com/php-fig/log", | ||
6 | "license": "MIT", | ||
7 | "authors": [ | ||
8 | { | ||
9 | "name": "PHP-FIG", | ||
10 | "homepage": "https://www.php-fig.org/" | ||
11 | } | ||
12 | ], | ||
13 | "require": { | ||
14 | "php": ">=8.0.0" | ||
15 | }, | ||
16 | "autoload": { | ||
17 | "psr-4": { | ||
18 | "Psr\\Log\\": "src" | ||
19 | } | ||
20 | }, | ||
21 | "extra": { | ||
22 | "branch-alias": { | ||
23 | "dev-master": "3.x-dev" | ||
24 | } | ||
25 | } | ||
26 | } | ||
diff --git a/vendor/psr/log/src/AbstractLogger.php b/vendor/psr/log/src/AbstractLogger.php new file mode 100644 index 0000000..d60a091 --- /dev/null +++ b/vendor/psr/log/src/AbstractLogger.php | |||
@@ -0,0 +1,15 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Psr\Log; | ||
4 | |||
5 | /** | ||
6 | * This is a simple Logger implementation that other Loggers can inherit from. | ||
7 | * | ||
8 | * It simply delegates all log-level-specific methods to the `log` method to | ||
9 | * reduce boilerplate code that a simple Logger that does the same thing with | ||
10 | * messages regardless of the error level has to implement. | ||
11 | */ | ||
12 | abstract class AbstractLogger implements LoggerInterface | ||
13 | { | ||
14 | use LoggerTrait; | ||
15 | } | ||
diff --git a/vendor/psr/log/src/InvalidArgumentException.php b/vendor/psr/log/src/InvalidArgumentException.php new file mode 100644 index 0000000..67f852d --- /dev/null +++ b/vendor/psr/log/src/InvalidArgumentException.php | |||
@@ -0,0 +1,7 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Psr\Log; | ||
4 | |||
5 | class InvalidArgumentException extends \InvalidArgumentException | ||
6 | { | ||
7 | } | ||
diff --git a/vendor/psr/log/src/LogLevel.php b/vendor/psr/log/src/LogLevel.php new file mode 100644 index 0000000..9cebcac --- /dev/null +++ b/vendor/psr/log/src/LogLevel.php | |||
@@ -0,0 +1,18 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Psr\Log; | ||
4 | |||
5 | /** | ||
6 | * Describes log levels. | ||
7 | */ | ||
8 | class LogLevel | ||
9 | { | ||
10 | const EMERGENCY = 'emergency'; | ||
11 | const ALERT = 'alert'; | ||
12 | const CRITICAL = 'critical'; | ||
13 | const ERROR = 'error'; | ||
14 | const WARNING = 'warning'; | ||
15 | const NOTICE = 'notice'; | ||
16 | const INFO = 'info'; | ||
17 | const DEBUG = 'debug'; | ||
18 | } | ||
diff --git a/vendor/psr/log/src/LoggerAwareInterface.php b/vendor/psr/log/src/LoggerAwareInterface.php new file mode 100644 index 0000000..cc46a95 --- /dev/null +++ b/vendor/psr/log/src/LoggerAwareInterface.php | |||
@@ -0,0 +1,18 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Psr\Log; | ||
4 | |||
5 | /** | ||
6 | * Describes a logger-aware instance. | ||
7 | */ | ||
8 | interface LoggerAwareInterface | ||
9 | { | ||
10 | /** | ||
11 | * Sets a logger instance on the object. | ||
12 | * | ||
13 | * @param LoggerInterface $logger | ||
14 | * | ||
15 | * @return void | ||
16 | */ | ||
17 | public function setLogger(LoggerInterface $logger): void; | ||
18 | } | ||
diff --git a/vendor/psr/log/src/LoggerAwareTrait.php b/vendor/psr/log/src/LoggerAwareTrait.php new file mode 100644 index 0000000..4fb57a2 --- /dev/null +++ b/vendor/psr/log/src/LoggerAwareTrait.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Psr\Log; | ||
4 | |||
5 | /** | ||
6 | * Basic Implementation of LoggerAwareInterface. | ||
7 | */ | ||
8 | trait LoggerAwareTrait | ||
9 | { | ||
10 | /** | ||
11 | * The logger instance. | ||
12 | * | ||
13 | * @var LoggerInterface|null | ||
14 | */ | ||
15 | protected ?LoggerInterface $logger = null; | ||
16 | |||
17 | /** | ||
18 | * Sets a logger. | ||
19 | * | ||
20 | * @param LoggerInterface $logger | ||
21 | */ | ||
22 | public function setLogger(LoggerInterface $logger): void | ||
23 | { | ||
24 | $this->logger = $logger; | ||
25 | } | ||
26 | } | ||
diff --git a/vendor/psr/log/src/LoggerInterface.php b/vendor/psr/log/src/LoggerInterface.php new file mode 100644 index 0000000..b3a24b5 --- /dev/null +++ b/vendor/psr/log/src/LoggerInterface.php | |||
@@ -0,0 +1,125 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Psr\Log; | ||
4 | |||
5 | /** | ||
6 | * Describes a logger instance. | ||
7 | * | ||
8 | * The message MUST be a string or object implementing __toString(). | ||
9 | * | ||
10 | * The message MAY contain placeholders in the form: {foo} where foo | ||
11 | * will be replaced by the context data in key "foo". | ||
12 | * | ||
13 | * The context array can contain arbitrary data. The only assumption that | ||
14 | * can be made by implementors is that if an Exception instance is given | ||
15 | * to produce a stack trace, it MUST be in a key named "exception". | ||
16 | * | ||
17 | * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md | ||
18 | * for the full interface specification. | ||
19 | */ | ||
20 | interface LoggerInterface | ||
21 | { | ||
22 | /** | ||
23 | * System is unusable. | ||
24 | * | ||
25 | * @param string|\Stringable $message | ||
26 | * @param mixed[] $context | ||
27 | * | ||
28 | * @return void | ||
29 | */ | ||
30 | public function emergency(string|\Stringable $message, array $context = []): void; | ||
31 | |||
32 | /** | ||
33 | * Action must be taken immediately. | ||
34 | * | ||
35 | * Example: Entire website down, database unavailable, etc. This should | ||
36 | * trigger the SMS alerts and wake you up. | ||
37 | * | ||
38 | * @param string|\Stringable $message | ||
39 | * @param mixed[] $context | ||
40 | * | ||
41 | * @return void | ||
42 | */ | ||
43 | public function alert(string|\Stringable $message, array $context = []): void; | ||
44 | |||
45 | /** | ||
46 | * Critical conditions. | ||
47 | * | ||
48 | * Example: Application component unavailable, unexpected exception. | ||
49 | * | ||
50 | * @param string|\Stringable $message | ||
51 | * @param mixed[] $context | ||
52 | * | ||
53 | * @return void | ||
54 | */ | ||
55 | public function critical(string|\Stringable $message, array $context = []): void; | ||
56 | |||
57 | /** | ||
58 | * Runtime errors that do not require immediate action but should typically | ||
59 | * be logged and monitored. | ||
60 | * | ||
61 | * @param string|\Stringable $message | ||
62 | * @param mixed[] $context | ||
63 | * | ||
64 | * @return void | ||
65 | */ | ||
66 | public function error(string|\Stringable $message, array $context = []): void; | ||
67 | |||
68 | /** | ||
69 | * Exceptional occurrences that are not errors. | ||
70 | * | ||
71 | * Example: Use of deprecated APIs, poor use of an API, undesirable things | ||
72 | * that are not necessarily wrong. | ||
73 | * | ||
74 | * @param string|\Stringable $message | ||
75 | * @param mixed[] $context | ||
76 | * | ||
77 | * @return void | ||
78 | */ | ||
79 | public function warning(string|\Stringable $message, array $context = []): void; | ||
80 | |||
81 | /** | ||
82 | * Normal but significant events. | ||
83 | * | ||
84 | * @param string|\Stringable $message | ||
85 | * @param mixed[] $context | ||
86 | * | ||
87 | * @return void | ||
88 | */ | ||
89 | public function notice(string|\Stringable $message, array $context = []): void; | ||
90 | |||
91 | /** | ||
92 | * Interesting events. | ||
93 | * | ||
94 | * Example: User logs in, SQL logs. | ||
95 | * | ||
96 | * @param string|\Stringable $message | ||
97 | * @param mixed[] $context | ||
98 | * | ||
99 | * @return void | ||
100 | */ | ||
101 | public function info(string|\Stringable $message, array $context = []): void; | ||
102 | |||
103 | /** | ||
104 | * Detailed debug information. | ||
105 | * | ||
106 | * @param string|\Stringable $message | ||
107 | * @param mixed[] $context | ||
108 | * | ||
109 | * @return void | ||
110 | */ | ||
111 | public function debug(string|\Stringable $message, array $context = []): void; | ||
112 | |||
113 | /** | ||
114 | * Logs with an arbitrary level. | ||
115 | * | ||
116 | * @param mixed $level | ||
117 | * @param string|\Stringable $message | ||
118 | * @param mixed[] $context | ||
119 | * | ||
120 | * @return void | ||
121 | * | ||
122 | * @throws \Psr\Log\InvalidArgumentException | ||
123 | */ | ||
124 | public function log($level, string|\Stringable $message, array $context = []): void; | ||
125 | } | ||
diff --git a/vendor/psr/log/src/LoggerTrait.php b/vendor/psr/log/src/LoggerTrait.php new file mode 100644 index 0000000..9c8733f --- /dev/null +++ b/vendor/psr/log/src/LoggerTrait.php | |||
@@ -0,0 +1,142 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Psr\Log; | ||
4 | |||
5 | /** | ||
6 | * This is a simple Logger trait that classes unable to extend AbstractLogger | ||
7 | * (because they extend another class, etc) can include. | ||
8 | * | ||
9 | * It simply delegates all log-level-specific methods to the `log` method to | ||
10 | * reduce boilerplate code that a simple Logger that does the same thing with | ||
11 | * messages regardless of the error level has to implement. | ||
12 | */ | ||
13 | trait LoggerTrait | ||
14 | { | ||
15 | /** | ||
16 | * System is unusable. | ||
17 | * | ||
18 | * @param string|\Stringable $message | ||
19 | * @param array $context | ||
20 | * | ||
21 | * @return void | ||
22 | */ | ||
23 | public function emergency(string|\Stringable $message, array $context = []): void | ||
24 | { | ||
25 | $this->log(LogLevel::EMERGENCY, $message, $context); | ||
26 | } | ||
27 | |||
28 | /** | ||
29 | * Action must be taken immediately. | ||
30 | * | ||
31 | * Example: Entire website down, database unavailable, etc. This should | ||
32 | * trigger the SMS alerts and wake you up. | ||
33 | * | ||
34 | * @param string|\Stringable $message | ||
35 | * @param array $context | ||
36 | * | ||
37 | * @return void | ||
38 | */ | ||
39 | public function alert(string|\Stringable $message, array $context = []): void | ||
40 | { | ||
41 | $this->log(LogLevel::ALERT, $message, $context); | ||
42 | } | ||
43 | |||
44 | /** | ||
45 | * Critical conditions. | ||
46 | * | ||
47 | * Example: Application component unavailable, unexpected exception. | ||
48 | * | ||
49 | * @param string|\Stringable $message | ||
50 | * @param array $context | ||
51 | * | ||
52 | * @return void | ||
53 | */ | ||
54 | public function critical(string|\Stringable $message, array $context = []): void | ||
55 | { | ||
56 | $this->log(LogLevel::CRITICAL, $message, $context); | ||
57 | } | ||
58 | |||
59 | /** | ||
60 | * Runtime errors that do not require immediate action but should typically | ||
61 | * be logged and monitored. | ||
62 | * | ||
63 | * @param string|\Stringable $message | ||
64 | * @param array $context | ||
65 | * | ||
66 | * @return void | ||
67 | */ | ||
68 | public function error(string|\Stringable $message, array $context = []): void | ||
69 | { | ||
70 | $this->log(LogLevel::ERROR, $message, $context); | ||
71 | } | ||
72 | |||
73 | /** | ||
74 | * Exceptional occurrences that are not errors. | ||
75 | * | ||
76 | * Example: Use of deprecated APIs, poor use of an API, undesirable things | ||
77 | * that are not necessarily wrong. | ||
78 | * | ||
79 | * @param string|\Stringable $message | ||
80 | * @param array $context | ||
81 | * | ||
82 | * @return void | ||
83 | */ | ||
84 | public function warning(string|\Stringable $message, array $context = []): void | ||
85 | { | ||
86 | $this->log(LogLevel::WARNING, $message, $context); | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * Normal but significant events. | ||
91 | * | ||
92 | * @param string|\Stringable $message | ||
93 | * @param array $context | ||
94 | * | ||
95 | * @return void | ||
96 | */ | ||
97 | public function notice(string|\Stringable $message, array $context = []): void | ||
98 | { | ||
99 | $this->log(LogLevel::NOTICE, $message, $context); | ||
100 | } | ||
101 | |||
102 | /** | ||
103 | * Interesting events. | ||
104 | * | ||
105 | * Example: User logs in, SQL logs. | ||
106 | * | ||
107 | * @param string|\Stringable $message | ||
108 | * @param array $context | ||
109 | * | ||
110 | * @return void | ||
111 | */ | ||
112 | public function info(string|\Stringable $message, array $context = []): void | ||
113 | { | ||
114 | $this->log(LogLevel::INFO, $message, $context); | ||
115 | } | ||
116 | |||
117 | /** | ||
118 | * Detailed debug information. | ||
119 | * | ||
120 | * @param string|\Stringable $message | ||
121 | * @param array $context | ||
122 | * | ||
123 | * @return void | ||
124 | */ | ||
125 | public function debug(string|\Stringable $message, array $context = []): void | ||
126 | { | ||
127 | $this->log(LogLevel::DEBUG, $message, $context); | ||
128 | } | ||
129 | |||
130 | /** | ||
131 | * Logs with an arbitrary level. | ||
132 | * | ||
133 | * @param mixed $level | ||
134 | * @param string|\Stringable $message | ||
135 | * @param array $context | ||
136 | * | ||
137 | * @return void | ||
138 | * | ||
139 | * @throws \Psr\Log\InvalidArgumentException | ||
140 | */ | ||
141 | abstract public function log($level, string|\Stringable $message, array $context = []): void; | ||
142 | } | ||
diff --git a/vendor/psr/log/src/NullLogger.php b/vendor/psr/log/src/NullLogger.php new file mode 100644 index 0000000..c1cc3c0 --- /dev/null +++ b/vendor/psr/log/src/NullLogger.php | |||
@@ -0,0 +1,30 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Psr\Log; | ||
4 | |||
5 | /** | ||
6 | * This Logger can be used to avoid conditional log calls. | ||
7 | * | ||
8 | * Logging should always be optional, and if no logger is provided to your | ||
9 | * library creating a NullLogger instance to have something to throw logs at | ||
10 | * is a good way to avoid littering your code with `if ($this->logger) { }` | ||
11 | * blocks. | ||
12 | */ | ||
13 | class NullLogger extends AbstractLogger | ||
14 | { | ||
15 | /** | ||
16 | * Logs with an arbitrary level. | ||
17 | * | ||
18 | * @param mixed $level | ||
19 | * @param string|\Stringable $message | ||
20 | * @param array $context | ||
21 | * | ||
22 | * @return void | ||
23 | * | ||
24 | * @throws \Psr\Log\InvalidArgumentException | ||
25 | */ | ||
26 | public function log($level, string|\Stringable $message, array $context = []): void | ||
27 | { | ||
28 | // noop | ||
29 | } | ||
30 | } | ||