17 | *
18 | * @internal
19 | */
20 | final class Php73
21 | {
22 | public static $startAt = 1533462603;
23 |
24 | /**
25 | * @param bool $asNum
26 | *
27 | * @return array|float|int
28 | */
29 | public static function hrtime($asNum = false)
30 | {
31 | $ns = microtime(false);
32 | $s = substr($ns, 11) - self::$startAt;
33 | $ns = 1E9 * (float) $ns;
34 |
35 | if ($asNum) {
36 | $ns += $s * 1E9;
37 |
38 | return \PHP_INT_SIZE === 4 ? $ns : (int) $ns;
39 | }
40 |
41 | return [$s, (int) $ns];
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/symfony/process/README.md:
--------------------------------------------------------------------------------
1 | Process Component
2 | =================
3 |
4 | The Process component executes commands in sub-processes.
5 |
6 | Sponsor
7 | -------
8 |
9 | The Process component for Symfony 5.4/6.0 is [backed][1] by [SensioLabs][2].
10 |
11 | As the creator of Symfony, SensioLabs supports companies using Symfony, with an
12 | offering encompassing consultancy, expertise, services, training, and technical
13 | assistance to ensure the success of web application development projects.
14 |
15 | Help Symfony by [sponsoring][3] its development!
16 |
17 | Resources
18 | ---------
19 |
20 | * [Documentation](https://symfony.com/doc/current/components/process.html)
21 | * [Contributing](https://symfony.com/doc/current/contributing/index.html)
22 | * [Report issues](https://github.com/symfony/symfony/issues) and
23 | [send Pull Requests](https://github.com/symfony/symfony/pulls)
24 | in the [main Symfony repository](https://github.com/symfony/symfony)
25 |
26 | [1]: https://symfony.com/backers
27 | [2]: https://sensiolabs.com
28 | [3]: https://symfony.com/sponsor
29 |
--------------------------------------------------------------------------------
/vendor/ps/image-optimizer/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014 Piotr Śliwa
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 furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | 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.
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Friends Of REDAXO
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-php80/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2020 Fabien Potencier
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 furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | 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.
20 |
--------------------------------------------------------------------------------
/vendor/symfony/process/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2004-2022 Fabien Potencier
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 furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | 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.
20 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-php73/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2018-2019 Fabien Potencier
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 furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | 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.
20 |
--------------------------------------------------------------------------------
/vendor/composer/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Copyright (c) Nils Adermann, Jordi Boggiano
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is furnished
9 | to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all
12 | copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 |
22 |
--------------------------------------------------------------------------------
/vendor/psr/log/LICENSE:
--------------------------------------------------------------------------------
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.
20 |
--------------------------------------------------------------------------------
/vendor/symfony/deprecation-contracts/function.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | if (!function_exists('trigger_deprecation')) {
13 | /**
14 | * Triggers a silenced deprecation notice.
15 | *
16 | * @param string $package The name of the Composer package that is triggering the deprecation
17 | * @param string $version The version of the package that introduced the deprecation
18 | * @param string $message The message of the deprecation
19 | * @param mixed ...$args Values to insert in the message using printf() formatting
20 | *
21 | * @author Nicolas Grekas
22 | */
23 | function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void
24 | {
25 | @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/symfony/options-resolver/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2004-2022 Fabien Potencier
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 furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | 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.
20 |
--------------------------------------------------------------------------------
/vendor/symfony/deprecation-contracts/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2020-2022 Fabien Potencier
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 furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | 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.
20 |
--------------------------------------------------------------------------------
/vendor/tinify/tinify/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License
2 |
3 | Copyright (c) 2013-2018 Tinify
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-php73/bootstrap.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | use Symfony\Polyfill\Php73 as p;
13 |
14 | if (\PHP_VERSION_ID >= 70300) {
15 | return;
16 | }
17 |
18 | if (!function_exists('is_countable')) {
19 | function is_countable($value) { return is_array($value) || $value instanceof Countable || $value instanceof ResourceBundle || $value instanceof SimpleXmlElement; }
20 | }
21 | if (!function_exists('hrtime')) {
22 | require_once __DIR__.'/Php73.php';
23 | p\Php73::$startAt = (int) microtime(true);
24 | function hrtime($as_number = false) { return p\Php73::hrtime($as_number); }
25 | }
26 | if (!function_exists('array_key_first')) {
27 | function array_key_first(array $array) { foreach ($array as $key => $value) { return $key; } }
28 | }
29 | if (!function_exists('array_key_last')) {
30 | function array_key_last(array $array) { return key(array_slice($array, -1, 1, true)); }
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-php73/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "symfony/polyfill-php73",
3 | "type": "library",
4 | "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
5 | "keywords": ["polyfill", "shim", "compatibility", "portable"],
6 | "homepage": "https://symfony.com",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Nicolas Grekas",
11 | "email": "p@tchwork.com"
12 | },
13 | {
14 | "name": "Symfony Community",
15 | "homepage": "https://symfony.com/contributors"
16 | }
17 | ],
18 | "require": {
19 | "php": ">=7.1"
20 | },
21 | "autoload": {
22 | "psr-4": { "Symfony\\Polyfill\\Php73\\": "" },
23 | "files": [ "bootstrap.php" ],
24 | "classmap": [ "Resources/stubs" ]
25 | },
26 | "minimum-stability": "dev",
27 | "extra": {
28 | "branch-alias": {
29 | "dev-main": "1.23-dev"
30 | },
31 | "thanks": {
32 | "name": "symfony/polyfill",
33 | "url": "https://github.com/symfony/polyfill"
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/symfony/process/Exception/ProcessSignaledException.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Process\Exception;
13 |
14 | use Symfony\Component\Process\Process;
15 |
16 | /**
17 | * Exception that is thrown when a process has been signaled.
18 | *
19 | * @author Sullivan Senechal
20 | */
21 | final class ProcessSignaledException extends RuntimeException
22 | {
23 | private $process;
24 |
25 | public function __construct(Process $process)
26 | {
27 | $this->process = $process;
28 |
29 | parent::__construct(sprintf('The process has been signaled with signal "%s".', $process->getTermSignal()));
30 | }
31 |
32 | public function getProcess(): Process
33 | {
34 | return $this->process;
35 | }
36 |
37 | public function getSignal(): int
38 | {
39 | return $this->getProcess()->getTermSignal();
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-php80/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "symfony/polyfill-php80",
3 | "type": "library",
4 | "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
5 | "keywords": ["polyfill", "shim", "compatibility", "portable"],
6 | "homepage": "https://symfony.com",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Ion Bazan",
11 | "email": "ion.bazan@gmail.com"
12 | },
13 | {
14 | "name": "Nicolas Grekas",
15 | "email": "p@tchwork.com"
16 | },
17 | {
18 | "name": "Symfony Community",
19 | "homepage": "https://symfony.com/contributors"
20 | }
21 | ],
22 | "require": {
23 | "php": ">=7.1"
24 | },
25 | "autoload": {
26 | "psr-4": { "Symfony\\Polyfill\\Php80\\": "" },
27 | "files": [ "bootstrap.php" ],
28 | "classmap": [ "Resources/stubs" ]
29 | },
30 | "minimum-stability": "dev",
31 | "extra": {
32 | "branch-alias": {
33 | "dev-main": "1.23-dev"
34 | },
35 | "thanks": {
36 | "name": "symfony/polyfill",
37 | "url": "https://github.com/symfony/polyfill"
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/tinify/tinify/lib/Tinify/Exception.php:
--------------------------------------------------------------------------------
1 | = 400 && $status <= 499) {
12 | $klass = "Tinify\ClientException";
13 | } else if($status >= 500 && $status <= 599) {
14 | $klass = "Tinify\ServerException";
15 | } else {
16 | $klass = "Tinify\Exception";
17 | }
18 |
19 | if (empty($message)) $message = "No message was provided";
20 | return new $klass($message, $type, $status);
21 | }
22 |
23 | function __construct($message, $type = NULL, $status = NULL) {
24 | $this->status = $status;
25 | if ($status) {
26 | parent::__construct($message . " (HTTP " . $status . "/" . $type . ")");
27 | } else {
28 | parent::__construct($message);
29 | }
30 | }
31 | }
32 |
33 | class AccountException extends Exception {}
34 | class ClientException extends Exception {}
35 | class ServerException extends Exception {}
36 | class ConnectionException extends Exception {}
37 |
--------------------------------------------------------------------------------
/vendor/symfony/deprecation-contracts/README.md:
--------------------------------------------------------------------------------
1 | Symfony Deprecation Contracts
2 | =============================
3 |
4 | A generic function and convention to trigger deprecation notices.
5 |
6 | This package provides a single global function named `trigger_deprecation()` that triggers silenced deprecation notices.
7 |
8 | By using a custom PHP error handler such as the one provided by the Symfony ErrorHandler component,
9 | the triggered deprecations can be caught and logged for later discovery, both on dev and prod environments.
10 |
11 | The function requires at least 3 arguments:
12 | - the name of the Composer package that is triggering the deprecation
13 | - the version of the package that introduced the deprecation
14 | - the message of the deprecation
15 | - more arguments can be provided: they will be inserted in the message using `printf()` formatting
16 |
17 | Example:
18 | ```php
19 | trigger_deprecation('symfony/blockchain', '8.9', 'Using "%s" is deprecated, use "%s" instead.', 'bitcoin', 'fabcoin');
20 | ```
21 |
22 | This will generate the following message:
23 | `Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.`
24 |
25 | While not necessarily recommended, the deprecation notices can be completely ignored by declaring an empty
26 | `function trigger_deprecation() {}` in your application.
27 |
--------------------------------------------------------------------------------
/vendor/ps/image-optimizer/src/ImageOptimizer/ChainOptimizer.php:
--------------------------------------------------------------------------------
1 | optimizers = $optimizers;
21 | $this->executeFirst = $executeFirst;
22 | $this->logger = $logger;
23 | }
24 |
25 | public function optimize(string $filepath): void
26 | {
27 | $exceptions = [];
28 | foreach($this->optimizers as $optimizer) {
29 | try {
30 | $optimizer->optimize($filepath);
31 |
32 | if($this->executeFirst) break;
33 | } catch (Exception $e) {
34 | $this->logger->error('Error during image optimization. See exception for more details.', [ 'exception' => $e ]);
35 | $exceptions[] = $e;
36 | }
37 | }
38 |
39 | if(count($exceptions) === count($this->optimizers)) {
40 | throw new Exception(sprintf('All optimizers failed to optimize the file: %s', $filepath));
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/vendor/tinify/tinify/README.md:
--------------------------------------------------------------------------------
1 | [
](https://travis-ci.org/tinify/tinify-php)
2 |
3 | # Tinify API client for PHP
4 |
5 | PHP client for the Tinify API, used for [TinyPNG](https://tinypng.com) and [TinyJPG](https://tinyjpg.com). Tinify compresses your images intelligently. Read more at [http://tinify.com](http://tinify.com).
6 |
7 | ## Documentation
8 |
9 | [Go to the documentation for the PHP client](https://tinypng.com/developers/reference/php).
10 |
11 | ## Installation
12 |
13 | Install the API client with Composer. Add this to your `composer.json`:
14 |
15 | ```json
16 | {
17 | "require": {
18 | "tinify/tinify": "*"
19 | }
20 | }
21 | ```
22 |
23 | Then install with:
24 |
25 | ```
26 | composer install
27 | ```
28 |
29 | Use autoloading to make the client available in PHP:
30 |
31 | ```php
32 | require_once("vendor/autoload.php");
33 | ```
34 |
35 | ## Usage
36 |
37 | ```php
38 | Tinify\setKey("YOUR_API_KEY");
39 | Tinify\fromFile("unoptimized.png")->toFile("optimized.png");
40 | ```
41 |
42 | ## Running tests
43 |
44 | ```
45 | composer install
46 | vendor/bin/phpunit
47 | ```
48 |
49 | ### Integration tests
50 |
51 | ```
52 | composer install
53 | TINIFY_KEY=$YOUR_API_KEY vendor/bin/phpunit --no-configuration test/integration.php
54 | ```
55 |
56 | ## License
57 |
58 | This software is licensed under the MIT License. [View the license](LICENSE).
59 |
--------------------------------------------------------------------------------
/vendor/tinify/tinify/test/TinifyResultTest.php:
--------------------------------------------------------------------------------
1 | "100"), "image data");
8 | $this->assertSame(100, $result->width());
9 | }
10 |
11 | public function testWithMetaAndDataHeightShouldReturnImageHeight() {
12 | $result = new Tinify\Result(array("image-height" => "60"), "image data");
13 | $this->assertSame(60, $result->height());
14 | }
15 |
16 | public function testWithMetaAndDataLocationShouldReturnNull() {
17 | $result = new Tinify\ResultMeta(array(), "image data");
18 | $this->assertSame(null, $result->location());
19 | }
20 |
21 | public function testWithMetaAndDataSizeShouldReturnContentLength() {
22 | $result = new Tinify\Result(array("content-length" => "450"), "image data");
23 | $this->assertSame(450, $result->size());
24 | }
25 |
26 | public function testWithMetaAndDataContentTypeShouldReturnMimeType() {
27 | $result = new Tinify\Result(array("content-type" => "image/png"), "image data");
28 | $this->assertSame("image/png", $result->contentType());
29 | }
30 |
31 | public function testWithMetaAndDataToBufferShouldReturnImageData() {
32 | $result = new Tinify\Result(array(), "image data");
33 | $this->assertSame("image data", $result->toBuffer());
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/ps/image-optimizer/src/ImageOptimizer/ChangedOutputOptimizer.php:
--------------------------------------------------------------------------------
1 | outputPattern = $outputPattern;
14 | $this->optimizer = $optimizer;
15 | }
16 |
17 | public function optimize(string $filepath): void
18 | {
19 | $fileInfo = pathinfo($filepath);
20 | $outputFilepath = str_replace(
21 | ['%basename%', '%filename%', '%ext%'],
22 | [$fileInfo['dirname'], $fileInfo['filename'], isset($fileInfo['extension']) ? '.'.$fileInfo['extension'] : ''],
23 | $this->outputPattern
24 | );
25 |
26 | $outputChanaged = $outputFilepath !== $filepath;
27 |
28 | if ($outputChanaged) {
29 | copy($filepath, $outputFilepath);
30 | $filepath = $outputFilepath;
31 | }
32 |
33 | try {
34 | $this->optimizer->optimize($filepath);
35 | } catch (\Throwable $exception) {
36 | if ($outputChanaged) {
37 | unlink($filepath);
38 | }
39 |
40 | throw $exception;
41 | }
42 | }
43 |
44 | public function unwrap(): Optimizer
45 | {
46 | return $this->optimizer instanceof WrapperOptimizer ? $this->optimizer->unwrap() : $this->optimizer;
47 | }
48 | }
--------------------------------------------------------------------------------
/vendor/psr/log/README.md:
--------------------------------------------------------------------------------
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 | 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.
59 |
--------------------------------------------------------------------------------
/vendor/symfony/process/Exception/ProcessFailedException.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Process\Exception;
13 |
14 | use Symfony\Component\Process\Process;
15 |
16 | /**
17 | * Exception for failed processes.
18 | *
19 | * @author Johannes M. Schmitt
20 | */
21 | class ProcessFailedException extends RuntimeException
22 | {
23 | private $process;
24 |
25 | public function __construct(Process $process)
26 | {
27 | if ($process->isSuccessful()) {
28 | throw new InvalidArgumentException('Expected a failed process, but the given process was successful.');
29 | }
30 |
31 | $error = sprintf('The command "%s" failed.'."\n\nExit Code: %s(%s)\n\nWorking directory: %s",
32 | $process->getCommandLine(),
33 | $process->getExitCode(),
34 | $process->getExitCodeText(),
35 | $process->getWorkingDirectory()
36 | );
37 |
38 | if (!$process->isOutputDisabled()) {
39 | $error .= sprintf("\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s",
40 | $process->getOutput(),
41 | $process->getErrorOutput()
42 | );
43 | }
44 |
45 | parent::__construct($error);
46 |
47 | $this->process = $process;
48 | }
49 |
50 | public function getProcess()
51 | {
52 | return $this->process;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-php80/bootstrap.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | use Symfony\Polyfill\Php80 as p;
13 |
14 | if (\PHP_VERSION_ID >= 80000) {
15 | return;
16 | }
17 |
18 | if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) {
19 | define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN);
20 | }
21 |
22 | if (!function_exists('fdiv')) {
23 | function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); }
24 | }
25 | if (!function_exists('preg_last_error_msg')) {
26 | function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); }
27 | }
28 | if (!function_exists('str_contains')) {
29 | function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); }
30 | }
31 | if (!function_exists('str_starts_with')) {
32 | function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); }
33 | }
34 | if (!function_exists('str_ends_with')) {
35 | function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); }
36 | }
37 | if (!function_exists('get_debug_type')) {
38 | function get_debug_type($value): string { return p\Php80::get_debug_type($value); }
39 | }
40 | if (!function_exists('get_resource_id')) {
41 | function get_resource_id($resource): int { return p\Php80::get_resource_id($resource); }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/symfony/process/Pipes/PipesInterface.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Process\Pipes;
13 |
14 | /**
15 | * PipesInterface manages descriptors and pipes for the use of proc_open.
16 | *
17 | * @author Romain Neutron
18 | *
19 | * @internal
20 | */
21 | interface PipesInterface
22 | {
23 | public const CHUNK_SIZE = 16384;
24 |
25 | /**
26 | * Returns an array of descriptors for the use of proc_open.
27 | */
28 | public function getDescriptors(): array;
29 |
30 | /**
31 | * Returns an array of filenames indexed by their related stream in case these pipes use temporary files.
32 | *
33 | * @return string[]
34 | */
35 | public function getFiles(): array;
36 |
37 | /**
38 | * Reads data in file handles and pipes.
39 | *
40 | * @param bool $blocking Whether to use blocking calls or not
41 | * @param bool $close Whether to close pipes if they've reached EOF
42 | *
43 | * @return string[] An array of read data indexed by their fd
44 | */
45 | public function readAndWrite(bool $blocking, bool $close = false): array;
46 |
47 | /**
48 | * Returns if the current state has open file handles or pipes.
49 | */
50 | public function areOpen(): bool;
51 |
52 | /**
53 | * Returns if pipes are able to read output.
54 | */
55 | public function haveReadSupport(): bool;
56 |
57 | /**
58 | * Closes file handles and pipes.
59 | */
60 | public function close();
61 | }
62 |
--------------------------------------------------------------------------------
/vendor/tinify/tinify/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 | php:
3 | - 5.4
4 | - 5.5
5 | - 5.6
6 | - 7.0
7 | - 7.1
8 | - 7.2
9 | - nightly
10 | env:
11 | global:
12 | secure: BFdcLqU/07l3/NGaSZA5+VSB5FSVSwTL9wAyrJSD1N7jN2HzFTE4xxxmcVrAqq6t+jhZqajXcSf8/DTUKyLcmWXGw3JkseHx3ofHw5p2E4Mp+dUvNMh+3KgAABCPm5zEBUgnhNGwFqL+WA/cgXIJY1/sv87u/mg63ojvf3orKJ3KMxFFsVbGo553XYVsiSUXfzvV3foqPdcV9D0SZ0v7IiLcsuwtDRtfJ/udgSZ2C2LFiOek1dLwbjM3inMBPkfLcpuvC2l8Z1CyW5ptxYRrHHJqCMbdRmmwGH04hxRju54EJKX5PGTyDhfG9Kyiu8/hQCtDL4jNQlVNAKbvHrRTnLogoMKhHMRaAIDMNI+lcQB9OHHuureYAqL7gJvRmE2sfN/OAbzizYJ2z+yXvjaKJsd2htrHff8hgvl0M3guhP+mA5C9ubibzGiCD66kdeqS5tJi3EH7wk9GO75lFm3tlZEWZ4FJCwgyFQRZGMGSRJC5cWvW4QlGLHeVnWwnf9CM9/B2oD21LraccgCZhpIbib5/XJ2vTQO0V2ke3kXT1D9E3P8E2eClxnge1aShUSy+d5kMTNeLxkfalgGEviWqA236XLzS8+MjWzNWy3+roBb63Vh0OPp4GyTO810U16Y5lwCMegVrxusnz9bCo1HbK1w2k8D7Ueb/O7LEFYaZSD4=
13 | matrix:
14 | allow_failures:
15 | - php: nightly
16 | include:
17 | - dist: precise
18 | php: 5.3
19 | - dist: trusty
20 | php: hhvm
21 | - dist: trusty
22 | php: 5.6
23 | env: INTEGRATION_TESTS=true
24 | script: "if [ \"$TRAVIS_PULL_REQUEST\" == \"false\" ]; then vendor/bin/phpunit --no-configuration test/integration.php; fi"
25 | before_script: composer install
26 | script: vendor/bin/phpunit
27 | notifications:
28 | email: false
29 | slack:
30 | secure: W1cEp+ctAD+in3hA/gansbUYrFZsR3EMd7s/XiK2mfAxRRXPCPgCvv0PWpYelJ5F2AnHXkmBP3USKFDhKN+JLmOOxrZpjzh4ve9QSNs4IPgcrU4meQYSgJ3uovS7h4fqAmqhQKL+FpAnrXAmXWGXVPCPtneySsMTyU6kNdmVfulxXRMJ+kLHtFQlT+U7cPYG0f8FkKR2u5CbRsdjUvoZHwbK7jmWpUcCi2O0A1vvMMEMEOG+iuayWW/RbfSfKIgM/SZG0pGYpoAB7I8XfYns7IyLhkJAw18jIWnowF4DuBusNRdr3zIfwC7bSlLKMFYJYpEsiLFCaeGZgp1NbYJ77DvqpwNp9xmoPz9rFGNe7Re+i13pjNWhEnwc5N3St7x8DYNhUC3L0upQ2FWZSomMM7ghlc6GIVtlXYrRJ5AnxIjSWyLRcTRU5Pf/PPRckOTiuLnVgUZNMVIlAHlRV7c/pUVDjbPvjcOajdXnpcd3+5cuKyzCYpXugIfJ9Hzsozq0yCHDKjo8ssAU+5H3mEfB7M25Rtd2awObb3zqOyUPm+J3M/dzql95cF+zj2SWQsBF/ViwkHo+9SoAr/FYqCZveiS0w9vzoKzbGXVDYCfFD+GlEMJ2b8zw4d2sqmIbw24jGq1ZPgczrpD5fcbI2TaheKBkgWvsBJFFO5KbGWqzHIM=
31 |
--------------------------------------------------------------------------------
/vendor/symfony/process/Exception/ProcessTimedOutException.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Process\Exception;
13 |
14 | use Symfony\Component\Process\Process;
15 |
16 | /**
17 | * Exception that is thrown when a process times out.
18 | *
19 | * @author Johannes M. Schmitt
20 | */
21 | class ProcessTimedOutException extends RuntimeException
22 | {
23 | public const TYPE_GENERAL = 1;
24 | public const TYPE_IDLE = 2;
25 |
26 | private $process;
27 | private $timeoutType;
28 |
29 | public function __construct(Process $process, int $timeoutType)
30 | {
31 | $this->process = $process;
32 | $this->timeoutType = $timeoutType;
33 |
34 | parent::__construct(sprintf(
35 | 'The process "%s" exceeded the timeout of %s seconds.',
36 | $process->getCommandLine(),
37 | $this->getExceededTimeout()
38 | ));
39 | }
40 |
41 | public function getProcess()
42 | {
43 | return $this->process;
44 | }
45 |
46 | public function isGeneralTimeout()
47 | {
48 | return self::TYPE_GENERAL === $this->timeoutType;
49 | }
50 |
51 | public function isIdleTimeout()
52 | {
53 | return self::TYPE_IDLE === $this->timeoutType;
54 | }
55 |
56 | public function getExceededTimeout()
57 | {
58 | switch ($this->timeoutType) {
59 | case self::TYPE_GENERAL:
60 | return $this->process->getTimeout();
61 |
62 | case self::TYPE_IDLE:
63 | return $this->process->getIdleTimeout();
64 |
65 | default:
66 | throw new \LogicException(sprintf('Unknown timeout type "%d".', $this->timeoutType));
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/vendor/ps/image-optimizer/src/ImageOptimizer/Command.php:
--------------------------------------------------------------------------------
1 | cmd = $bin;
29 | $this->args = $args;
30 | $this->timeout = $timeout;
31 | }
32 |
33 | public function execute(array $customArgs = []): void
34 | {
35 | $process = new Process(array_merge([$this->cmd], $this->args, $customArgs));
36 | $process->setTimeout($this->timeout);
37 |
38 | try {
39 | $exitCode = $process->run();
40 | $commandLine = $process->getCommandLine();
41 | $output = $process->getOutput().PHP_EOL.$process->getErrorOutput();
42 |
43 | if($exitCode == 127) {
44 | throw new CommandNotFound(sprintf('Command "%s" not found.', $this->cmd));
45 | }
46 |
47 | if($exitCode !== 0 || stripos($output, 'error') !== false || stripos($output, 'permission') !== false) {
48 | throw new Exception(sprintf('Command failed, return code: %d, command: %s, stderr: %s', $exitCode, $commandLine, trim($output)));
49 | }
50 | } catch(RuntimeException $e) {
51 | throw new Exception($e->getMessage(), $e->getCode(), $e);
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/vendor/ps/image-optimizer/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | CHANGELOG
2 | =========
3 |
4 | * 2.0.5 (2021-09-30)
5 |
6 | * [#77] Fixed the bug that the copied files were not deleted when the optimization failed
7 |
8 | * 2.0.4 (2021-02-23)
9 |
10 | * [#75] Support for PHP8
11 |
12 | * 2.0.2 (2020-01-11)
13 |
14 | * [#73] Support for Symfony 5
15 |
16 | * 2.0.1 (2019-09-24)
17 |
18 | * [#70] Change log level from notice to error and change log message
19 |
20 | * 2.0.0 (2019-07-13)
21 |
22 | * [#21] Add configurable timeout for single optimizer. Use
23 | symfony-process component as an implementation.
24 | * [#60] Skip larger files for pngquant optimizer
25 | * Adopt source code to more modern php versions (7.1+)
26 | * [#61] New option - allow to change output filepath
27 | (`output_filepath_pattern` option)
28 |
29 | * 1.2.2 (2019-06-21)
30 |
31 | * [#58] Easy way to add custom optimizers.
32 | * [#57] Clear error message when "exec" function is not available.
33 |
34 | * 1.2.1 (2018-12-17)
35 |
36 | * [#64] Bump psr/log version to 1.*
37 |
38 | * 1.2.0 (2018-04-11)
39 |
40 | * [#46] Add support for svg files (using svgo library)
41 |
42 | * 1.1.3 (2018-04-09)
43 |
44 | * [#53, #54, #50] Compatibility with Symfony 4
45 |
46 | * 1.1.2 (2017-07-21)
47 |
48 | * [#44] Throw exception for Permissions Denied
49 |
50 | * 1.1.1 (2017-06-28)
51 |
52 | * [#30] Fix "Command not found" issue related to open_basedir
53 |
54 | * 1.1.0 (2017-03-25)
55 |
56 | * [#8] Chain optimizers' better behaviour:
57 | * execute only first successful optimizer by default (new options: `execute_only_first_png_optimizer` and `execute_only_first_jpeg_optimizer`)
58 | * ignore error when first optimizer fails, but second one succeeds
59 | * report an error when all optimizers fail (an error is ignored when `ignore_errors` is enabled)
60 | * BC break - `ChainOptimizer` constructor now requires 2nd parameter, and adds 3rd parameter logger:
61 | ```diff
62 | - public function __construct(array $optimizers, $executeFirst = false)
63 | + public function __construct(array $optimizers, $executeFirst, LoggerInterface $logger)
64 | ```
65 |
--------------------------------------------------------------------------------
/vendor/symfony/process/ProcessUtils.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Process;
13 |
14 | use Symfony\Component\Process\Exception\InvalidArgumentException;
15 |
16 | /**
17 | * ProcessUtils is a bunch of utility methods.
18 | *
19 | * This class contains static methods only and is not meant to be instantiated.
20 | *
21 | * @author Martin Hasoň
22 | */
23 | class ProcessUtils
24 | {
25 | /**
26 | * This class should not be instantiated.
27 | */
28 | private function __construct()
29 | {
30 | }
31 |
32 | /**
33 | * Validates and normalizes a Process input.
34 | *
35 | * @param string $caller The name of method call that validates the input
36 | * @param mixed $input The input to validate
37 | *
38 | * @return mixed
39 | *
40 | * @throws InvalidArgumentException In case the input is not valid
41 | */
42 | public static function validateInput(string $caller, $input)
43 | {
44 | if (null !== $input) {
45 | if (\is_resource($input)) {
46 | return $input;
47 | }
48 | if (\is_string($input)) {
49 | return $input;
50 | }
51 | if (is_scalar($input)) {
52 | return (string) $input;
53 | }
54 | if ($input instanceof Process) {
55 | return $input->getIterator($input::ITER_SKIP_ERR);
56 | }
57 | if ($input instanceof \Iterator) {
58 | return $input;
59 | }
60 | if ($input instanceof \Traversable) {
61 | return new \IteratorIterator($input);
62 | }
63 |
64 | throw new InvalidArgumentException(sprintf('"%s" only accepts strings, Traversable objects or stream resources.', $caller));
65 | }
66 |
67 | return $input;
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Minify (Bilder)
2 |
3 | Das AddOn stellt einen __Effekt für REDAXOs Media Manager__ zur Verfügung, über den Bilder optimiert werden können. Die Optimierung kann direkt auf dem Server oder über einen externen Dienst (TinyPNG) erfolgen.
4 |
5 | 
6 |
7 | ### Anwendung
8 |
9 | 1. AddOn installieren und aktivieren.
10 | 2. In der Konfiguration des AddOn eins der angebotenen Optimierungs-Tools auswählen.
11 | 3. In der Konfiguration des Media Managers die gewünschte Bildqualität einstellen.
12 | 4. Dem gewünschten Mediatyp den Effekt `Bild: Minify` hinzufügen.
13 |
14 | #### ImageOptimizer
15 |
16 | ImageOptimizer nutzt verschiedene bekannte Bildoptimierer wie __optipng, pngquant, jpegoptim oder svgo__. Bitte beachten, dass diese auf dem Webserver installiert sein müssen! Infos dazu finden sich in der Dokumentation: [https://github.com/psliwa/image-optimizer](https://github.com/psliwa/image-optimizer)
17 |
18 | #### Tinify (extern)
19 |
20 | Tinify nutzt den __externen Webdienst__ [TinyPNG](https://tinypng.com), der Bilder über einen speziellen Algorithmus optimiert, um eine möglichst geringe Dateigröße bei optimaler Qualität zu erzielen.
21 |
22 | Der Dienst ist in geringem Umfang kostenlos, bei normaler Nutzung aber kostenpflichtig. Es ist eine Anmeldung erforderlich. Danach wird ein __API-Key__ bereitgestellt, der in der Konfiguration des AddOns eingetragen werden muss.
23 |
24 | #### Imagemagick
25 |
26 | Imagemagick ist ein __populärer Bildprozessor__, der leider nicht auf allen Webservern installiert ist. Wenn er jedoch installiert ist, leistet er hervorragende Dienste.
27 |
28 |
29 | ### Funktion
30 |
31 | Das AddOn stellt den Effekt `Bild: Minify` bereit, der im Media Manager angewendet werden kann. Damit wird das Bild dem ausgewählten Optimierungs-Tool übergeben. Sollte dieses Tool aus verschiedenen Gründen nicht funktionieren, greift REDAXOs normaler Bildprozess, und das Bild wird einfach nicht weiter optimiert. Im Fehlerlog (unter System > Logdateien) sollte dann ersichtlich sein, aus welchen Gründen die Optimierung nicht funktioniert hat.
32 |
33 |
34 | ### Credits
35 |
36 | * [Friends Of REDAXO](https://github.com/FriendsOfREDAXO) Gemeinsame REDAXO-Entwicklung!
37 | * [Thomas Kaegi](https://github.com/phoebusryan) für die initiale Entwicklung
38 |
--------------------------------------------------------------------------------
/vendor/tinify/tinify/lib/Tinify/Source.php:
--------------------------------------------------------------------------------
1 | request("post", "/shrink", $string);
14 | return new self($response->headers["location"]);
15 | }
16 |
17 | public static function fromUrl($url) {
18 | $body = array("source" => array("url" => $url));
19 | $response = Tinify::getClient()->request("post", "/shrink", $body);
20 | return new self($response->headers["location"]);
21 | }
22 |
23 | public function __construct($url, $commands = array()) {
24 | $this->url = $url;
25 | $this->commands = $commands;
26 | }
27 |
28 | public function preserve() {
29 | $options = $this->flatten(func_get_args());
30 | $commands = array_merge($this->commands, array("preserve" => $options));
31 | return new self($this->url, $commands);
32 | }
33 |
34 | public function resize($options) {
35 | $commands = array_merge($this->commands, array("resize" => $options));
36 | return new self($this->url, $commands);
37 | }
38 |
39 | public function store($options) {
40 | $response = Tinify::getClient()->request("post", $this->url,
41 | array_merge($this->commands, array("store" => $options)));
42 | return new Result($response->headers, $response->body);
43 | }
44 |
45 | public function result() {
46 | $response = Tinify::getClient()->request("get", $this->url, $this->commands);
47 | return new Result($response->headers, $response->body);
48 | }
49 |
50 | public function toFile($path) {
51 | return $this->result()->toFile($path);
52 | }
53 |
54 | public function toBuffer() {
55 | return $this->result()->toBuffer();
56 | }
57 |
58 | private static function flatten($options) {
59 | $flattened = array();
60 | foreach ($options as $option) {
61 | if (is_array($option)) {
62 | $flattened = array_merge($flattened, $option);
63 | } else {
64 | array_push($flattened, $option);
65 | }
66 | }
67 | return $flattened;
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/vendor/tinify/tinify/lib/Tinify.php:
--------------------------------------------------------------------------------
1 | request("post", "/shrink");
90 | } catch (AccountException $err) {
91 | if ($err->status == 429) return true;
92 | throw $err;
93 | } catch (ClientException $err) {
94 | return true;
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-php80/PhpToken.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Polyfill\Php80;
13 |
14 | /**
15 | * @author Fedonyuk Anton
16 | *
17 | * @internal
18 | */
19 | class PhpToken implements \Stringable
20 | {
21 | /**
22 | * @var int
23 | */
24 | public $id;
25 |
26 | /**
27 | * @var string
28 | */
29 | public $text;
30 |
31 | /**
32 | * @var int
33 | */
34 | public $line;
35 |
36 | /**
37 | * @var int
38 | */
39 | public $pos;
40 |
41 | public function __construct(int $id, string $text, int $line = -1, int $position = -1)
42 | {
43 | $this->id = $id;
44 | $this->text = $text;
45 | $this->line = $line;
46 | $this->pos = $position;
47 | }
48 |
49 | public function getTokenName(): ?string
50 | {
51 | if ('UNKNOWN' === $name = token_name($this->id)) {
52 | $name = \strlen($this->text) > 1 || \ord($this->text) < 32 ? null : $this->text;
53 | }
54 |
55 | return $name;
56 | }
57 |
58 | /**
59 | * @param int|string|array $kind
60 | */
61 | public function is($kind): bool
62 | {
63 | foreach ((array) $kind as $value) {
64 | if (\in_array($value, [$this->id, $this->text], true)) {
65 | return true;
66 | }
67 | }
68 |
69 | return false;
70 | }
71 |
72 | public function isIgnorable(): bool
73 | {
74 | return \in_array($this->id, [\T_WHITESPACE, \T_COMMENT, \T_DOC_COMMENT, \T_OPEN_TAG], true);
75 | }
76 |
77 | public function __toString(): string
78 | {
79 | return (string) $this->text;
80 | }
81 |
82 | /**
83 | * @return static[]
84 | */
85 | public static function tokenize(string $code, int $flags = 0): array
86 | {
87 | $line = 1;
88 | $position = 0;
89 | $tokens = token_get_all($code, $flags);
90 | foreach ($tokens as $index => $token) {
91 | if (\is_string($token)) {
92 | $id = \ord($token);
93 | $text = $token;
94 | } else {
95 | [$id, $text, $line] = $token;
96 | }
97 | $tokens[$index] = new static($id, $text, $line, $position);
98 | $position += \strlen($text);
99 | }
100 |
101 | return $tokens;
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/vendor/symfony/process/PhpProcess.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Process;
13 |
14 | use Symfony\Component\Process\Exception\LogicException;
15 | use Symfony\Component\Process\Exception\RuntimeException;
16 |
17 | /**
18 | * PhpProcess runs a PHP script in an independent process.
19 | *
20 | * $p = new PhpProcess('');
21 | * $p->run();
22 | * print $p->getOutput()."\n";
23 | *
24 | * @author Fabien Potencier
25 | */
26 | class PhpProcess extends Process
27 | {
28 | /**
29 | * @param string $script The PHP script to run (as a string)
30 | * @param string|null $cwd The working directory or null to use the working dir of the current PHP process
31 | * @param array|null $env The environment variables or null to use the same environment as the current PHP process
32 | * @param int $timeout The timeout in seconds
33 | * @param array|null $php Path to the PHP binary to use with any additional arguments
34 | */
35 | public function __construct(string $script, string $cwd = null, array $env = null, int $timeout = 60, array $php = null)
36 | {
37 | if (null === $php) {
38 | $executableFinder = new PhpExecutableFinder();
39 | $php = $executableFinder->find(false);
40 | $php = false === $php ? null : array_merge([$php], $executableFinder->findArguments());
41 | }
42 | if ('phpdbg' === \PHP_SAPI) {
43 | $file = tempnam(sys_get_temp_dir(), 'dbg');
44 | file_put_contents($file, $script);
45 | register_shutdown_function('unlink', $file);
46 | $php[] = $file;
47 | $script = null;
48 | }
49 |
50 | parent::__construct($php, $cwd, $env, $script, $timeout);
51 | }
52 |
53 | /**
54 | * {@inheritdoc}
55 | */
56 | public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
57 | {
58 | throw new LogicException(sprintf('The "%s()" method cannot be called when using "%s".', __METHOD__, self::class));
59 | }
60 |
61 | /**
62 | * {@inheritdoc}
63 | */
64 | public function start(callable $callback = null, array $env = [])
65 | {
66 | if (null === $this->getCommandLine()) {
67 | throw new RuntimeException('Unable to find the PHP executable.');
68 | }
69 |
70 | parent::start($callback, $env);
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/vendor/symfony/process/InputStream.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Process;
13 |
14 | use Symfony\Component\Process\Exception\RuntimeException;
15 |
16 | /**
17 | * Provides a way to continuously write to the input of a Process until the InputStream is closed.
18 | *
19 | * @author Nicolas Grekas
20 | *
21 | * @implements \IteratorAggregate
22 | */
23 | class InputStream implements \IteratorAggregate
24 | {
25 | /** @var callable|null */
26 | private $onEmpty = null;
27 | private $input = [];
28 | private $open = true;
29 |
30 | /**
31 | * Sets a callback that is called when the write buffer becomes empty.
32 | */
33 | public function onEmpty(callable $onEmpty = null)
34 | {
35 | $this->onEmpty = $onEmpty;
36 | }
37 |
38 | /**
39 | * Appends an input to the write buffer.
40 | *
41 | * @param resource|string|int|float|bool|\Traversable|null $input The input to append as scalar,
42 | * stream resource or \Traversable
43 | */
44 | public function write($input)
45 | {
46 | if (null === $input) {
47 | return;
48 | }
49 | if ($this->isClosed()) {
50 | throw new RuntimeException(sprintf('"%s" is closed.', static::class));
51 | }
52 | $this->input[] = ProcessUtils::validateInput(__METHOD__, $input);
53 | }
54 |
55 | /**
56 | * Closes the write buffer.
57 | */
58 | public function close()
59 | {
60 | $this->open = false;
61 | }
62 |
63 | /**
64 | * Tells whether the write buffer is closed or not.
65 | */
66 | public function isClosed()
67 | {
68 | return !$this->open;
69 | }
70 |
71 | /**
72 | * @return \Traversable
73 | */
74 | #[\ReturnTypeWillChange]
75 | public function getIterator()
76 | {
77 | $this->open = true;
78 |
79 | while ($this->open || $this->input) {
80 | if (!$this->input) {
81 | yield '';
82 | continue;
83 | }
84 | $current = array_shift($this->input);
85 |
86 | if ($current instanceof \Iterator) {
87 | yield from $current;
88 | } else {
89 | yield $current;
90 | }
91 | if (!$this->input && $this->open && null !== $onEmpty = $this->onEmpty) {
92 | $this->write($onEmpty($this));
93 | }
94 | }
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/vendor/symfony/process/ExecutableFinder.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Process;
13 |
14 | /**
15 | * Generic executable finder.
16 | *
17 | * @author Fabien Potencier
18 | * @author Johannes M. Schmitt
19 | */
20 | class ExecutableFinder
21 | {
22 | private $suffixes = ['.exe', '.bat', '.cmd', '.com'];
23 |
24 | /**
25 | * Replaces default suffixes of executable.
26 | */
27 | public function setSuffixes(array $suffixes)
28 | {
29 | $this->suffixes = $suffixes;
30 | }
31 |
32 | /**
33 | * Adds new possible suffix to check for executable.
34 | */
35 | public function addSuffix(string $suffix)
36 | {
37 | $this->suffixes[] = $suffix;
38 | }
39 |
40 | /**
41 | * Finds an executable by name.
42 | *
43 | * @param string $name The executable name (without the extension)
44 | * @param string|null $default The default to return if no executable is found
45 | * @param array $extraDirs Additional dirs to check into
46 | *
47 | * @return string|null
48 | */
49 | public function find(string $name, string $default = null, array $extraDirs = [])
50 | {
51 | if (ini_get('open_basedir')) {
52 | $searchPath = array_merge(explode(\PATH_SEPARATOR, ini_get('open_basedir')), $extraDirs);
53 | $dirs = [];
54 | foreach ($searchPath as $path) {
55 | // Silencing against https://bugs.php.net/69240
56 | if (@is_dir($path)) {
57 | $dirs[] = $path;
58 | } else {
59 | if (basename($path) == $name && @is_executable($path)) {
60 | return $path;
61 | }
62 | }
63 | }
64 | } else {
65 | $dirs = array_merge(
66 | explode(\PATH_SEPARATOR, getenv('PATH') ?: getenv('Path')),
67 | $extraDirs
68 | );
69 | }
70 |
71 | $suffixes = [''];
72 | if ('\\' === \DIRECTORY_SEPARATOR) {
73 | $pathExt = getenv('PATHEXT');
74 | $suffixes = array_merge($pathExt ? explode(\PATH_SEPARATOR, $pathExt) : $this->suffixes, $suffixes);
75 | }
76 | foreach ($suffixes as $suffix) {
77 | foreach ($dirs as $dir) {
78 | if (@is_file($file = $dir.\DIRECTORY_SEPARATOR.$name.$suffix) && ('\\' === \DIRECTORY_SEPARATOR || @is_executable($file))) {
79 | return $file;
80 | }
81 | }
82 | }
83 |
84 | return $default;
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_real.php:
--------------------------------------------------------------------------------
1 | = 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32 | if ($useStaticLoader) {
33 | require __DIR__ . '/autoload_static.php';
34 |
35 | call_user_func(\Composer\Autoload\ComposerStaticInitcbd2864030567235a54cb2e210e0f7cb::getInitializer($loader));
36 | } else {
37 | $map = require __DIR__ . '/autoload_namespaces.php';
38 | foreach ($map as $namespace => $path) {
39 | $loader->set($namespace, $path);
40 | }
41 |
42 | $map = require __DIR__ . '/autoload_psr4.php';
43 | foreach ($map as $namespace => $path) {
44 | $loader->setPsr4($namespace, $path);
45 | }
46 |
47 | $classMap = require __DIR__ . '/autoload_classmap.php';
48 | if ($classMap) {
49 | $loader->addClassMap($classMap);
50 | }
51 | }
52 |
53 | $loader->register(true);
54 |
55 | if ($useStaticLoader) {
56 | $includeFiles = Composer\Autoload\ComposerStaticInitcbd2864030567235a54cb2e210e0f7cb::$files;
57 | } else {
58 | $includeFiles = require __DIR__ . '/autoload_files.php';
59 | }
60 | foreach ($includeFiles as $fileIdentifier => $file) {
61 | composerRequirecbd2864030567235a54cb2e210e0f7cb($fileIdentifier, $file);
62 | }
63 |
64 | return $loader;
65 | }
66 | }
67 |
68 | /**
69 | * @param string $fileIdentifier
70 | * @param string $file
71 | * @return void
72 | */
73 | function composerRequirecbd2864030567235a54cb2e210e0f7cb($fileIdentifier, $file)
74 | {
75 | if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
76 | $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
77 |
78 | require $file;
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/vendor/tinify/tinify/test/integration.php:
--------------------------------------------------------------------------------
1 | toFile($path);
22 |
23 | $size = filesize($path);
24 | $contents = fread(fopen($path, "rb"), $size);
25 |
26 | $this->assertGreaterThan(1000, $size);
27 | $this->assertLessThan(1500, $size);
28 |
29 | /* width == 137 */
30 | $this->assertContains("\0\0\0\x89", $contents);
31 | $this->assertNotContains("Copyright Voormedia", $contents);
32 | }
33 |
34 | public function testShouldCompressFromUrl() {
35 | $path = tempnam(sys_get_temp_dir(), "tinify-php");
36 | $source = \Tinify\fromUrl("https://raw.githubusercontent.com/tinify/tinify-php/master/test/examples/voormedia.png");
37 | $source->toFile($path);
38 |
39 | $size = filesize($path);
40 | $contents = fread(fopen($path, "rb"), $size);
41 |
42 | $this->assertGreaterThan(1000, $size);
43 | $this->assertLessThan(1500, $size);
44 |
45 | /* width == 137 */
46 | $this->assertContains("\0\0\0\x89", $contents);
47 | $this->assertNotContains("Copyright Voormedia", $contents);
48 | }
49 |
50 | public function testShouldResize() {
51 | $path = tempnam(sys_get_temp_dir(), "tinify-php");
52 | self::$optimized->resize(array("method" => "fit", "width" => 50, "height" => 20))->toFile($path);
53 |
54 | $size = filesize($path);
55 | $contents = fread(fopen($path, "rb"), $size);
56 |
57 | $this->assertGreaterThan(500, $size);
58 | $this->assertLessThan(1000, $size);
59 |
60 | /* width == 50 */
61 | $this->assertContains("\0\0\0\x32", $contents);
62 | $this->assertNotContains("Copyright Voormedia", $contents);
63 | }
64 |
65 | public function testShouldPreserveMetadata() {
66 | $path = tempnam(sys_get_temp_dir(), "tinify-php");
67 | self::$optimized->preserve("copyright", "creation")->toFile($path);
68 |
69 | $size = filesize($path);
70 | $contents = fread(fopen($path, "rb"), $size);
71 |
72 | $this->assertGreaterThan(1000, $size);
73 | $this->assertLessThan(2000, $size);
74 |
75 | /* width == 137 */
76 | $this->assertContains("\0\0\0\x89", $contents);
77 | $this->assertContains("Copyright Voormedia", $contents);
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/pages/config.php:
--------------------------------------------------------------------------------
1 | isValid()) {
8 |
9 | echo rex_view::error(rex_i18n::msg('csrf_token_invalid'));
10 | } else {
11 |
12 | $this->setConfig(rex_post('config', [
13 | ['optimization_tool', 'string'],
14 | ['tinify_key', 'string'],
15 | ]));
16 | echo rex_view::success($this->i18n('config_saved'));
17 | }
18 | }
19 |
20 |
21 | $content = '