From 782265c5a075d9e162aa84bf0fc03454f86291cb Mon Sep 17 00:00:00 2001 From: Gregor Harlan Date: Sat, 1 Oct 2022 11:56:41 +0200 Subject: [PATCH] Update vendors (#5345) --- .tools/bin/update-all | 13 ++++ composer.json | 16 ++--- redaxo/src/addons/debug/composer.json | 2 +- redaxo/src/addons/debug/composer.lock | 14 ++-- .../clockwork/Clockwork/Clockwork.php | 2 +- redaxo/src/core/composer.json | 6 +- redaxo/src/core/composer.lock | 50 ++++++------- .../src/core/vendor/composer/installed.json | 56 +++++++-------- redaxo/src/core/vendor/composer/installed.php | 28 ++++---- .../symfony/console/Resources/completion.bash | 2 +- .../http-foundation/BinaryFileResponse.php | 71 +++++++++++-------- .../symfony/http-foundation/Request.php | 9 +-- .../symfony/http-foundation/Response.php | 2 +- .../symfony/string/AbstractUnicodeString.php | 2 +- .../core/vendor/symfony/string/ByteString.php | 5 +- 15 files changed, 152 insertions(+), 126 deletions(-) diff --git a/.tools/bin/update-all b/.tools/bin/update-all index c0faeab8f3..d794d3638c 100755 --- a/.tools/bin/update-all +++ b/.tools/bin/update-all @@ -95,6 +95,19 @@ find redaxo/src/addons/phpmailer/vendor -name "*.md" ! -name "LICENSE.md" -type printf "\nUpdate root composer.json and vendor/\n" .tools/bin/update-root-composer +composer require --dev --ansi --fixed \ + friendsofredaxo/linter \ + phpstan/extension-installer \ + phpstan/phpstan \ + phpstan/phpstan-deprecation-rules \ + phpstan/phpstan-phpunit \ + phpstan/phpstan-symfony \ + psalm/plugin-phpunit \ + psalm/plugin-symfony \ + rector/rector \ + redaxo/php-cs-fixer-config \ + redaxo/psalm-plugin \ + vimeo/psalm composer update --ansi printf "\nUpdate redaxo/src/core/assets/jquery.min.js\n" diff --git a/composer.json b/composer.json index 4b68d6554b..1b1e4f181b 100644 --- a/composer.json +++ b/composer.json @@ -15,14 +15,14 @@ "friendsofredaxo/linter": "1.3.0", "jetbrains/phpstorm-attributes": "^1.0", "phpstan/extension-installer": "1.1.0", - "phpstan/phpstan": "1.8.4", + "phpstan/phpstan": "1.8.6", "phpstan/phpstan-deprecation-rules": "1.0.0", "phpstan/phpstan-phpunit": "1.1.1", "phpstan/phpstan-symfony": "1.2.13", "phpunit/phpunit": "^9.5", "psalm/plugin-phpunit": "0.17.0", - "psalm/plugin-symfony": "3.1.8", - "rector/rector": "0.14.2", + "psalm/plugin-symfony": "v3.1.9", + "rector/rector": "0.14.5", "redaxo/php-cs-fixer-config": "1.0.0", "redaxo/psalm-plugin": "1.0.0", "vimeo/psalm": "4.27.0" @@ -31,7 +31,7 @@ "erusev/parsedown": "1.7.4", "erusev/parsedown-extra": "0.8.1", "filp/whoops": "2.14.5", - "itsgoingd/clockwork": "v5.1.7", + "itsgoingd/clockwork": "v5.1.8", "phpmailer/phpmailer": "v6.6.4", "psr/container": "1.1.1", "psr/http-message": "1.0.1", @@ -40,9 +40,9 @@ "ramsey/http-range": "1.0.0", "scssphp/scssphp": "v1.11.0", "splitbrain/php-archive": "1.3.1", - "symfony/console": "v5.4.12", + "symfony/console": "v5.4.13", "symfony/deprecation-contracts": "v2.5.2", - "symfony/http-foundation": "v5.4.12", + "symfony/http-foundation": "v5.4.13", "symfony/polyfill-ctype": "*", "symfony/polyfill-php70": "*", "symfony/polyfill-php72": "*", @@ -50,8 +50,8 @@ "symfony/polyfill-php80": "v1.26.0", "symfony/polyfill-php81": "v1.26.0", "symfony/service-contracts": "v2.5.2", - "symfony/string": "v5.4.12", - "symfony/var-dumper": "v5.4.11", + "symfony/string": "v5.4.13", + "symfony/var-dumper": "v5.4.13", "symfony/yaml": "v5.4.12", "voku/anti-xss": "4.1.39", "voku/portable-ascii": "2.0.1", diff --git a/redaxo/src/addons/debug/composer.json b/redaxo/src/addons/debug/composer.json index 3287eb9c2c..f23214c6db 100644 --- a/redaxo/src/addons/debug/composer.json +++ b/redaxo/src/addons/debug/composer.json @@ -1,6 +1,6 @@ { "require": { - "itsgoingd/clockwork": "^5.1.7" + "itsgoingd/clockwork": "^5.1.8" }, "config": { diff --git a/redaxo/src/addons/debug/composer.lock b/redaxo/src/addons/debug/composer.lock index 782c9645b0..22a0f8ccc2 100644 --- a/redaxo/src/addons/debug/composer.lock +++ b/redaxo/src/addons/debug/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "06ef499cb3cf4a9e29f3279efec060f7", + "content-hash": "6c9029cbbf0473033bd4c8d847d04088", "packages": [ { "name": "itsgoingd/clockwork", - "version": "v5.1.7", + "version": "v5.1.8", "source": { "type": "git", "url": "https://github.com/itsgoingd/clockwork.git", - "reference": "2cad6c75dc2b96cbfd48c0511bb035a4e328c17f" + "reference": "74ee05a61296aa7298164ef5346f0a568aa6106e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/itsgoingd/clockwork/zipball/2cad6c75dc2b96cbfd48c0511bb035a4e328c17f", - "reference": "2cad6c75dc2b96cbfd48c0511bb035a4e328c17f", + "url": "https://api.github.com/repos/itsgoingd/clockwork/zipball/74ee05a61296aa7298164ef5346f0a568aa6106e", + "reference": "74ee05a61296aa7298164ef5346f0a568aa6106e", "shasum": "" }, "require": { @@ -64,7 +64,7 @@ ], "support": { "issues": "https://github.com/itsgoingd/clockwork/issues", - "source": "https://github.com/itsgoingd/clockwork/tree/v5.1.7" + "source": "https://github.com/itsgoingd/clockwork/tree/v5.1.8" }, "funding": [ { @@ -72,7 +72,7 @@ "type": "github" } ], - "time": "2022-08-14T21:23:22+00:00" + "time": "2022-09-25T20:21:14+00:00" } ], "packages-dev": [], diff --git a/redaxo/src/addons/debug/vendor/itsgoingd/clockwork/Clockwork/Clockwork.php b/redaxo/src/addons/debug/vendor/itsgoingd/clockwork/Clockwork/Clockwork.php index 3f2811999a..1732c40fe8 100644 --- a/redaxo/src/addons/debug/vendor/itsgoingd/clockwork/Clockwork/Clockwork.php +++ b/redaxo/src/addons/debug/vendor/itsgoingd/clockwork/Clockwork/Clockwork.php @@ -15,7 +15,7 @@ class Clockwork { // Clockwork library version - const VERSION = '5.1.7'; + const VERSION = '5.1.8'; // Array of data sources, these objects collect metadata for the current application run protected $dataSources = []; diff --git a/redaxo/src/core/composer.json b/redaxo/src/core/composer.json index b26d02731a..f2c0b348e1 100644 --- a/redaxo/src/core/composer.json +++ b/redaxo/src/core/composer.json @@ -5,10 +5,10 @@ "filp/whoops": "^2.14.5", "psr/log": "^1.1.4", "ramsey/http-range": "^1.0", - "symfony/console": "^5.4.12", - "symfony/http-foundation": "^5.4.12", + "symfony/console": "^5.4.13", + "symfony/http-foundation": "^5.4.13", "symfony/polyfill-php80": "^1.26", - "symfony/var-dumper": "^5.4.11", + "symfony/var-dumper": "^5.4.13", "symfony/yaml": "^5.4.12", "voku/anti-xss": "^4.1.39" }, diff --git a/redaxo/src/core/composer.lock b/redaxo/src/core/composer.lock index ffb5e4742f..3b82c28471 100644 --- a/redaxo/src/core/composer.lock +++ b/redaxo/src/core/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "df7e2f9727bc4dd6a1c6a65959f41b90", + "content-hash": "c3df25b1ac99b0701d26bade0a6895e4", "packages": [ { "name": "erusev/parsedown", @@ -467,16 +467,16 @@ }, { "name": "symfony/console", - "version": "v5.4.12", + "version": "v5.4.13", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1" + "reference": "3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c072aa8f724c3af64e2c7a96b796a4863d24dba1", - "reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1", + "url": "https://api.github.com/repos/symfony/console/zipball/3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be", + "reference": "3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be", "shasum": "" }, "require": { @@ -546,7 +546,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.12" + "source": "https://github.com/symfony/console/tree/v5.4.13" }, "funding": [ { @@ -562,7 +562,7 @@ "type": "tidelift" } ], - "time": "2022-08-17T13:18:05+00:00" + "time": "2022-08-26T13:50:20+00:00" }, { "name": "symfony/deprecation-contracts", @@ -633,16 +633,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.4.12", + "version": "v5.4.13", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "f4bfe9611b113b15d98a43da68ec9b5a00d56791" + "reference": "54be067587a4f2b7fffb7a699f9481ec3daf9379" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f4bfe9611b113b15d98a43da68ec9b5a00d56791", - "reference": "f4bfe9611b113b15d98a43da68ec9b5a00d56791", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/54be067587a4f2b7fffb7a699f9481ec3daf9379", + "reference": "54be067587a4f2b7fffb7a699f9481ec3daf9379", "shasum": "" }, "require": { @@ -689,7 +689,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.12" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.13" }, "funding": [ { @@ -705,7 +705,7 @@ "type": "tidelift" } ], - "time": "2022-08-19T07:33:17+00:00" + "time": "2022-09-17T07:31:22+00:00" }, { "name": "symfony/polyfill-php80", @@ -954,16 +954,16 @@ }, { "name": "symfony/string", - "version": "v5.4.12", + "version": "v5.4.13", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "2fc515e512d721bf31ea76bd02fe23ada4640058" + "reference": "2900c668a32138a34118740de3e4d5a701801f53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/2fc515e512d721bf31ea76bd02fe23ada4640058", - "reference": "2fc515e512d721bf31ea76bd02fe23ada4640058", + "url": "https://api.github.com/repos/symfony/string/zipball/2900c668a32138a34118740de3e4d5a701801f53", + "reference": "2900c668a32138a34118740de3e4d5a701801f53", "shasum": "" }, "require": { @@ -1020,7 +1020,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.12" + "source": "https://github.com/symfony/string/tree/v5.4.13" }, "funding": [ { @@ -1036,20 +1036,20 @@ "type": "tidelift" } ], - "time": "2022-08-12T17:03:11+00:00" + "time": "2022-09-01T01:52:16+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.4.11", + "version": "v5.4.13", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861" + "reference": "2bf2ccab581bec363191672f0df40e0c85569e1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b8f306d7b8ef34fb3db3305be97ba8e088fb4861", - "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/2bf2ccab581bec363191672f0df40e0c85569e1c", + "reference": "2bf2ccab581bec363191672f0df40e0c85569e1c", "shasum": "" }, "require": { @@ -1109,7 +1109,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.11" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.13" }, "funding": [ { @@ -1125,7 +1125,7 @@ "type": "tidelift" } ], - "time": "2022-07-20T13:00:38+00:00" + "time": "2022-09-06T13:23:31+00:00" }, { "name": "symfony/yaml", diff --git a/redaxo/src/core/vendor/composer/installed.json b/redaxo/src/core/vendor/composer/installed.json index a29e1582a6..c37592b42c 100644 --- a/redaxo/src/core/vendor/composer/installed.json +++ b/redaxo/src/core/vendor/composer/installed.json @@ -485,17 +485,17 @@ }, { "name": "symfony/console", - "version": "v5.4.12", - "version_normalized": "5.4.12.0", + "version": "v5.4.13", + "version_normalized": "5.4.13.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1" + "reference": "3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c072aa8f724c3af64e2c7a96b796a4863d24dba1", - "reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1", + "url": "https://api.github.com/repos/symfony/console/zipball/3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be", + "reference": "3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be", "shasum": "" }, "require": { @@ -533,7 +533,7 @@ "symfony/lock": "", "symfony/process": "" }, - "time": "2022-08-17T13:18:05+00:00", + "time": "2022-08-26T13:50:20+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -567,7 +567,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.12" + "source": "https://github.com/symfony/console/tree/v5.4.13" }, "funding": [ { @@ -657,17 +657,17 @@ }, { "name": "symfony/http-foundation", - "version": "v5.4.12", - "version_normalized": "5.4.12.0", + "version": "v5.4.13", + "version_normalized": "5.4.13.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "f4bfe9611b113b15d98a43da68ec9b5a00d56791" + "reference": "54be067587a4f2b7fffb7a699f9481ec3daf9379" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f4bfe9611b113b15d98a43da68ec9b5a00d56791", - "reference": "f4bfe9611b113b15d98a43da68ec9b5a00d56791", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/54be067587a4f2b7fffb7a699f9481ec3daf9379", + "reference": "54be067587a4f2b7fffb7a699f9481ec3daf9379", "shasum": "" }, "require": { @@ -688,7 +688,7 @@ "suggest": { "symfony/mime": "To use the file extension guesser" }, - "time": "2022-08-19T07:33:17+00:00", + "time": "2022-09-17T07:31:22+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -716,7 +716,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.12" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.13" }, "funding": [ { @@ -990,17 +990,17 @@ }, { "name": "symfony/string", - "version": "v5.4.12", - "version_normalized": "5.4.12.0", + "version": "v5.4.13", + "version_normalized": "5.4.13.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "2fc515e512d721bf31ea76bd02fe23ada4640058" + "reference": "2900c668a32138a34118740de3e4d5a701801f53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/2fc515e512d721bf31ea76bd02fe23ada4640058", - "reference": "2fc515e512d721bf31ea76bd02fe23ada4640058", + "url": "https://api.github.com/repos/symfony/string/zipball/2900c668a32138a34118740de3e4d5a701801f53", + "reference": "2900c668a32138a34118740de3e4d5a701801f53", "shasum": "" }, "require": { @@ -1020,7 +1020,7 @@ "symfony/translation-contracts": "^1.1|^2", "symfony/var-exporter": "^4.4|^5.0|^6.0" }, - "time": "2022-08-12T17:03:11+00:00", + "time": "2022-09-01T01:52:16+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1059,7 +1059,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.12" + "source": "https://github.com/symfony/string/tree/v5.4.13" }, "funding": [ { @@ -1079,17 +1079,17 @@ }, { "name": "symfony/var-dumper", - "version": "v5.4.11", - "version_normalized": "5.4.11.0", + "version": "v5.4.13", + "version_normalized": "5.4.13.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861" + "reference": "2bf2ccab581bec363191672f0df40e0c85569e1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b8f306d7b8ef34fb3db3305be97ba8e088fb4861", - "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/2bf2ccab581bec363191672f0df40e0c85569e1c", + "reference": "2bf2ccab581bec363191672f0df40e0c85569e1c", "shasum": "" }, "require": { @@ -1113,7 +1113,7 @@ "ext-intl": "To show region name in time zone dump", "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" }, - "time": "2022-07-20T13:00:38+00:00", + "time": "2022-09-06T13:23:31+00:00", "bin": [ "Resources/bin/var-dump-server" ], @@ -1151,7 +1151,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.11" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.13" }, "funding": [ { diff --git a/redaxo/src/core/vendor/composer/installed.php b/redaxo/src/core/vendor/composer/installed.php index 7629ae7025..01575786fa 100644 --- a/redaxo/src/core/vendor/composer/installed.php +++ b/redaxo/src/core/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => 'b7043043d70ee0719d4aa7e76a3d0c29dfefe101', + 'reference' => 'f52d0851d0e1e3fd6da80130358766ed8e860d1f', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,7 +13,7 @@ '__root__' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => 'b7043043d70ee0719d4aa7e76a3d0c29dfefe101', + 'reference' => 'f52d0851d0e1e3fd6da80130358766ed8e860d1f', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -98,9 +98,9 @@ 'dev_requirement' => false, ), 'symfony/console' => array( - 'pretty_version' => 'v5.4.12', - 'version' => '5.4.12.0', - 'reference' => 'c072aa8f724c3af64e2c7a96b796a4863d24dba1', + 'pretty_version' => 'v5.4.13', + 'version' => '5.4.13.0', + 'reference' => '3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), @@ -116,9 +116,9 @@ 'dev_requirement' => false, ), 'symfony/http-foundation' => array( - 'pretty_version' => 'v5.4.12', - 'version' => '5.4.12.0', - 'reference' => 'f4bfe9611b113b15d98a43da68ec9b5a00d56791', + 'pretty_version' => 'v5.4.13', + 'version' => '5.4.13.0', + 'reference' => '54be067587a4f2b7fffb7a699f9481ec3daf9379', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-foundation', 'aliases' => array(), @@ -194,18 +194,18 @@ 'dev_requirement' => false, ), 'symfony/string' => array( - 'pretty_version' => 'v5.4.12', - 'version' => '5.4.12.0', - 'reference' => '2fc515e512d721bf31ea76bd02fe23ada4640058', + 'pretty_version' => 'v5.4.13', + 'version' => '5.4.13.0', + 'reference' => '2900c668a32138a34118740de3e4d5a701801f53', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/var-dumper' => array( - 'pretty_version' => 'v5.4.11', - 'version' => '5.4.11.0', - 'reference' => 'b8f306d7b8ef34fb3db3305be97ba8e088fb4861', + 'pretty_version' => 'v5.4.13', + 'version' => '5.4.13.0', + 'reference' => '2bf2ccab581bec363191672f0df40e0c85569e1c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-dumper', 'aliases' => array(), diff --git a/redaxo/src/core/vendor/symfony/console/Resources/completion.bash b/redaxo/src/core/vendor/symfony/console/Resources/completion.bash index fba46070cd..bf3edf511b 100644 --- a/redaxo/src/core/vendor/symfony/console/Resources/completion.bash +++ b/redaxo/src/core/vendor/symfony/console/Resources/completion.bash @@ -24,7 +24,7 @@ _sf_{{ COMMAND_NAME }}() { local cur prev words cword _get_comp_words_by_ref -n := cur prev words cword - local completecmd=("$sf_cmd" "_complete" "-sbash" "-c$cword" "-S{{ VERSION }}") + local completecmd=("$sf_cmd" "_complete" "--no-interaction" "-sbash" "-c$cword" "-S{{ VERSION }}") for w in ${words[@]}; do w=$(printf -- '%b' "$w") # remove quotes from typed values diff --git a/redaxo/src/core/vendor/symfony/http-foundation/BinaryFileResponse.php b/redaxo/src/core/vendor/symfony/http-foundation/BinaryFileResponse.php index beb0eda0a5..aff851956d 100644 --- a/redaxo/src/core/vendor/symfony/http-foundation/BinaryFileResponse.php +++ b/redaxo/src/core/vendor/symfony/http-foundation/BinaryFileResponse.php @@ -206,15 +206,17 @@ public function setContentDisposition(string $disposition, string $filename = '' */ public function prepare(Request $request) { - if (!$this->headers->has('Content-Type')) { - $this->headers->set('Content-Type', $this->file->getMimeType() ?: 'application/octet-stream'); - } + parent::prepare($request); - if ('HTTP/1.0' !== $request->server->get('SERVER_PROTOCOL')) { - $this->setProtocolVersion('1.1'); + if ($this->isInformational() || $this->isEmpty()) { + $this->maxlen = 0; + + return $this; } - $this->ensureIEOverSSLCompatibility($request); + if (!$this->headers->has('Content-Type')) { + $this->headers->set('Content-Type', $this->file->getMimeType() ?: 'application/octet-stream'); + } $this->offset = 0; $this->maxlen = -1; @@ -222,6 +224,7 @@ public function prepare(Request $request) if (false === $fileSize = $this->file->getSize()) { return $this; } + $this->headers->remove('Transfer-Encoding'); $this->headers->set('Content-Length', $fileSize); if (!$this->headers->has('Accept-Ranges')) { @@ -291,6 +294,10 @@ public function prepare(Request $request) } } + if ($request->isMethod('HEAD')) { + $this->maxlen = 0; + } + return $this; } @@ -312,40 +319,42 @@ private function hasValidIfRangeHeader(?string $header): bool */ public function sendContent() { - if (!$this->isSuccessful()) { - return parent::sendContent(); - } + try { + if (!$this->isSuccessful()) { + return parent::sendContent(); + } - if (0 === $this->maxlen) { - return $this; - } + if (0 === $this->maxlen) { + return $this; + } - $out = fopen('php://output', 'w'); - $file = fopen($this->file->getPathname(), 'r'); + $out = fopen('php://output', 'w'); + $file = fopen($this->file->getPathname(), 'r'); - ignore_user_abort(true); + ignore_user_abort(true); - if (0 !== $this->offset) { - fseek($file, $this->offset); - } + if (0 !== $this->offset) { + fseek($file, $this->offset); + } - $length = $this->maxlen; - while ($length && !feof($file)) { - $read = ($length > $this->chunkSize) ? $this->chunkSize : $length; - $length -= $read; + $length = $this->maxlen; + while ($length && !feof($file)) { + $read = ($length > $this->chunkSize) ? $this->chunkSize : $length; + $length -= $read; - stream_copy_to_stream($file, $out, $read); + stream_copy_to_stream($file, $out, $read); - if (connection_aborted()) { - break; + if (connection_aborted()) { + break; + } } - } - fclose($out); - fclose($file); - - if ($this->deleteFileAfterSend && is_file($this->file->getPathname())) { - unlink($this->file->getPathname()); + fclose($out); + fclose($file); + } finally { + if ($this->deleteFileAfterSend && is_file($this->file->getPathname())) { + unlink($this->file->getPathname()); + } } return $this; diff --git a/redaxo/src/core/vendor/symfony/http-foundation/Request.php b/redaxo/src/core/vendor/symfony/http-foundation/Request.php index 65f30a1a7f..2bf52ce433 100644 --- a/redaxo/src/core/vendor/symfony/http-foundation/Request.php +++ b/redaxo/src/core/vendor/symfony/http-foundation/Request.php @@ -1689,7 +1689,8 @@ public function getLanguages() $languages = AcceptHeader::fromString($this->headers->get('Accept-Language'))->all(); $this->languages = []; - foreach ($languages as $lang => $acceptHeaderItem) { + foreach ($languages as $acceptHeaderItem) { + $lang = $acceptHeaderItem->getValue(); if (str_contains($lang, '-')) { $codes = explode('-', $lang); if ('i' === $codes[0]) { @@ -1727,7 +1728,7 @@ public function getCharsets() return $this->charsets; } - return $this->charsets = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Charset'))->all()); + return $this->charsets = array_map('strval', array_keys(AcceptHeader::fromString($this->headers->get('Accept-Charset'))->all())); } /** @@ -1741,7 +1742,7 @@ public function getEncodings() return $this->encodings; } - return $this->encodings = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Encoding'))->all()); + return $this->encodings = array_map('strval', array_keys(AcceptHeader::fromString($this->headers->get('Accept-Encoding'))->all())); } /** @@ -1755,7 +1756,7 @@ public function getAcceptableContentTypes() return $this->acceptableContentTypes; } - return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all()); + return $this->acceptableContentTypes = array_map('strval', array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all())); } /** diff --git a/redaxo/src/core/vendor/symfony/http-foundation/Response.php b/redaxo/src/core/vendor/symfony/http-foundation/Response.php index 88635bb490..d5c8cb45cd 100644 --- a/redaxo/src/core/vendor/symfony/http-foundation/Response.php +++ b/redaxo/src/core/vendor/symfony/http-foundation/Response.php @@ -399,6 +399,7 @@ public function send() litespeed_finish_request(); } elseif (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { static::closeOutputBuffers(0, true); + flush(); } return $this; @@ -1245,7 +1246,6 @@ public static function closeOutputBuffers(int $targetLevel, bool $flush): void while ($level-- > $targetLevel && ($s = $status[$level]) && (!isset($s['del']) ? !isset($s['flags']) || ($s['flags'] & $flags) === $flags : $s['del'])) { if ($flush) { ob_end_flush(); - flush(); } else { ob_end_clean(); } diff --git a/redaxo/src/core/vendor/symfony/string/AbstractUnicodeString.php b/redaxo/src/core/vendor/symfony/string/AbstractUnicodeString.php index 6fd418e65a..1bc6f88fda 100644 --- a/redaxo/src/core/vendor/symfony/string/AbstractUnicodeString.php +++ b/redaxo/src/core/vendor/symfony/string/AbstractUnicodeString.php @@ -162,7 +162,7 @@ public function ascii(array $rules = []): self public function camel(): parent { $str = clone $this; - $str->string = str_replace(' ', '', preg_replace_callback('/\b./u', static function ($m) use (&$i) { + $str->string = str_replace(' ', '', preg_replace_callback('/\b.(?![A-Z]{2,})/u', static function ($m) use (&$i) { return 1 === ++$i ? ('İ' === $m[0] ? 'i̇' : mb_strtolower($m[0], 'UTF-8')) : mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8'); }, preg_replace('/[^\pL0-9]++/u', ' ', $this->string))); diff --git a/redaxo/src/core/vendor/symfony/string/ByteString.php b/redaxo/src/core/vendor/symfony/string/ByteString.php index d9ee3edb52..626d8c1bb3 100644 --- a/redaxo/src/core/vendor/symfony/string/ByteString.php +++ b/redaxo/src/core/vendor/symfony/string/ByteString.php @@ -103,7 +103,10 @@ public function append(string ...$suffix): parent public function camel(): parent { $str = clone $this; - $str->string = lcfirst(str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $this->string)))); + + $parts = explode(' ', trim(ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $this->string)))); + $parts[0] = 1 !== \strlen($parts[0]) && ctype_upper($parts[0]) ? $parts[0] : lcfirst($parts[0]); + $str->string = implode('', $parts); return $str; }