diff --git a/.appveyor.yml b/.appveyor.yml index 8227669ef7fdf..e0d8c17dc1f56 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,8 +9,7 @@ cache: init: - SET PATH=c:\php;%PATH% - SET COMPOSER_NO_INTERACTION=1 - - SET SYMFONY_DEPRECATIONS_HELPER=max[indirect]=7 - - SET "SYMFONY_REQUIRE=>=4.4" + - SET SYMFONY_DEPRECATIONS_HELPER=strict - SET ANSICON=121x90 (121x90) - SET SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE=1 - REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f @@ -43,22 +42,24 @@ install: - echo extension=php_curl.dll >> php.ini-max - copy /Y php.ini-max php.ini - cd c:\projects\symfony - - IF NOT EXIST composer.phar (appveyor DownloadFile https://github.com/composer/composer/releases/download/1.9.0/composer.phar) - - php composer.phar self-update + - IF NOT EXIST composer.phar (appveyor DownloadFile https://github.com/composer/composer/releases/download/2.0.0/composer.phar) + - php composer.phar self-update --2 - copy /Y .github\composer-config.json %APPDATA%\Composer\config.json - - php composer.phar global require --no-progress --no-scripts --no-plugins symfony/flex dev-master + - php composer.phar global require --no-progress --no-scripts --no-plugins symfony/flex - git config --global user.email "" - git config --global user.name "Symfony" - - php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit src\Symfony\Contracts - - IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev) - - php composer.phar update --no-progress --no-suggest --ansi + - FOR /F "tokens=* USEBACKQ" %%F IN (`bash -c "grep branch-version composer.json | grep -o '[0-9.]*'"`) DO (SET SYMFONY_VERSION=%%F) + - php .github/build-packages.php "HEAD^" %SYMFONY_VERSION% src\Symfony\Bridge\PhpUnit src\Symfony\Contracts + - SET "SYMFONY_REQUIRE=>=%SYMFONY_VERSION%" + - SET COMPOSER_ROOT_VERSION=%SYMFONY_VERSION%.x-dev + - php composer.phar update --no-progress --ansi - php phpunit install test_script: - SET X=0 - SET SYMFONY_PHPUNIT_SKIPPED_TESTS=phpunit.skipped - copy /Y c:\php\php.ini-min c:\php\php.ini - - IF %APPVEYOR_REPO_BRANCH% neq master (rm -Rf src\Symfony\Bridge\PhpUnit) + - IF %APPVEYOR_REPO_BRANCH:~-2% neq .x (rm -Rf src\Symfony\Bridge\PhpUnit) - mv src\Symfony\Component\HttpClient\phpunit.xml.dist src\Symfony\Component\HttpClient\phpunit.xml - php phpunit src\Symfony --exclude-group tty,benchmark,intl-data || SET X=!errorlevel! - php phpunit src\Symfony\Component\HttpClient || SET X=!errorlevel! diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 6a9ac46efac81..0870dcfdd5cc4 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,9 +1,10 @@ # Console +/src/Symfony/Component/Console/ @chalasr /src/Symfony/Component/Console/Logger/ConsoleLogger.php @dunglas # DependencyInjection /src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php @dunglas -# ErrorRenderer -/src/Symfony/Component/ErrorRenderer/* @yceruto +# ErrorHandler +/src/Symfony/Component/ErrorHandler/ @yceruto # Form /src/Symfony/Bridge/Twig/Extension/FormExtension.php @xabbuh /src/Symfony/Bridge/Twig/Form/ @xabbuh @@ -20,7 +21,7 @@ /src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/FormPassTest.php @xabbuh /src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php @xabbuh /src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php @xabbuh -/src/Symfony/Component/Form/ @xabbuh +/src/Symfony/Component/Form/ @xabbuh @yceruto # HttpKernel /src/Symfony/Component/HttpKernel/Log/Logger.php @dunglas # LDAP @@ -30,13 +31,20 @@ # Messenger /src/Symfony/Bridge/Doctrine/Messenger/ @sroze /src/Symfony/Component/Messenger/ @sroze +# OptionsResolver +/src/Symfony/Component/OptionsResolver/ @yceruto # PropertyInfo /src/Symfony/Component/PropertyInfo/ @dunglas /src/Symfony/Bridge/Doctrine/PropertyInfo/ @dunglas # Serializer /src/Symfony/Component/Serializer/ @dunglas +# Security +/src/Symfony/Bridge/Doctrine/Security/ @wouterj @chalasr +/src/Symfony/Bundle/SecurityBundle/ @wouterj @chalasr +/src/Symfony/Component/Security/ @wouterj @chalasr +/src/Symfony/Component/Ldap/Security/ @wouterj @chalasr # TwigBundle -/src/Symfony/Bundle/TwigBundle/ErrorRenderer/TwigHtmlErrorRenderer.php @yceruto +/src/Symfony/Bundle/TwigBundle/ @yceruto # WebLink /src/Symfony/Component/WebLink/ @dunglas # Workflow diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 7b86916e7bc14..df9db03fa8bca 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@ | Q | A | ------------- | --- -| Branch? | master for features / 3.4, 4.4 or 5.1 for bug fixes +| Branch? | 5.x for features / 3.4, 4.4 or 5.1 for bug fixes | Bug fix? | yes/no | New feature? | yes/no | Deprecations? | yes/no @@ -16,5 +16,5 @@ Additionally (see https://symfony.com/releases): - Never break backward compatibility (see https://symfony.com/bc). - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too.) - - Features and deprecations must be submitted against branch master. + - Features and deprecations must be submitted against branch 5.x. --> diff --git a/.github/build-packages.php b/.github/build-packages.php index 81a309911135c..13978ab4e6d93 100644 --- a/.github/build-packages.php +++ b/.github/build-packages.php @@ -1,7 +1,7 @@ $_SERVER['argc']) { - echo "Usage: branch dir1 dir2 ... dirN\n"; + echo "Usage: branch version dir1 dir2 ... dirN\n"; exit(1); } chdir(dirname(__DIR__)); @@ -14,6 +14,7 @@ $dirs = $_SERVER['argv']; array_shift($dirs); $mergeBase = trim(shell_exec(sprintf('git merge-base "%s" HEAD', array_shift($dirs)))); +$version = array_shift($dirs); $packages = array(); $flags = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; @@ -50,23 +51,15 @@ passthru("cd $dir && git init && git add . && git commit -q -m - && git archive -o package.tar HEAD && rm .git/ -Rf"); } - if (!isset($package->extra->{'branch-alias'}->{'dev-master'})) { - echo "Missing \"dev-master\" branch-alias in composer.json extra.\n"; - exit(1); - } - $package->version = str_replace('-dev', '.x-dev', $package->extra->{'branch-alias'}->{'dev-master'}); + $package->version = (isset($package->extra->{'branch-version'}) ? $package->extra->{'branch-version'} : $version).'.x-dev'; $package->dist['type'] = 'tar'; $package->dist['url'] = 'file://'.str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__))."/$dir/package.tar"; $packages[$package->name][$package->version] = $package; - $versions = @file_get_contents('https://repo.packagist.org/p/'.$package->name.'.json') ?: sprintf('{"packages":{"%s":{"dev-master":%s}}}', $package->name, file_get_contents($dir.'/composer.json')); + $versions = @file_get_contents('https://repo.packagist.org/p/'.$package->name.'.json') ?: sprintf('{"packages":{"%s":{"%s":%s}}}', $package->name, $package->version, file_get_contents($dir.'/composer.json')); $versions = json_decode($versions)->packages->{$package->name}; - if (isset($versions->{'dev-master'}) && $package->version === str_replace('-dev', '.x-dev', $versions->{'dev-master'}->extra->{'branch-alias'}->{'dev-master'})) { - unset($versions->{'dev-master'}); - } - foreach ($versions as $v => $package) { $packages[$package->name] += array($v => $package); } diff --git a/.github/composer-config.json b/.github/composer-config.json index 185292ab21cea..752047dbb681d 100644 --- a/.github/composer-config.json +++ b/.github/composer-config.json @@ -1,5 +1,6 @@ { "config": { + "platform-check": false, "preferred-install": { "symfony/form": "source", "symfony/http-kernel": "source", diff --git a/.github/patch-types.php b/.github/patch-types.php index 70fea35aaae3e..0d5576ea7f47e 100644 --- a/.github/patch-types.php +++ b/.github/patch-types.php @@ -5,7 +5,7 @@ exit(1); } -require __DIR__.'/../.phpunit/phpunit-8.3-0/vendor/autoload.php'; +require __DIR__.'/../.phpunit/phpunit/vendor/autoload.php'; $loader = require __DIR__.'/../vendor/autoload.php'; @@ -24,6 +24,7 @@ case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php'): case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/uniontype_classes.php'): case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ParentNotExists.php'): + case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/'): case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Prototype/BadClasses/MissingParent.php'): case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/WitherStaticReturnType.php'): case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/'): diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5b126d5992c04..2bcc279d84cf2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -102,14 +102,13 @@ jobs: extensions: "json,couchbase,memcached,mongodb,redis,rdkafka,xsl" ini-values: "memory_limit=-1" php-version: "${{ matrix.php }}" - tools: flex,pecl + tools: pecl - name: Configure composer run: | - ([ -d ~/.composer ] || mkdir ~/.composer) && cp .github/composer-config.json ~/.composer/config.json - SYMFONY_VERSION=$(cat composer.json | grep '^ *\"dev-master\". *\"[1-9]' | grep -o '[0-9.]*') - echo "::set-env name=SYMFONY_VERSION::$SYMFONY_VERSION" - echo "::set-env name=COMPOSER_ROOT_VERSION::$SYMFONY_VERSION.x-dev" + COMPOSER_HOME="$(composer config home)" + ([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json" + echo "COMPOSER_ROOT_VERSION=$(grep branch-version composer.json | grep -o '[0-9.]*').x-dev" >> $GITHUB_ENV - name: Determine composer cache directory id: composer-cache @@ -150,6 +149,6 @@ jobs: run: | [ -d .phpunit ] && mv .phpunit .phpunit.bak wget -q https://github.com/symfony/binary-utils/releases/download/v0.1/vulcain_0.1.3_Linux_x86_64.tar.gz -O - | tar xz && mv vulcain /usr/local/bin - docker run --rm -e COMPOSER_ROOT_VERSION -e SYMFONY_VERSION -v $(pwd):/app -v $(which composer):/usr/local/bin/composer -v /usr/local/bin/vulcain:/usr/local/bin/vulcain -w /app php:7.4-alpine ./phpunit src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php --filter testHttp2Push + docker run --rm -e COMPOSER_ROOT_VERSION -v $(pwd):/app -v $(which composer):/usr/local/bin/composer -v /usr/local/bin/vulcain:/usr/local/bin/vulcain -w /app php:7.4-alpine ./phpunit src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php --filter testHttp2Push sudo rm -rf .phpunit [ -d .phpunit.bak ] && mv .phpunit.bak .phpunit diff --git a/.travis.yml b/.travis.yml index 75568167b31f1..d1f90d9babcfe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,11 +60,10 @@ before_install: [ -d /usr/lib/openldap ] && ln -s /usr/lib/openldap /tmp/slapd-modules || ln -s /usr/lib/ldap /tmp/slapd-modules fi slapd -f src/Symfony/Component/Ldap/Tests/Fixtures/conf/slapd.conf -h ldap://localhost:3389 & - [ -d ~/.composer ] || mkdir ~/.composer - cp .github/composer-config.json ~/.composer/config.json + cp .github/composer-config.json "$(composer config home)/config.json" export PHPUNIT=$(readlink -f ./phpunit) export PHPUNIT_X="$PHPUNIT --exclude-group tty,benchmark,intl-data" - export COMPOSER_UP='composer update --no-progress --no-suggest --ansi' + export COMPOSER_UP='composer update --no-progress --ansi' export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n' | sort) find ~/.phpenv -name xdebug.ini -delete @@ -123,23 +122,6 @@ before_install: } export -f tpecl - install_apcu_dev () { - local ref=$1 - local INI=$2 - - wget https://github.com/krakjoe/apcu/archive/${ref}.zip - unzip ${ref}.zip - cd apcu-${ref} - phpize - ./configure - make - mv modules/apcu.so $(php -r "echo ini_get('extension_dir');") - echo 'extension = apcu.so' >> $INI - cd .. - rm -rf apcu-${ref} ${ref}.zip - } - export -f install_apcu_dev - - | # Install sigchild-enabled PHP to test the Process component on the lowest PHP matrix line if [[ ! $deps && $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} && ! -d php-$MIN_PHP/sapi ]]; then @@ -168,26 +150,24 @@ before_install: for PHP in $TRAVIS_PHP_VERSION $php_extra; do export PHP=$PHP phpenv global $PHP + composer self-update + composer self-update --2 INI=~/.phpenv/versions/$PHP/etc/conf.d/travis.ini if ! php --ri sodium > /dev/null; then tfold ext.libsodium tpecl libsodium sodium.so $INI fi if [[ $PHP = nightly ]]; then tfold ext.memcached tpecl memcached-3.1.5 memcached.so $INI - tfold ext.apcu install_apcu_dev 9c36db45100d4d27ec33072f4be90f1f5a0108b7 $INI else - tfold ext.apcu tpecl apcu-5.1.18 apcu.so $INI tfold ext.mongodb tpecl mongodb-1.6.16 mongodb.so $INI tfold ext.zookeeper tpecl zookeeper-0.7.2 zookeeper.so $INI tfold ext.amqp tpecl amqp-1.10.2 amqp.so $INI tfold ext.redis tpecl redis-5.2.2 redis.so $INI "no" fi - tfold ext.igbinary tpecl igbinary-3.1.5 igbinary.so $INI + tfold ext.apcu tpecl apcu-5.1.19 apcu.so $INI + tfold ext.igbinary tpecl igbinary-3.1.6 igbinary.so $INI done - - | - # List all php extensions with versions - php -r 'foreach (get_loaded_extensions() as $extension) echo $extension . " " . phpversion($extension) . PHP_EOL;' - | # Load fixtures @@ -209,7 +189,7 @@ install: git fetch --depth=2 origin refs/pull/$SYMFONY_PHPUNIT_BRIDGE_PR/head git rm -rq src/Symfony/Bridge/PhpUnit git checkout -q FETCH_HEAD -- src/Symfony/Bridge/PhpUnit - export SYMFONY_VERSION=$(cat src/Symfony/Bridge/PhpUnit/composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*') + export SYMFONY_VERSION=$(curl -s https://api.github.com/repos/symfony/symfony/pulls/$SYMFONY_PHPUNIT_BRIDGE_PR | jq -r .base.ref) sed -i 's/"symfony\/phpunit-bridge": ".*"/"symfony\/phpunit-bridge": "'$SYMFONY_VERSION'.x@dev"/' composer.json rm -rf .phpunit fi @@ -219,13 +199,15 @@ install: git config --global user.email "" git config --global user.name "Symfony" + export SYMFONY_VERSION=$(grep branch-version composer.json | grep -o '[0-9.]*') + if [[ ! $deps ]]; then - php .github/build-packages.php HEAD^ src/Symfony/Bridge/PhpUnit src/Symfony/Contracts + php .github/build-packages.php HEAD^ $SYMFONY_VERSION src/Symfony/Bridge/PhpUnit src/Symfony/Contracts else export SYMFONY_DEPRECATIONS_HELPER=weak && cp composer.json composer.json.orig && echo -e '{\n"require":{'"$(grep phpunit-bridge composer.json)"'"php":"*"},"minimum-stability":"dev"}' > composer.json && - php .github/build-packages.php HEAD^ $(find src/Symfony -mindepth 3 -type f -name composer.json -printf '%h\n' | sort) && + php .github/build-packages.php HEAD^ $SYMFONY_VERSION $(find src/Symfony -mindepth 2 -type f -name composer.json -printf '%h\n' | sort) && mv composer.json composer.json.phpunit && mv composer.json.orig composer.json fi @@ -235,21 +217,19 @@ install: fi - | - # For the master branch, when deps=high, the version before master is checked out and tested with the locally patched components - if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then + # For the feature-branch, when deps=high, the version before it is checked out and tested with the locally patched components + if [[ $deps = high && $TRAVIS_BRANCH = *.x ]]; then export FLIP='🙃' - export SYMFONY_VERSION=$(git ls-remote --heads | grep -o '/[1-9].*' | tail -n 1 | sed s/.//) && + export SYMFONY_VERSION=$(git ls-remote -q --heads | grep -o '/[1-9]\.[0-9].*' | tail -n 1 | sed s/.//) && git fetch --depth=2 origin $SYMFONY_VERSION && git checkout -m FETCH_HEAD && export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n' | sort) - else - export SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*') fi - | - # Skip the phpunit-bridge on not-master branches when $deps is empty - if [[ ! $deps && $TRAVIS_BRANCH != master ]]; then - export COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -not -wholename '*/Bridge/PhpUnit/*' -printf '%h\n' | sort) + # Skip the phpunit-bridge on bugfix-branches when $deps is empty + if [[ ! $deps && ! $TRAVIS_BRANCH = *.x ]]; then + export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -not -wholename '*/Bridge/PhpUnit/*' -printf '%h\n' | sort) fi - | @@ -266,16 +246,27 @@ install: else export SYMFONY_REQUIRE=">=$SYMFONY_VERSION" fi - composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-master + composer global require --no-progress --no-scripts --no-plugins symfony/flex - | # Legacy tests are skipped when deps=high and when the current branch version has not the same major version number as the next one - [[ $deps = high && ${SYMFONY_VERSION%.*} != $(git show $(git ls-remote --heads | grep -FA1 /$SYMFONY_VERSION | tail -n 1):composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9]*' | head -n 1) ]] && export LEGACY=,legacy + [[ $deps = high && ${SYMFONY_VERSION%.*} != $(git ls-remote -q --heads | cut -f2 | grep -FA1 /$SYMFONY_VERSION | tail -n 1 | grep -o '[0-9]*') ]] && export LEGACY=,legacy export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev if [[ $deps ]]; then mv composer.json.phpunit composer.json; fi - - php -i + - | + # phpinfo + phpinfo() { + phpenv global $1 + php -r 'foreach (get_loaded_extensions() as $extension) echo $extension . " " . phpversion($extension) . PHP_EOL;' + php -i + } + export -f phpinfo + + for PHP in $TRAVIS_PHP_VERSION $php_extra; do + tfold phpinfo phpinfo $PHP + done - | run_tests () { @@ -287,7 +278,7 @@ install: return fi phpenv global $PHP - + rm vendor/composer/package-versions-deprecated -Rf ([[ $deps ]] && cd src/Symfony/Component/HttpFoundation; cp composer.json composer.bak; composer config platform.ext-mongodb 1.6.99; composer require --dev --no-update mongodb/mongodb ~1.5.0) tfold 'composer update' $COMPOSER_UP tfold 'phpunit install' ./phpunit install @@ -296,7 +287,7 @@ install: (cd src/Symfony/Component/HttpFoundation; mv composer.bak composer.json) COMPONENTS=$(git diff --name-only src/ | grep composer.json || true) - if [[ $COMPONENTS && $LEGACY && $TRAVIS_BRANCH != master && $TRAVIS_PULL_REQUEST != false ]]; then + if [[ $COMPONENTS && $LEGACY && ! $TRAVIS_BRANCH = *.x && $TRAVIS_PULL_REQUEST != false ]]; then export FLIP='🙃' SYMFONY_VERSION=$(echo $SYMFONY_VERSION | awk '{print $1 - 1}') echo -e "\\n\\e[33;1mChecking out Symfony $SYMFONY_VERSION and running tests with patched components as deps\\e[0m" diff --git a/CHANGELOG-5.1.md b/CHANGELOG-5.1.md index 2787daf5a9f1d..0f8e3a5c324dd 100644 --- a/CHANGELOG-5.1.md +++ b/CHANGELOG-5.1.md @@ -7,6 +7,44 @@ in 5.1 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v5.1.0...v5.1.1 +* 5.1.8 (2020-10-28) + + * bug #38713 [DI] Fix Preloader exception when preloading a class with an unknown parent/interface (rgeraads) + * bug #38647 [HttpClient] relax auth bearer format requirements (xabbuh) + * bug #38699 [DependencyInjection] Preload classes with union types correctly (derrabus) + * bug #38669 [Serializer] fix decoding float XML attributes starting with 0 (Marcin Kruk) + * bug #38680 [PhpUnitBridge] Support new expect methods in test case polyfill (alcaeus) + * bug #38681 [PHPUnitBridge] Support PHPUnit 8 and PHPUnit 9 in constraint compatibility trait (alcaeus) + * bug #38686 [TwigBridge] Remove "transchoice" from the code base (nicolas-grekas) + * bug #38678 [String] fix before/after[Last]() returning the empty string instead of the original one on non-match (nicolas-grekas) + * bug #38679 [PhpUnitBridge] Add missing exporter function for PHPUnit 7 (alcaeus) + * bug #38659 [String] fix slicing in UnicodeString (nicolas-grekas) + * bug #38595 [TwigBridge] do not translate null placeholders or titles (xabbuh) + * bug #38635 [Cache] Use correct expiry in ChainAdapter (Nyholm) + * bug #38652 [Filesystem] Check if failed unlink was caused by permission denied (Nyholm) + * bug #38645 [PropertyAccess] forward the caught exception (xabbuh) + * bug #38612 [Messenger/Amqp] Allow setting option "login" in DSN (W0rma) + * bug #38618 [Messenger][Doctrine] Avoid early db access for pgsql detection (chalasr) + * bug #38604 [DoctrineBridge] indexBy does not refer to attributes, but to column names (xabbuh) + * bug #38606 [WebProfilerBundle] Hide debug toolbar in print view (jt2k) + * bug #38582 [DI] Fix Reflection file name with eval()\'d code (maxime-aknin) + * bug #38578 Add missing use statement (jderusse) + * bug #38516 [HttpFoundation] Fix Range Requests (BattleRattle) + * bug #38553 [Lock] Reset Key lifetime time before we acquire it (Nyholm) + * bug #38551 Remove content-type check on toArray methods (jderusse) + * bug #38546 [String] fix "is too large" ValueError on PHP 8 (nicolas-grekas) + * bug #38544 [DI] fix dumping env vars (nicolas-grekas) + * bug #38533 [TwigBridge] Fix preload hint and remove "unlinked class class@anonymous" warning (burned42) + * bug #38530 [HttpClient] fix reading the body after a ClientException (nicolas-grekas) + * bug #38510 [PropertyInfo] Support for the mixed type (derrabus) + * bug #38493 [HttpClient] Fix CurlHttpClient memory leak (HypeMC) + * bug #38456 [Cache] skip igbinary < 3.1.6 (nicolas-grekas) + * bug #38392 [Ldap] Bypass the use of `ldap_control_paged_result` on PHP >= 7.3 (lucasaba) + * bug #38444 [PhpUnitBridge] fix running parallel tests with phpunit 9 (nicolas-grekas) + * bug #38446 [PropertyInfo] Extract from default value doesn't set collection boolean (Korbeil) + * bug #38442 [VarDumper] fix truncating big arrays (nicolas-grekas) + * bug #38433 [Mime] Fix serialization of RawMessage (gilbertsoft) + * 5.1.7 (2020-10-04) * bug #38396 Handle consecutive supports() calls in the RememberMeAuthenticator (wouterj) diff --git a/composer.json b/composer.json index 0dfefb3475e7a..caf3a939c59d7 100644 --- a/composer.json +++ b/composer.json @@ -171,8 +171,6 @@ ], "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } + "branch-version": "5.1" } } diff --git a/phpunit b/phpunit index e1b1aea0e46c5..71915eecb2b34 100755 --- a/phpunit +++ b/phpunit @@ -15,7 +15,7 @@ if (!getenv('SYMFONY_PHPUNIT_VERSION')) { if (\PHP_VERSION_ID < 70300) { putenv('SYMFONY_PHPUNIT_VERSION=8.5'); } else { - putenv('SYMFONY_PHPUNIT_VERSION=9.3'); + putenv('SYMFONY_PHPUNIT_VERSION=9.4'); } } elseif (\PHP_VERSION_ID >= 70000) { putenv('SYMFONY_PHPUNIT_VERSION=6.5'); @@ -24,5 +24,8 @@ if (!getenv('SYMFONY_PHPUNIT_VERSION')) { if (!getenv('SYMFONY_PATCH_TYPE_DECLARATIONS')) { putenv('SYMFONY_PATCH_TYPE_DECLARATIONS=deprecations=1'); } +if (getcwd() === realpath(__DIR__.'/src/Symfony/Bridge/PhpUnit')) { + putenv('SYMFONY_DEPRECATIONS_HELPER=disabled'); +} putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit'); require __DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit'; diff --git a/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php b/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php index 1829cdbcdb747..c4e5b025c3014 100644 --- a/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php +++ b/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php @@ -95,19 +95,10 @@ public function getTypes(string $class, string $property, array $context = []) $associationMapping = $metadata->getAssociationMapping($property); if (isset($associationMapping['indexBy'])) { - $indexProperty = $associationMapping['indexBy']; + $indexColumn = $associationMapping['indexBy']; /** @var ClassMetadataInfo $subMetadata */ $subMetadata = $this->entityManager ? $this->entityManager->getClassMetadata($associationMapping['targetEntity']) : $this->classMetadataFactory->getMetadataFor($associationMapping['targetEntity']); - $typeOfField = $subMetadata->getTypeOfField($indexProperty); - - if (null === $typeOfField) { - $associationMapping = $subMetadata->getAssociationMapping($indexProperty); - - /** @var ClassMetadataInfo $subMetadata */ - $indexProperty = $subMetadata->getSingleAssociationReferencedJoinColumnName($indexProperty); - $subMetadata = $this->entityManager ? $this->entityManager->getClassMetadata($associationMapping['targetEntity']) : $this->classMetadataFactory->getMetadataFor($associationMapping['targetEntity']); - $typeOfField = $subMetadata->getTypeOfField($indexProperty); - } + $typeOfField = $subMetadata->getTypeOfField($subMetadata->getFieldForColumn($indexColumn)); if (!$collectionKeyType = $this->getPhpType($typeOfField)) { return null; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php index 8d106ca53d2a6..ca9ab318d3f48 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php @@ -60,13 +60,6 @@ class EntityTypeTest extends BaseTypeTest protected static $supportedFeatureSetVersion = 404; - public static function setUpBeforeClass(): void - { - if (\PHP_VERSION_ID >= 80000) { - self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.'); - } - } - protected function setUp(): void { $this->em = DoctrineTestHelper::createTestEntityManager(); diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php index 81264fad27c5f..568efce33d382 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php @@ -42,7 +42,7 @@ class DoctrineDummy public $bar; /** - * @ManyToMany(targetEntity="DoctrineRelation", indexBy="rguid") + * @ManyToMany(targetEntity="DoctrineRelation", indexBy="rguid_column") */ protected $indexedBar; diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php index 5730cf81dd493..e480ca9d777ba 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php @@ -30,7 +30,7 @@ class DoctrineRelation public $id; /** - * @Column(type="guid") + * @Column(type="guid", name="rguid_column") */ protected $rguid; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php index 75faf9012a56c..6e406b06b76af 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php @@ -13,13 +13,6 @@ */ class DoctrineTokenProviderTest extends TestCase { - public static function setUpBeforeClass(): void - { - if (\PHP_VERSION_ID >= 80000) { - self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.'); - } - } - public function testCreateNewToken() { $provider = $this->bootstrapProvider(); diff --git a/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php index 257c6f7a93fbb..59793406b5d5a 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php @@ -24,13 +24,6 @@ class EntityUserProviderTest extends TestCase { - public static function setUpBeforeClass(): void - { - if (\PHP_VERSION_ID >= 80000) { - self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.'); - } - } - public function testRefreshUserGetsUserByPrimaryKey() { $em = DoctrineTestHelper::createTestEntityManager(); diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php index 985d4601bf4d5..e9e905c89c3a4 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php @@ -59,13 +59,6 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase protected $repositoryFactory; - public static function setUpBeforeClass(): void - { - if (\PHP_VERSION_ID >= 80000) { - self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.'); - } - } - protected function setUp(): void { $this->repositoryFactory = new TestRepositoryFactory(); diff --git a/src/Symfony/Bridge/Doctrine/composer.json b/src/Symfony/Bridge/Doctrine/composer.json index 1e05d0a559668..b0189df45993e 100644 --- a/src/Symfony/Bridge/Doctrine/composer.json +++ b/src/Symfony/Bridge/Doctrine/composer.json @@ -75,10 +75,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Bridge/Monolog/composer.json b/src/Symfony/Bridge/Monolog/composer.json index fb9566af1260e..6b44c2db80834 100644 --- a/src/Symfony/Bridge/Monolog/composer.json +++ b/src/Symfony/Bridge/Monolog/composer.json @@ -44,10 +44,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Bridge/PhpUnit/ConstraintTrait.php b/src/Symfony/Bridge/PhpUnit/ConstraintTrait.php index 64b24ee166858..446dbf2f4fe03 100644 --- a/src/Symfony/Bridge/PhpUnit/ConstraintTrait.php +++ b/src/Symfony/Bridge/PhpUnit/ConstraintTrait.php @@ -20,9 +20,19 @@ trait ConstraintTrait { use Legacy\ConstraintTraitForV6; } -} else { +} elseif ($r->getProperty('exporter')->isProtected()) { trait ConstraintTrait { use Legacy\ConstraintTraitForV7; } +} elseif (\PHP_VERSION < 70100 || !$r->getMethod('evaluate')->hasReturnType()) { + trait ConstraintTrait + { + use Legacy\ConstraintTraitForV8; + } +} else { + trait ConstraintTrait + { + use Legacy\ConstraintTraitForV9; + } } diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintLogicTrait.php b/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintLogicTrait.php new file mode 100644 index 0000000000000..e124358c4f724 --- /dev/null +++ b/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintLogicTrait.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PhpUnit\Legacy; + +/** + * @internal + */ +trait ConstraintLogicTrait +{ + private function doEvaluate($other, $description, $returnResult) + { + $success = false; + + if ($this->matches($other)) { + $success = true; + } + + if ($returnResult) { + return $success; + } + + if (!$success) { + $this->fail($other, $description); + } + + return null; + } + + private function doAdditionalFailureDescription($other): string + { + return ''; + } + + private function doCount(): int + { + return 1; + } + + private function doFailureDescription($other): string + { + return $this->exporter()->export($other).' '.$this->toString(); + } + + private function doMatches($other): bool + { + return false; + } + + private function doToString(): string + { + return ''; + } +} diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV6.php b/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV6.php index 71b7c3c39d738..53819e4b3c4d7 100644 --- a/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV6.php +++ b/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV6.php @@ -18,6 +18,14 @@ */ trait ConstraintTraitForV6 { + /** + * @return bool|null + */ + public function evaluate($other, $description = '', $returnResult = false) + { + return $this->doEvaluate($other, $description, $returnResult); + } + /** * @return int */ @@ -86,6 +94,25 @@ private function doCount() return 1; } + private function doEvaluate($other, $description, $returnResult) + { + $success = false; + + if ($this->matches($other)) { + $success = true; + } + + if ($returnResult) { + return $success; + } + + if (!$success) { + $this->fail($other, $description); + } + + return null; + } + private function doFailureDescription($other) { return $this->exporter()->export($other).' '.$this->toString(); diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV7.php b/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV7.php index 48c79a76dd0cf..1e625e463a1e8 100644 --- a/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV7.php +++ b/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV7.php @@ -11,11 +11,23 @@ namespace Symfony\Bridge\PhpUnit\Legacy; +use SebastianBergmann\Exporter\Exporter; + /** * @internal */ trait ConstraintTraitForV7 { + use ConstraintLogicTrait; + + /** + * @return bool|null + */ + public function evaluate($other, $description = '', $returnResult = false) + { + return $this->doEvaluate($other, $description, $returnResult); + } + public function count(): int { return $this->doCount(); @@ -31,38 +43,22 @@ protected function additionalFailureDescription($other): string return $this->doAdditionalFailureDescription($other); } - protected function failureDescription($other): string - { - return $this->doFailureDescription($other); - } - - protected function matches($other): bool - { - return $this->doMatches($other); - } - - private function doAdditionalFailureDescription($other): string - { - return ''; - } - - private function doCount(): int + protected function exporter(): Exporter { - return 1; - } + if (null !== $this->exporter) { + $this->exporter = new Exporter(); + } - private function doFailureDescription($other): string - { - return $this->exporter()->export($other).' '.$this->toString(); + return $this->exporter; } - private function doMatches($other): bool + protected function failureDescription($other): string { - return false; + return $this->doFailureDescription($other); } - private function doToString(): string + protected function matches($other): bool { - return ''; + return $this->doMatches($other); } } diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV8.php b/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV8.php new file mode 100644 index 0000000000000..d31cc1215877b --- /dev/null +++ b/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV8.php @@ -0,0 +1,53 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PhpUnit\Legacy; + +/** + * @internal + */ +trait ConstraintTraitForV8 +{ + use ConstraintLogicTrait; + + /** + * @return bool|null + */ + public function evaluate($other, $description = '', $returnResult = false) + { + return $this->doEvaluate($other, $description, $returnResult); + } + + public function count(): int + { + return $this->doCount(); + } + + public function toString(): string + { + return $this->doToString(); + } + + protected function additionalFailureDescription($other): string + { + return $this->doAdditionalFailureDescription($other); + } + + protected function failureDescription($other): string + { + return $this->doFailureDescription($other); + } + + protected function matches($other): bool + { + return $this->doMatches($other); + } +} diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV9.php b/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV9.php new file mode 100644 index 0000000000000..66da873e4243e --- /dev/null +++ b/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV9.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PhpUnit\Legacy; + +/** + * @internal + */ +trait ConstraintTraitForV9 +{ + use ConstraintLogicTrait; + + public function evaluate($other, string $description = '', bool $returnResult = false): ?bool + { + return $this->doEvaluate($other, $description, $returnResult); + } + + public function count(): int + { + return $this->doCount(); + } + + public function toString(): string + { + return $this->doToString(); + } + + protected function additionalFailureDescription($other): string + { + return $this->doAdditionalFailureDescription($other); + } + + protected function failureDescription($other): string + { + return $this->doFailureDescription($other); + } + + protected function matches($other): bool + { + return $this->doMatches($other); + } +} diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/PolyfillTestCaseTrait.php b/src/Symfony/Bridge/PhpUnit/Legacy/PolyfillTestCaseTrait.php index cb3fbf44903bd..ad2150436833d 100644 --- a/src/Symfony/Bridge/PhpUnit/Legacy/PolyfillTestCaseTrait.php +++ b/src/Symfony/Bridge/PhpUnit/Legacy/PolyfillTestCaseTrait.php @@ -11,6 +11,9 @@ namespace Symfony\Bridge\PhpUnit\Legacy; +use PHPUnit\Framework\Error\Error; +use PHPUnit\Framework\Error\Notice; +use PHPUnit\Framework\Error\Warning; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; @@ -66,9 +69,7 @@ protected function createPartialMock($originalClassName, array $methods) */ public function expectException($exception) { - $property = new \ReflectionProperty(TestCase::class, 'expectedException'); - $property->setAccessible(true); - $property->setValue($this, $exception); + $this->doExpectException($exception); } /** @@ -116,4 +117,95 @@ public function expectExceptionMessageRegExp($messageRegExp) $property->setAccessible(true); $property->setValue($this, $messageRegExp); } + + /** + * @return void + */ + public function expectNotice() + { + $this->doExpectException(Notice::class); + } + + /** + * @param string $message + * + * @return void + */ + public function expectNoticeMessage($message) + { + $this->expectExceptionMessage($message); + } + + /** + * @param string $regularExpression + * + * @return void + */ + public function expectNoticeMessageMatches($regularExpression) + { + $this->expectExceptionMessageMatches($regularExpression); + } + + /** + * @return void + */ + public function expectWarning() + { + $this->doExpectException(Warning::class); + } + + /** + * @param string $message + * + * @return void + */ + public function expectWarningMessage($message) + { + $this->expectExceptionMessage($message); + } + + /** + * @param string $regularExpression + * + * @return void + */ + public function expectWarningMessageMatches($regularExpression) + { + $this->expectExceptionMessageMatches($regularExpression); + } + + /** + * @return void + */ + public function expectError() + { + $this->doExpectException(Error::class); + } + + /** + * @param string $message + * + * @return void + */ + public function expectErrorMessage($message) + { + $this->expectExceptionMessage($message); + } + + /** + * @param string $regularExpression + * + * @return void + */ + public function expectErrorMessageMatches($regularExpression) + { + $this->expectExceptionMessageMatches($regularExpression); + } + + private function doExpectException($exception) + { + $property = new \ReflectionProperty(TestCase::class, 'expectedException'); + $property->setAccessible(true); + $property->setValue($this, $exception); + } } diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php index 403d23cdd5505..5c2f28264037b 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php @@ -41,7 +41,7 @@ private static function getVendorDir() } self::$vendorDir = $vendorDir; - mkdir($vendorDir.'/myfakevendor/myfakepackage2'); + @mkdir($vendorDir.'/myfakevendor/myfakepackage2'); touch($vendorDir.'/myfakevendor/myfakepackage1/MyFakeFile1.php'); touch($vendorDir.'/myfakevendor/myfakepackage1/MyFakeFile2.php'); touch($vendorDir.'/myfakevendor/myfakepackage2/MyFakeFile.php'); diff --git a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php index c03a4c2962d02..efbe5d2cd48a1 100644 --- a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php +++ b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php @@ -95,7 +95,7 @@ if (\PHP_VERSION_ID >= 80000) { // PHP 8 requires PHPUnit 9.3+ - $PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '9.3'); + $PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '9.4'); } elseif (\PHP_VERSION_ID >= 70200) { // PHPUnit 8 requires PHP 7.2+ $PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '8.3'); @@ -197,7 +197,7 @@ 'requires' => ['php' => '*'], ]; - $stableVersions = array_filter($info['versions'], function($v) { + $stableVersions = array_filter($info['versions'], function ($v) { return !preg_match('/-dev$|^dev-/', $v); }); @@ -265,11 +265,11 @@ class SymfonyExcludeListPhpunit {} if (method_exists('PHPUnit\Util\ExcludeList', 'addDirectory')) { (new PHPUnit\Util\Excludelist())->getExcludedDirectories(); PHPUnit\Util\ExcludeList::addDirectory(\dirname((new \ReflectionClass('SymfonyExcludeListPhpunit'))->getFileName())); - PHPUnit\Util\ExcludeList::addDirectory(\dirname((new \ReflectionClass('SymfonyExcludeListSimplePhpunit'))->getFileName())); + class_exists('SymfonyExcludeListSimplePhpunit', false) && PHPUnit\Util\ExcludeList::addDirectory(\dirname((new \ReflectionClass('SymfonyExcludeListSimplePhpunit'))->getFileName())); } elseif (method_exists('PHPUnit\Util\Blacklist', 'addDirectory')) { (new PHPUnit\Util\BlackList())->getBlacklistedDirectories(); PHPUnit\Util\Blacklist::addDirectory(\dirname((new \ReflectionClass('SymfonyExcludeListPhpunit'))->getFileName())); - PHPUnit\Util\Blacklist::addDirectory(\dirname((new \ReflectionClass('SymfonyExcludeListSimplePhpunit'))->getFileName())); + class_exists('SymfonyExcludeListSimplePhpunit', false) && PHPUnit\Util\Blacklist::addDirectory(\dirname((new \ReflectionClass('SymfonyExcludeListSimplePhpunit'))->getFileName())); } else { PHPUnit\Util\Blacklist::$blacklistedClassNames['SymfonyExcludeListPhpunit'] = 1; PHPUnit\Util\Blacklist::$blacklistedClassNames['SymfonyExcludeListSimplePhpunit'] = 1; diff --git a/src/Symfony/Bridge/PhpUnit/composer.json b/src/Symfony/Bridge/PhpUnit/composer.json index 60c13a0aabc70..844cdee96fbf7 100644 --- a/src/Symfony/Bridge/PhpUnit/composer.json +++ b/src/Symfony/Bridge/PhpUnit/composer.json @@ -20,6 +20,9 @@ "php": "THIS BRIDGE WHEN TESTING LOWEST SYMFONY VERSIONS.", "php": ">=5.5.9" }, + "require-dev": { + "symfony/deprecation-contracts": "^2.1" + }, "suggest": { "symfony/error-handler": "For tracking deprecated interfaces usages at runtime with DebugClassLoader" }, @@ -38,15 +41,9 @@ ], "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - }, "thanks": { "name": "phpunit/phpunit", "url": "https://github.com/sebastianbergmann/phpunit" } - }, - "require-dev": { - "symfony/deprecation-contracts": "^2.1" } } diff --git a/src/Symfony/Bridge/ProxyManager/composer.json b/src/Symfony/Bridge/ProxyManager/composer.json index 5c04e00da8407..fb32b177ac7f7 100644 --- a/src/Symfony/Bridge/ProxyManager/composer.json +++ b/src/Symfony/Bridge/ProxyManager/composer.json @@ -17,6 +17,7 @@ ], "require": { "php": ">=7.2.5", + "composer/package-versions-deprecated": "^1.8", "symfony/dependency-injection": "^5.0", "ocramius/proxy-manager": "~2.1" }, @@ -32,10 +33,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Bridge/Twig/Extension/TranslationExtension.php b/src/Symfony/Bridge/Twig/Extension/TranslationExtension.php index d65578608d1aa..4e143f78d360e 100644 --- a/src/Symfony/Bridge/Twig/Extension/TranslationExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/TranslationExtension.php @@ -23,6 +23,7 @@ // Help opcache.preload discover always-needed symbols class_exists(TranslatorInterface::class); +class_exists(TranslatorTrait::class); /** * Provides integration of the Translation component with Twig. diff --git a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php index 55bc3ae9a8959..213365ed9f1ef 100644 --- a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php +++ b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php @@ -64,21 +64,18 @@ protected function doEnterNode(Node $node, Environment $env): Node return $node; } - if ($node instanceof FilterExpression && \in_array($node->getNode('filter')->getAttribute('value'), ['trans', 'transchoice'])) { + if ($node instanceof FilterExpression && 'trans' === $node->getNode('filter')->getAttribute('value')) { $arguments = $node->getNode('arguments'); - $ind = 'trans' === $node->getNode('filter')->getAttribute('value') ? 1 : 2; if ($this->isNamedArguments($arguments)) { - if (!$arguments->hasNode('domain') && !$arguments->hasNode($ind)) { + if (!$arguments->hasNode('domain') && !$arguments->hasNode(1)) { $arguments->setNode('domain', $this->scope->get('domain')); } - } else { - if (!$arguments->hasNode($ind)) { - if (!$arguments->hasNode($ind - 1)) { - $arguments->setNode($ind - 1, new ArrayExpression([], $node->getTemplateLine())); - } - - $arguments->setNode($ind, $this->scope->get('domain')); + } elseif (!$arguments->hasNode(1)) { + if (!$arguments->hasNode(0)) { + $arguments->setNode(0, new ArrayExpression([], $node->getTemplateLine())); } + + $arguments->setNode(1, $this->scope->get('domain')); } } elseif ($node instanceof TransNode) { if (!$node->hasNode('domain')) { diff --git a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php index 89a15cd622c5d..3d5edb4ae1994 100644 --- a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php +++ b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php @@ -66,16 +66,6 @@ protected function doEnterNode(Node $node, Environment $env): Node $node->getNode('node')->getAttribute('value'), $this->getReadDomainFromArguments($node->getNode('arguments'), 1), ]; - } elseif ( - $node instanceof FilterExpression && - 'transchoice' === $node->getNode('filter')->getAttribute('value') && - $node->getNode('node') instanceof ConstantExpression - ) { - // extract constant nodes with a trans filter - $this->messages[] = [ - $node->getNode('node')->getAttribute('value'), - $this->getReadDomainFromArguments($node->getNode('arguments'), 2), - ]; } elseif ($node instanceof TransNode) { // extract trans nodes $this->messages[] = [ diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig index 2e58e26db0e67..3f31c5f31c8c6 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig @@ -466,7 +466,7 @@ {%- for attrname, attrvalue in attr -%} {{- " " -}} {%- if attrname in ['placeholder', 'title'] -%} - {{- attrname }}="{{ translation_domain is same as(false) ? attrvalue : attrvalue|trans(attr_translation_parameters, translation_domain) }}" + {{- attrname }}="{{ translation_domain is same as(false) or attrvalue is null ? attrvalue : attrvalue|trans(attr_translation_parameters, translation_domain) }}" {%- elseif attrvalue is same as(true) -%} {{- attrname }}="{{ attrname }}" {%- elseif attrvalue is not same as(false) -%} diff --git a/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php b/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php index f2789542ff551..09e8352faeccf 100644 --- a/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php @@ -142,7 +142,7 @@ protected function tearDown(): void { foreach ($this->files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } } diff --git a/src/Symfony/Bridge/Twig/UndefinedCallableHandler.php b/src/Symfony/Bridge/Twig/UndefinedCallableHandler.php index fa3049d3dd7c2..a058acb40af28 100644 --- a/src/Symfony/Bridge/Twig/UndefinedCallableHandler.php +++ b/src/Symfony/Bridge/Twig/UndefinedCallableHandler.php @@ -22,7 +22,6 @@ class UndefinedCallableHandler private static $filterComponents = [ 'humanize' => 'form', 'trans' => 'translation', - 'transchoice' => 'translation', 'yaml_encode' => 'yaml', 'yaml_dump' => 'yaml', ]; diff --git a/src/Symfony/Bridge/Twig/composer.json b/src/Symfony/Bridge/Twig/composer.json index 2f89f709f7127..5454e868e0766 100644 --- a/src/Symfony/Bridge/Twig/composer.json +++ b/src/Symfony/Bridge/Twig/composer.json @@ -77,10 +77,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Bundle/DebugBundle/composer.json b/src/Symfony/Bundle/DebugBundle/composer.json index 34d5a39c01662..c77e3a13f4c1e 100644 --- a/src/Symfony/Bundle/DebugBundle/composer.json +++ b/src/Symfony/Bundle/DebugBundle/composer.json @@ -41,10 +41,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index cfb5d0728a4dc..60302152b10e7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -74,6 +74,7 @@ use Symfony\Component\Lock\LockInterface; use Symfony\Component\Lock\PersistingStoreInterface; use Symfony\Component\Lock\Store\StoreFactory; +use Symfony\Component\Lock\StoreInterface; use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesTransportFactory; use Symfony\Component\Mailer\Bridge\Google\Transport\GmailTransportFactory; use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillTransportFactory; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/XliffLintCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/XliffLintCommandTest.php index 7d6783d9352c0..9d786f2935776 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/XliffLintCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/XliffLintCommandTest.php @@ -121,9 +121,9 @@ protected function tearDown(): void { foreach ($this->files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } - rmdir(sys_get_temp_dir().'/xliff-lint-test'); + @rmdir(sys_get_temp_dir().'/xliff-lint-test'); } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php index af81f335e3cdb..29947983f42af 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php @@ -168,9 +168,9 @@ protected function tearDown(): void { foreach ($this->files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } - rmdir(sys_get_temp_dir().'/yml-lint-test'); + @rmdir(sys_get_temp_dir().'/yml-lint-test'); } } diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index 62555c0c6fa26..5a3572269aca0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -108,10 +108,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Bundle/SecurityBundle/composer.json b/src/Symfony/Bundle/SecurityBundle/composer.json index 7b2575a51f103..0e13bfaad46b6 100644 --- a/src/Symfony/Bundle/SecurityBundle/composer.json +++ b/src/Symfony/Bundle/SecurityBundle/composer.json @@ -60,10 +60,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Bundle/TwigBundle/composer.json b/src/Symfony/Bundle/TwigBundle/composer.json index f5f34b02921f7..74ea9a36a8a9c 100644 --- a/src/Symfony/Bundle/TwigBundle/composer.json +++ b/src/Symfony/Bundle/TwigBundle/composer.json @@ -50,10 +50,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 6669cd721fe73..d7508ec1448de 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -541,6 +541,6 @@ div.sf-toolbar .sf-toolbar-block a:hover { /***** Media query print: Do not print the Toolbar. *****/ @media print { .sf-toolbar { - display: none; + display: none !important; } } diff --git a/src/Symfony/Bundle/WebProfilerBundle/composer.json b/src/Symfony/Bundle/WebProfilerBundle/composer.json index 072c41fa644f0..868a5180778d4 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/composer.json +++ b/src/Symfony/Bundle/WebProfilerBundle/composer.json @@ -40,10 +40,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Asset/composer.json b/src/Symfony/Component/Asset/composer.json index 5514494dc5890..65295f8797432 100644 --- a/src/Symfony/Component/Asset/composer.json +++ b/src/Symfony/Component/Asset/composer.json @@ -32,10 +32,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php b/src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php index 63374c50144c0..4292cd553abbb 100644 --- a/src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php +++ b/src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php @@ -56,7 +56,7 @@ public function testXmlHttpRequest() { $client = $this->getBrowser(); $client->xmlHttpRequest('GET', 'http://example.com/', [], [], [], null, true); - $this->assertEquals($client->getRequest()->getServer()['HTTP_X_REQUESTED_WITH'], 'XMLHttpRequest'); + $this->assertSame('XMLHttpRequest', $client->getRequest()->getServer()['HTTP_X_REQUESTED_WITH']); $this->assertFalse($client->getServerParameter('HTTP_X_REQUESTED_WITH', false)); } @@ -65,9 +65,9 @@ public function testGetRequestWithIpAsHttpHost() $client = $this->getBrowser(); $client->request('GET', 'https://example.com/foo', [], [], ['HTTP_HOST' => '127.0.0.1']); - $this->assertEquals('https://example.com/foo', $client->getRequest()->getUri()); + $this->assertSame('https://example.com/foo', $client->getRequest()->getUri()); $headers = $client->getRequest()->getServer(); - $this->assertEquals('127.0.0.1', $headers['HTTP_HOST']); + $this->assertSame('127.0.0.1', $headers['HTTP_HOST']); } public function testGetResponse() @@ -76,7 +76,7 @@ public function testGetResponse() $client->setNextResponse(new Response('foo')); $client->request('GET', 'http://example.com/'); - $this->assertEquals('foo', $client->getResponse()->getContent(), '->getCrawler() returns the Response of the last request'); + $this->assertSame('foo', $client->getResponse()->getContent(), '->getCrawler() returns the Response of the last request'); $this->assertInstanceOf('Symfony\Component\BrowserKit\Response', $client->getResponse(), '->getCrawler() returns the Response of the last request'); } @@ -104,7 +104,7 @@ public function testGetContent() $client = $this->getBrowser(); $client->request('POST', 'http://example.com/jsonrpc', [], [], [], $json); - $this->assertEquals($json, $client->getRequest()->getContent()); + $this->assertSame($json, $client->getRequest()->getContent()); } public function testGetCrawler() @@ -130,12 +130,12 @@ public function testRequestHttpHeaders() $client = $this->getBrowser(); $client->request('GET', '/'); $headers = $client->getRequest()->getServer(); - $this->assertEquals('localhost', $headers['HTTP_HOST'], '->request() sets the HTTP_HOST header'); + $this->assertSame('localhost', $headers['HTTP_HOST'], '->request() sets the HTTP_HOST header'); $client = $this->getBrowser(); $client->request('GET', 'http://www.example.com'); $headers = $client->getRequest()->getServer(); - $this->assertEquals('www.example.com', $headers['HTTP_HOST'], '->request() sets the HTTP_HOST header'); + $this->assertSame('www.example.com', $headers['HTTP_HOST'], '->request() sets the HTTP_HOST header'); $client->request('GET', 'https://www.example.com'); $headers = $client->getRequest()->getServer(); @@ -144,66 +144,66 @@ public function testRequestHttpHeaders() $client = $this->getBrowser(); $client->request('GET', 'http://www.example.com:8080'); $headers = $client->getRequest()->getServer(); - $this->assertEquals('www.example.com:8080', $headers['HTTP_HOST'], '->request() sets the HTTP_HOST header with port'); + $this->assertSame('www.example.com:8080', $headers['HTTP_HOST'], '->request() sets the HTTP_HOST header with port'); } public function testRequestURIConversion() { $client = $this->getBrowser(); $client->request('GET', '/foo'); - $this->assertEquals('http://localhost/foo', $client->getRequest()->getUri(), '->request() converts the URI to an absolute one'); + $this->assertSame('http://localhost/foo', $client->getRequest()->getUri(), '->request() converts the URI to an absolute one'); $client = $this->getBrowser(); $client->request('GET', 'http://www.example.com'); - $this->assertEquals('http://www.example.com', $client->getRequest()->getUri(), '->request() does not change absolute URIs'); + $this->assertSame('http://www.example.com', $client->getRequest()->getUri(), '->request() does not change absolute URIs'); $client = $this->getBrowser(); $client->request('GET', 'http://www.example.com/'); $client->request('GET', '/foo'); - $this->assertEquals('http://www.example.com/foo', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); + $this->assertSame('http://www.example.com/foo', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); $client = $this->getBrowser(); $client->request('GET', 'http://www.example.com/foo'); $client->request('GET', '#'); - $this->assertEquals('http://www.example.com/foo#', $client->getRequest()->getUri(), '->request() uses the previous request for #'); + $this->assertSame('http://www.example.com/foo#', $client->getRequest()->getUri(), '->request() uses the previous request for #'); $client->request('GET', '#'); - $this->assertEquals('http://www.example.com/foo#', $client->getRequest()->getUri(), '->request() uses the previous request for #'); + $this->assertSame('http://www.example.com/foo#', $client->getRequest()->getUri(), '->request() uses the previous request for #'); $client->request('GET', '#foo'); - $this->assertEquals('http://www.example.com/foo#foo', $client->getRequest()->getUri(), '->request() uses the previous request for #'); + $this->assertSame('http://www.example.com/foo#foo', $client->getRequest()->getUri(), '->request() uses the previous request for #'); $client = $this->getBrowser(); $client->request('GET', 'http://www.example.com/foo/'); $client->request('GET', 'bar'); - $this->assertEquals('http://www.example.com/foo/bar', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); + $this->assertSame('http://www.example.com/foo/bar', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); $client = $this->getBrowser(); $client->request('GET', 'http://www.example.com/foo/foobar'); $client->request('GET', 'bar'); - $this->assertEquals('http://www.example.com/foo/bar', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); + $this->assertSame('http://www.example.com/foo/bar', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); $client = $this->getBrowser(); $client->request('GET', 'http://www.example.com/foo/'); $client->request('GET', 'http'); - $this->assertEquals('http://www.example.com/foo/http', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); + $this->assertSame('http://www.example.com/foo/http', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); $client = $this->getBrowser(); $client->request('GET', 'http://www.example.com/foo'); $client->request('GET', 'http/bar'); - $this->assertEquals('http://www.example.com/http/bar', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); + $this->assertSame('http://www.example.com/http/bar', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); $client = $this->getBrowser(); $client->request('GET', 'http://www.example.com/'); $client->request('GET', 'http'); - $this->assertEquals('http://www.example.com/http', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); + $this->assertSame('http://www.example.com/http', $client->getRequest()->getUri(), '->request() uses the previous request for relative URLs'); $client = $this->getBrowser(); $client->request('GET', 'http://www.example.com/foo'); $client->request('GET', '?'); - $this->assertEquals('http://www.example.com/foo?', $client->getRequest()->getUri(), '->request() uses the previous request for ?'); + $this->assertSame('http://www.example.com/foo?', $client->getRequest()->getUri(), '->request() uses the previous request for ?'); $client->request('GET', '?'); - $this->assertEquals('http://www.example.com/foo?', $client->getRequest()->getUri(), '->request() uses the previous request for ?'); + $this->assertSame('http://www.example.com/foo?', $client->getRequest()->getUri(), '->request() uses the previous request for ?'); $client->request('GET', '?foo=bar'); - $this->assertEquals('http://www.example.com/foo?foo=bar', $client->getRequest()->getUri(), '->request() uses the previous request for ?'); + $this->assertSame('http://www.example.com/foo?foo=bar', $client->getRequest()->getUri(), '->request() uses the previous request for ?'); } public function testRequestReferer() @@ -212,7 +212,7 @@ public function testRequestReferer() $client->request('GET', 'http://www.example.com/foo/foobar'); $client->request('GET', 'bar'); $server = $client->getRequest()->getServer(); - $this->assertEquals('http://www.example.com/foo/foobar', $server['HTTP_REFERER'], '->request() sets the referer'); + $this->assertSame('http://www.example.com/foo/foobar', $server['HTTP_REFERER'], '->request() sets the referer'); } public function testRequestRefererCanBeOverridden() @@ -221,7 +221,7 @@ public function testRequestRefererCanBeOverridden() $client->request('GET', 'http://www.example.com/foo/foobar'); $client->request('GET', 'bar', [], [], ['HTTP_REFERER' => 'xyz']); $server = $client->getRequest()->getServer(); - $this->assertEquals('xyz', $server['HTTP_REFERER'], '->request() allows referer to be overridden'); + $this->assertSame('xyz', $server['HTTP_REFERER'], '->request() allows referer to be overridden'); } public function testRequestHistory() @@ -230,8 +230,8 @@ public function testRequestHistory() $client->request('GET', 'http://www.example.com/foo/foobar'); $client->request('GET', 'bar'); - $this->assertEquals('http://www.example.com/foo/bar', $client->getHistory()->current()->getUri(), '->request() updates the History'); - $this->assertEquals('http://www.example.com/foo/foobar', $client->getHistory()->back()->getUri(), '->request() updates the History'); + $this->assertSame('http://www.example.com/foo/bar', $client->getHistory()->current()->getUri(), '->request() updates the History'); + $this->assertSame('http://www.example.com/foo/foobar', $client->getHistory()->back()->getUri(), '->request() updates the History'); } public function testRequestCookies() @@ -239,10 +239,10 @@ public function testRequestCookies() $client = $this->getBrowser(); $client->setNextResponse(new Response('foo', 200, ['Set-Cookie' => 'foo=bar'])); $client->request('GET', 'http://www.example.com/foo/foobar'); - $this->assertEquals(['foo' => 'bar'], $client->getCookieJar()->allValues('http://www.example.com/foo/foobar'), '->request() updates the CookieJar'); + $this->assertSame(['foo' => 'bar'], $client->getCookieJar()->allValues('http://www.example.com/foo/foobar'), '->request() updates the CookieJar'); $client->request('GET', 'bar'); - $this->assertEquals(['foo' => 'bar'], $client->getCookieJar()->allValues('http://www.example.com/foo/foobar'), '->request() updates the CookieJar'); + $this->assertSame(['foo' => 'bar'], $client->getCookieJar()->allValues('http://www.example.com/foo/foobar'), '->request() updates the CookieJar'); } public function testRequestSecureCookies() @@ -262,7 +262,7 @@ public function testClick() $client->click($crawler->filter('a')->link()); - $this->assertEquals('http://www.example.com/foo', $client->getRequest()->getUri(), '->click() clicks on links'); + $this->assertSame('http://www.example.com/foo', $client->getRequest()->getUri(), '->click() clicks on links'); } public function testClickLink() @@ -272,7 +272,7 @@ public function testClickLink() $client->request('GET', 'http://www.example.com/foo/foobar'); $client->clickLink('foo'); - $this->assertEquals('http://www.example.com/foo', $client->getRequest()->getUri(), '->click() clicks on links'); + $this->assertSame('http://www.example.com/foo', $client->getRequest()->getUri(), '->click() clicks on links'); } public function testClickLinkNotFound() @@ -297,7 +297,7 @@ public function testClickForm() $client->click($crawler->filter('input')->form()); - $this->assertEquals('http://www.example.com/foo', $client->getRequest()->getUri(), '->click() Form submit forms'); + $this->assertSame('http://www.example.com/foo', $client->getRequest()->getUri(), '->click() Form submit forms'); } public function testSubmit() @@ -308,7 +308,7 @@ public function testSubmit() $client->submit($crawler->filter('input')->form()); - $this->assertEquals('http://www.example.com/foo', $client->getRequest()->getUri(), '->submit() submit forms'); + $this->assertSame('http://www.example.com/foo', $client->getRequest()->getUri(), '->submit() submit forms'); } public function testSubmitForm() @@ -324,11 +324,11 @@ public function testSubmitForm() 'HTTP_USER_AGENT' => 'Symfony User Agent', ]); - $this->assertEquals('http://www.example.com/foo', $client->getRequest()->getUri(), '->submitForm() submit forms'); - $this->assertEquals('PUT', $client->getRequest()->getMethod(), '->submitForm() allows to change the method'); - $this->assertEquals('new username', $client->getRequest()->getParameters()['username'], '->submitForm() allows to override the form values'); - $this->assertEquals('new password', $client->getRequest()->getParameters()['password'], '->submitForm() allows to override the form values'); - $this->assertEquals('Symfony User Agent', $client->getRequest()->getServer()['HTTP_USER_AGENT'], '->submitForm() allows to change the $_SERVER parameters'); + $this->assertSame('http://www.example.com/foo', $client->getRequest()->getUri(), '->submitForm() submit forms'); + $this->assertSame('PUT', $client->getRequest()->getMethod(), '->submitForm() allows to change the method'); + $this->assertSame('new username', $client->getRequest()->getParameters()['username'], '->submitForm() allows to override the form values'); + $this->assertSame('new password', $client->getRequest()->getParameters()['password'], '->submitForm() allows to override the form values'); + $this->assertSame('Symfony User Agent', $client->getRequest()->getServer()['HTTP_USER_AGENT'], '->submitForm() allows to change the $_SERVER parameters'); } public function testSubmitFormNotFound() @@ -356,19 +356,19 @@ public function testSubmitPreserveAuth() $server = $client->getRequest()->getServer(); $this->assertArrayHasKey('PHP_AUTH_USER', $server); - $this->assertEquals('foo', $server['PHP_AUTH_USER']); + $this->assertSame('foo', $server['PHP_AUTH_USER']); $this->assertArrayHasKey('PHP_AUTH_PW', $server); - $this->assertEquals('bar', $server['PHP_AUTH_PW']); + $this->assertSame('bar', $server['PHP_AUTH_PW']); $client->submit($crawler->filter('input')->form()); - $this->assertEquals('http://www.example.com/foo', $client->getRequest()->getUri(), '->submit() submit forms'); + $this->assertSame('http://www.example.com/foo', $client->getRequest()->getUri(), '->submit() submit forms'); $server = $client->getRequest()->getServer(); $this->assertArrayHasKey('PHP_AUTH_USER', $server); - $this->assertEquals('foo', $server['PHP_AUTH_USER']); + $this->assertSame('foo', $server['PHP_AUTH_USER']); $this->assertArrayHasKey('PHP_AUTH_PW', $server); - $this->assertEquals('bar', $server['PHP_AUTH_PW']); + $this->assertSame('bar', $server['PHP_AUTH_PW']); } public function testSubmitPassthrewHeaders() @@ -382,7 +382,7 @@ public function testSubmitPassthrewHeaders() $server = $client->getRequest()->getServer(); $this->assertArrayHasKey('Accept-Language', $server); - $this->assertEquals('de', $server['Accept-Language']); + $this->assertSame('de', $server['Accept-Language']); } public function testFollowRedirect() @@ -402,19 +402,19 @@ public function testFollowRedirect() $client->request('GET', 'http://www.example.com/foo/foobar'); $client->followRedirect(); - $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect if any'); + $this->assertSame('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect if any'); $client = $this->getBrowser(); $client->setNextResponse(new Response('', 302, ['Location' => 'http://www.example.com/redirected'])); $client->request('GET', 'http://www.example.com/foo/foobar'); - $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() automatically follows redirects if followRedirects is true'); + $this->assertSame('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() automatically follows redirects if followRedirects is true'); $client = $this->getBrowser(); $client->setNextResponse(new Response('', 201, ['Location' => 'http://www.example.com/redirected'])); $client->request('GET', 'http://www.example.com/foo/foobar'); - $this->assertEquals('http://www.example.com/foo/foobar', $client->getRequest()->getUri(), '->followRedirect() does not follow redirect if HTTP Code is not 30x'); + $this->assertSame('http://www.example.com/foo/foobar', $client->getRequest()->getUri(), '->followRedirect() does not follow redirect if HTTP Code is not 30x'); $client = $this->getBrowser(); $client->setNextResponse(new Response('', 201, ['Location' => 'http://www.example.com/redirected'])); @@ -434,12 +434,12 @@ public function testFollowRelativeRedirect() $client = $this->getBrowser(); $client->setNextResponse(new Response('', 302, ['Location' => '/redirected'])); $client->request('GET', 'http://www.example.com/foo/foobar'); - $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect if any'); + $this->assertSame('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect if any'); $client = $this->getBrowser(); $client->setNextResponse(new Response('', 302, ['Location' => '/redirected:1234'])); $client->request('GET', 'http://www.example.com/foo/foobar'); - $this->assertEquals('http://www.example.com/redirected:1234', $client->getRequest()->getUri(), '->followRedirect() follows relative urls'); + $this->assertSame('http://www.example.com/redirected:1234', $client->getRequest()->getUri(), '->followRedirect() follows relative urls'); } public function testFollowRedirectWithMaxRedirects() @@ -448,7 +448,7 @@ public function testFollowRedirectWithMaxRedirects() $client->setMaxRedirects(1); $client->setNextResponse(new Response('', 302, ['Location' => 'http://www.example.com/redirected'])); $client->request('GET', 'http://www.example.com/foo/foobar'); - $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect if any'); + $this->assertSame('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect if any'); $client->setNextResponse(new Response('', 302, ['Location' => 'http://www.example.com/redirected2'])); try { @@ -460,25 +460,25 @@ public function testFollowRedirectWithMaxRedirects() $client->setNextResponse(new Response('', 302, ['Location' => 'http://www.example.com/redirected'])); $client->request('GET', 'http://www.example.com/foo/foobar'); - $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect if any'); + $this->assertSame('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect if any'); $client->setNextResponse(new Response('', 302, ['Location' => '/redirected'])); $client->request('GET', 'http://www.example.com/foo/foobar'); - $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows relative URLs'); + $this->assertSame('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows relative URLs'); $client = $this->getBrowser(); $client->setNextResponse(new Response('', 302, ['Location' => '//www.example.org/'])); $client->request('GET', 'https://www.example.com/'); - $this->assertEquals('https://www.example.org/', $client->getRequest()->getUri(), '->followRedirect() follows protocol-relative URLs'); + $this->assertSame('https://www.example.org/', $client->getRequest()->getUri(), '->followRedirect() follows protocol-relative URLs'); $client = $this->getBrowser(); $client->setNextResponse(new Response('', 302, ['Location' => 'http://www.example.com/redirected'])); $client->request('POST', 'http://www.example.com/foo/foobar', ['name' => 'bar']); - $this->assertEquals('GET', $client->getRequest()->getMethod(), '->followRedirect() uses a GET for 302'); - $this->assertEquals([], $client->getRequest()->getParameters(), '->followRedirect() does not submit parameters when changing the method'); + $this->assertSame('GET', $client->getRequest()->getMethod(), '->followRedirect() uses a GET for 302'); + $this->assertSame([], $client->getRequest()->getParameters(), '->followRedirect() does not submit parameters when changing the method'); } public function testFollowRedirectWithCookies() @@ -490,9 +490,9 @@ public function testFollowRedirectWithCookies() 'Set-Cookie' => 'foo=bar', ])); $client->request('GET', 'http://www.example.com/'); - $this->assertEquals([], $client->getRequest()->getCookies()); + $this->assertSame([], $client->getRequest()->getCookies()); $client->followRedirect(); - $this->assertEquals(['foo' => 'bar'], $client->getRequest()->getCookies()); + $this->assertSame(['foo' => 'bar'], $client->getRequest()->getCookies()); } public function testFollowRedirectWithHeaders() @@ -551,9 +551,9 @@ public function testIsFollowingRedirects() public function testGetMaxRedirects() { $client = $this->getBrowser(); - $this->assertEquals(-1, $client->getMaxRedirects(), '->getMaxRedirects() returns default value'); + $this->assertSame(-1, $client->getMaxRedirects(), '->getMaxRedirects() returns default value'); $client->setMaxRedirects(3); - $this->assertEquals(3, $client->getMaxRedirects(), '->getMaxRedirects() returns assigned value'); + $this->assertSame(3, $client->getMaxRedirects(), '->getMaxRedirects() returns assigned value'); } public function testFollowRedirectWithPostMethod() @@ -568,12 +568,12 @@ public function testFollowRedirectWithPostMethod() $client->setNextResponse(new Response('', 307, ['Location' => 'http://www.example.com/redirected'])); $client->request('POST', 'http://www.example.com/foo/foobar', $parameters, $files, $server, $content); - $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect with POST method'); + $this->assertSame('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect with POST method'); $this->assertArrayHasKey('foo', $client->getRequest()->getParameters(), '->followRedirect() keeps parameters with POST method'); $this->assertArrayHasKey('myfile.foo', $client->getRequest()->getFiles(), '->followRedirect() keeps files with POST method'); $this->assertArrayHasKey('X_TEST_FOO', $client->getRequest()->getServer(), '->followRedirect() keeps $_SERVER with POST method'); - $this->assertEquals($content, $client->getRequest()->getContent(), '->followRedirect() keeps content with POST method'); - $this->assertEquals('POST', $client->getRequest()->getMethod(), '->followRedirect() keeps request method'); + $this->assertSame($content, $client->getRequest()->getContent(), '->followRedirect() keeps content with POST method'); + $this->assertSame('POST', $client->getRequest()->getMethod(), '->followRedirect() keeps request method'); } public function testFollowRedirectDropPostMethod() @@ -589,12 +589,12 @@ public function testFollowRedirectDropPostMethod() $client->setNextResponse(new Response('', $code, ['Location' => 'http://www.example.com/redirected'])); $client->request('POST', 'http://www.example.com/foo/foobar', $parameters, $files, $server, $content); - $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect with POST method on response code: '.$code.'.'); + $this->assertSame('http://www.example.com/redirected', $client->getRequest()->getUri(), '->followRedirect() follows a redirect with POST method on response code: '.$code.'.'); $this->assertEmpty($client->getRequest()->getParameters(), '->followRedirect() drops parameters with POST method on response code: '.$code.'.'); $this->assertEmpty($client->getRequest()->getFiles(), '->followRedirect() drops files with POST method on response code: '.$code.'.'); $this->assertArrayHasKey('X_TEST_FOO', $client->getRequest()->getServer(), '->followRedirect() keeps $_SERVER with POST method on response code: '.$code.'.'); $this->assertEmpty($client->getRequest()->getContent(), '->followRedirect() drops content with POST method on response code: '.$code.'.'); - $this->assertEquals('GET', $client->getRequest()->getMethod(), '->followRedirect() drops request method to GET on response code: '.$code.'.'); + $this->assertSame('GET', $client->getRequest()->getMethod(), '->followRedirect() drops request method to GET on response code: '.$code.'.'); } } @@ -607,7 +607,7 @@ public function testFollowMetaRefresh(string $content, string $expectedEndingUrl $client->followMetaRefresh($followMetaRefresh); $client->setNextResponse(new Response($content)); $client->request('GET', 'http://www.example.com/foo/foobar'); - $this->assertEquals($expectedEndingUrl, $client->getRequest()->getUri()); + $this->assertSame($expectedEndingUrl, $client->getRequest()->getUri()); } public function getTestsForMetaRefresh() @@ -644,11 +644,11 @@ public function testBack() $client->request('GET', 'http://www.example.com/foo'); $client->back(); - $this->assertEquals('http://www.example.com/foo/foobar', $client->getRequest()->getUri(), '->back() goes back in the history'); + $this->assertSame('http://www.example.com/foo/foobar', $client->getRequest()->getUri(), '->back() goes back in the history'); $this->assertArrayHasKey('foo', $client->getRequest()->getParameters(), '->back() keeps parameters'); $this->assertArrayHasKey('myfile.foo', $client->getRequest()->getFiles(), '->back() keeps files'); $this->assertArrayHasKey('X_TEST_FOO', $client->getRequest()->getServer(), '->back() keeps $_SERVER'); - $this->assertEquals($content, $client->getRequest()->getContent(), '->back() keeps content'); + $this->assertSame($content, $client->getRequest()->getContent(), '->back() keeps content'); } public function testForward() @@ -665,11 +665,11 @@ public function testForward() $client->back(); $client->forward(); - $this->assertEquals('http://www.example.com/foo', $client->getRequest()->getUri(), '->forward() goes forward in the history'); + $this->assertSame('http://www.example.com/foo', $client->getRequest()->getUri(), '->forward() goes forward in the history'); $this->assertArrayHasKey('foo', $client->getRequest()->getParameters(), '->forward() keeps parameters'); $this->assertArrayHasKey('myfile.foo', $client->getRequest()->getFiles(), '->forward() keeps files'); $this->assertArrayHasKey('X_TEST_FOO', $client->getRequest()->getServer(), '->forward() keeps $_SERVER'); - $this->assertEquals($content, $client->getRequest()->getContent(), '->forward() keeps content'); + $this->assertSame($content, $client->getRequest()->getContent(), '->forward() keeps content'); } public function testBackAndFrowardWithRedirects() @@ -680,15 +680,15 @@ public function testBackAndFrowardWithRedirects() $client->setNextResponse(new Response('', 301, ['Location' => 'http://www.example.com/redirected'])); $client->request('GET', 'http://www.example.com/bar'); - $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), 'client followed redirect'); + $this->assertSame('http://www.example.com/redirected', $client->getRequest()->getUri(), 'client followed redirect'); $client->back(); - $this->assertEquals('http://www.example.com/foo', $client->getRequest()->getUri(), '->back() goes back in the history skipping redirects'); + $this->assertSame('http://www.example.com/foo', $client->getRequest()->getUri(), '->back() goes back in the history skipping redirects'); $client->forward(); - $this->assertEquals('http://www.example.com/redirected', $client->getRequest()->getUri(), '->forward() goes forward in the history skipping redirects'); + $this->assertSame('http://www.example.com/redirected', $client->getRequest()->getUri(), '->forward() goes forward in the history skipping redirects'); } public function testReload() @@ -703,11 +703,11 @@ public function testReload() $client->request('GET', 'http://www.example.com/foo/foobar', $parameters, $files, $server, $content); $client->reload(); - $this->assertEquals('http://www.example.com/foo/foobar', $client->getRequest()->getUri(), '->reload() reloads the current page'); + $this->assertSame('http://www.example.com/foo/foobar', $client->getRequest()->getUri(), '->reload() reloads the current page'); $this->assertArrayHasKey('foo', $client->getRequest()->getParameters(), '->reload() keeps parameters'); $this->assertArrayHasKey('myfile.foo', $client->getRequest()->getFiles(), '->reload() keeps files'); $this->assertArrayHasKey('X_TEST_FOO', $client->getRequest()->getServer(), '->reload() keeps $_SERVER'); - $this->assertEquals($content, $client->getRequest()->getContent(), '->reload() keeps content'); + $this->assertSame($content, $client->getRequest()->getContent(), '->reload() keeps content'); } public function testRestart() @@ -717,7 +717,7 @@ public function testRestart() $client->restart(); $this->assertTrue($client->getHistory()->isEmpty(), '->restart() clears the history'); - $this->assertEquals([], $client->getCookieJar()->all(), '->restart() clears the cookies'); + $this->assertSame([], $client->getCookieJar()->all(), '->restart() clears the cookies'); } /** @@ -730,7 +730,7 @@ public function testInsulatedRequests() $client->setNextScript("new Symfony\Component\BrowserKit\Response('foobar')"); $client->request('GET', 'http://www.example.com/foo/foobar'); - $this->assertEquals('foobar', $client->getResponse()->getContent(), '->insulate() process the request in a forked process'); + $this->assertSame('foobar', $client->getResponse()->getContent(), '->insulate() process the request in a forked process'); $client->setNextScript("new Symfony\Component\BrowserKit\Response('foobar)"); @@ -745,31 +745,31 @@ public function testInsulatedRequests() public function testGetServerParameter() { $client = $this->getBrowser(); - $this->assertEquals('', $client->getServerParameter('HTTP_HOST')); - $this->assertEquals('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT')); - $this->assertEquals('testvalue', $client->getServerParameter('testkey', 'testvalue')); + $this->assertSame('', $client->getServerParameter('HTTP_HOST')); + $this->assertSame('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT')); + $this->assertSame('testvalue', $client->getServerParameter('testkey', 'testvalue')); } public function testSetServerParameter() { $client = $this->getBrowser(); - $this->assertEquals('', $client->getServerParameter('HTTP_HOST')); - $this->assertEquals('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT')); + $this->assertSame('', $client->getServerParameter('HTTP_HOST')); + $this->assertSame('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT')); $client->setServerParameter('HTTP_HOST', 'testhost'); - $this->assertEquals('testhost', $client->getServerParameter('HTTP_HOST')); + $this->assertSame('testhost', $client->getServerParameter('HTTP_HOST')); $client->setServerParameter('HTTP_USER_AGENT', 'testua'); - $this->assertEquals('testua', $client->getServerParameter('HTTP_USER_AGENT')); + $this->assertSame('testua', $client->getServerParameter('HTTP_USER_AGENT')); } public function testSetServerParameterInRequest() { $client = $this->getBrowser(); - $this->assertEquals('', $client->getServerParameter('HTTP_HOST')); - $this->assertEquals('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT')); + $this->assertSame('', $client->getServerParameter('HTTP_HOST')); + $this->assertSame('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT')); $client->request('GET', 'https://www.example.com/https/www.example.com', [], [], [ 'HTTP_HOST' => 'testhost', @@ -778,21 +778,21 @@ public function testSetServerParameterInRequest() 'NEW_SERVER_KEY' => 'new-server-key-value', ]); - $this->assertEquals('', $client->getServerParameter('HTTP_HOST')); - $this->assertEquals('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT')); + $this->assertSame('', $client->getServerParameter('HTTP_HOST')); + $this->assertSame('Symfony BrowserKit', $client->getServerParameter('HTTP_USER_AGENT')); - $this->assertEquals('https://www.example.com/https/www.example.com', $client->getRequest()->getUri()); + $this->assertSame('https://www.example.com/https/www.example.com', $client->getRequest()->getUri()); $server = $client->getRequest()->getServer(); $this->assertArrayHasKey('HTTP_USER_AGENT', $server); - $this->assertEquals('testua', $server['HTTP_USER_AGENT']); + $this->assertSame('testua', $server['HTTP_USER_AGENT']); $this->assertArrayHasKey('HTTP_HOST', $server); - $this->assertEquals('testhost', $server['HTTP_HOST']); + $this->assertSame('testhost', $server['HTTP_HOST']); $this->assertArrayHasKey('NEW_SERVER_KEY', $server); - $this->assertEquals('new-server-key-value', $server['NEW_SERVER_KEY']); + $this->assertSame('new-server-key-value', $server['NEW_SERVER_KEY']); $this->assertArrayHasKey('HTTPS', $server); $this->assertTrue($server['HTTPS']); @@ -806,13 +806,13 @@ public function testRequestWithRelativeUri() 'HTTP_HOST' => 'testhost', 'HTTPS' => true, ]); - $this->assertEquals('https://testhost/', $client->getRequest()->getUri()); + $this->assertSame('https://testhost/', $client->getRequest()->getUri()); $client->request('GET', 'https://www.example.com/', [], [], [ 'HTTP_HOST' => 'testhost', 'HTTPS' => false, ]); - $this->assertEquals('https://www.example.com/', $client->getRequest()->getUri()); + $this->assertSame('https://www.example.com/', $client->getRequest()->getUri()); } public function testInternalRequest() diff --git a/src/Symfony/Component/BrowserKit/composer.json b/src/Symfony/Component/BrowserKit/composer.json index 38150e485dbca..e216536862413 100644 --- a/src/Symfony/Component/BrowserKit/composer.json +++ b/src/Symfony/Component/BrowserKit/composer.json @@ -34,10 +34,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Cache/Adapter/ChainAdapter.php b/src/Symfony/Component/Cache/Adapter/ChainAdapter.php index 1029bbff698ff..efca364ba7ce6 100644 --- a/src/Symfony/Component/Cache/Adapter/ChainAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/ChainAdapter.php @@ -73,7 +73,9 @@ static function ($sourceItem, $item, $sourceMetadata = null) use ($defaultLifeti $item->isHit = $sourceItem->isHit; $item->metadata = $item->newMetadata = $sourceItem->metadata = $sourceMetadata; - if (0 < $defaultLifetime) { + if (isset($item->metadata[CacheItem::METADATA_EXPIRY])) { + $item->expiresAt(\DateTime::createFromFormat('U.u', $item->metadata[CacheItem::METADATA_EXPIRY])); + } elseif (0 < $defaultLifetime) { $item->expiresAfter($defaultLifetime); } diff --git a/src/Symfony/Component/Cache/Marshaller/DefaultMarshaller.php b/src/Symfony/Component/Cache/Marshaller/DefaultMarshaller.php index e00c8f4845c20..7a02a962376ef 100644 --- a/src/Symfony/Component/Cache/Marshaller/DefaultMarshaller.php +++ b/src/Symfony/Component/Cache/Marshaller/DefaultMarshaller.php @@ -25,9 +25,9 @@ class DefaultMarshaller implements MarshallerInterface public function __construct(bool $useIgbinarySerialize = null) { if (null === $useIgbinarySerialize) { - $useIgbinarySerialize = \extension_loaded('igbinary') && (\PHP_VERSION_ID < 70400 || version_compare('3.1.0', phpversion('igbinary'), '<=')); - } elseif ($useIgbinarySerialize && (!\extension_loaded('igbinary') || (\PHP_VERSION_ID >= 70400 && version_compare('3.1.0', phpversion('igbinary'), '>')))) { - throw new CacheException(\extension_loaded('igbinary') && \PHP_VERSION_ID >= 70400 ? 'Please upgrade the "igbinary" PHP extension to v3.1 or higher.' : 'The "igbinary" PHP extension is not loaded.'); + $useIgbinarySerialize = \extension_loaded('igbinary') && (\PHP_VERSION_ID < 70400 || version_compare('3.1.6', phpversion('igbinary'), '<=')); + } elseif ($useIgbinarySerialize && (!\extension_loaded('igbinary') || (\PHP_VERSION_ID >= 70400 && version_compare('3.1.6', phpversion('igbinary'), '>')))) { + throw new CacheException(\extension_loaded('igbinary') && \PHP_VERSION_ID >= 70400 ? 'Please upgrade the "igbinary" PHP extension to v3.1.6 or higher.' : 'The "igbinary" PHP extension is not loaded.'); } $this->useIgbinarySerialize = $useIgbinarySerialize; } @@ -66,7 +66,7 @@ public function unmarshall(string $value) return null; } static $igbinaryNull; - if ($value === ($igbinaryNull ?? $igbinaryNull = \extension_loaded('igbinary') && (\PHP_VERSION_ID < 70400 || version_compare('3.1.0', phpversion('igbinary'), '<=')) ? igbinary_serialize(null) : false)) { + if ($value === ($igbinaryNull ?? $igbinaryNull = \extension_loaded('igbinary') ? igbinary_serialize(null) : false)) { return null; } $unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback'); diff --git a/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php b/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php index 05b863d1ac110..57c355eaa43a6 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php @@ -116,11 +116,11 @@ public function testGetMetadata() $item = $cache->getItem('foo'); - $expected = [ - CacheItem::METADATA_EXPIRY => 9.5 + time(), - CacheItem::METADATA_CTIME => 1000, - ]; - $this->assertEqualsWithDelta($expected, $item->getMetadata(), .6, 'Item metadata should embed expiry and ctime.'); + $metadata = $item->getMetadata(); + $this->assertArrayHasKey(CacheItem::METADATA_CTIME, $metadata); + $this->assertEqualsWithDelta(1000, $metadata[CacheItem::METADATA_CTIME], 6); + $this->assertArrayHasKey(CacheItem::METADATA_EXPIRY, $metadata); + $this->assertEqualsWithDelta(9.5 + time(), $metadata[CacheItem::METADATA_EXPIRY], 0.6); } public function testDefaultLifeTime() diff --git a/src/Symfony/Component/Cache/Tests/Adapter/ChainAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/ChainAdapterTest.php index 53295a1eef0e5..909b5f87ceabd 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/ChainAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/ChainAdapterTest.php @@ -16,8 +16,11 @@ use Symfony\Component\Cache\Adapter\ArrayAdapter; use Symfony\Component\Cache\Adapter\ChainAdapter; use Symfony\Component\Cache\Adapter\FilesystemAdapter; +use Symfony\Component\Cache\CacheItem; use Symfony\Component\Cache\Tests\Fixtures\ExternalAdapter; use Symfony\Component\Cache\Tests\Fixtures\PrunableAdapter; +use Symfony\Component\Filesystem\Filesystem; +use Symfony\Contracts\Cache\ItemInterface; /** * @author Kévin Dunglas @@ -34,6 +37,11 @@ public function createCachePool(int $defaultLifetime = 0, string $testMethod = n return new ChainAdapter([new ArrayAdapter($defaultLifetime), new ExternalAdapter($defaultLifetime), new FilesystemAdapter('', $defaultLifetime)], $defaultLifetime); } + public static function tearDownAfterClass(): void + { + (new Filesystem())->remove(sys_get_temp_dir().'/symfony-cache'); + } + public function testEmptyAdaptersException() { $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException'); @@ -187,6 +195,48 @@ public function testMultipleCachesExpirationWhenCommonTtlIsSet() $this->assertFalse($item->isHit()); } + public function testExpirationOnAllAdapters() + { + if (isset($this->skippedTests[__FUNCTION__])) { + $this->markTestSkipped($this->skippedTests[__FUNCTION__]); + } + + $itemValidator = function (CacheItem $item) { + $refl = new \ReflectionObject($item); + $propExpiry = $refl->getProperty('expiry'); + $propExpiry->setAccessible(true); + $expiry = $propExpiry->getValue($item); + $this->assertGreaterThan(10, $expiry - time(), 'Item should be saved with the given ttl, not the default for the adapter.'); + + return true; + }; + + $adapter1 = $this->getMockBuilder(FilesystemAdapter::class) + ->setConstructorArgs(['', 2]) + ->setMethods(['save']) + ->getMock(); + $adapter1->expects($this->once()) + ->method('save') + ->with($this->callback($itemValidator)) + ->willReturn(true); + + $adapter2 = $this->getMockBuilder(FilesystemAdapter::class) + ->setConstructorArgs(['', 4]) + ->setMethods(['save']) + ->getMock(); + $adapter2->expects($this->once()) + ->method('save') + ->with($this->callback($itemValidator)) + ->willReturn(true); + + $cache = new ChainAdapter([$adapter1, $adapter2], 6); + $cache->get('test_key', function (ItemInterface $item) { + $item->expiresAfter(15); + + return 'chain'; + }); + } + private function getPruneableMock(): AdapterInterface { $pruneable = $this->createMock(PrunableAdapter::class); diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php index 9056c848718bb..dbd93bdd71f03 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Cache\Tests\Adapter; -use Doctrine\DBAL\Version; use Psr\Cache\CacheItemPoolInterface; use Symfony\Component\Cache\Adapter\PdoAdapter; use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait; @@ -31,10 +30,6 @@ public static function setUpBeforeClass(): void self::markTestSkipped('Extension pdo_sqlite required.'); } - if (\PHP_VERSION_ID >= 80000 && class_exists(Version::class)) { - self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.'); - } - self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache'); $pool = new PdoAdapter('sqlite:'.self::$dbFile); diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php index 54ae56375c7a3..648e4313d8375 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php @@ -35,10 +35,6 @@ public static function setUpBeforeClass(): void self::markTestSkipped('Extension pdo_sqlite required.'); } - if (\PHP_VERSION_ID >= 80000 && class_exists(Version::class)) { - self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.'); - } - self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache'); } diff --git a/src/Symfony/Component/Cache/Tests/Marshaller/DefaultMarshallerTest.php b/src/Symfony/Component/Cache/Tests/Marshaller/DefaultMarshallerTest.php index aaef04610e457..050aab4207358 100644 --- a/src/Symfony/Component/Cache/Tests/Marshaller/DefaultMarshallerTest.php +++ b/src/Symfony/Component/Cache/Tests/Marshaller/DefaultMarshallerTest.php @@ -24,7 +24,7 @@ public function testSerialize() 'b' => function () {}, ]; - $expected = ['a' => \extension_loaded('igbinary') && (\PHP_VERSION_ID < 70400 || version_compare('3.1.0', phpversion('igbinary'), '<=')) ? igbinary_serialize(123) : serialize(123)]; + $expected = ['a' => \extension_loaded('igbinary') && (\PHP_VERSION_ID < 70400 || version_compare('3.1.6', phpversion('igbinary'), '<=')) ? igbinary_serialize(123) : serialize(123)]; $this->assertSame($expected, $marshaller->marshall($values, $failed)); $this->assertSame(['b'], $failed); } @@ -43,7 +43,7 @@ public function testNativeUnserialize() */ public function testIgbinaryUnserialize() { - if (\PHP_VERSION_ID >= 70400 && version_compare('3.1.0', phpversion('igbinary'), '>')) { + if (\PHP_VERSION_ID >= 70400 && version_compare('3.1.6', phpversion('igbinary'), '>')) { $this->markTestSkipped('igbinary is not compatible with PHP 7.4.'); } @@ -67,7 +67,7 @@ public function testNativeUnserializeNotFoundClass() */ public function testIgbinaryUnserializeNotFoundClass() { - if (\PHP_VERSION_ID >= 70400 && version_compare('3.1.0', phpversion('igbinary'), '>')) { + if (\PHP_VERSION_ID >= 70400 && version_compare('3.1.6', phpversion('igbinary'), '>')) { $this->markTestSkipped('igbinary is not compatible with PHP 7.4.'); } @@ -95,7 +95,7 @@ public function testNativeUnserializeInvalid() */ public function testIgbinaryUnserializeInvalid() { - if (\PHP_VERSION_ID >= 70400 && version_compare('3.1.0', phpversion('igbinary'), '>')) { + if (\PHP_VERSION_ID >= 70400 && version_compare('3.1.6', phpversion('igbinary'), '>')) { $this->markTestSkipped('igbinary is not compatible with PHP 7.4.'); } diff --git a/src/Symfony/Component/Cache/Traits/RedisTrait.php b/src/Symfony/Component/Cache/Traits/RedisTrait.php index 7910f95c40c84..c7701fbecc147 100644 --- a/src/Symfony/Component/Cache/Traits/RedisTrait.php +++ b/src/Symfony/Component/Cache/Traits/RedisTrait.php @@ -174,7 +174,7 @@ public static function createConnection($dsn, array $options = []) $connect = $params['persistent'] || $params['persistent_id'] ? 'pconnect' : 'connect'; $redis = new $class(); - $initializer = function ($redis) use ($connect, $params, $dsn, $auth, $hosts) { + $initializer = static function ($redis) use ($connect, $params, $dsn, $auth, $hosts) { try { @$redis->{$connect}($hosts[0]['host'] ?? $hosts[0]['path'], $hosts[0]['port'] ?? null, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval']); @@ -226,7 +226,7 @@ public static function createConnection($dsn, array $options = []) $redis->setOption(\Redis::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']); } } elseif (is_a($class, \RedisCluster::class, true)) { - $initializer = function () use ($class, $params, $dsn, $hosts) { + $initializer = static function () use ($class, $params, $dsn, $hosts) { foreach ($hosts as $i => $host) { $hosts[$i] = 'tcp' === $host['scheme'] ? $host['host'].':'.$host['port'] : $host['path']; } diff --git a/src/Symfony/Component/Cache/composer.json b/src/Symfony/Component/Cache/composer.json index 7ced133b4c6dc..af7827f2bb432 100644 --- a/src/Symfony/Component/Cache/composer.json +++ b/src/Symfony/Component/Cache/composer.json @@ -37,6 +37,7 @@ "psr/simple-cache": "^1.0", "symfony/config": "^4.4|^5.0", "symfony/dependency-injection": "^4.4|^5.0", + "symfony/filesystem": "^4.4|^5.0", "symfony/var-dumper": "^4.4|^5.0" }, "conflict": { @@ -51,10 +52,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Config/Tests/ConfigCacheTest.php b/src/Symfony/Component/Config/Tests/ConfigCacheTest.php index 946c66fd1d83d..cfb2403a82a6c 100644 --- a/src/Symfony/Component/Config/Tests/ConfigCacheTest.php +++ b/src/Symfony/Component/Config/Tests/ConfigCacheTest.php @@ -30,7 +30,7 @@ protected function tearDown(): void foreach ($files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } } diff --git a/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php index 6b43a58bdabbb..c450ff172c0ad 100644 --- a/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php +++ b/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php @@ -30,7 +30,7 @@ protected function setUp(): void protected function tearDown(): void { if (file_exists($this->file)) { - unlink($this->file); + @unlink($this->file); } } diff --git a/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php index e3a45566c2617..9b619a0fe6630 100644 --- a/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php +++ b/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php @@ -30,11 +30,9 @@ protected function setUp(): void protected function tearDown(): void { - if (!file_exists($this->file)) { - return; + if (file_exists($this->file)) { + @unlink($this->file); } - - unlink($this->file); } public function testGetResource() diff --git a/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php b/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php index a7498760a8a3e..8e0a2b32ba069 100644 --- a/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php +++ b/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php @@ -31,7 +31,7 @@ protected function tearDown(): void foreach ($files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } } diff --git a/src/Symfony/Component/Config/composer.json b/src/Symfony/Component/Config/composer.json index 70072cfa2ea7d..e5233d3ae0376 100644 --- a/src/Symfony/Component/Config/composer.json +++ b/src/Symfony/Component/Config/composer.json @@ -41,10 +41,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Console/composer.json b/src/Symfony/Component/Console/composer.json index 3f7e36aaeefdd..53db106718571 100644 --- a/src/Symfony/Component/Console/composer.json +++ b/src/Symfony/Component/Console/composer.json @@ -54,10 +54,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/CssSelector/composer.json b/src/Symfony/Component/CssSelector/composer.json index 19c9f34d3c176..b8b9d3f930e80 100644 --- a/src/Symfony/Component/CssSelector/composer.json +++ b/src/Symfony/Component/CssSelector/composer.json @@ -28,10 +28,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index b504a8fc2115a..93b303ea2bf20 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -504,6 +504,9 @@ private function collectLineage(string $class, array &$lineage) return; } $file = $r->getFileName(); + if (') : eval()\'d code' === substr($file, -17)) { + $file = substr($file, 0, strrpos($file, '(', -17)); + } if (!$file || $this->doExport($file) === $exportedFile = $this->export($file)) { return; } @@ -1479,7 +1482,7 @@ private function addDefaultParametersMethod(): string $export = $this->exportParameters([$value]); $export = explode('0 => ', substr(rtrim($export, " ]\n"), 2, -1), 2); - if (preg_match("/\\\$this->(?:getEnv\('(?:\w++:)*+\w++'\)|targetDir\.'')/", $export[1])) { + if (preg_match("/\\\$this->(?:getEnv\('(?:[-.\w]*+:)*+\w++'\)|targetDir\.'')/", $export[1])) { $dynamicPhp[$key] = sprintf('%scase %s: $value = %s; break;', $export[0], $this->export($key), $export[1]); } else { $php[] = sprintf('%s%s => %s,', $export[0], $this->export($key), $export[1]); @@ -1885,7 +1888,7 @@ private function dumpParameter(string $name): string return $dumpedValue; } - if (!preg_match("/\\\$this->(?:getEnv\('(?:\w++:)*+\w++'\)|targetDir\.'')/", $dumpedValue)) { + if (!preg_match("/\\\$this->(?:getEnv\('(?:[-.\w]*+:)*+\w++'\)|targetDir\.'')/", $dumpedValue)) { return sprintf('$this->parameters[%s]', $this->doExport($name)); } } diff --git a/src/Symfony/Component/DependencyInjection/Dumper/Preloader.php b/src/Symfony/Component/DependencyInjection/Dumper/Preloader.php index c64559c49d6dc..8fcf8551d2bd3 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/Preloader.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/Preloader.php @@ -106,14 +106,14 @@ private static function doPreload(string $class, array &$preloaded): void self::preloadType($m->getReturnType(), $preloaded); } - } catch (\ReflectionException $e) { + } catch (\Throwable $e) { // ignore missing classes } } private static function preloadType(?\ReflectionType $t, array &$preloaded): void { - if (!$t || $t->isBuiltin()) { + if (!$t) { return; } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PreloaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PreloaderTest.php new file mode 100644 index 0000000000000..ff70bb75ea08c --- /dev/null +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PreloaderTest.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Dumper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Dumper\Preloader; + +class PreloaderTest extends TestCase +{ + /** + * @requires PHP 7.4 + */ + public function testPreload() + { + $r = new \ReflectionMethod(Preloader::class, 'doPreload'); + $r->setAccessible(true); + + $preloaded = []; + + $r->invokeArgs(null, ['Symfony\Component\DependencyInjection\Tests\Fixtures\Preload\Dummy', &$preloaded]); + + self::assertTrue(class_exists('Symfony\Component\DependencyInjection\Tests\Fixtures\Preload\Dummy', false)); + self::assertTrue(class_exists('Symfony\Component\DependencyInjection\Tests\Fixtures\Preload\A', false)); + self::assertTrue(class_exists('Symfony\Component\DependencyInjection\Tests\Fixtures\Preload\B', false)); + self::assertTrue(class_exists('Symfony\Component\DependencyInjection\Tests\Fixtures\Preload\C', false)); + } + + /** + * @requires PHP 7.4 + */ + public function testPreloadSkipsNonExistingInterface() + { + $r = new \ReflectionMethod(Preloader::class, 'doPreload'); + $r->setAccessible(true); + + $preloaded = []; + + $r->invokeArgs(null, ['Symfony\Component\DependencyInjection\Tests\Fixtures\Preload\DummyWithInterface', &$preloaded]); + self::assertFalse(class_exists('Symfony\Component\DependencyInjection\Tests\Fixtures\Preload\DummyWithInterface', false)); + } + + /** + * @requires PHP 8 + */ + public function testPreloadUnion() + { + $r = new \ReflectionMethod(Preloader::class, 'doPreload'); + $r->setAccessible(true); + + $preloaded = []; + + $r->invokeArgs(null, ['Symfony\Component\DependencyInjection\Tests\Fixtures\Preload\UnionDummy', &$preloaded]); + + self::assertTrue(class_exists('Symfony\Component\DependencyInjection\Tests\Fixtures\Preload\UnionDummy', false)); + self::assertTrue(class_exists('Symfony\Component\DependencyInjection\Tests\Fixtures\Preload\D', false)); + self::assertTrue(class_exists('Symfony\Component\DependencyInjection\Tests\Fixtures\Preload\E', false)); + } +} diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/A.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/A.php new file mode 100644 index 0000000000000..2802a577e85b1 --- /dev/null +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/A.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Fixtures\Preload; + +final class A +{ +} diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/B.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/B.php new file mode 100644 index 0000000000000..66dda101ce436 --- /dev/null +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/B.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Fixtures\Preload; + +final class B +{ +} diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/C.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/C.php new file mode 100644 index 0000000000000..331e9fed19c95 --- /dev/null +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/C.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Fixtures\Preload; + +final class C +{ +} diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/D.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/D.php new file mode 100644 index 0000000000000..52e10e918149b --- /dev/null +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/D.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Fixtures\Preload; + +final class D +{ +} diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/Dummy.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/Dummy.php new file mode 100644 index 0000000000000..35d61be5a573c --- /dev/null +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/Dummy.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Fixtures\Preload; + +final class Dummy +{ + public A $a; + + public function doSomething(B $b): ?C + { + return null; + } + + public function noTypes($foo) + { + } + + public function builtinTypes(int $foo): ?string + { + } +} diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/DummyWithInterface.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/DummyWithInterface.php new file mode 100644 index 0000000000000..1c1b0d20addd4 --- /dev/null +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/DummyWithInterface.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Fixtures\Preload; + +final class DummyWithInterface implements \NonExistentDummyInterface +{ +} diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/E.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/E.php new file mode 100644 index 0000000000000..b4ec3b2734c57 --- /dev/null +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/E.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Fixtures\Preload; + +final class E +{ +} diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/UnionDummy.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/UnionDummy.php new file mode 100644 index 0000000000000..24b709b0a2d69 --- /dev/null +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/UnionDummy.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Fixtures\Preload; + +final class UnionDummy +{ + public D|E $de; + + public function builtinTypes(int|float $foo): string|\Stringable|null + { + } +} diff --git a/src/Symfony/Component/DependencyInjection/composer.json b/src/Symfony/Component/DependencyInjection/composer.json index 072706749851d..dcc88de186695 100644 --- a/src/Symfony/Component/DependencyInjection/composer.json +++ b/src/Symfony/Component/DependencyInjection/composer.json @@ -50,10 +50,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/DomCrawler/composer.json b/src/Symfony/Component/DomCrawler/composer.json index e00dc7a56e892..786f3476d9b8d 100644 --- a/src/Symfony/Component/DomCrawler/composer.json +++ b/src/Symfony/Component/DomCrawler/composer.json @@ -37,10 +37,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Dotenv/composer.json b/src/Symfony/Component/Dotenv/composer.json index 4101c2e47e6fe..de8ec159740f5 100644 --- a/src/Symfony/Component/Dotenv/composer.json +++ b/src/Symfony/Component/Dotenv/composer.json @@ -28,10 +28,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/ErrorHandler/composer.json b/src/Symfony/Component/ErrorHandler/composer.json index 64e72d9f65b55..1deb5ad91c5ef 100644 --- a/src/Symfony/Component/ErrorHandler/composer.json +++ b/src/Symfony/Component/ErrorHandler/composer.json @@ -32,10 +32,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/EventDispatcher/composer.json b/src/Symfony/Component/EventDispatcher/composer.json index 7fb244fa6af67..60513489c7423 100644 --- a/src/Symfony/Component/EventDispatcher/composer.json +++ b/src/Symfony/Component/EventDispatcher/composer.json @@ -48,10 +48,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/ExpressionLanguage/Token.php b/src/Symfony/Component/ExpressionLanguage/Token.php index 38aac0a055e6b..85befbcf8b9c3 100644 --- a/src/Symfony/Component/ExpressionLanguage/Token.php +++ b/src/Symfony/Component/ExpressionLanguage/Token.php @@ -54,7 +54,7 @@ public function __toString() /** * Tests the current token for a type and/or a value. * - * @param array|int $type The type to test + * @param string $type The type to test * * @return bool */ diff --git a/src/Symfony/Component/ExpressionLanguage/composer.json b/src/Symfony/Component/ExpressionLanguage/composer.json index 9012165564220..2445155a13f4e 100644 --- a/src/Symfony/Component/ExpressionLanguage/composer.json +++ b/src/Symfony/Component/ExpressionLanguage/composer.json @@ -27,10 +27,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php index 0bfe180464bd0..aaf62d02674f8 100644 --- a/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/Symfony/Component/Filesystem/Filesystem.php @@ -175,7 +175,7 @@ public function remove($files) if (!self::box('rmdir', $file) && file_exists($file)) { throw new IOException(sprintf('Failed to remove directory "%s": ', $file).self::$lastError); } - } elseif (!self::box('unlink', $file) && file_exists($file)) { + } elseif (!self::box('unlink', $file) && (false !== strpos(self::$lastError, 'Permission denied') || file_exists($file))) { throw new IOException(sprintf('Failed to remove file "%s": ', $file).self::$lastError); } } diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php index dcd6a393a9848..68542d7b5c97d 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Filesystem\Tests; +use Symfony\Component\Filesystem\Exception\IOException; + /** * Test class for Filesystem. */ @@ -334,6 +336,28 @@ public function testRemoveIgnoresNonExistingFiles() $this->assertFileDoesNotExist($basePath.'dir'); } + public function testRemoveThrowsExceptionOnPermissionDenied() + { + $this->markAsSkippedIfChmodIsMissing(); + + $basePath = $this->workspace.\DIRECTORY_SEPARATOR.'dir_permissions'; + mkdir($basePath); + $file = $basePath.\DIRECTORY_SEPARATOR.'file'; + touch($file); + chmod($basePath, 0400); + + try { + $this->filesystem->remove($file); + $this->fail('Filesystem::remove() should throw an exception'); + } catch (IOException $e) { + $this->assertStringContainsString('Failed to remove file "'.$file.'"', $e->getMessage()); + $this->assertStringContainsString('Permission denied', $e->getMessage()); + } finally { + // Make sure we can clean up this file + chmod($basePath, 0777); + } + } + public function testRemoveCleansInvalidLinks() { $this->markAsSkippedIfSymlinkIsMissing(); diff --git a/src/Symfony/Component/Filesystem/composer.json b/src/Symfony/Component/Filesystem/composer.json index 7ec870a91108a..a1ca1f00cb395 100644 --- a/src/Symfony/Component/Filesystem/composer.json +++ b/src/Symfony/Component/Filesystem/composer.json @@ -25,10 +25,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Finder/composer.json b/src/Symfony/Component/Finder/composer.json index c1b0f32796fbb..339a9af2feb43 100644 --- a/src/Symfony/Component/Finder/composer.json +++ b/src/Symfony/Component/Finder/composer.json @@ -24,10 +24,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Form/Resources/translations/validators.ar.xlf b/src/Symfony/Component/Form/Resources/translations/validators.ar.xlf index 990b039d63d4c..e30daaf1dff5d 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.ar.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.ar.xlf @@ -14,6 +14,126 @@ The CSRF token is invalid. Please try to resubmit the form. قيمة رمز الموقع غير صحيحة. من فضلك اعد ارسال النموذج. + + This value is not a valid HTML5 color. + هذه القيمة ليست لون HTML5 صالحًا. + + + Please enter a valid birthdate. + الرجاء ادخال تاريخ ميلاد صالح. + + + The selected choice is invalid. + الاختيار المحدد غير صالح. + + + The collection is invalid. + المجموعة غير صالحة. + + + Please select a valid color. + الرجاء اختيار لون صالح. + + + Please select a valid country. + الرجاء اختيار بلد صالح. + + + Please select a valid currency. + الرجاء اختيار عملة صالحة. + + + Please choose a valid date interval. + الرجاء اختيار فاصل زمني صالح. + + + Please enter a valid date and time. + الرجاء إدخال تاريخ ووقت صالحين. + + + Please enter a valid date. + الرجاء إدخال تاريخ صالح. + + + Please select a valid file. + الرجاء اختيار ملف صالح. + + + The hidden field is invalid. + الحقل المخفي غير صالح. + + + Please enter an integer. + الرجاء إدخال عدد صحيح. + + + Please select a valid language. + الرجاء اختيار لغة صالحة. + + + Please select a valid locale. + الرجاء اختيار لغة صالحة. + + + Please enter a valid money amount. + الرجاء إدخال مبلغ مالي صالح. + + + Please enter a number. + الرجاء إدخال رقم. + + + The password is invalid. + كلمة المرور غير صحيحة. + + + Please enter a percentage value. + الرجاء إدخال قيمة النسبة المئوية. + + + The values do not match. + القيم لا تتطابق. + + + Please enter a valid time. + الرجاء إدخال وقت صالح. + + + Please select a valid timezone. + الرجاء تحديد منطقة زمنية صالحة. + + + Please enter a valid URL. + أدخل عنوان الرابط صحيح من فضلك. + + + Please enter a valid search term. + الرجاء إدخال مصطلح البحث ساري المفعول. + + + Please provide a valid phone number. + يرجى تقديم رقم هاتف صالح. + + + The checkbox has an invalid value. + خانة الاختيار لها قيمة غير صالحة. + + + Please enter a valid email address. + رجاء قم بإدخال بريد الكتروني صحيح + + + Please select a valid option. + الرجاء تحديد خيار صالح. + + + Please select a valid range. + يرجى تحديد نطاق صالح. + + + Please enter a valid week. + الرجاء إدخال أسبوع صالح. + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.bg.xlf b/src/Symfony/Component/Form/Resources/translations/validators.bg.xlf index 5c768c305f9ee..32fa9433108c1 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.bg.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.bg.xlf @@ -14,6 +14,126 @@ The CSRF token is invalid. Please try to resubmit the form. Невалиден CSRF токен. Моля, опитайте да изпратите формата отново. + + This value is not a valid HTML5 color. + Стойността не е валиден HTML5 цвят. + + + Please enter a valid birthdate. + Моля въведете валидна дата на раждане. + + + The selected choice is invalid. + Избраните стойности не са валидни. + + + The collection is invalid. + Колекцията не е валидна. + + + Please select a valid color. + Моля изберете валиден цвят. + + + Please select a valid country. + Моля изберете валидна държава. + + + Please select a valid currency. + Моля изберете валидна валута. + + + Please choose a valid date interval. + Моля изберете валиден интервал от дати. + + + Please enter a valid date and time. + Моля въведете валидни дата и час. + + + Please enter a valid date. + Моля въведете валидна дата. + + + Please select a valid file. + Моля изберете валиден файл. + + + The hidden field is invalid. + Скритото поле е невалидно. + + + Please enter an integer. + Моля попълнете цяло число. + + + Please select a valid language. + Моля изберете валиден език. + + + Please select a valid locale. + Моля изберете валиден език. + + + Please enter a valid money amount. + Моля въведете валидна парична сума. + + + Please enter a number. + Моля въведете число. + + + The password is invalid. + Паролата е невалидна. + + + Please enter a percentage value. + Моля въведете процентна стойност. + + + The values do not match. + Стойностите не съвпадат. + + + Please enter a valid time. + Моля въведете валидно време. + + + Please select a valid timezone. + Моля изберете валидна часова зона. + + + Please enter a valid URL. + Моля въведете валиден URL. + + + Please enter a valid search term. + Моля въведете валидно търсене. + + + Please provide a valid phone number. + Моля осигурете валиден телефонен номер. + + + The checkbox has an invalid value. + Отметката има невалидна стойност. + + + Please enter a valid email address. + Моля въведете валидна ел. поща. + + + Please select a valid option. + Моля изберете валидна опция. + + + Please select a valid range. + Моля изберете валиден обхват. + + + Please enter a valid week. + Моля въведете валидна седмица. + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.bs.xlf b/src/Symfony/Component/Form/Resources/translations/validators.bs.xlf new file mode 100644 index 0000000000000..cfe681e3b0534 --- /dev/null +++ b/src/Symfony/Component/Form/Resources/translations/validators.bs.xlf @@ -0,0 +1,119 @@ + + + + + + This form should not contain extra fields. + Ovaj obrazac ne bi trebalo da sadrži dodatna polja. + + + The uploaded file was too large. Please try to upload a smaller file. + Prenijeta (uploaded) datoteka je prevelika. Molim pokušajte prenijeti manju datoteku. + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF vrijednost nije ispravna. Molim pokušajte ponovo da pošaljete obrazac. + + + This value is not a valid HTML5 color. + Ova vrijednost nije ispravna HTML5 boja. + + + Please enter a valid birthdate. + Molim upišite ispravan datum rođenja. + + + The selected choice is invalid. + Odabrani izbor nije ispravan. + + + The collection is invalid. + Ova kolekcija nije ispravna. + + + Please select a valid color. + Molim izaberite ispravnu boju. + + + Please select a valid country. + Molim izaberite ispravnu državu. + + + Please select a valid currency. + Molim izaberite ispravnu valutu. + + + Please choose a valid date interval. + Molim izaberite ispravan datumski interval. + + + Please enter a valid date and time. + Molim upišite ispravan datum i vrijeme. + + + Please enter a valid date. + Molim upišite ispravan datum. + + + Please select a valid file. + Molim izaberite ispravnu datoteku. + + + The hidden field is invalid. + Skriveno polje nije ispravno. + + + Please enter an integer. + Molim upišite cijeli broj (integer). + + + Please select a valid language. + Molim izaberite ispravan jezik. + + + Please select a valid locale. + Molim izaberite ispravnu lokalizaciju. + + + Please enter a valid money amount. + Molim upišite ispravnu količinu novca. + + + Please enter a number. + Molim upišite broj. + + + The password is invalid. + Ova lozinka nije ispravna. + + + Please enter a percentage value. + Molim upišite procentualnu vrijednost. + + + The values do not match. + Date vrijednosti se ne poklapaju. + + + Please enter a valid time. + Molim upišite ispravno vrijeme. + + + Please select a valid timezone. + Molim izaberite ispravnu vremensku zonu. + + + Please enter a valid URL. + Molim upišite ispravan URL. + + + Please enter a valid search term. + Molim upišite ispravan termin za pretragu. + + + Please provide a valid phone number. + Molim navedite ispravan broj telefona. + + + + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.cs.xlf b/src/Symfony/Component/Form/Resources/translations/validators.cs.xlf index 44d597db980ec..3c4052b1ca496 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.cs.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.cs.xlf @@ -18,6 +18,122 @@ This value is not a valid HTML5 color. Tato hodnota není platná HTML5 barva. + + Please enter a valid birthdate. + Prosím zadejte platný datum narození. + + + The selected choice is invalid. + Vybraná možnost není platná. + + + The collection is invalid. + Kolekce není platná. + + + Please select a valid color. + Prosím vyberte platnou barvu. + + + Please select a valid country. + Prosím vyberte platnou zemi. + + + Please select a valid currency. + Prosím vyberte platnou měnu. + + + Please choose a valid date interval. + Prosím vyberte platné rozpětí dat. + + + Please enter a valid date and time. + Prosím zadejte platný datum a čas. + + + Please enter a valid date. + Prosím zadejte platný datum. + + + Please select a valid file. + Prosím vyberte platný soubor. + + + The hidden field is invalid. + Skryté pole není platné. + + + Please enter an integer. + Prosím zadejte číslo. + + + Please select a valid language. + Prosím zadejte platný jazyk. + + + Please select a valid locale. + Prosím zadejte platný jazyk. + + + Please enter a valid money amount. + Prosím zadejte platnou částku. + + + Please enter a number. + Prosím zadejte číslo. + + + The password is invalid. + Heslo není platné. + + + Please enter a percentage value. + Prosím zadejte procentuální hodnotu. + + + The values do not match. + Hodnoty se neshodují. + + + Please enter a valid time. + Prosím zadejte platný čas. + + + Please select a valid timezone. + Prosím vyberte platné časové pásmo. + + + Please enter a valid URL. + Prosím zadejte platnou URL. + + + Please enter a valid search term. + Prosím zadejte platný výraz k vyhledání. + + + Please provide a valid phone number. + Prosím zadejte platné telefonní číslo. + + + The checkbox has an invalid value. + Zaškrtávací políčko má neplatnou hodnotu. + + + Please enter a valid email address. + Prosím zadejte platnou emailovou adresu. + + + Please select a valid option. + Prosím vyberte platnou možnost. + + + Please select a valid range. + Prosím vyberte platný rozsah. + + + Please enter a valid week. + Prosím zadejte platný týden. + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.de.xlf b/src/Symfony/Component/Form/Resources/translations/validators.de.xlf index fe4353120d256..bc8e46d1ec089 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.de.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.de.xlf @@ -18,6 +18,122 @@ This value is not a valid HTML5 color. Dieser Wert ist keine gültige HTML5 Farbe. + + Please enter a valid birthdate. + Bitte geben Sie ein gültiges Geburtsdatum ein. + + + The selected choice is invalid. + Die Auswahl ist ungültig. + + + The collection is invalid. + Diese Gruppe von Feldern ist ungültig. + + + Please select a valid color. + Bitte geben Sie eine gültige Farbe ein. + + + Please select a valid country. + Bitte wählen Sie ein gültiges Land aus. + + + Please select a valid currency. + Bitte wählen Sie eine gültige Währung aus. + + + Please choose a valid date interval. + Bitte wählen Sie ein gültiges Datumsintervall. + + + Please enter a valid date and time. + Bitte geben Sie ein gültiges Datum samt Uhrzeit ein. + + + Please enter a valid date. + Bitte geben Sie ein gültiges Datum ein. + + + Please select a valid file. + Bitte wählen Sie eine gültige Datei. + + + The hidden field is invalid. + Das versteckte Feld ist ungültig. + + + Please enter an integer. + Bitte geben Sie eine ganze Zahl ein. + + + Please select a valid language. + Bitte wählen Sie eine gültige Sprache. + + + Please select a valid locale. + Bitte wählen Sie eine gültige Locale-Einstellung aus. + + + Please enter a valid money amount. + Bitte geben Sie einen gültigen Geldbetrag ein. + + + Please enter a number. + Bitte geben Sie eine gültige Zahl ein. + + + The password is invalid. + Das Kennwort ist ungültig. + + + Please enter a percentage value. + Bitte geben Sie einen gültigen Prozentwert ein. + + + The values do not match. + Die Werte stimmen nicht überein. + + + Please enter a valid time. + Bitte geben Sie eine gültige Uhrzeit ein. + + + Please select a valid timezone. + Bitte wählen Sie eine gültige Zeitzone. + + + Please enter a valid URL. + Bitte geben Sie eine gültige URL ein. + + + Please enter a valid search term. + Bitte geben Sie einen gültigen Suchbegriff ein. + + + Please provide a valid phone number. + Bitte geben Sie eine gültige Telefonnummer ein. + + + The checkbox has an invalid value. + Das Kontrollkästchen hat einen ungültigen Wert. + + + Please enter a valid email address. + Bitte geben Sie eine gültige E-Mail-Adresse ein. + + + Please select a valid option. + Bitte wählen Sie eine gültige Option. + + + Please select a valid range. + Bitte wählen Sie einen gültigen Bereich. + + + Please enter a valid week. + Bitte geben Sie eine gültige Woche ein. + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.en.xlf b/src/Symfony/Component/Form/Resources/translations/validators.en.xlf index 97ed83fd47425..e556c40b647f6 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.en.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.en.xlf @@ -114,6 +114,26 @@ Please provide a valid phone number. Please provide a valid phone number. + + The checkbox has an invalid value. + The checkbox has an invalid value. + + + Please enter a valid email address. + Please enter a valid email address. + + + Please select a valid option. + Please select a valid option. + + + Please select a valid range. + Please select a valid range. + + + Please enter a valid week. + Please enter a valid week. + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.es.xlf b/src/Symfony/Component/Form/Resources/translations/validators.es.xlf index b609e53e5600a..c143e009e1938 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.es.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.es.xlf @@ -14,6 +14,126 @@ The CSRF token is invalid. Please try to resubmit the form. El token CSRF no es válido. Por favor, pruebe a enviar nuevamente el formulario. + + This value is not a valid HTML5 color. + Este valor no es un color HTML5 válido. + + + Please enter a valid birthdate. + Por favor, ingrese una fecha de cumpleaños válida. + + + The selected choice is invalid. + La opción seleccionada no es válida. + + + The collection is invalid. + La colección no es válida. + + + Please select a valid color. + Por favor, seleccione un color válido. + + + Please select a valid country. + Por favor, seleccione un país válido. + + + Please select a valid currency. + Por favor, seleccione una moneda válida. + + + Please choose a valid date interval. + Por favor, elija un intervalo de fechas válido. + + + Please enter a valid date and time. + Por favor, ingrese una fecha y hora válidas. + + + Please enter a valid date. + Por favor, ingrese una fecha valida. + + + Please select a valid file. + Por favor, seleccione un archivo válido. + + + The hidden field is invalid. + El campo oculto no es válido. + + + Please enter an integer. + Por favor, ingrese un número entero. + + + Please select a valid language. + Por favor, seleccione un idioma válido. + + + Please select a valid locale. + Por favor, seleccione una configuración regional válida. + + + Please enter a valid money amount. + Por favor, ingrese una cantidad de dinero válida. + + + Please enter a number. + Por favor, ingrese un número. + + + The password is invalid. + La contraseña no es válida. + + + Please enter a percentage value. + Por favor, ingrese un valor porcentual. + + + The values do not match. + Los valores no coinciden. + + + Please enter a valid time. + Por favor, ingrese una hora válida. + + + Please select a valid timezone. + Por favor, seleccione una zona horaria válida. + + + Please enter a valid URL. + Por favor, ingrese una URL válida. + + + Please enter a valid search term. + Por favor, ingrese un término de búsqueda válido. + + + Please provide a valid phone number. + Por favor, proporcione un número de teléfono válido. + + + The checkbox has an invalid value. + La casilla de verificación tiene un valor inválido. + + + Please enter a valid email address. + Por favor, ingrese una dirección de correo electrónico válida. + + + Please select a valid option. + Por favor, seleccione una opción válida. + + + Please select a valid range. + Por favor, seleccione un rango válido. + + + Please enter a valid week. + Por favor, ingrese una semana válida. + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.fa.xlf b/src/Symfony/Component/Form/Resources/translations/validators.fa.xlf index 1c784c24a0e2d..1bbe090f34472 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.fa.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.fa.xlf @@ -4,15 +4,135 @@ This form should not contain extra fields. - این فرم نباید شامل فیلد اضافه ای باشد. + این فرم نباید شامل فیلدهای اضافی باشد. The uploaded file was too large. Please try to upload a smaller file. - فایل بارگذاری شده بسیار بزرگ می باشد. لطفا فایل کوچکتری را بارگذاری نمایید. + فایل بارگذاری‌شده بسیار بزرگ است. لطفاً فایل کوچک‌تری را بارگذاری نمایید. The CSRF token is invalid. Please try to resubmit the form. - توکن CSRF نامعتبر می باشد. لطفا فرم را مجددا ارسال نمایید. + توکن CSRF نامعتبر است. لطفاً فرم را مجدداً ارسال نمایید. + + + This value is not a valid HTML5 color. + این مقدار یک رنگ معتبر HTML5 نیست. + + + Please enter a valid birthdate. + لطفاً یک تاریخ تولد معتبر وارد نمایید. + + + The selected choice is invalid. + گزینه‌ی انتخاب‌شده نامعتبر است + + + The collection is invalid. + این مجموعه نامعتبر است. + + + Please select a valid color. + لطفاً یک رنگ معتبر انتخاب کنید. + + + Please select a valid country. + لطفاً یک کشور معتبر انتخاب کنید. + + + Please select a valid currency. + لطفاً یک واحد پولی معتبر انتخاب کنید. + + + Please choose a valid date interval. + لطفاً یک بازه‌ی زمانی معتبر انتخاب کنید. + + + Please enter a valid date and time. + لطفاً یک تاریخ و زمان معتبر وارد کنید. + + + Please enter a valid date. + لطفاً یک تاریخ معتبر وارد کنید. + + + Please select a valid file. + لطفاً یک فایل معتبر انتخاب کنید. + + + The hidden field is invalid. + فیلد مخفی نامعتبر است. + + + Please enter an integer. + لطفاً یک عدد صحیح وارد کنید. + + + Please select a valid language. + لطفاً یک زبان معتبر انتخاب کنید. + + + Please select a valid locale. + لطفاً یک جغرافیای (locale) معتبر انتخاب کنید. + + + Please enter a valid money amount. + لطفاً یک مقدار پول معتبر وارد کنید. + + + Please enter a number. + لطفاً یک عدد وارد کنید. + + + The password is invalid. + رمزعبور نامعتبر است. + + + Please enter a percentage value. + لطفاً یک درصد معتبر وارد کنید. + + + The values do not match. + مقادیر تطابق ندارند. + + + Please enter a valid time. + لطفاً یک زمان معتبر وارد کنید. + + + Please select a valid timezone. + لطفاً یک منطقه‌زمانی معتبر وارد کنید. + + + Please enter a valid URL. + لطفاً یک URL معتبر وارد کنید. + + + Please enter a valid search term. + لطفاً یک عبارت جستجوی معتبر وارد کنید. + + + Please provide a valid phone number. + لطفاً یک شماره تلفن معتبر وارد کنید. + + + The checkbox has an invalid value. + کادر انتخاب (checkbox) دارای مقداری نامعتبر است. + + + Please enter a valid email address. + لطفاً یک آدرس رایانامه‌ی معتبر وارد کنید. + + + Please select a valid option. + لطفاً یک گزینه‌ی معتبر انتخاب کنید. + + + Please select a valid range. + لطفاً یک محدوده‌ی معتبر انتخاب کنید. + + + Please enter a valid week. + لطفاً یک هفته‌ی معتبر وارد کنید. diff --git a/src/Symfony/Component/Form/Resources/translations/validators.fr.xlf b/src/Symfony/Component/Form/Resources/translations/validators.fr.xlf index a32c83fc93026..f40dea752d3dd 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.fr.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.fr.xlf @@ -18,6 +18,122 @@ This value is not a valid HTML5 color. Cette valeur n'est pas une couleur HTML5 valide. + + Please enter a valid birthdate. + Veuillez entrer une date de naissance valide. + + + The selected choice is invalid. + Le choix sélectionné est invalide. + + + The collection is invalid. + La collection est invalide. + + + Please select a valid color. + Veuillez sélectionner une couleur valide. + + + Please select a valid country. + Veuillez sélectionner un pays valide. + + + Please select a valid currency. + Veuillez sélectionner une devise valide. + + + Please choose a valid date interval. + Veuillez choisir un intervalle de dates valide. + + + Please enter a valid date and time. + Veuillez saisir une date et une heure valides. + + + Please enter a valid date. + Veuillez entrer une date valide. + + + Please select a valid file. + Veuillez sélectionner un fichier valide. + + + The hidden field is invalid. + Le champ masqué n'est pas valide. + + + Please enter an integer. + Veuillez saisir un entier. + + + Please select a valid language. + Veuillez sélectionner une langue valide. + + + Please select a valid locale. + Veuillez sélectionner une langue valide. + + + Please enter a valid money amount. + Veuillez saisir un montant valide. + + + Please enter a number. + Veuillez saisir un nombre. + + + The password is invalid. + Le mot de passe est invalide. + + + Please enter a percentage value. + Veuillez saisir un pourcentage valide. + + + The values do not match. + Les valeurs ne correspondent pas. + + + Please enter a valid time. + Veuillez saisir une heure valide. + + + Please select a valid timezone. + Veuillez sélectionner un fuseau horaire valide. + + + Please enter a valid URL. + Veuillez saisir une URL valide. + + + Please enter a valid search term. + Veuillez saisir un terme de recherche valide. + + + Please provide a valid phone number. + Veuillez fournir un numéro de téléphone valide. + + + The checkbox has an invalid value. + La case à cocher a une valeur non valide. + + + Please enter a valid email address. + Veuillez saisir une adresse email valide. + + + Please select a valid option. + Veuillez sélectionner une option valide. + + + Please select a valid range. + Veuillez sélectionner une plage valide. + + + Please enter a valid week. + Veuillez entrer une semaine valide. + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.id.xlf b/src/Symfony/Component/Form/Resources/translations/validators.id.xlf index b067d98474fac..535f9e6b15860 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.id.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.id.xlf @@ -14,6 +14,126 @@ The CSRF token is invalid. Please try to resubmit the form. CSRF-Token tidak sah. Silahkan coba kirim ulang formulir. + + This value is not a valid HTML5 color. + Nilai ini bukan merupakan HTML5 color yang sah. + + + Please enter a valid birthdate. + Silahkan masukkan tanggal lahir yang sah. + + + The selected choice is invalid. + Pilihan yang dipilih tidak sah. + + + The collection is invalid. + Koleksi tidak sah. + + + Please select a valid color. + Silahkan pilih warna yang sah. + + + Please select a valid country. + Silahkan pilih negara yang sah. + + + Please select a valid currency. + Silahkan pilih mata uang yang sah. + + + Please choose a valid date interval. + Silahkan pilih interval tanggal yang sah. + + + Please enter a valid date and time. + Silahkan masukkan tanggal dan waktu yang sah. + + + Please enter a valid date. + Silahkan masukkan tanggal yang sah. + + + Please select a valid file. + Silahkan pilih berkas yang sah. + + + The hidden field is invalid. + Ruas yang tersembunyi tidak sah. + + + Please enter an integer. + Silahkan masukkan angka. + + + Please select a valid language. + Silahlan pilih bahasa yang sah. + + + Please select a valid locale. + Silahkan pilih local yang sah. + + + Please enter a valid money amount. + Silahkan masukkan nilai uang yang sah. + + + Please enter a number. + Silahkan masukkan sebuah angka + + + The password is invalid. + Kata sandi tidak sah. + + + Please enter a percentage value. + Silahkan masukkan sebuah nilai persentase. + + + The values do not match. + Nilainya tidak cocok. + + + Please enter a valid time. + Silahkan masukkan waktu yang sah. + + + Please select a valid timezone. + Silahkan pilih zona waktu yang sah. + + + Please enter a valid URL. + Silahkan masukkan URL yang sah. + + + Please enter a valid search term. + Silahkan masukkan kata pencarian yang sah. + + + Please provide a valid phone number. + Silahkan sediakan nomor telepon yang sah. + + + The checkbox has an invalid value. + Nilai dari checkbox tidak sah. + + + Please enter a valid email address. + Silahkan masukkan alamat surel yang sah. + + + Please select a valid option. + Silahkan pilih opsi yang sah. + + + Please select a valid range. + Silahkan pilih rentang yang sah. + + + Please enter a valid week. + Silahkan masukkan minggu yang sah. + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.it.xlf b/src/Symfony/Component/Form/Resources/translations/validators.it.xlf index aa15264d9faad..8e4665ce1daf5 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.it.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.it.xlf @@ -8,11 +8,131 @@ The uploaded file was too large. Please try to upload a smaller file. - Il file caricato è troppo grande. Per favore caricare un file più piccolo. + Il file caricato è troppo grande. Per favore, carica un file più piccolo. The CSRF token is invalid. Please try to resubmit the form. - Il token CSRF non è valido. Provare a reinviare il form. + Il token CSRF non è valido. Prova a reinviare il form. + + + This value is not a valid HTML5 color. + Il valore non è un colore HTML5 valido. + + + Please enter a valid birthdate. + Per favore, inserisci una data di compleanno valida. + + + The selected choice is invalid. + La scelta selezionata non è valida. + + + The collection is invalid. + La collezione non è valida. + + + Please select a valid color. + Per favore, seleziona un colore valido. + + + Please select a valid country. + Per favore, seleziona un paese valido. + + + Please select a valid currency. + Per favore, seleziona una valuta valida. + + + Please choose a valid date interval. + Per favore, scegli a valid date interval. + + + Please enter a valid date and time. + Per favore, inserisci a valid date and time. + + + Please enter a valid date. + Per favore, inserisci a valid date. + + + Please select a valid file. + Per favore, seleziona un file valido. + + + The hidden field is invalid. + Il campo nascosto non è valido. + + + Please enter an integer. + Per favore, inserisci un numero intero. + + + Please select a valid language. + Per favore, seleziona una lingua valida. + + + Please select a valid locale. + Per favore, seleziona una lingua valida. + + + Please enter a valid money amount. + Per favore, inserisci un importo valido. + + + Please enter a number. + Per favore, inserisci un numero. + + + The password is invalid. + La password non è valida. + + + Please enter a percentage value. + Per favore, inserisci un valore percentuale. + + + The values do not match. + I valori non corrispondono. + + + Please enter a valid time. + Per favore, inserisci un orario valido. + + + Please select a valid timezone. + Per favore, seleziona un fuso orario valido. + + + Please enter a valid URL. + Per favore, inserisci un URL valido. + + + Please enter a valid search term. + Per favore, inserisci un termine di ricerca valido. + + + Please provide a valid phone number. + Per favore, indica un numero di telefono valido. + + + The checkbox has an invalid value. + La casella di selezione non ha un valore valido. + + + Please enter a valid email address. + Per favore, indica un indirizzo email valido. + + + Please select a valid option. + Per favore, seleziona un'opzione valida. + + + Please select a valid range. + Per favore, seleziona un intervallo valido. + + + Please enter a valid week. + Per favore, inserisci una settimana valida. diff --git a/src/Symfony/Component/Form/Resources/translations/validators.ja.xlf b/src/Symfony/Component/Form/Resources/translations/validators.ja.xlf index 0db5eddbe68a6..ea2226ce4182f 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.ja.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.ja.xlf @@ -14,6 +14,126 @@ The CSRF token is invalid. Please try to resubmit the form. CSRFトークンが無効です、再送信してください。 + + This value is not a valid HTML5 color. + 有効なHTML5の色ではありません。 + + + Please enter a valid birthdate. + 有効な生年月日を入力してください。 + + + The selected choice is invalid. + 選択した値は無効です。 + + + The collection is invalid. + コレクションは無効です。 + + + Please select a valid color. + 有効な色を選択してください。 + + + Please select a valid country. + 有効な国を選択してください。 + + + Please select a valid currency. + 有効な通貨を選択してください。 + + + Please choose a valid date interval. + 有効な日付間隔を選択してください。 + + + Please enter a valid date and time. + 有効な日時を入力してください。 + + + Please enter a valid date. + 有効な日付を入力してください。 + + + Please select a valid file. + 有効なファイルを選択してください。 + + + The hidden field is invalid. + 隠しフィールドが無効です。 + + + Please enter an integer. + 整数で入力してください。 + + + Please select a valid language. + 有効な言語を選択してください。 + + + Please select a valid locale. + 有効なロケールを選択してください。 + + + Please enter a valid money amount. + 有効な金額を入力してください。 + + + Please enter a number. + 数値で入力してください。 + + + The password is invalid. + パスワードが無効です。 + + + Please enter a percentage value. + パーセント値で入力してください。 + + + The values do not match. + 値が一致しません。 + + + Please enter a valid time. + 有効な時間を入力してください。 + + + Please select a valid timezone. + 有効なタイムゾーンを選択してください。 + + + Please enter a valid URL. + 有効なURLを入力してください。 + + + Please enter a valid search term. + 有効な検索語を入力してください。 + + + Please provide a valid phone number. + 有効な電話番号を入力してください。 + + + The checkbox has an invalid value. + チェックボックスの値が無効です。 + + + Please enter a valid email address. + 有効なメールアドレスを入力してください。 + + + Please select a valid option. + 有効な値を選択してください。 + + + Please select a valid range. + 有効な範囲を選択してください。 + + + Please enter a valid week. + 有効な週を入力してください。 + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.lv.xlf b/src/Symfony/Component/Form/Resources/translations/validators.lv.xlf index 9cdfb2cd4864f..e7c90c793ede1 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.lv.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.lv.xlf @@ -14,6 +14,126 @@ The CSRF token is invalid. Please try to resubmit the form. Dotais CSRF talons nav derīgs. Lūdzu mēģiniet vēlreiz iesniegt veidlapu. + + This value is not a valid HTML5 color. + Šī vertība nav derīga HTML5 krāsa. + + + Please enter a valid birthdate. + Lūdzu, ievadiet derīgu dzimšanas datumu. + + + The selected choice is invalid. + Iezīmētā izvēle nav derīga. + + + The collection is invalid. + Kolekcija nav derīga. + + + Please select a valid color. + Lūdzu, izvēlieties derīgu krāsu. + + + Please select a valid country. + Lūdzu, izvēlieties derīgu valsti. + + + Please select a valid currency. + Lūdzu, izvēlieties derīgu valūtu. + + + Please choose a valid date interval. + Lūdzu, izvēlieties derīgu datumu intervālu. + + + Please enter a valid date and time. + Lūdzu, ievadiet derīgu datumu un laiku. + + + Please enter a valid date. + Lūdzu, ievadiet derīgu datumu. + + + Please select a valid file. + Lūdzu, izvēlieties derīgu failu. + + + The hidden field is invalid. + Slēptā lauka vērtība ir nederīga. + + + Please enter an integer. + Lūdzu, ievadiet veselu skaitli. + + + Please select a valid language. + Lūdzu, izvēlieties derīgu valodu. + + + Please select a valid locale. + Lūdzu, izvēlieties derīgu lokalizāciju. + + + Please enter a valid money amount. + Lūdzu, ievadiet derīgu naudas lielumu. + + + Please enter a number. + Lūdzu, ievadiet skaitli. + + + The password is invalid. + Parole ir nederīga. + + + Please enter a percentage value. + Lūdzu, ievadiet procentuālo lielumu. + + + The values do not match. + Vērtības nesakrīt. + + + Please enter a valid time. + Lūdzu, ievadiet derīgu laiku. + + + Please select a valid timezone. + Lūdzu, izvēlieties derīgu laika zonu. + + + Please enter a valid URL. + Lūdzu, ievadiet derīgu URL. + + + Please enter a valid search term. + Lūdzu, ievadiet derīgu meklēšanas nosacījumu. + + + Please provide a valid phone number. + Lūdzu, ievadiet derīgu tālruņa numuru. + + + The checkbox has an invalid value. + Izvēles rūtiņai ir nederīga vērtība. + + + Please enter a valid email address. + Lūdzu, ievadiet derīgu e-pasta adresi. + + + Please select a valid option. + Lūdzu, izvēlieties derīgu opciju. + + + Please select a valid range. + Lūdzu, izvēlieties derīgu diapazonu. + + + Please enter a valid week. + Lūdzu, ievadiet derīgu nedeļu. + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.nl.xlf b/src/Symfony/Component/Form/Resources/translations/validators.nl.xlf index 3d737d79c1d56..7aa56ebf1bda4 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.nl.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.nl.xlf @@ -14,6 +14,126 @@ The CSRF token is invalid. Please try to resubmit the form. De CSRF-token is ongeldig. Probeer het formulier opnieuw te versturen. + + This value is not a valid HTML5 color. + Dit is geen geldige HTML5 kleur. + + + Please enter a valid birthdate. + Vul een geldige geboortedatum in. + + + The selected choice is invalid. + Deze keuze is ongeldig. + + + The collection is invalid. + Deze collectie is ongeldig. + + + Please select a valid color. + Kies een geldige kleur. + + + Please select a valid country. + Kies een geldige landnaam. + + + Please select a valid currency. + Kies een geldige valuta. + + + Please choose a valid date interval. + Kies een geldig tijdinterval. + + + Please enter a valid date and time. + Vul een geldige datum en tijd in. + + + Please enter a valid date. + Vul een geldige datum in. + + + Please select a valid file. + Kies een geldig bestand. + + + The hidden field is invalid. + Het verborgen veld is incorrect. + + + Please enter an integer. + Vul een geldig getal in. + + + Please select a valid language. + Kies een geldige taal. + + + Please select a valid locale. + Kies een geldige locale. + + + Please enter a valid money amount. + Vul een geldig bedrag in. + + + Please enter a number. + Vul een geldig getal in. + + + The password is invalid. + Het wachtwoord is incorrect. + + + Please enter a percentage value. + Vul een geldig percentage in. + + + The values do not match. + De waardes komen niet overeen. + + + Please enter a valid time. + Vul een geldige tijd in. + + + Please select a valid timezone. + Vul een geldige tijdzone in. + + + Please enter a valid URL. + Vul een geldige URL in. + + + Please enter a valid search term. + Vul een geldige zoekterm in. + + + Please provide a valid phone number. + Vul een geldig telefoonnummer in. + + + The checkbox has an invalid value. + De checkbox heeft een incorrecte waarde. + + + Please enter a valid email address. + Vul een geldig e-mailadres in. + + + Please select a valid option. + Kies een geldige optie. + + + Please select a valid range. + Kies een geldig bereik. + + + Please enter a valid week. + Vul een geldige week in. + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.pl.xlf b/src/Symfony/Component/Form/Resources/translations/validators.pl.xlf index 64def2a69135c..d553f2a179a97 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.pl.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.pl.xlf @@ -14,6 +14,126 @@ The CSRF token is invalid. Please try to resubmit the form. Token CSRF jest nieprawidłowy. Proszę spróbować wysłać formularz ponownie. + + This value is not a valid HTML5 color. + Ta wartość nie jest prawidłowym kolorem HTML5. + + + Please enter a valid birthdate. + Proszę wprowadzić prawidłową datę urodzenia. + + + The selected choice is invalid. + Wybrana wartość jest nieprawidłowa. + + + The collection is invalid. + Zbiór jest nieprawidłowy. + + + Please select a valid color. + Proszę wybrać prawidłowy kolor. + + + Please select a valid country. + Proszę wybrać prawidłowy kraj. + + + Please select a valid currency. + Proszę wybrać prawidłową walutę. + + + Please choose a valid date interval. + Proszę wybrać prawidłowy przedział czasowy. + + + Please enter a valid date and time. + Proszę wprowadzić prawidłową datę i czas. + + + Please enter a valid date. + Proszę wprowadzić prawidłową datę. + + + Please select a valid file. + Proszę wybrać prawidłowy plik. + + + The hidden field is invalid. + Ukryte pole jest nieprawidłowe. + + + Please enter an integer. + Proszę wprowadzić liczbę całkowitą. + + + Please select a valid language. + Proszę wybrać prawidłowy język. + + + Please select a valid locale. + Proszę wybrać prawidłową lokalizację. + + + Please enter a valid money amount. + Proszę wybrać prawidłową ilość pieniędzy. + + + Please enter a number. + Proszę wprowadzić liczbę. + + + The password is invalid. + Hasło jest nieprawidłowe. + + + Please enter a percentage value. + Proszę wprowadzić wartość procentową. + + + The values do not match. + Wartości się nie zgadzają. + + + Please enter a valid time. + Proszę wprowadzić prawidłowy czas. + + + Please select a valid timezone. + Proszę wybrać prawidłową strefę czasową. + + + Please enter a valid URL. + Proszę wprowadzić prawidłowy adres URL. + + + Please enter a valid search term. + Proszę wprowadzić prawidłowy termin wyszukiwania. + + + Please provide a valid phone number. + Proszę wprowadzić prawidłowy numer telefonu. + + + The checkbox has an invalid value. + Pole wyboru posiada nieprawidłową wartość. + + + Please enter a valid email address. + Proszę wprowadzić prawidłowy adres email. + + + Please select a valid option. + Proszę wybrać prawidłową opcję. + + + Please select a valid range. + Proszę wybrać prawidłowy zakres. + + + Please enter a valid week. + Proszę wybrać prawidłowy tydzień. + - \ No newline at end of file + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.pt_BR.xlf b/src/Symfony/Component/Form/Resources/translations/validators.pt_BR.xlf index 9ae4d719126b5..37717fe983dd9 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.pt_BR.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.pt_BR.xlf @@ -14,6 +14,126 @@ The CSRF token is invalid. Please try to resubmit the form. O token CSRF é inválido. Por favor, tente reenviar o formulário. + + This value is not a valid HTML5 color. + Este valor não é uma cor HTML5 válida. + + + Please enter a valid birthdate. + Por favor, informe uma data de nascimento válida. + + + The selected choice is invalid. + A escolha selecionada é inválida. + + + The collection is invalid. + A coleção é inválida. + + + Please select a valid color. + Por favor, selecione uma cor válida. + + + Please select a valid country. + Por favor, selecione um país válido. + + + Please select a valid currency. + Por favor, selecione uma moeda válida. + + + Please choose a valid date interval. + Por favor, escolha um intervalo de datas válido. + + + Please enter a valid date and time. + Por favor, informe uma data e horário válidos. + + + Please enter a valid date. + Por favor, informe uma data válida. + + + Please select a valid file. + Por favor, selecione um arquivo válido. + + + The hidden field is invalid. + O campo oculto é inválido. + + + Please enter an integer. + Por favor, informe um número inteiro. + + + Please select a valid language. + Por favor, selecione um idioma válido. + + + Please select a valid locale. + Por favor, selecione uma configuração de local válida. + + + Please enter a valid money amount. + Por favor, informe um valor monetário válido. + + + Please enter a number. + Por favor, informe um número. + + + The password is invalid. + A senha é inválida. + + + Please enter a percentage value. + Por favor, informe um valor percentual. + + + The values do not match. + Os valores não conferem. + + + Please enter a valid time. + Por favor, informe um horário válido. + + + Please select a valid timezone. + Por favor, selecione um fuso horário válido. + + + Please enter a valid URL. + Por favor, informe uma URL válida. + + + Please enter a valid search term. + Por favor, informe um termo de busca válido. + + + Please provide a valid phone number. + Por favor, informe um telefone válido. + + + The checkbox has an invalid value. + A caixa de seleção possui um valor inválido. + + + Please enter a valid email address. + Por favor, informe um endereço de e-mail válido. + + + Please select a valid option. + Por favor, selecione uma opção válida. + + + Please select a valid range. + Por favor, selecione um intervalo válido. + + + Please enter a valid week. + Por favor, informe uma semana válida. + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.ru.xlf b/src/Symfony/Component/Form/Resources/translations/validators.ru.xlf index fbbbeb442297c..b11b7cef57a31 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.ru.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.ru.xlf @@ -14,6 +14,126 @@ The CSRF token is invalid. Please try to resubmit the form. CSRF значение недопустимо. Пожалуйста, попробуйте повторить отправку формы. + + This value is not a valid HTML5 color. + Значение не является допустимым HTML5 цветом. + + + Please enter a valid birthdate. + Пожалуйста, введите действительную дату рождения. + + + The selected choice is invalid. + Выбранный вариант недопустим. + + + The collection is invalid. + Коллекция недопустима. + + + Please select a valid color. + Пожалуйста, выберите допустимый цвет. + + + Please select a valid country. + Пожалуйста, выберите действительную страну. + + + Please select a valid currency. + Пожалуйста, выберите действительную валюту. + + + Please choose a valid date interval. + Пожалуйста, выберите действительный период. + + + Please enter a valid date and time. + Пожалуйста, введите действительные дату и время. + + + Please enter a valid date. + Пожалуйста, введите действительную дату. + + + Please select a valid file. + Пожалуйста, выберите допустимый файл. + + + The hidden field is invalid. + Значение скрытого поля недопустимо. + + + Please enter an integer. + Пожалуйста, введите целое число. + + + Please select a valid language. + Пожалуйста, выберите допустимый язык. + + + Please select a valid locale. + Пожалуйста, выберите допустимую локаль. + + + Please enter a valid money amount. + Пожалуйста, введите допустимое количество денег. + + + Please enter a number. + Пожалуйста, введите номер. + + + The password is invalid. + Пароль недействителен. + + + Please enter a percentage value. + Пожалуйста, введите процентное значение. + + + The values do not match. + Значения не совпадают. + + + Please enter a valid time. + Пожалуйста, введите действительное время. + + + Please select a valid timezone. + Пожалуйста, выберите действительный часовой пояс. + + + Please enter a valid URL. + Пожалуйста, введите действительный URL. + + + Please enter a valid search term. + Пожалуйста, введите действительный поисковый запрос. + + + Please provide a valid phone number. + Пожалуйста, введите действительный номер телефона. + + + The checkbox has an invalid value. + Флажок имеет недопустимое значение. + + + Please enter a valid email address. + Пожалуйста, введите допустимый email адрес. + + + Please select a valid option. + Пожалуйста, выберите допустимый вариант. + + + Please select a valid range. + Пожалуйста, выберите допустимый диапазон. + + + Please enter a valid week. + Пожалуйста, введите действительную неделю. + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.sq.xlf b/src/Symfony/Component/Form/Resources/translations/validators.sq.xlf new file mode 100644 index 0000000000000..3224f6e38ad0a --- /dev/null +++ b/src/Symfony/Component/Form/Resources/translations/validators.sq.xlf @@ -0,0 +1,139 @@ + + + + + + This form should not contain extra fields. + Kjo formë nuk duhet të përmbajë fusha shtesë. + + + The uploaded file was too large. Please try to upload a smaller file. + Skedari i ngarkuar ishte shumë i madh. Ju lutemi provoni të ngarkoni një skedar më të vogël. + + + The CSRF token is invalid. Please try to resubmit the form. + Vlera CSRF është e pavlefshme. Ju lutemi provoni të ridërgoni formën. + + + This value is not a valid HTML5 color. + Kjo vlerë nuk është një ngjyrë e vlefshme HTML5. + + + Please enter a valid birthdate. + Ju lutemi shkruani një datëlindje të vlefshme. + + + The selected choice is invalid. + Opsioni i zgjedhur është i pavlefshëm. + + + The collection is invalid. + Koleksioni është i pavlefshëm. + + + Please select a valid color. + Ju lutemi zgjidhni një ngjyrë të vlefshme. + + + Please select a valid country. + Ju lutemi zgjidhni një shtet të vlefshëm. + + + Please select a valid currency. + Ju lutemi zgjidhni një monedhë të vlefshme. + + + Please choose a valid date interval. + Ju lutemi zgjidhni një interval të vlefshëm të datës. + + + Please enter a valid date and time. + Ju lutemi shkruani një datë dhe orë të vlefshme. + + + Please enter a valid date. + Ju lutemi shkruani një datë të vlefshme. + + + Please select a valid file. + Ju lutemi zgjidhni një skedar të vlefshëm. + + + The hidden field is invalid. + Fusha e fshehur është e pavlefshme. + + + Please enter an integer. + Ju lutemi shkruani një numër të plotë. + + + Please select a valid language. + Please select a valid language. + + + Please select a valid locale. + Ju lutemi zgjidhni një lokale të vlefshme. + + + Please enter a valid money amount. + Ju lutemi shkruani një shumë të vlefshme parash. + + + Please enter a number. + Ju lutemi shkruani një numër. + + + The password is invalid. + Fjalëkalimi është i pavlefshëm. + + + Please enter a percentage value. + Ju lutemi shkruani një vlerë përqindjeje. + + + The values do not match. + Vlerat nuk përputhen. + + + Please enter a valid time. + Ju lutemi shkruani një kohë të vlefshme. + + + Please select a valid timezone. + Ju lutemi zgjidhni një zonë kohore të vlefshme. + + + Please enter a valid URL. + Ju lutemi shkruani një URL të vlefshme. + + + Please enter a valid search term. + Ju lutemi shkruani një term të vlefshëm kërkimi. + + + Please provide a valid phone number. + Ju lutemi jepni një numër telefoni të vlefshëm. + + + The checkbox has an invalid value. + Kutia e zgjedhjes ka një vlerë të pavlefshme. + + + Please enter a valid email address. + Ju lutemi shkruani një adresë të vlefshme emaili. + + + Please select a valid option. + Ju lutemi zgjidhni një opsion të vlefshëm. + + + Please select a valid range. + Ju lutemi zgjidhni një diapazon të vlefshëm. + + + Please enter a valid week. + Ju lutemi shkruani një javë të vlefshme. + + + + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.sr_Cyrl.xlf b/src/Symfony/Component/Form/Resources/translations/validators.sr_Cyrl.xlf index ff7f550adff3c..1aa242f4186a4 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.sr_Cyrl.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.sr_Cyrl.xlf @@ -12,7 +12,107 @@ The CSRF token is invalid. Please try to resubmit the form. - CSRF вредност је невалидна. Покушајте поново. + CSRF вредност није исправна. Покушајте поново. + + + This value is not a valid HTML5 color. + Ова вредност није исправна HTML5 боја. + + + Please enter a valid birthdate. + Молим упишите исправан датум рођења. + + + The selected choice is invalid. + Одабрани избор није исправан. + + + The collection is invalid. + Ова колекција није исправна. + + + Please select a valid color. + Молим изаберите исправну боју. + + + Please select a valid country. + Молим изаберите исправну државу. + + + Please select a valid currency. + Молим изаберите исправну валуту. + + + Please choose a valid date interval. + Молим изаберите исправан датумски интервал. + + + Please enter a valid date and time. + Молим упишите исправан датум и време. + + + Please enter a valid date. + Молим упишите исправан датум. + + + Please select a valid file. + Молим изаберите исправну датотеку. + + + The hidden field is invalid. + Скривено поље није исправно. + + + Please enter an integer. + Молим упишите цео број (integer). + + + Please select a valid language. + Молим изаберите исправан језик. + + + Please select a valid locale. + Молим изаберите исправну локализацију. + + + Please enter a valid money amount. + Молим упишите исправну количину новца. + + + Please enter a number. + Молим упишите број. + + + The password is invalid. + Ова лозинка није исправна. + + + Please enter a percentage value. + Молим упишите процентуалну вредност. + + + The values do not match. + Дате вредности се не поклапају. + + + Please enter a valid time. + Молим упишите исправно време. + + + Please select a valid timezone. + Молим изаберите исправну временску зону. + + + Please enter a valid URL. + Молим упишите исправан URL. + + + Please enter a valid search term. + Молим упишите исправан термин за претрагу. + + + Please provide a valid phone number. + Молим наведите исправан број телефона. diff --git a/src/Symfony/Component/Form/Resources/translations/validators.sr_Latn.xlf b/src/Symfony/Component/Form/Resources/translations/validators.sr_Latn.xlf index 6c4be3585718e..75a2aaab70e2e 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.sr_Latn.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.sr_Latn.xlf @@ -12,7 +12,107 @@ The CSRF token is invalid. Please try to resubmit the form. - CSRF vrednost je nevalidna. Pokušajte ponovo. + CSRF vrednost nije ispravna. Pokušajte ponovo. + + + This value is not a valid HTML5 color. + Ova vrednost nije ispravna HTML5 boja. + + + Please enter a valid birthdate. + Molim upišite ispravan datum rođenja. + + + The selected choice is invalid. + Odabrani izbor nije ispravan. + + + The collection is invalid. + Ova kolekcija nije ispravna. + + + Please select a valid color. + Molim izaberite ispravnu boju. + + + Please select a valid country. + Molim izaberite ispravnu državu. + + + Please select a valid currency. + Molim izaberite ispravnu valutu. + + + Please choose a valid date interval. + Molim izaberite ispravan datumski interval. + + + Please enter a valid date and time. + Molim upišite ispravan datum i vreme. + + + Please enter a valid date. + Molim upišite ispravan datum. + + + Please select a valid file. + Molim izaberite ispravnu datoteku. + + + The hidden field is invalid. + Skriveno polje nije ispravno. + + + Please enter an integer. + Molim upišite ceo broj (integer). + + + Please select a valid language. + Molim izaberite ispravan jezik. + + + Please select a valid locale. + Molim izaberite ispravnu lokalizaciju. + + + Please enter a valid money amount. + Molim upišite ispravnu količinu novca. + + + Please enter a number. + Molim upišite broj. + + + The password is invalid. + Ova lozinka nije ispravna. + + + Please enter a percentage value. + Molim upišite procentualnu vrednost. + + + The values do not match. + Date vrednosti se ne poklapaju. + + + Please enter a valid time. + Molim upišite ispravno vreme. + + + Please select a valid timezone. + Molim izaberite ispravnu vremensku zonu. + + + Please enter a valid URL. + Molim upišite ispravan URL. + + + Please enter a valid search term. + Molim upišite ispravan termin za pretragu. + + + Please provide a valid phone number. + Molim navedite ispravan broj telefona. diff --git a/src/Symfony/Component/Form/Resources/translations/validators.sv.xlf b/src/Symfony/Component/Form/Resources/translations/validators.sv.xlf index 2a5e57ca81b36..43e925628a488 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.sv.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.sv.xlf @@ -14,6 +14,126 @@ The CSRF token is invalid. Please try to resubmit the form. CSRF-elementet är inte giltigt. Försök att skicka formuläret igen. + + This value is not a valid HTML5 color. + Värdet är inte en giltig HTML5-färg. + + + Please enter a valid birthdate. + Ange ett giltigt födelsedatum. + + + The selected choice is invalid. + Det valda alternativet är ogiltigt. + + + The collection is invalid. + Den här samlingen är ogiltig. + + + Please select a valid color. + Välj en giltig färg. + + + Please select a valid country. + Välj ett land. + + + Please select a valid currency. + Välj en valuta. + + + Please choose a valid date interval. + Välj ett giltigt datumintervall. + + + Please enter a valid date and time. + Ange ett giltigt datum och tid. + + + Please enter a valid date. + Ange ett giltigt datum. + + + Please select a valid file. + Välj en fil. + + + The hidden field is invalid. + Det dolda fältet är ogiltigt. + + + Please enter an integer. + Ange ett heltal. + + + Please select a valid language. + Välj språk. + + + Please select a valid locale. + Välj plats. + + + Please enter a valid money amount. + Ange en giltig summa pengar. + + + Please enter a number. + Ange en siffra. + + + The password is invalid. + Lösenordet är ogiltigt. + + + Please enter a percentage value. + Ange ett procentuellt värde. + + + The values do not match. + De angivna värdena stämmer inte överens. + + + Please enter a valid time. + Ange en giltig tid. + + + Please select a valid timezone. + Välj en tidszon. + + + Please enter a valid URL. + Ange en giltig URL. + + + Please enter a valid search term. + Ange ett giltigt sökbegrepp. + + + Please provide a valid phone number. + Ange ett giltigt telefonnummer. + + + The checkbox has an invalid value. + Kryssrutan har ett ogiltigt värde. + + + Please enter a valid email address. + Ange en giltig e-postadress. + + + Please select a valid option. + Välj ett alternativ. + + + Please select a valid range. + Välj ett intervall. + + + Please enter a valid week. + Ange en giltig vecka. + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.tr.xlf b/src/Symfony/Component/Form/Resources/translations/validators.tr.xlf index 70e8541ed909c..d1ddc1d0ef33d 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.tr.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.tr.xlf @@ -14,6 +14,126 @@ The CSRF token is invalid. Please try to resubmit the form. CSRF fişi geçersiz. Formu tekrar göndermeyi deneyin. + + This value is not a valid HTML5 color. + Bu değer, geçerli bir HTML5 rengi değil. + + + Please enter a valid birthdate. + Lütfen geçerli bir doğum tarihi girin. + + + The selected choice is invalid. + Seçilen seçim geçersiz. + + + The collection is invalid. + Koleksiyon geçersiz. + + + Please select a valid color. + Lütfen geçerli bir renk seçin. + + + Please select a valid country. + Lütfen geçerli bir ülke seçin. + + + Please select a valid currency. + Lütfen geçerli bir para birimi seçin. + + + Please choose a valid date interval. + Lütfen geçerli bir tarih aralığı seçin. + + + Please enter a valid date and time. + Lütfen geçerli bir tarih ve saat girin. + + + Please enter a valid date. + Lütfen geçerli bir tarih giriniz. + + + Please select a valid file. + Lütfen geçerli bir dosya seçin. + + + The hidden field is invalid. + Gizli alan geçersiz. + + + Please enter an integer. + Lütfen bir tam sayı girin. + + + Please select a valid language. + Lütfen geçerli bir dil seçin. + + + Please select a valid locale. + Lütfen geçerli bir yerel ayar seçin. + + + Please enter a valid money amount. + Lütfen geçerli bir para tutarı girin. + + + Please enter a number. + Lütfen bir numara giriniz. + + + The password is invalid. + Şifre geçersiz. + + + Please enter a percentage value. + Lütfen bir yüzde değeri girin. + + + The values do not match. + Değerler eşleşmiyor. + + + Please enter a valid time. + Lütfen geçerli bir zaman girin. + + + Please select a valid timezone. + Lütfen geçerli bir saat dilimi seçin. + + + Please enter a valid URL. + Lütfen geçerli bir giriniz URL. + + + Please enter a valid search term. + Lütfen geçerli bir arama terimi girin. + + + Please provide a valid phone number. + lütfen geçerli bir telefon numarası sağlayın. + + + The checkbox has an invalid value. + Onay kutusunda geçersiz bir değer var. + + + Please enter a valid email address. + Lütfen geçerli bir e-posta adresi girin. + + + Please select a valid option. + Lütfen geçerli bir seçenek seçin. + + + Please select a valid range. + Lütfen geçerli bir aralık seçin. + + + Please enter a valid week. + Lütfen geçerli bir hafta girin. + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.uk.xlf b/src/Symfony/Component/Form/Resources/translations/validators.uk.xlf index 4c739face54f8..ca707bcffa916 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.uk.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.uk.xlf @@ -8,11 +8,131 @@ The uploaded file was too large. Please try to upload a smaller file. - Завантажений файл занадто великий. Будь-ласка, спробуйте завантажити файл меншого розміру. + Завантажений файл занадто великий. Будь ласка, спробуйте завантажити файл меншого розміру. The CSRF token is invalid. Please try to resubmit the form. - CSRF значення недопустиме. Будь-ласка, спробуйте відправити форму знову. + CSRF значення недопустиме. Будь ласка, спробуйте відправити форму знову. + + + This value is not a valid HTML5 color. + Це значення не є допустимим кольором HTML5. + + + Please enter a valid birthdate. + Будь ласка, введіть дійсну дату народження. + + + The selected choice is invalid. + Обраний варіант недійсний. + + + The collection is invalid. + Колекція недійсна. + + + Please select a valid color. + Будь ласка, оберіть дійсний колір. + + + Please select a valid country. + Будь ласка, оберіть дійсну країну. + + + Please select a valid currency. + Будь ласка, оберіть дійсну валюту. + + + Please choose a valid date interval. + Будь ласка, оберіть дійсний інтервал дати. + + + Please enter a valid date and time. + Будь ласка, введіть дійсну дату та час. + + + Please enter a valid date. + Будь ласка, введіть дійсну дату. + + + Please select a valid file. + Будь ласка, оберіть дійсний файл. + + + The hidden field is invalid. + Приховане поле недійсне. + + + Please enter an integer. + Будь ласка, введіть ціле число. + + + Please select a valid language. + Будь ласка, оберіть дійсну мову. + + + Please select a valid locale. + Будь ласка, оберіть дійсну локаль. + + + Please enter a valid money amount. + Будь ласка, введіть дійсну суму грошей. + + + Please enter a number. + Будь ласка, введіть число. + + + The password is invalid. + Пароль недійсний. + + + Please enter a percentage value. + Будь ласка, введіть процентне значення. + + + The values do not match. + Значення не збігаються. + + + Please enter a valid time. + Будь ласка, введіть дійсний час. + + + Please select a valid timezone. + Будь ласка, оберіть дійсний часовий пояс. + + + Please enter a valid URL. + Будь ласка, введіть дійсну URL-адресу. + + + Please enter a valid search term. + Будь ласка, введіть дійсний пошуковий термін. + + + Please provide a valid phone number. + Будь ласка, введіть дійсний номер телефону. + + + The checkbox has an invalid value. + Прапорець має недійсне значення. + + + Please enter a valid email address. + Будь ласка, введіть дійсну адресу електронної пошти. + + + Please select a valid option. + Будь ласка, оберіть дійсний варіант. + + + Please select a valid range. + Будь ласка, оберіть дійсний діапазон. + + + Please enter a valid week. + Будь ласка, введіть дійсний тиждень. diff --git a/src/Symfony/Component/Form/Resources/translations/validators.vi.xlf b/src/Symfony/Component/Form/Resources/translations/validators.vi.xlf index 4d060fbe0d96e..6a8f2bd862c9d 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.vi.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.vi.xlf @@ -114,6 +114,26 @@ Please provide a valid phone number. Vui lòng cung cấp số điện thoại hợp lệ. + + The checkbox has an invalid value. + Hộp kiểm có một giá trị không hợp lệ. + + + Please enter a valid email address. + Vui lòng nhập địa chỉ email hợp lệ. + + + Please select a valid option. + Vui lòng chọn một phương án hợp lệ. + + + Please select a valid range. + Vui lòng nhập một phạm vi hợp lệ. + + + Please enter a valid week. + Vui lòng nhập một tuần hợp lệ. + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.zh_CN.xlf b/src/Symfony/Component/Form/Resources/translations/validators.zh_CN.xlf index 8bdf7fb5ca0bc..3106db2bd97b7 100644 --- a/src/Symfony/Component/Form/Resources/translations/validators.zh_CN.xlf +++ b/src/Symfony/Component/Form/Resources/translations/validators.zh_CN.xlf @@ -14,6 +14,126 @@ The CSRF token is invalid. Please try to resubmit the form. CSRF 验证符无效, 请重新提交. + + This value is not a valid HTML5 color. + 该数值不是个有效的 HTML5 颜色。 + + + Please enter a valid birthdate. + 请输入有效的生日日期。 + + + The selected choice is invalid. + 所选的选项无效。 + + + The collection is invalid. + 集合无效。 + + + Please select a valid color. + 请选择有效的颜色。 + + + Please select a valid country. + 请选择有效的国家。 + + + Please select a valid currency. + 请选择有效的货币。 + + + Please choose a valid date interval. + 请选择有效的日期间隔。 + + + Please enter a valid date and time. + 请输入有效的日期与时间。 + + + Please enter a valid date. + 请输入有效的日期。 + + + Please select a valid file. + 请选择有效的文件。 + + + The hidden field is invalid. + 隐藏字段无效。 + + + Please enter an integer. + 请输入整数。 + + + Please select a valid language. + 请选择有效的语言。 + + + Please select a valid locale. + 请选择有效的语言环境。 + + + Please enter a valid money amount. + 请输入正确的金额。 + + + Please enter a number. + 请输入数字。 + + + The password is invalid. + 密码无效。 + + + Please enter a percentage value. + 请输入百分比值。 + + + The values do not match. + 数值不匹配。 + + + Please enter a valid time. + 请输入有效的时间。 + + + Please select a valid timezone. + 请选择有效的时区。 + + + Please enter a valid URL. + 请输入有效的网址。 + + + Please enter a valid search term. + 请输入有效的搜索词。 + + + Please provide a valid phone number. + 请提供有效的手机号码。 + + + The checkbox has an invalid value. + 无效的选框值。 + + + Please enter a valid email address. + 请输入有效的电子邮件地址。 + + + Please select a valid option. + 请选择有效的选项。 + + + Please select a valid range. + 请选择有效的范围。 + + + Please enter a valid week. + 请输入有效的星期。 + diff --git a/src/Symfony/Component/Form/Resources/translations/validators.zh_TW.xlf b/src/Symfony/Component/Form/Resources/translations/validators.zh_TW.xlf new file mode 100644 index 0000000000000..858b9db42ea5f --- /dev/null +++ b/src/Symfony/Component/Form/Resources/translations/validators.zh_TW.xlf @@ -0,0 +1,139 @@ + + + + + + This form should not contain extra fields. + 該表單中不可有額外字段。 + + + The uploaded file was too large. Please try to upload a smaller file. + 上傳文件太大, 請重新嘗試上傳一個較小的文件。 + + + The CSRF token is invalid. Please try to resubmit the form. + CSRF 驗證符無效, 請重新提交。 + + + This value is not a valid HTML5 color. + 該數值不是個有效的 HTML5 顏色。 + + + Please enter a valid birthdate. + 請輸入有效的生日日期。 + + + The selected choice is invalid. + 所選的選項無效。 + + + The collection is invalid. + 集合無效。 + + + Please select a valid color. + 請選擇有效的顏色。 + + + Please select a valid country. + 請選擇有效的國家。 + + + Please select a valid currency. + 請選擇有效的貨幣。 + + + Please choose a valid date interval. + 請選擇有效的日期間隔。 + + + Please enter a valid date and time. + 請輸入有效的日期與時間。 + + + Please enter a valid date. + 請輸入有效的日期。 + + + Please select a valid file. + 請選擇有效的文件。 + + + The hidden field is invalid. + 隱藏字段無效。 + + + Please enter an integer. + 請輸入整數。 + + + Please select a valid language. + 請選擇有效的語言。 + + + Please select a valid locale. + 請選擇有效的語言環境。 + + + Please enter a valid money amount. + 請輸入正確的金額。 + + + Please enter a number. + 請輸入數字。 + + + The password is invalid. + 密碼無效。 + + + Please enter a percentage value. + 請輸入百分比值。 + + + The values do not match. + 數值不匹配。 + + + Please enter a valid time. + 請輸入有效的時間。 + + + Please select a valid timezone. + 請選擇有效的時區。 + + + Please enter a valid URL. + 請輸入有效的網址。 + + + Please enter a valid search term. + 請輸入有效的搜索詞。 + + + Please provide a valid phone number. + 請提供有效的手機號碼。 + + + The checkbox has an invalid value. + 無效的選框值。 + + + Please enter a valid email address. + 請輸入有效的電子郵件地址。 + + + Please select a valid option. + 請選擇有效的選項。 + + + Please select a valid range. + 請選擇有效的範圍。 + + + Please enter a valid week. + 請輸入有效的星期。 + + + + diff --git a/src/Symfony/Component/Form/composer.json b/src/Symfony/Component/Form/composer.json index 03ba22716a02a..b17ef9804901d 100644 --- a/src/Symfony/Component/Form/composer.json +++ b/src/Symfony/Component/Form/composer.json @@ -64,10 +64,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/HttpClient/CurlHttpClient.php b/src/Symfony/Component/HttpClient/CurlHttpClient.php index 5174ad053a2ea..ce442834a166f 100644 --- a/src/Symfony/Component/HttpClient/CurlHttpClient.php +++ b/src/Symfony/Component/HttpClient/CurlHttpClient.php @@ -326,8 +326,10 @@ public function stream($responses, float $timeout = null): ResponseStreamInterfa throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of CurlResponse objects, "%s" given.', __METHOD__, get_debug_type($responses))); } - $active = 0; - while (\CURLM_CALL_MULTI_PERFORM === curl_multi_exec($this->multi->handle, $active)); + if (\is_resource($this->multi->handle) || $this->multi->handle instanceof \CurlMultiHandle) { + $active = 0; + while (\CURLM_CALL_MULTI_PERFORM === curl_multi_exec($this->multi->handle, $active)); + } return new ResponseStream(CurlResponse::stream($responses, $timeout)); } diff --git a/src/Symfony/Component/HttpClient/HttpClientTrait.php b/src/Symfony/Component/HttpClient/HttpClientTrait.php index cf2f1cc6e9891..77cc4ab284ba3 100644 --- a/src/Symfony/Component/HttpClient/HttpClientTrait.php +++ b/src/Symfony/Component/HttpClient/HttpClientTrait.php @@ -111,8 +111,13 @@ private static function prepareRequest(?string $method, ?string $url, array $opt throw new InvalidArgumentException(sprintf('Option "auth_basic" must be string or an array, "%s" given.', get_debug_type($options['auth_basic']))); } - if (isset($options['auth_bearer']) && (!\is_string($options['auth_bearer']) || !preg_match('{^[-._=:~+/0-9a-zA-Z]++$}', $options['auth_bearer']))) { - throw new InvalidArgumentException(sprintf('Option "auth_bearer" must be a string containing only characters from the base 64 alphabet, %s given.', \is_string($options['auth_bearer']) ? 'invalid string' : '"'.get_debug_type($options['auth_bearer']).'"')); + if (isset($options['auth_bearer'])) { + if (!\is_string($options['auth_bearer'])) { + throw new InvalidArgumentException(sprintf('Option "auth_bearer" must be a string, "%s" given.', get_debug_type($options['auth_bearer']))); + } + if (preg_match('{[^\x21-\x7E]}', $options['auth_bearer'])) { + throw new InvalidArgumentException('Invalid character found in option "auth_bearer": '.json_encode($options['auth_bearer']).'.'); + } } if (isset($options['auth_basic'], $options['auth_bearer'])) { diff --git a/src/Symfony/Component/HttpClient/Internal/Canary.php b/src/Symfony/Component/HttpClient/Internal/Canary.php new file mode 100644 index 0000000000000..3d14b5fd1ab6f --- /dev/null +++ b/src/Symfony/Component/HttpClient/Internal/Canary.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpClient\Internal; + +/** + * @author Nicolas Grekas + * + * @internal + */ +final class Canary +{ + private $canceller; + + public function __construct(\Closure $canceller) + { + $this->canceller = $canceller; + } + + public function cancel() + { + if (($canceller = $this->canceller) instanceof \Closure) { + $this->canceller = null; + $canceller(); + } + } + + public function __destruct() + { + $this->cancel(); + } +} diff --git a/src/Symfony/Component/HttpClient/Response/AmpResponse.php b/src/Symfony/Component/HttpClient/Response/AmpResponse.php index 7745461c9475e..7f6c3c208f74a 100644 --- a/src/Symfony/Component/HttpClient/Response/AmpResponse.php +++ b/src/Symfony/Component/HttpClient/Response/AmpResponse.php @@ -25,6 +25,7 @@ use Symfony\Component\HttpClient\HttpClientTrait; use Symfony\Component\HttpClient\Internal\AmpBody; use Symfony\Component\HttpClient\Internal\AmpClientState; +use Symfony\Component\HttpClient\Internal\Canary; use Symfony\Component\HttpClient\Internal\ClientState; use Symfony\Contracts\HttpClient\ResponseInterface; @@ -93,6 +94,11 @@ public function __construct(AmpClientState $multi, Request $request, array $opti $multi->openHandles[$id] = $id; ++$multi->responseCount; + + $this->canary = new Canary(static function () use ($canceller, $multi, $id) { + $canceller->cancel(); + unset($multi->openHandles[$id], $multi->handlesActivity[$id]); + }); } /** @@ -108,8 +114,6 @@ public function __destruct() try { $this->doDestruct(); } finally { - $this->close(); - // Clear the DNS cache when all requests completed if (0 >= --$this->multi->responseCount) { $this->multi->responseCount = 0; @@ -118,15 +122,6 @@ public function __destruct() } } - /** - * {@inheritdoc} - */ - private function close(): void - { - $this->canceller->cancel(); - unset($this->multi->openHandles[$this->id], $this->multi->handlesActivity[$this->id]); - } - /** * {@inheritdoc} */ @@ -189,11 +184,9 @@ private static function select(ClientState $multi, float $timeout): int private static function generateResponse(Request $request, AmpClientState $multi, string $id, array &$info, array &$headers, CancellationTokenSource $canceller, array &$options, \Closure $onProgress, &$handle, ?LoggerInterface $logger) { - $activity = &$multi->handlesActivity; - - $request->setInformationalResponseHandler(static function (Response $response) use (&$activity, $id, &$info, &$headers) { + $request->setInformationalResponseHandler(static function (Response $response) use ($multi, $id, &$info, &$headers) { self::addResponseHeaders($response, $info, $headers); - $activity[$id][] = new InformationalChunk($response->getStatus(), $response->getHeaders()); + $multi->handlesActivity[$id][] = new InformationalChunk($response->getStatus(), $response->getHeaders()); self::stopLoop(); }); @@ -207,11 +200,11 @@ private static function generateResponse(Request $request, AmpClientState $multi $options = null; - $activity[$id][] = new FirstChunk(); + $multi->handlesActivity[$id][] = new FirstChunk(); if ('HEAD' === $response->getRequest()->getMethod() || \in_array($info['http_code'], [204, 304], true)) { - $activity[$id][] = null; - $activity[$id][] = null; + $multi->handlesActivity[$id][] = null; + $multi->handlesActivity[$id][] = null; self::stopLoop(); return; @@ -231,14 +224,14 @@ private static function generateResponse(Request $request, AmpClientState $multi } $info['size_download'] += \strlen($data); - $activity[$id][] = $data; + $multi->handlesActivity[$id][] = $data; } - $activity[$id][] = null; - $activity[$id][] = null; + $multi->handlesActivity[$id][] = null; + $multi->handlesActivity[$id][] = null; } catch (\Throwable $e) { - $activity[$id][] = null; - $activity[$id][] = $e; + $multi->handlesActivity[$id][] = null; + $multi->handlesActivity[$id][] = $e; } finally { $info['download_content_length'] = $info['size_download']; } diff --git a/src/Symfony/Component/HttpClient/Response/CurlResponse.php b/src/Symfony/Component/HttpClient/Response/CurlResponse.php index 29f82ac9b7ced..435f6402c796d 100644 --- a/src/Symfony/Component/HttpClient/Response/CurlResponse.php +++ b/src/Symfony/Component/HttpClient/Response/CurlResponse.php @@ -15,9 +15,9 @@ use Symfony\Component\HttpClient\Chunk\FirstChunk; use Symfony\Component\HttpClient\Chunk\InformationalChunk; use Symfony\Component\HttpClient\Exception\TransportException; +use Symfony\Component\HttpClient\Internal\Canary; use Symfony\Component\HttpClient\Internal\ClientState; use Symfony\Component\HttpClient\Internal\CurlClientState; -use Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface; use Symfony\Contracts\HttpClient\ResponseInterface; /** @@ -150,6 +150,31 @@ public function __construct(CurlClientState $multi, $ch, array $options = null, // Schedule the request in a non-blocking way $multi->openHandles[$id] = [$ch, $options]; curl_multi_add_handle($multi->handle, $ch); + + $this->canary = new Canary(static function () use ($ch, $multi, $id) { + unset($multi->openHandles[$id], $multi->handlesActivity[$id]); + curl_setopt($ch, \CURLOPT_PRIVATE, '_0'); + + if (self::$performing) { + return; + } + + curl_multi_remove_handle($multi->handle, $ch); + curl_setopt_array($ch, [ + \CURLOPT_NOPROGRESS => true, + \CURLOPT_PROGRESSFUNCTION => null, + \CURLOPT_HEADERFUNCTION => null, + \CURLOPT_WRITEFUNCTION => null, + \CURLOPT_READFUNCTION => null, + \CURLOPT_INFILE => null, + ]); + + if (!$multi->openHandles) { + // Schedule DNS cache eviction for the next request + $multi->dnsCache->evictions = $multi->dnsCache->evictions ?: $multi->dnsCache->removals; + $multi->dnsCache->removals = $multi->dnsCache->hostnames = []; + } + }); } /** @@ -200,52 +225,13 @@ public function getContent(bool $throw = true): string public function __destruct() { - try { - if (null === $this->timeout) { - return; // Unused pushed response - } - - $e = null; - $this->doDestruct(); - } catch (HttpExceptionInterface $e) { - throw $e; - } finally { - if ($e ?? false) { - throw $e; - } - - $this->close(); + curl_setopt($this->handle, \CURLOPT_VERBOSE, false); - if (!$this->multi->openHandles) { - // Schedule DNS cache eviction for the next request - $this->multi->dnsCache->evictions = $this->multi->dnsCache->evictions ?: $this->multi->dnsCache->removals; - $this->multi->dnsCache->removals = $this->multi->dnsCache->hostnames = []; - } - } - } - - /** - * {@inheritdoc} - */ - private function close(): void - { - $this->inflate = null; - unset($this->multi->openHandles[$this->id], $this->multi->handlesActivity[$this->id]); - curl_setopt($this->handle, \CURLOPT_PRIVATE, '_0'); - - if (self::$performing) { - return; + if (null === $this->timeout) { + return; // Unused pushed response } - curl_multi_remove_handle($this->multi->handle, $this->handle); - curl_setopt_array($this->handle, [ - \CURLOPT_NOPROGRESS => true, - \CURLOPT_PROGRESSFUNCTION => null, - \CURLOPT_HEADERFUNCTION => null, - \CURLOPT_WRITEFUNCTION => null, - \CURLOPT_READFUNCTION => null, - \CURLOPT_INFILE => null, - ]); + $this->doDestruct(); } /** diff --git a/src/Symfony/Component/HttpClient/Response/NativeResponse.php b/src/Symfony/Component/HttpClient/Response/NativeResponse.php index e29005b58fbbc..a3566aea326e4 100644 --- a/src/Symfony/Component/HttpClient/Response/NativeResponse.php +++ b/src/Symfony/Component/HttpClient/Response/NativeResponse.php @@ -14,9 +14,9 @@ use Psr\Log\LoggerInterface; use Symfony\Component\HttpClient\Chunk\FirstChunk; use Symfony\Component\HttpClient\Exception\TransportException; +use Symfony\Component\HttpClient\Internal\Canary; use Symfony\Component\HttpClient\Internal\ClientState; use Symfony\Component\HttpClient\Internal\NativeClientState; -use Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface; use Symfony\Contracts\HttpClient\ResponseInterface; /** @@ -44,7 +44,7 @@ final class NativeResponse implements ResponseInterface public function __construct(NativeClientState $multi, $context, string $url, array $options, array &$info, callable $resolveRedirect, ?callable $onProgress, ?LoggerInterface $logger) { $this->multi = $multi; - $this->id = (int) $context; + $this->id = $id = (int) $context; $this->context = $context; $this->url = $url; $this->logger = $logger; @@ -64,6 +64,10 @@ public function __construct(NativeClientState $multi, $context, string $url, arr $this->initializer = static function (self $response) { return null === $response->remaining; }; + + $this->canary = new Canary(static function () use ($multi, $id) { + unset($multi->openHandles[$id], $multi->handlesActivity[$id]); + }); } /** @@ -87,17 +91,8 @@ public function getInfo(string $type = null) public function __destruct() { try { - $e = null; $this->doDestruct(); - } catch (HttpExceptionInterface $e) { - throw $e; } finally { - if ($e ?? false) { - throw $e; - } - - $this->close(); - // Clear the DNS cache when all requests completed if (0 >= --$this->multi->responseCount) { $this->multi->responseCount = 0; @@ -196,7 +191,7 @@ private function open(): void */ private function close(): void { - unset($this->multi->openHandles[$this->id], $this->multi->handlesActivity[$this->id]); + $this->canary->cancel(); $this->handle = $this->buffer = $this->inflate = $this->onProgress = null; } diff --git a/src/Symfony/Component/HttpClient/Response/ResponseTrait.php b/src/Symfony/Component/HttpClient/Response/ResponseTrait.php index 54a06fc450d58..6786a2584d7c5 100644 --- a/src/Symfony/Component/HttpClient/Response/ResponseTrait.php +++ b/src/Symfony/Component/HttpClient/Response/ResponseTrait.php @@ -37,6 +37,7 @@ trait ResponseTrait { private $logger; private $headers = []; + private $canary; /** * @var callable|null A callback that initializes the two previous properties @@ -142,12 +143,6 @@ public function toArray(bool $throw = true): array return $this->jsonData; } - $contentType = $this->headers['content-type'][0] ?? 'application/json'; - - if (!preg_match('/\bjson\b/i', $contentType)) { - throw new JsonException(sprintf('Response content-type is "%s" while a JSON-compatible one was expected for "%s".', $contentType, $this->getInfo('url'))); - } - try { $content = json_decode($content, true, 512, \JSON_BIGINT_AS_STRING | (\PHP_VERSION_ID >= 70300 ? \JSON_THROW_ON_ERROR : 0)); } catch (\JsonException $e) { @@ -207,7 +202,11 @@ public function toStream(bool $throw = true) /** * Closes the response and all its network handles. */ - abstract protected function close(): void; + private function close(): void + { + $this->canary->cancel(); + $this->inflate = null; + } /** * Adds pending responses to the activity list. diff --git a/src/Symfony/Component/HttpClient/Tests/HttpClientTestCase.php b/src/Symfony/Component/HttpClient/Tests/HttpClientTestCase.php index f8a84ea4bcfe6..dbfba52da8799 100644 --- a/src/Symfony/Component/HttpClient/Tests/HttpClientTestCase.php +++ b/src/Symfony/Component/HttpClient/Tests/HttpClientTestCase.php @@ -12,9 +12,11 @@ namespace Symfony\Component\HttpClient\Tests; use Symfony\Component\HttpClient\Exception\ClientException; +use Symfony\Component\HttpClient\Internal\ClientState; use Symfony\Component\HttpClient\Response\StreamWrapper; use Symfony\Component\Process\Exception\ProcessFailedException; use Symfony\Component\Process\Process; +use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\Test\HttpClientTestCase as BaseHttpClientTestCase; @@ -241,9 +243,40 @@ private static function startVulcain(HttpClientInterface $client) sleep('\\' === \DIRECTORY_SEPARATOR ? 10 : 1); if (!$process->isRunning()) { + if ('\\' !== \DIRECTORY_SEPARATOR && 127 === $process->getExitCode()) { + self::markTestSkipped('vulcain binary is missing'); + } + + if ('\\' !== \DIRECTORY_SEPARATOR && 126 === $process->getExitCode()) { + self::markTestSkipped('vulcain binary is not executable'); + } + self::markTestSkipped((new ProcessFailedException($process))->getMessage()); } self::$vulcainStarted = true; } + + public function testHandleIsRemovedOnException() + { + $client = $this->getHttpClient(__FUNCTION__); + + try { + $client->request('GET', 'http://localhost:8057/304'); + $this->fail(RedirectionExceptionInterface::class.' expected'); + } catch (RedirectionExceptionInterface $e) { + // The response content-type mustn't be json as that calls getContent + // @see src/Symfony/Component/HttpClient/Exception/HttpExceptionTrait.php:58 + $this->assertStringNotContainsString('json', $e->getResponse()->getHeaders(false)['content-type'][0] ?? ''); + unset($e); + + $r = new \ReflectionProperty($client, 'multi'); + $r->setAccessible(true); + /** @var ClientState $clientState */ + $clientState = $r->getValue($client); + + $this->assertCount(0, $clientState->handlesActivity); + $this->assertCount(0, $clientState->openHandles); + } + } } diff --git a/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php b/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php index 9662081825148..56ce269e5463c 100644 --- a/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php +++ b/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php @@ -179,14 +179,14 @@ public function testAuthBearerOption() public function testInvalidAuthBearerOption() { $this->expectException('Symfony\Component\HttpClient\Exception\InvalidArgumentException'); - $this->expectExceptionMessage('Option "auth_bearer" must be a string containing only characters from the base 64 alphabet, "stdClass" given.'); + $this->expectExceptionMessage('Option "auth_bearer" must be a string, "stdClass" given.'); self::prepareRequest('POST', 'http://example.com', ['auth_bearer' => new \stdClass()], HttpClientInterface::OPTIONS_DEFAULTS); } public function testInvalidAuthBearerValue() { $this->expectException('Symfony\Component\HttpClient\Exception\InvalidArgumentException'); - $this->expectExceptionMessage('Option "auth_bearer" must be a string containing only characters from the base 64 alphabet, invalid string given.'); + $this->expectExceptionMessage('Invalid character found in option "auth_bearer": "a\nb".'); self::prepareRequest('POST', 'http://example.com', ['auth_bearer' => "a\nb"], HttpClientInterface::OPTIONS_DEFAULTS); } diff --git a/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php index 4130d702888fb..73dfb9f0740fa 100644 --- a/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php @@ -240,6 +240,10 @@ protected function getHttpClient(string $testCase): HttpClientInterface $this->markTestSkipped("MockHttpClient doesn't timeout on destruct"); break; + case 'testHandleIsRemovedOnException': + $this->markTestSkipped("MockHttpClient doesn't cache handles"); + break; + case 'testGetRequest': array_unshift($headers, 'HTTP/1.1 200 OK'); $responses[] = new MockResponse($body, ['response_headers' => $headers]); diff --git a/src/Symfony/Component/HttpClient/Tests/Response/MockResponseTest.php b/src/Symfony/Component/HttpClient/Tests/Response/MockResponseTest.php index b1cb16c1d90e8..3be97dd45fa61 100644 --- a/src/Symfony/Component/HttpClient/Tests/Response/MockResponseTest.php +++ b/src/Symfony/Component/HttpClient/Tests/Response/MockResponseTest.php @@ -41,12 +41,6 @@ public function toArrayErrors() 'message' => 'Response body is empty.', ]; - yield [ - 'content' => '{}', - 'responseHeaders' => ['content-type' => 'plain/text'], - 'message' => 'Response content-type is "plain/text" while a JSON-compatible one was expected for "https://example.com/file.json".', - ]; - yield [ 'content' => 'not json', 'responseHeaders' => [], diff --git a/src/Symfony/Component/HttpClient/composer.json b/src/Symfony/Component/HttpClient/composer.json index 4d4164000244c..e244060b88aee 100644 --- a/src/Symfony/Component/HttpClient/composer.json +++ b/src/Symfony/Component/HttpClient/composer.json @@ -46,10 +46,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php index 30eff944d750a..74bad652bb61f 100644 --- a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php +++ b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php @@ -231,33 +231,36 @@ public function prepare(Request $request) $this->headers->set($type, $path); $this->maxlen = 0; } - } elseif ($request->headers->has('Range')) { + } elseif ($request->headers->has('Range') && $request->isMethod('GET')) { // Process the range headers. if (!$request->headers->has('If-Range') || $this->hasValidIfRangeHeader($request->headers->get('If-Range'))) { $range = $request->headers->get('Range'); - list($start, $end) = explode('-', substr($range, 6), 2) + [0]; + if (0 === strpos($range, 'bytes=')) { + list($start, $end) = explode('-', substr($range, 6), 2) + [0]; - $end = ('' === $end) ? $fileSize - 1 : (int) $end; + $end = ('' === $end) ? $fileSize - 1 : (int) $end; - if ('' === $start) { - $start = $fileSize - $end; - $end = $fileSize - 1; - } else { - $start = (int) $start; - } + if ('' === $start) { + $start = $fileSize - $end; + $end = $fileSize - 1; + } else { + $start = (int) $start; + } - if ($start <= $end) { - if ($start < 0 || $end > $fileSize - 1) { - $this->setStatusCode(416); - $this->headers->set('Content-Range', sprintf('bytes */%s', $fileSize)); - } elseif (0 !== $start || $end !== $fileSize - 1) { - $this->maxlen = $end < $fileSize ? $end - $start + 1 : -1; - $this->offset = $start; - - $this->setStatusCode(206); - $this->headers->set('Content-Range', sprintf('bytes %s-%s/%s', $start, $end, $fileSize)); - $this->headers->set('Content-Length', $end - $start + 1); + if ($start <= $end) { + $end = min($end, $fileSize - 1); + if ($start < 0 || $start > $end) { + $this->setStatusCode(416); + $this->headers->set('Content-Range', sprintf('bytes */%s', $fileSize)); + } elseif ($end - $start < $fileSize - 1) { + $this->maxlen = $end < $fileSize ? $end - $start + 1 : -1; + $this->offset = $start; + + $this->setStatusCode(206); + $this->headers->set('Content-Range', sprintf('bytes %s-%s/%s', $start, $end, $fileSize)); + $this->headers->set('Content-Length', $end - $start + 1); + } } } } diff --git a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php index 4f4a5606fd9d7..2efbc2b8aec88 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php @@ -149,6 +149,7 @@ public function provideRanges() ['bytes=30-', 30, 5, 'bytes 30-34/35'], ['bytes=30-30', 30, 1, 'bytes 30-30/35'], ['bytes=30-34', 30, 5, 'bytes 30-34/35'], + ['bytes=30-40', 30, 5, 'bytes 30-34/35'], ]; } @@ -203,9 +204,31 @@ public function provideFullFileRanges() // Syntactical invalid range-request should also return the full resource ['bytes=20-10'], ['bytes=50-40'], + // range units other than bytes must be ignored + ['unknown=10-20'], ]; } + public function testRangeOnPostMethod() + { + $request = Request::create('/', 'POST'); + $request->headers->set('Range', 'bytes=10-20'); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream']); + + $file = fopen(__DIR__.'/File/Fixtures/test.gif', 'r'); + $data = fread($file, 35); + fclose($file); + + $this->expectOutputString($data); + $response = clone $response; + $response->prepare($request); + $response->sendContent(); + + $this->assertSame(200, $response->getStatusCode()); + $this->assertSame('35', $response->headers->get('Content-Length')); + $this->assertNull($response->headers->get('Content-Range')); + } + public function testUnpreparedResponseSendsFullFile() { $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200); @@ -242,7 +265,7 @@ public function provideInvalidRanges() { return [ ['bytes=-40'], - ['bytes=30-40'], + ['bytes=40-50'], ]; } diff --git a/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php b/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php index 5565b0384fb38..50374aa081361 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php @@ -87,11 +87,11 @@ public function testGuessClientExtensionWithIncorrectMimeType() $file = new UploadedFile( __DIR__.'/Fixtures/test.gif', 'original.gif', - 'image/jpeg', + 'image/png', null ); - $this->assertEquals('jpeg', $file->guessClientExtension()); + $this->assertEquals('png', $file->guessClientExtension()); } public function testCaseSensitiveMimeType() diff --git a/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php index ec6ae402481fa..69983ede49c58 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php @@ -168,9 +168,9 @@ protected function setUp(): void protected function tearDown(): void { foreach (glob(sys_get_temp_dir().'/form_test/*') as $file) { - unlink($file); + @unlink($file); } - rmdir(sys_get_temp_dir().'/form_test'); + @rmdir(sys_get_temp_dir().'/form_test'); } } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php index 9eb8e89b1af3f..2ca81fed8f70a 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php @@ -43,7 +43,7 @@ protected function tearDown(): void { array_map('unlink', glob($this->sessionDir.'/*')); if (is_dir($this->sessionDir)) { - rmdir($this->sessionDir); + @rmdir($this->sessionDir); } $this->sessionDir = null; $this->storage = null; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php index 4f7b37b1f3040..709bef36b9e58 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php @@ -47,7 +47,7 @@ protected function tearDown(): void session_write_close(); array_map('unlink', glob($this->savePath.'/*')); if (is_dir($this->savePath)) { - rmdir($this->savePath); + @rmdir($this->savePath); } $this->savePath = null; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php index 472456b7204f2..c0c667545243b 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php @@ -43,7 +43,7 @@ protected function tearDown(): void session_write_close(); array_map('unlink', glob($this->savePath.'/*')); if (is_dir($this->savePath)) { - rmdir($this->savePath); + @rmdir($this->savePath); } $this->savePath = null; diff --git a/src/Symfony/Component/HttpFoundation/composer.json b/src/Symfony/Component/HttpFoundation/composer.json index f4350ce37f499..ab5f365c7f7b7 100644 --- a/src/Symfony/Component/HttpFoundation/composer.json +++ b/src/Symfony/Component/HttpFoundation/composer.json @@ -36,10 +36,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 8ae9cfc6c25b5..59689807370d0 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -73,11 +73,11 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private static $freshCache = []; - const VERSION = '5.1.7'; - const VERSION_ID = 50107; + const VERSION = '5.1.8'; + const VERSION_ID = 50108; const MAJOR_VERSION = 5; const MINOR_VERSION = 1; - const RELEASE_VERSION = 7; + const RELEASE_VERSION = 8; const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '01/2021'; diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php index 22cadf7129528..fd67af368b740 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php @@ -216,7 +216,7 @@ public function testResponseIsExiprableWhenEmbeddedResponseCombinesExpiryAndVali $cacheStrategy->add($embeddedResponse); $cacheStrategy->update($masterResponse); - $this->assertSame('60', $masterResponse->headers->getCacheControlDirective('s-maxage')); + $this->assertEqualsWithDelta(60, (int) $masterResponse->headers->getCacheControlDirective('s-maxage'), 1); } public function testResponseIsExpirableButNotValidateableWhenMasterResponseCombinesExpirationAndValidation() diff --git a/src/Symfony/Component/HttpKernel/composer.json b/src/Symfony/Component/HttpKernel/composer.json index d29435754f72d..c3b0c6ea92e99 100644 --- a/src/Symfony/Component/HttpKernel/composer.json +++ b/src/Symfony/Component/HttpKernel/composer.json @@ -75,10 +75,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Inflector/composer.json b/src/Symfony/Component/Inflector/composer.json index 7401256c823a9..227800932cc04 100644 --- a/src/Symfony/Component/Inflector/composer.json +++ b/src/Symfony/Component/Inflector/composer.json @@ -33,10 +33,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Intl/composer.json b/src/Symfony/Component/Intl/composer.json index d39c393fbeba4..ff93e44b860f4 100644 --- a/src/Symfony/Component/Intl/composer.json +++ b/src/Symfony/Component/Intl/composer.json @@ -41,10 +41,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php index 070ef4d775b2d..0ea9aa3b86dd4 100644 --- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php +++ b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php @@ -30,6 +30,9 @@ class Query extends AbstractQuery /** @var resource[] */ private $results; + /** @var array */ + private $serverctrls = []; + public function __construct(Connection $connection, string $dn, string $query, array $options = []) { parent::__construct($connection, $dn, $query, $options); @@ -97,22 +100,13 @@ public function execute() $cookie = ''; do { if ($pageControl) { - ldap_control_paged_result($con, $pageSize, true, $cookie); + $this->controlPagedResult($con, $pageSize, $cookie); } $sizeLimit = $itemsLeft; if ($pageSize > 0 && $sizeLimit >= $pageSize) { $sizeLimit = 0; } - $search = @$func( - $con, - $this->dn, - $this->query, - $this->options['filter'], - $this->options['attrsOnly'], - $sizeLimit, - $this->options['timeout'], - $this->options['deref'] - ); + $search = $this->callSearchFunction($con, $func, $sizeLimit); if (false === $search) { $ldapError = ''; @@ -133,7 +127,7 @@ public function execute() break; } if ($pageControl) { - ldap_control_paged_result_response($con, $search, $cookie); + $cookie = $this->controlPagedResultResponse($con, $search, $cookie); } } while (null !== $cookie && '' !== $cookie); @@ -180,7 +174,8 @@ public function getResources(): array private function resetPagination() { $con = $this->connection->getResource(); - ldap_control_paged_result($con, 0); + $this->controlPagedResultResponse($con, 0, ''); + $this->serverctrls = []; // This is a workaround for a bit of a bug in the above invocation // of ldap_control_paged_result. Instead of indicating to extldap that @@ -203,4 +198,62 @@ private function resetPagination() ldap_set_option($con, \LDAP_OPT_SERVER_CONTROLS, $ctl); } } + + /** + * Sets LDAP pagination controls. + * + * @param resource $con + */ + private function controlPagedResult($con, int $pageSize, string $cookie): bool + { + if (\PHP_VERSION_ID < 70300) { + return ldap_control_paged_result($con, $pageSize, true, $cookie); + } + $this->serverctrls = [ + [ + 'oid' => \LDAP_CONTROL_PAGEDRESULTS, + 'isCritical' => true, + 'value' => [ + 'size' => $pageSize, + 'cookie' => $cookie, + ], + ], + ]; + + return true; + } + + /** + * Retrieve LDAP pagination cookie. + * + * @param resource $con + * @param resource $result + */ + private function controlPagedResultResponse($con, $result, string $cookie = ''): string + { + if (\PHP_VERSION_ID < 70300) { + ldap_control_paged_result_response($con, $result, $cookie); + + return $cookie; + } + ldap_parse_result($con, $result, $errcode, $matcheddn, $errmsg, $referrals, $controls); + + return $controls[\LDAP_CONTROL_PAGEDRESULTS]['value']['cookie'] ?? ''; + } + + /** + * Calls actual LDAP search function with the prepared options and parameters. + * + * @param resource $con + * + * @return resource + */ + private function callSearchFunction($con, string $func, int $sizeLimit) + { + if (\PHP_VERSION_ID < 70300) { + return @$func($con, $this->dn, $this->query, $this->options['filter'], $this->options['attrsOnly'], $sizeLimit, $this->options['timeout'], $this->options['deref']); + } + + return @$func($con, $this->dn, $this->query, $this->options['filter'], $this->options['attrsOnly'], $sizeLimit, $this->options['timeout'], $this->options['deref'], $this->serverctrls); + } } diff --git a/src/Symfony/Component/Ldap/composer.json b/src/Symfony/Component/Ldap/composer.json index 817c810507205..39883dae2ca72 100644 --- a/src/Symfony/Component/Ldap/composer.json +++ b/src/Symfony/Component/Ldap/composer.json @@ -34,10 +34,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Lock/Lock.php b/src/Symfony/Component/Lock/Lock.php index 673238a9fb1f7..7b90248d01389 100644 --- a/src/Symfony/Component/Lock/Lock.php +++ b/src/Symfony/Component/Lock/Lock.php @@ -67,6 +67,7 @@ public function __destruct() */ public function acquire(bool $blocking = false): bool { + $this->key->resetLifetime(); try { if ($blocking) { if (!$this->store instanceof BlockingStoreInterface) { diff --git a/src/Symfony/Component/Lock/Tests/LockTest.php b/src/Symfony/Component/Lock/Tests/LockTest.php index 9ac96f938562a..e25bf3ad75700 100644 --- a/src/Symfony/Component/Lock/Tests/LockTest.php +++ b/src/Symfony/Component/Lock/Tests/LockTest.php @@ -18,6 +18,7 @@ use Symfony\Component\Lock\Key; use Symfony\Component\Lock\Lock; use Symfony\Component\Lock\PersistingStoreInterface; +use Symfony\Component\Lock\Store\ExpiringStoreTrait; /** * @author Jérémy Derussé @@ -372,4 +373,50 @@ public function provideExpiredDates() yield [[0.1], false]; yield [[-0.1, null], false]; } + + /** + * @group time-sensitive + */ + public function testAcquireTwiceWithExpiration() + { + $key = new Key(uniqid(__METHOD__, true)); + $store = new class() implements PersistingStoreInterface { + use ExpiringStoreTrait; + private $keys = []; + private $initialTtl = 30; + + public function save(Key $key) + { + $key->reduceLifetime($this->initialTtl); + $this->keys[spl_object_hash($key)] = $key; + $this->checkNotExpired($key); + + return true; + } + + public function delete(Key $key) + { + unset($this->keys[spl_object_hash($key)]); + } + + public function exists(Key $key) + { + return isset($this->keys[spl_object_hash($key)]); + } + + public function putOffExpiration(Key $key, $ttl) + { + $key->reduceLifetime($ttl); + $this->checkNotExpired($key); + } + }; + $ttl = 1; + $lock = new Lock($key, $store, $ttl); + + $this->assertTrue($lock->acquire()); + $lock->release(); + sleep($ttl + 1); + $this->assertTrue($lock->acquire()); + $lock->release(); + } } diff --git a/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php index ed93690db9ae2..44adca1ca0689 100644 --- a/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php @@ -14,7 +14,6 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Schema\Schema; -use Doctrine\DBAL\Version; use Symfony\Component\Lock\PersistingStoreInterface; use Symfony\Component\Lock\Store\PdoStore; @@ -33,10 +32,6 @@ public static function setUpBeforeClass(): void { self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_lock'); - if (\PHP_VERSION_ID >= 80000 && class_exists(Version::class)) { - self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.'); - } - $store = new PdoStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile])); $store->createTable(); } diff --git a/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php index f694363045300..800397d153d19 100644 --- a/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Lock\Tests\Store; -use Doctrine\DBAL\Version; use Symfony\Component\Lock\Key; use Symfony\Component\Lock\PersistingStoreInterface; use Symfony\Component\Lock\Store\PdoStore; @@ -31,10 +30,6 @@ public static function setUpBeforeClass(): void { self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_lock'); - if (\PHP_VERSION_ID >= 80000 && class_exists(Version::class)) { - self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.'); - } - $store = new PdoStore('sqlite:'.self::$dbFile); $store->createTable(); } diff --git a/src/Symfony/Component/Lock/composer.json b/src/Symfony/Component/Lock/composer.json index 6afc09356b739..d864fc2aa7b87 100644 --- a/src/Symfony/Component/Lock/composer.json +++ b/src/Symfony/Component/Lock/composer.json @@ -34,10 +34,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/composer.json b/src/Symfony/Component/Mailer/Bridge/Amazon/composer.json index 56397920eceac..6737d1082bae9 100644 --- a/src/Symfony/Component/Mailer/Bridge/Amazon/composer.json +++ b/src/Symfony/Component/Mailer/Bridge/Amazon/composer.json @@ -30,10 +30,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Mailer/Bridge/Google/composer.json b/src/Symfony/Component/Mailer/Bridge/Google/composer.json index 19706e4eee3cd..01f259776531a 100644 --- a/src/Symfony/Component/Mailer/Bridge/Google/composer.json +++ b/src/Symfony/Component/Mailer/Bridge/Google/composer.json @@ -28,10 +28,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Mailer/Bridge/Mailchimp/composer.json b/src/Symfony/Component/Mailer/Bridge/Mailchimp/composer.json index 721d33eb27af8..46cb8a7209977 100644 --- a/src/Symfony/Component/Mailer/Bridge/Mailchimp/composer.json +++ b/src/Symfony/Component/Mailer/Bridge/Mailchimp/composer.json @@ -28,10 +28,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Mailer/Bridge/Mailgun/composer.json b/src/Symfony/Component/Mailer/Bridge/Mailgun/composer.json index 9533770f3ce14..999a6a5fd7b54 100644 --- a/src/Symfony/Component/Mailer/Bridge/Mailgun/composer.json +++ b/src/Symfony/Component/Mailer/Bridge/Mailgun/composer.json @@ -28,10 +28,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Mailer/Bridge/Postmark/composer.json b/src/Symfony/Component/Mailer/Bridge/Postmark/composer.json index e1c2a70d953da..6883a6e0c1a50 100644 --- a/src/Symfony/Component/Mailer/Bridge/Postmark/composer.json +++ b/src/Symfony/Component/Mailer/Bridge/Postmark/composer.json @@ -28,10 +28,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Mailer/Bridge/Sendgrid/composer.json b/src/Symfony/Component/Mailer/Bridge/Sendgrid/composer.json index 9144ba5a6a233..657b4bc631a82 100644 --- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/composer.json +++ b/src/Symfony/Component/Mailer/Bridge/Sendgrid/composer.json @@ -28,10 +28,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Mailer/composer.json b/src/Symfony/Component/Mailer/composer.json index 3afe46b7c5d0a..5e3a710a82793 100644 --- a/src/Symfony/Component/Mailer/composer.json +++ b/src/Symfony/Component/Mailer/composer.json @@ -43,10 +43,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/composer.json b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/composer.json index 3d447de0ee0b7..3bcee938c00e5 100644 --- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/composer.json +++ b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/composer.json @@ -32,10 +32,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpExtIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpExtIntegrationTest.php index 2313e1308f6f9..50e38c4611f87 100644 --- a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpExtIntegrationTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpExtIntegrationTest.php @@ -161,6 +161,9 @@ public function testItReceivesSignals() $signalTime = microtime(true); $timedOutTime = time() + 10; + // wait for worker started and registered the signal handler + usleep(100 * 1000); // 100ms + // immediately after the process has started "booted", kill it $process->signal(15); diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/Connection.php index 1789e89b7ac8a..ac5c999303f17 100644 --- a/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/Connection.php @@ -37,6 +37,7 @@ class Connection 'port', 'vhost', 'user', + 'login', 'password', 'queues', 'exchange', @@ -123,8 +124,8 @@ public function __construct(array $connectionOptions, array $exchangeOptions, ar * * host: Hostname of the AMQP service * * port: Port of the AMQP service * * vhost: Virtual Host to use with the AMQP service - * * user: Username to use to connect the the AMQP service - * * password: Password to use the connect to the AMQP service + * * user|login: Username to use to connect the AMQP service + * * password: Password to use to connect to the AMQP service * * read_timeout: Timeout in for income activity. Note: 0 or greater seconds. May be fractional. * * write_timeout: Timeout in for outcome activity. Note: 0 or greater seconds. May be fractional. * * connect_timeout: Connection timeout. Note: 0 or greater seconds. May be fractional. @@ -155,8 +156,8 @@ public function __construct(array $connectionOptions, array $exchangeOptions, ar * which means heartbeats checked only during blocking calls. * * TLS support (see https://www.rabbitmq.com/ssl.html for details): - * * cacert: Path to the CA cert file in PEM format.. - * * cert: Path to the client certificate in PEM foramt. + * * cacert: Path to the CA cert file in PEM format. + * * cert: Path to the client certificate in PEM format. * * key: Path to the client key in PEM format. * * verify: Enable or disable peer verification. If peer verification is enabled then the common name in the * server certificate must match the server name. Peer verification is enabled by default. diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/composer.json b/src/Symfony/Component/Messenger/Bridge/Amqp/composer.json index a54fc11249bd0..46ab3d0dae76a 100644 --- a/src/Symfony/Component/Messenger/Bridge/Amqp/composer.json +++ b/src/Symfony/Component/Messenger/Bridge/Amqp/composer.json @@ -31,10 +31,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php index 106a05b5b6767..470d20703d6b0 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php @@ -14,7 +14,6 @@ use Doctrine\DBAL\Driver\Result as DriverResult; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Result; -use Doctrine\DBAL\Version; use PHPUnit\Framework\TestCase; use Symfony\Component\Messenger\Bridge\Doctrine\Tests\Fixtures\DummyMessage; use Symfony\Component\Messenger\Bridge\Doctrine\Transport\Connection; @@ -31,13 +30,6 @@ class DoctrineIntegrationTest extends TestCase /** @var string */ private $sqliteFile; - public static function setUpBeforeClass(): void - { - if (\PHP_VERSION_ID >= 80000 && class_exists(Version::class)) { - self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.'); - } - } - protected function setUp(): void { $this->sqliteFile = sys_get_temp_dir().'/symfony.messenger.sqlite'; @@ -50,7 +42,7 @@ protected function tearDown(): void { $this->driverConnection->close(); if (file_exists($this->sqliteFile)) { - unlink($this->sqliteFile); + @unlink($this->sqliteFile); } } diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineTransportFactory.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineTransportFactory.php index 224d8bafad75f..27759ec3b03a4 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineTransportFactory.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineTransportFactory.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Messenger\Bridge\Doctrine\Transport; +use Doctrine\DBAL\Driver\AbstractPostgreSQLDriver; use Doctrine\Persistence\ConnectionRegistry; use Symfony\Bridge\Doctrine\RegistryInterface; use Symfony\Component\Messenger\Exception\TransportException; @@ -47,7 +48,7 @@ public function createTransport(string $dsn, array $options, SerializerInterface throw new TransportException(sprintf('Could not find Doctrine connection from Messenger DSN "%s".', $dsn), 0, $e); } - if ($useNotify && ($wrappedConnection = $driverConnection->getWrappedConnection()) && method_exists($wrappedConnection, 'pgsqlGetNotify')) { + if ($useNotify && $driverConnection->getDriver() instanceof AbstractPostgreSQLDriver) { $connection = new PostgreSqlConnection($configuration, $driverConnection); } else { $connection = new Connection($configuration, $driverConnection); diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/composer.json b/src/Symfony/Component/Messenger/Bridge/Doctrine/composer.json index 62ca472dc14c7..bb64d757f212c 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/composer.json +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/composer.json @@ -35,10 +35,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/composer.json b/src/Symfony/Component/Messenger/Bridge/Redis/composer.json index 79ff5b944fff9..11e939e1fbd8b 100644 --- a/src/Symfony/Component/Messenger/Bridge/Redis/composer.json +++ b/src/Symfony/Component/Messenger/Bridge/Redis/composer.json @@ -29,10 +29,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnRestartSignalListenerTest.php b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnRestartSignalListenerTest.php index 3536a1bbbe9e0..a9b01fbe9dddd 100644 --- a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnRestartSignalListenerTest.php +++ b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnRestartSignalListenerTest.php @@ -30,7 +30,7 @@ public function testWorkerStopsWhenMemoryLimitExceeded(?int $lastRestartTimeOffs { $cachePool = $this->createMock(CacheItemPoolInterface::class); $cacheItem = $this->createMock(CacheItemInterface::class); - $cacheItem->expects($this->once())->method('isHIt')->willReturn(true); + $cacheItem->expects($this->once())->method('isHit')->willReturn(true); $cacheItem->expects($this->once())->method('get')->willReturn(null === $lastRestartTimeOffset ? null : time() + $lastRestartTimeOffset); $cachePool->expects($this->once())->method('getItem')->willReturn($cacheItem); @@ -54,7 +54,7 @@ public function testWorkerDoesNotStopIfRestartNotInCache() { $cachePool = $this->createMock(CacheItemPoolInterface::class); $cacheItem = $this->createMock(CacheItemInterface::class); - $cacheItem->expects($this->once())->method('isHIt')->willReturn(false); + $cacheItem->expects($this->once())->method('isHit')->willReturn(false); $cacheItem->expects($this->never())->method('get'); $cachePool->expects($this->once())->method('getItem')->willReturn($cacheItem); diff --git a/src/Symfony/Component/Messenger/composer.json b/src/Symfony/Component/Messenger/composer.json index 468df3471c517..60b7971902b15 100644 --- a/src/Symfony/Component/Messenger/composer.json +++ b/src/Symfony/Component/Messenger/composer.json @@ -51,10 +51,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Mime/RawMessage.php b/src/Symfony/Component/Mime/RawMessage.php index 79a27e9fcc69d..66788d8ad526d 100644 --- a/src/Symfony/Component/Mime/RawMessage.php +++ b/src/Symfony/Component/Mime/RawMessage.php @@ -78,7 +78,7 @@ final public function unserialize($serialized) public function __serialize(): array { - return [$this->message]; + return [$this->toString()]; } public function __unserialize(array $data): void diff --git a/src/Symfony/Component/Mime/Tests/RawMessageTest.php b/src/Symfony/Component/Mime/Tests/RawMessageTest.php index 5d1588bff00fa..26e7605baba2d 100644 --- a/src/Symfony/Component/Mime/Tests/RawMessageTest.php +++ b/src/Symfony/Component/Mime/Tests/RawMessageTest.php @@ -32,4 +32,18 @@ public function testToString() $this->assertEquals('some string', $message->toString()); $this->assertEquals('some string', implode('', iterator_to_array($message->toIterable()))); } + + public function testSerialization() + { + $message = new RawMessage('string'); + $this->assertEquals('string', unserialize(serialize($message))->toString()); + // calling methods more than once work + $this->assertEquals('string', unserialize(serialize($message))->toString()); + + $message = new RawMessage(new \ArrayObject(['some', ' ', 'string'])); + $message = new RawMessage($message->toIterable()); + $this->assertEquals('some string', unserialize(serialize($message))->toString()); + // calling methods more than once work + $this->assertEquals('some string', unserialize(serialize($message))->toString()); + } } diff --git a/src/Symfony/Component/Mime/composer.json b/src/Symfony/Component/Mime/composer.json index 2181eafd68beb..36050a3469f3a 100644 --- a/src/Symfony/Component/Mime/composer.json +++ b/src/Symfony/Component/Mime/composer.json @@ -34,10 +34,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Notifier/Bridge/Firebase/composer.json b/src/Symfony/Component/Notifier/Bridge/Firebase/composer.json index 799762400bc27..8c8f15c3fd1e5 100644 --- a/src/Symfony/Component/Notifier/Bridge/Firebase/composer.json +++ b/src/Symfony/Component/Notifier/Bridge/Firebase/composer.json @@ -26,10 +26,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Notifier/Bridge/FreeMobile/composer.json b/src/Symfony/Component/Notifier/Bridge/FreeMobile/composer.json index 97edbd7e51b69..0d97cbb572e96 100644 --- a/src/Symfony/Component/Notifier/Bridge/FreeMobile/composer.json +++ b/src/Symfony/Component/Notifier/Bridge/FreeMobile/composer.json @@ -27,10 +27,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Notifier/Bridge/Mattermost/composer.json b/src/Symfony/Component/Notifier/Bridge/Mattermost/composer.json index fa6a43f89717b..ced3cc8615c1a 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mattermost/composer.json +++ b/src/Symfony/Component/Notifier/Bridge/Mattermost/composer.json @@ -26,10 +26,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Notifier/Bridge/Nexmo/composer.json b/src/Symfony/Component/Notifier/Bridge/Nexmo/composer.json index 5c6be2d6e24db..72b030f1976ad 100644 --- a/src/Symfony/Component/Notifier/Bridge/Nexmo/composer.json +++ b/src/Symfony/Component/Notifier/Bridge/Nexmo/composer.json @@ -26,10 +26,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Notifier/Bridge/OvhCloud/composer.json b/src/Symfony/Component/Notifier/Bridge/OvhCloud/composer.json index 88d7f960af135..9a91eea448df5 100644 --- a/src/Symfony/Component/Notifier/Bridge/OvhCloud/composer.json +++ b/src/Symfony/Component/Notifier/Bridge/OvhCloud/composer.json @@ -26,10 +26,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Notifier/Bridge/RocketChat/composer.json b/src/Symfony/Component/Notifier/Bridge/RocketChat/composer.json index 510d8a23faad0..2ecd6b057544a 100644 --- a/src/Symfony/Component/Notifier/Bridge/RocketChat/composer.json +++ b/src/Symfony/Component/Notifier/Bridge/RocketChat/composer.json @@ -26,10 +26,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Notifier/Bridge/Sinch/composer.json b/src/Symfony/Component/Notifier/Bridge/Sinch/composer.json index 9e3f52d70fb1b..1030cc26112c1 100644 --- a/src/Symfony/Component/Notifier/Bridge/Sinch/composer.json +++ b/src/Symfony/Component/Notifier/Bridge/Sinch/composer.json @@ -27,10 +27,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Notifier/Bridge/Slack/composer.json b/src/Symfony/Component/Notifier/Bridge/Slack/composer.json index 0cf160687b265..076e73ff2c605 100644 --- a/src/Symfony/Component/Notifier/Bridge/Slack/composer.json +++ b/src/Symfony/Component/Notifier/Bridge/Slack/composer.json @@ -29,10 +29,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Notifier/Bridge/Telegram/composer.json b/src/Symfony/Component/Notifier/Bridge/Telegram/composer.json index 20ca97ec4eaf5..fa1a3daf2976f 100644 --- a/src/Symfony/Component/Notifier/Bridge/Telegram/composer.json +++ b/src/Symfony/Component/Notifier/Bridge/Telegram/composer.json @@ -29,10 +29,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Notifier/Bridge/Twilio/composer.json b/src/Symfony/Component/Notifier/Bridge/Twilio/composer.json index 3b7b179383d8e..a1f5a1b449c70 100644 --- a/src/Symfony/Component/Notifier/Bridge/Twilio/composer.json +++ b/src/Symfony/Component/Notifier/Bridge/Twilio/composer.json @@ -26,10 +26,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Notifier/composer.json b/src/Symfony/Component/Notifier/composer.json index 4a2202c1b261c..f56ff3d662053 100644 --- a/src/Symfony/Component/Notifier/composer.json +++ b/src/Symfony/Component/Notifier/composer.json @@ -28,10 +28,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/OptionsResolver/composer.json b/src/Symfony/Component/OptionsResolver/composer.json index 3d098cf1bdaa9..6d5188eb57dcd 100644 --- a/src/Symfony/Component/OptionsResolver/composer.json +++ b/src/Symfony/Component/OptionsResolver/composer.json @@ -26,10 +26,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Process/composer.json b/src/Symfony/Component/Process/composer.json index 1957e5681d64d..3bd9abefd2f33 100644 --- a/src/Symfony/Component/Process/composer.json +++ b/src/Symfony/Component/Process/composer.json @@ -25,10 +25,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php index 44bf21d741134..835793ccbe12e 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php @@ -122,7 +122,7 @@ public function setValue(&$objectOrArray, $propertyPath, $value) return; } catch (\TypeError $e) { - self::throwInvalidArgumentException($e->getMessage(), $e->getTrace(), 0, $propertyPath); + self::throwInvalidArgumentException($e->getMessage(), $e->getTrace(), 0, $propertyPath, $e); // It wasn't thrown in this class so rethrow it throw $e; } diff --git a/src/Symfony/Component/PropertyAccess/composer.json b/src/Symfony/Component/PropertyAccess/composer.json index d4249038956c1..e456b932a89fa 100644 --- a/src/Symfony/Component/PropertyAccess/composer.json +++ b/src/Symfony/Component/PropertyAccess/composer.json @@ -32,10 +32,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php b/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php index 8c207cffc97f0..710940812191c 100644 --- a/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php +++ b/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php @@ -477,8 +477,9 @@ private function extractFromDefaultValue(string $class, string $property): ?arra } $type = \gettype($defaultValue); + $type = static::MAP_TYPES[$type] ?? $type; - return [new Type(static::MAP_TYPES[$type] ?? $type)]; + return [new Type($type, false, null, Type::BUILTIN_TYPE_ARRAY === $type)]; } private function extractFromReflectionType(\ReflectionType $reflectionType, \ReflectionClass $declaringClass): array @@ -488,7 +489,7 @@ private function extractFromReflectionType(\ReflectionType $reflectionType, \Ref foreach ($reflectionType instanceof \ReflectionUnionType ? $reflectionType->getTypes() : [$reflectionType] as $type) { $phpTypeOrClass = $reflectionType instanceof \ReflectionNamedType ? $reflectionType->getName() : (string) $type; - if ('null' === $phpTypeOrClass) { + if ('null' === $phpTypeOrClass || 'mixed' === $phpTypeOrClass) { continue; } diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php index a2d2db5b8000b..672f31cb2b841 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php @@ -240,6 +240,8 @@ public function php80TypesProvider() ['timeout', [new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_FLOAT)]], ['optional', [new Type(Type::BUILTIN_TYPE_INT, true), new Type(Type::BUILTIN_TYPE_FLOAT, true)]], ['string', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Stringable'), new Type(Type::BUILTIN_TYPE_STRING)]], + ['payload', null], + ['data', null], ]; } @@ -257,7 +259,7 @@ public function defaultValueProvider() ['defaultInt', [new Type(Type::BUILTIN_TYPE_INT, false)]], ['defaultFloat', [new Type(Type::BUILTIN_TYPE_FLOAT, false)]], ['defaultString', [new Type(Type::BUILTIN_TYPE_STRING, false)]], - ['defaultArray', [new Type(Type::BUILTIN_TYPE_ARRAY, false)]], + ['defaultArray', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true)]], ['defaultNull', null], ]; } @@ -415,6 +417,7 @@ public function testTypedProperties(): void $this->assertEquals([new Type(Type::BUILTIN_TYPE_OBJECT, false, Dummy::class)], $this->extractor->getTypes(Php74Dummy::class, 'dummy')); $this->assertEquals([new Type(Type::BUILTIN_TYPE_BOOL, true)], $this->extractor->getTypes(Php74Dummy::class, 'nullableBoolProp')); $this->assertEquals([new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING))], $this->extractor->getTypes(Php74Dummy::class, 'stringCollection')); + $this->assertEquals([new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true)], $this->extractor->getTypes(Php74Dummy::class, 'collection')); } /** diff --git a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php74Dummy.php b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php74Dummy.php index ffc4f4cd37621..932b251b9560b 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php74Dummy.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php74Dummy.php @@ -20,6 +20,7 @@ class Php74Dummy private ?bool $nullableBoolProp; /** @var string[] */ private array $stringCollection; + public array $collection = []; public function addStringCollection(string $string): void { diff --git a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php80Dummy.php b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php80Dummy.php index 484498f4a6c0e..3e1ffba6628f0 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php80Dummy.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php80Dummy.php @@ -23,4 +23,12 @@ public function getOptional(): int|float|null public function setString(string|\Stringable $string) { } + + public function setPayload(mixed $payload) + { + } + + public function getData(): mixed + { + } } diff --git a/src/Symfony/Component/PropertyInfo/composer.json b/src/Symfony/Component/PropertyInfo/composer.json index 4c07da473ded6..955584ce8b8b8 100644 --- a/src/Symfony/Component/PropertyInfo/composer.json +++ b/src/Symfony/Component/PropertyInfo/composer.json @@ -51,10 +51,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Routing/Tests/RouterTest.php b/src/Symfony/Component/Routing/Tests/RouterTest.php index 3c07802f0025c..2568bcd7b51cc 100644 --- a/src/Symfony/Component/Routing/Tests/RouterTest.php +++ b/src/Symfony/Component/Routing/Tests/RouterTest.php @@ -36,7 +36,7 @@ protected function tearDown(): void { if (is_dir($this->cacheDir)) { array_map('unlink', glob($this->cacheDir.\DIRECTORY_SEPARATOR.'*')); - rmdir($this->cacheDir); + @rmdir($this->cacheDir); } $this->loader = null; diff --git a/src/Symfony/Component/Routing/composer.json b/src/Symfony/Component/Routing/composer.json index e78688f395354..311eccc7d7158 100644 --- a/src/Symfony/Component/Routing/composer.json +++ b/src/Symfony/Component/Routing/composer.json @@ -47,10 +47,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.ar.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.ar.xlf index 49381ba347f6f..5dda050e22e7e 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.ar.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.ar.xlf @@ -62,6 +62,14 @@ Account is locked. الحساب مغلق. + + Too many failed login attempts, please try again later. + عدد كبير جدا من محاولات الدخول الفاشلة، يرجى المحاولة مرة أخرى في وقت لاحق. + + + Invalid or expired login link. + رابط تسجيل الدخول غير صالح أو منتهي الصلاحية. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.bg.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.bg.xlf index 28c1360eb946e..318f7d498bc97 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.bg.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.bg.xlf @@ -62,6 +62,14 @@ Account is locked. Акаунта е заключен. + + Too many failed login attempts, please try again later. + Твърде много грешни опити за вход, моля опитайте по-късно. + + + Invalid or expired login link. + Невалиден или изтекъл линк за вход. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.cs.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.cs.xlf index b455779cb6f20..f953b4162af0d 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.cs.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.cs.xlf @@ -62,6 +62,14 @@ Account is locked. Účet je zablokovaný. + + Too many failed login attempts, please try again later. + Příliš mnoho nepovedených pokusů přihlášení. Zkuste to prosím později. + + + Invalid or expired login link. + Neplatný nebo expirovaný odkaz na přihlášení. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.de.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.de.xlf index 093d92d2d1fa9..c196611b17843 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.de.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.de.xlf @@ -62,6 +62,14 @@ Account is locked. Der Account ist gesperrt. + + Too many failed login attempts, please try again later. + Zu viele fehlgeschlagene Anmeldeversuche, bitte versuchen Sie es später noch einmal. + + + Invalid or expired login link. + Ungültiger oder abgelaufener Anmelde-Link. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.en.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.en.xlf index 3c89e44f9380e..d274ea9527fa3 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.en.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.en.xlf @@ -62,6 +62,14 @@ Account is locked. Account is locked. + + Too many failed login attempts, please try again later. + Too many failed login attempts, please try again later. + + + Invalid or expired login link. + Invalid or expired login link. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.es.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.es.xlf index 369f11b9b41d4..b029197b815f2 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.es.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.es.xlf @@ -62,6 +62,14 @@ Account is locked. La cuenta está bloqueada. + + Too many failed login attempts, please try again later. + Demasiados intentos fallidos de inicio de sesión, inténtelo de nuevo más tarde. + + + Invalid or expired login link. + Enlace de inicio de sesión inválido o expirado. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.fa.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.fa.xlf index 84b670ec1af3e..32e5ace42507a 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.fa.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.fa.xlf @@ -62,6 +62,14 @@ Account is locked. حساب کاربری قفل گردیده است. + + Too many failed login attempts, please try again later. + تلاش‌های ناموفق زیادی برای ورود صورت گرفته است، لطفاً بعداً دوباره تلاش کنید. + + + Invalid or expired login link. + لینک ورود نامعتبر یا تاریخ‌گذشته است. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.fi.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.fi.xlf new file mode 100644 index 0000000000000..d5358a6c1700c --- /dev/null +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.fi.xlf @@ -0,0 +1,79 @@ + + + + + + An authentication exception occurred. + Autentikointi poikkeus tapahtui. + + + Authentication credentials could not be found. + Autentikoinnin tunnistetietoja ei löydetty. + + + Authentication request could not be processed due to a system problem. + Autentikointipyyntöä ei voitu käsitellä järjestelmäongelman vuoksi. + + + Invalid credentials. + Virheelliset tunnistetiedot. + + + Cookie has already been used by someone else. + Eväste on jo jonkin muun käytössä. + + + Not privileged to request the resource. + Ei oikeutta resurssiin. + + + Invalid CSRF token. + Virheellinen CSRF tunnus. + + + Digest nonce has expired. + Digest nonce on vanhentunut. + + + No authentication provider found to support the authentication token. + Autentikointi tunnukselle ei löydetty tuettua autentikointi tarjoajaa. + + + No session available, it either timed out or cookies are not enabled. + Sessio ei ole saatavilla, se on joko vanhentunut tai evästeet eivät ole käytössä. + + + No token could be found. + Tunnusta ei löytynyt. + + + Username could not be found. + Käyttäjätunnusta ei löydetty. + + + Account has expired. + Tili on vanhentunut. + + + Credentials have expired. + Tunnistetiedot ovat vanhentuneet. + + + Account is disabled. + Tili on poistettu käytöstä. + + + Account is locked. + Tili on lukittu. + + + Too many failed login attempts, please try again later. + Liian monta epäonnistunutta kirjautumisyritystä, yritä myöhemmin uudelleen. + + + Invalid or expired login link. + Virheellinen tai vanhentunut kirjautumislinkki. + + + + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.fr.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.fr.xlf index d67dcaefc5029..72ad86d6d7e5a 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.fr.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.fr.xlf @@ -62,6 +62,14 @@ Account is locked. Le compte est bloqué. + + Too many failed login attempts, please try again later. + Plusieurs tentatives de connexion ont échoué, veuillez réessayer plus tard. + + + Invalid or expired login link. + Lien de connexion invalide ou expiré. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.id.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.id.xlf index 6289481d03265..91315bdf1d016 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.id.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.id.xlf @@ -62,6 +62,14 @@ Account is locked. Akun terkunci. + + Too many failed login attempts, please try again later. + Terlalu banyak percobaan login yang salah, Silahkan coba lagi nanti. + + + Invalid or expired login link. + Link login salah atau sudah kadaluwarsa. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.it.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.it.xlf index f2cb0fa48fab5..fa72163dee4a6 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.it.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.it.xlf @@ -62,6 +62,14 @@ Account is locked. L'account è bloccato. + + Too many failed login attempts, please try again later. + Troppi tentaivi di login falliti. Riprova tra un po'. + + + Invalid or expired login link. + Link di login scaduto o non valido. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.ja.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.ja.xlf index 2dad8dee6a927..a637c02a8b530 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.ja.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.ja.xlf @@ -62,6 +62,14 @@ Account is locked. アカウントはロックされています。 + + Too many failed login attempts, please try again later. + ログイン試行回数を超えました。しばらくして再度お試しください。 + + + Invalid or expired login link. + ログインリンクが有効期限切れ、もしくは無効です。 + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.lv.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.lv.xlf index 0ad9125e711e9..6c63276f4423f 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.lv.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.lv.xlf @@ -62,6 +62,14 @@ Account is locked. Konts ir slēgts. + + Too many failed login attempts, please try again later. + Pārāk daudz atteiktu ieejas mēģinājumu, lūdzu, mēģiniet vēlreiz vēlāk. + + + Invalid or expired login link. + Ieejas saite ir nederīga vai arī tai ir beidzies derīguma termiņš. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.nl.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.nl.xlf index 5160143ab7380..978d92b15b728 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.nl.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.nl.xlf @@ -62,6 +62,14 @@ Account is locked. Account is geblokkeerd. + + Too many failed login attempts, please try again later. + Te veel onjuiste inlogpogingen, probeer het later nogmaals. + + + Invalid or expired login link. + Ongeldige of verlopen inloglink. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.pl.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.pl.xlf index 9940d2940003d..b357cf4a43905 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.pl.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.pl.xlf @@ -62,6 +62,14 @@ Account is locked. Konto jest zablokowane. + + Too many failed login attempts, please try again later. + Zbyt dużo nieudanych prób logowania, proszę spróbować ponownie później. + + + Invalid or expired login link. + Nieprawidłowy lub wygasły link logowania. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.pt_BR.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.pt_BR.xlf index 5981976f167ea..108a1f28b76a5 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.pt_BR.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.pt_BR.xlf @@ -12,7 +12,7 @@ Authentication request could not be processed due to a system problem. - A autenticação não pôde ser concluída devido a um problema no sistema. + A solicitação de autenticação não pôde ser processada devido a um problema no sistema. Invalid credentials. @@ -20,11 +20,11 @@ Cookie has already been used by someone else. - Este cookie já está em uso. + Este cookie já foi usado por outra pessoa. Not privileged to request the resource. - Não possui privilégios o bastante para requisitar este recurso. + Sem privilégio para solicitar o recurso. Invalid CSRF token. @@ -36,7 +36,7 @@ No session available, it either timed out or cookies are not enabled. - Nenhuma sessão disponível, ela expirou ou os cookies estão desativados. + Nenhuma sessão disponível, ela expirou ou os cookies não estão habilitados. No token could be found. @@ -62,6 +62,14 @@ Account is locked. A conta está travada. + + Too many failed login attempts, please try again later. + Muitas tentativas de login malsucedidas, tente novamente mais tarde. + + + Invalid or expired login link. + Link de login inválido ou expirado. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.ru.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.ru.xlf index 3f2690b2d3d7c..461623148c1ac 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.ru.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.ru.xlf @@ -62,6 +62,14 @@ Account is locked. Учетная запись заблокирована. + + Too many failed login attempts, please try again later. + Слишком много неудачных попыток входа, пожалуйста, попробуйте позже. + + + Invalid or expired login link. + Ссылка для входа недействительна или просрочена. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.sk.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.sk.xlf index 1447b4ef5a3c8..3caa51ab01306 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.sk.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.sk.xlf @@ -62,6 +62,14 @@ Account is locked. Účet je zablokovaný. + + Too many failed login attempts, please try again later. + Príliš mnoho neúspešných pokusov o prihlásenie. Skúste to prosím znovu neskôr. + + + Invalid or expired login link. + Neplatný alebo expirovaný odkaz na prihlásenie. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.sq.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.sq.xlf new file mode 100644 index 0000000000000..4f4bc6d4cbc61 --- /dev/null +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.sq.xlf @@ -0,0 +1,79 @@ + + + + + + An authentication exception occurred. + Ndodhi një problem në autentikim. + + + Authentication credentials could not be found. + Kredencialet e autentikimit nuk mund të gjendeshin. + + + Authentication request could not be processed due to a system problem. + Kërkesa për autentikim nuk mund të përpunohej për shkak të një problemi në sistem. + + + Invalid credentials. + Kredenciale të pavlefshme. + + + Cookie has already been used by someone else. + Cookie është përdorur tashmë nga dikush tjetër. + + + Not privileged to request the resource. + Nuk është i privilegjuar të kërkojë burimin. + + + Invalid CSRF token. + Identifikues i pavlefshëm CSRF. + + + Digest nonce has expired. + Numeri një perdorimësh i verifikimit Digest ka skaduar. + + + No authentication provider found to support the authentication token. + Asnjë ofrues i vërtetimit nuk u gjet që të mbështesë simbolin e vërtetimit. + + + No session available, it either timed out or cookies are not enabled. + Nuk ka asnjë sesion të vlefshëm, i ka skaduar koha ose cookies nuk janë aktivizuar. + + + No token could be found. + Asnjë simbol identifikimi nuk mund të gjendej. + + + Username could not be found. + Emri i përdoruesit nuk mund të gjendej. + + + Account has expired. + Llogaria ka skaduar. + + + Credentials have expired. + Kredencialet kanë skaduar. + + + Account is disabled. + Llogaria është çaktivizuar. + + + Account is locked. + Llogaria është e kyçur. + + + Too many failed login attempts, please try again later. + Shumë përpjekje të dështuara autentikimi, provo përsëri më vonë. + + + Invalid or expired login link. + Link hyrje i pavlefshëm ose i skaduar. + + + + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.sv.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.sv.xlf index ec3616f58620f..a2bbf44e3ea0d 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.sv.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.sv.xlf @@ -62,6 +62,14 @@ Account is locked. Kontot är låst. + + Too many failed login attempts, please try again later. + För många misslyckade inloggningsförsök, försök igen senare. + + + Invalid or expired login link. + Ogiltig eller utgången inloggningslänk. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf index 1ffa76e4d4457..4bc4d2cda882a 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf @@ -62,6 +62,14 @@ Account is locked. Hesap kilitlenmiş. + + Too many failed login attempts, please try again later. + Çok fazla başarısız giriş denemesi, lütfen daha sonra tekrar deneyin. + + + Invalid or expired login link. + Geçersiz veya süresi dolmuş oturum açma bağlantısı. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.uk.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.uk.xlf index f60a9c18eb711..dc90c91f41032 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.uk.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.uk.xlf @@ -62,6 +62,14 @@ Account is locked. Обліковий запис заблоковано. + + Too many failed login attempts, please try again later. + Забагато невдалих спроб входу. Будь ласка, спробуйте пізніше. + + + Invalid or expired login link. + Посилання для входу недійсне, або термін його дії закінчився. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf index dac0a4d6dc781..efe83c3194b0c 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf @@ -62,6 +62,14 @@ Account is locked. Tài khoản bị khóa. + + Too many failed login attempts, please try again later. + Đăng nhập sai quá nhiều lần, vui lòng thử lại lần nữa. + + + Invalid or expired login link. + Liên kết đăng nhập không hợp lệ hoặc quá hạn. + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.zh_CN.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.zh_CN.xlf index 460c0ac68bf48..ce9d6fd2245e8 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.zh_CN.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.zh_CN.xlf @@ -62,6 +62,14 @@ Account is locked. 帐号已被锁定。 + + Too many failed login attempts, please try again later. + 登入失败的次数过多,请稍后再试。 + + + Invalid or expired login link. + 失效或过期的登入链接。 + diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.zh_TW.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.zh_TW.xlf new file mode 100644 index 0000000000000..7085206440528 --- /dev/null +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.zh_TW.xlf @@ -0,0 +1,79 @@ + + + + + + An authentication exception occurred. + 身份驗證發生異常。 + + + Authentication credentials could not be found. + 沒有找到身份驗證的憑證。 + + + Authentication request could not be processed due to a system problem. + 由於系統故障,身份驗證的請求無法被處理。 + + + Invalid credentials. + 無效的憑證。 + + + Cookie has already been used by someone else. + Cookie 已經被其他人使用。 + + + Not privileged to request the resource. + 沒有權限請求此資源。 + + + Invalid CSRF token. + 無效的 CSRF token 。 + + + Digest nonce has expired. + 摘要隨機串(digest nonce)已過期。 + + + No authentication provider found to support the authentication token. + 沒有找到支持此 token 的身份驗證服務提供方。 + + + No session available, it either timed out or cookies are not enabled. + Session 不可用。回話超時或沒有啓用 cookies 。 + + + No token could be found. + 找不到 token 。 + + + Username could not be found. + 找不到用戶名。 + + + Account has expired. + 賬號已逾期。 + + + Credentials have expired. + 憑證已逾期。 + + + Account is disabled. + 賬號已被禁用。 + + + Account is locked. + 賬號已被鎖定。 + + + Too many failed login attempts, please try again later. + 登入失敗的次數過多,請稍後再試。 + + + Invalid or expired login link. + 失效或過期的登入鏈接。 + + + + diff --git a/src/Symfony/Component/Security/Core/composer.json b/src/Symfony/Component/Security/Core/composer.json index d8ee73fedd684..eccd6c1d3c92c 100644 --- a/src/Symfony/Component/Security/Core/composer.json +++ b/src/Symfony/Component/Security/Core/composer.json @@ -50,10 +50,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Security/Csrf/composer.json b/src/Symfony/Component/Security/Csrf/composer.json index b44bc8dbaf3e7..3bdea6f7a449a 100644 --- a/src/Symfony/Component/Security/Csrf/composer.json +++ b/src/Symfony/Component/Security/Csrf/composer.json @@ -34,10 +34,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Security/Guard/composer.json b/src/Symfony/Component/Security/Guard/composer.json index 847b69635e65b..bc5213ae17e70 100644 --- a/src/Symfony/Component/Security/Guard/composer.json +++ b/src/Symfony/Component/Security/Guard/composer.json @@ -30,10 +30,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Security/Http/Authentication/AuthenticatorManager.php b/src/Symfony/Component/Security/Http/Authentication/AuthenticatorManager.php index a9bdf8a36f236..17d2407db6fee 100644 --- a/src/Symfony/Component/Security/Http/Authentication/AuthenticatorManager.php +++ b/src/Symfony/Component/Security/Http/Authentication/AuthenticatorManager.php @@ -129,8 +129,7 @@ private function executeAuthenticators(array $authenticators, Request $request): foreach ($authenticators as $authenticator) { // recheck if the authenticator still supports the listener. supports() is called // eagerly (before token storage is initialized), whereas authenticate() is called - // lazily (after initialization). This is important for e.g. the AnonymousAuthenticator - // as its support is relying on the (initialized) token in the TokenStorage. + // lazily (after initialization). if (false === $authenticator->supports($request)) { if (null !== $this->logger) { $this->logger->debug('Skipping the "{authenticator}" authenticator as it did not support the request.', ['authenticator' => \get_class($authenticator)]); diff --git a/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerTest.php b/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerTest.php index 3469c4813eb14..8c14f31d81ecd 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerTest.php @@ -71,7 +71,7 @@ public function testSupportCheckedUponRequestAuthentication() { // the attribute stores the supported authenticators, returning false now // means support changed between calling supports() and authenticateRequest() - // (which is the case with lazy firewalls and e.g. the AnonymousAuthenticator) + // (which is the case with lazy firewalls) $authenticator = $this->createAuthenticator(false); $this->request->attributes->set('_security_authenticators', [$authenticator]); diff --git a/src/Symfony/Component/Security/Http/composer.json b/src/Symfony/Component/Security/Http/composer.json index 4076bcbb0474c..b9e6052df60d0 100644 --- a/src/Symfony/Component/Security/Http/composer.json +++ b/src/Symfony/Component/Security/Http/composer.json @@ -43,10 +43,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php b/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php index 10a7f3aabfb04..84a84ad1f3e69 100644 --- a/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php +++ b/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php @@ -14,8 +14,6 @@ use Symfony\Component\Serializer\Exception\UnexpectedValueException; /** - * Defines the interface of decoders. - * * @author Jordi Boggiano */ interface DecoderInterface diff --git a/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php b/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php index 3cf6b5b186c46..74d0ed6f331b6 100644 --- a/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php +++ b/src/Symfony/Component/Serializer/Encoder/EncoderInterface.php @@ -14,8 +14,6 @@ use Symfony\Component\Serializer\Exception\UnexpectedValueException; /** - * Defines the interface of encoders. - * * @author Jordi Boggiano */ interface EncoderInterface diff --git a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php index 9e4902c7cd75e..fe48a9372cde2 100644 --- a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php @@ -301,7 +301,7 @@ private function parseXmlAttributes(\DOMNode $node, array $context = []): array $typeCastAttributes = (bool) ($context[self::TYPE_CAST_ATTRIBUTES] ?? $this->defaultContext[self::TYPE_CAST_ATTRIBUTES]); foreach ($node->attributes as $attr) { - if (!is_numeric($attr->nodeValue) || !$typeCastAttributes || (isset($attr->nodeValue[1]) && '0' === $attr->nodeValue[0])) { + if (!is_numeric($attr->nodeValue) || !$typeCastAttributes || (isset($attr->nodeValue[1]) && '0' === $attr->nodeValue[0] && '.' !== $attr->nodeValue[1])) { $data['@'.$attr->nodeName] = $attr->nodeValue; continue; diff --git a/src/Symfony/Component/Serializer/Normalizer/DenormalizerAwareInterface.php b/src/Symfony/Component/Serializer/Normalizer/DenormalizerAwareInterface.php index 87bfb842290e6..f88df1bec6827 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DenormalizerAwareInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/DenormalizerAwareInterface.php @@ -12,8 +12,6 @@ namespace Symfony\Component\Serializer\Normalizer; /** - * Class accepting a denormalizer. - * * @author Joel Wurtz */ interface DenormalizerAwareInterface diff --git a/src/Symfony/Component/Serializer/Normalizer/DenormalizerAwareTrait.php b/src/Symfony/Component/Serializer/Normalizer/DenormalizerAwareTrait.php index 588f453215c4e..82dba8f1861c5 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DenormalizerAwareTrait.php +++ b/src/Symfony/Component/Serializer/Normalizer/DenormalizerAwareTrait.php @@ -12,8 +12,6 @@ namespace Symfony\Component\Serializer\Normalizer; /** - * DenormalizerAware trait. - * * @author Joel Wurtz */ trait DenormalizerAwareTrait diff --git a/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php index 73ca7ce3865d4..337fe2e8c2a3f 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php @@ -20,8 +20,6 @@ use Symfony\Component\Serializer\Exception\UnexpectedValueException; /** - * Defines the interface of denormalizers. - * * @author Jordi Boggiano */ interface DenormalizerInterface diff --git a/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareInterface.php b/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareInterface.php index be380912b1ca4..08865a3f1e395 100644 --- a/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareInterface.php @@ -12,8 +12,6 @@ namespace Symfony\Component\Serializer\Normalizer; /** - * Class accepting a normalizer. - * * @author Joel Wurtz */ interface NormalizerAwareInterface diff --git a/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareTrait.php b/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareTrait.php index 897fb4c16d002..a8835c93d0364 100644 --- a/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareTrait.php +++ b/src/Symfony/Component/Serializer/Normalizer/NormalizerAwareTrait.php @@ -12,8 +12,6 @@ namespace Symfony\Component\Serializer\Normalizer; /** - * NormalizerAware trait. - * * @author Joel Wurtz */ trait NormalizerAwareTrait diff --git a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php index 9e28a3a763d90..653f949548c41 100644 --- a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php @@ -17,8 +17,6 @@ use Symfony\Component\Serializer\Exception\LogicException; /** - * Defines the interface of normalizers. - * * @author Jordi Boggiano */ interface NormalizerInterface diff --git a/src/Symfony/Component/Serializer/SerializerAwareInterface.php b/src/Symfony/Component/Serializer/SerializerAwareInterface.php index 13dfb392e9688..4811fc9667d5f 100644 --- a/src/Symfony/Component/Serializer/SerializerAwareInterface.php +++ b/src/Symfony/Component/Serializer/SerializerAwareInterface.php @@ -12,8 +12,6 @@ namespace Symfony\Component\Serializer; /** - * Defines the interface of encoders. - * * @author Jordi Boggiano */ interface SerializerAwareInterface diff --git a/src/Symfony/Component/Serializer/SerializerAwareTrait.php b/src/Symfony/Component/Serializer/SerializerAwareTrait.php index fcdac52c6aa11..99f4d0f3e09fe 100644 --- a/src/Symfony/Component/Serializer/SerializerAwareTrait.php +++ b/src/Symfony/Component/Serializer/SerializerAwareTrait.php @@ -12,8 +12,6 @@ namespace Symfony\Component\Serializer; /** - * SerializerAware trait. - * * @author Joel Wurtz */ trait SerializerAwareTrait diff --git a/src/Symfony/Component/Serializer/SerializerInterface.php b/src/Symfony/Component/Serializer/SerializerInterface.php index 8a1bf5318747c..f67dd66edd86d 100644 --- a/src/Symfony/Component/Serializer/SerializerInterface.php +++ b/src/Symfony/Component/Serializer/SerializerInterface.php @@ -12,8 +12,6 @@ namespace Symfony\Component\Serializer; /** - * Defines the interface of the Serializer. - * * @author Jordi Boggiano */ interface SerializerInterface diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php index c1bb517ab07f5..64e0673fa9dca 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php @@ -276,10 +276,10 @@ public function testDecodeFloatAttribute() { $source = << -Name +Name XML; - $this->assertSame(['@index' => -12.11, '#' => 'Name'], $this->encoder->decode($source, 'xml')); + $this->assertSame(['@index' => 12.11, '#' => 'Name'], $this->encoder->decode($source, 'xml')); } public function testDecodeNegativeFloatAttribute() @@ -292,6 +292,16 @@ public function testDecodeNegativeFloatAttribute() $this->assertSame(['@index' => -12.11, '#' => 'Name'], $this->encoder->decode($source, 'xml')); } + public function testDecodeFloatAttributeWithZeroWholeNumber() + { + $source = << +Name +XML; + + $this->assertSame(['@index' => 0.123, '#' => 'Name'], $this->encoder->decode($source, 'xml')); + } + public function testNoTypeCastAttribute() { $source = <<openSection(); + +// starts event named 'eventName' +$stopwatch->start('eventName'); + +// ... run your code here + +// optionally, start a new "lap" time +$stopwatch->lap('foo'); + +// ... run your code here + +$event = $stopwatch->stop('eventName'); + +$stopwatch->stopSection('phase_1'); +``` + Resources --------- - * [Documentation](https://symfony.com/doc/current/components/stopwatch.html) * [Contributing](https://symfony.com/doc/current/contributing/index.html) * [Report issues](https://github.com/symfony/symfony/issues) and [send Pull Requests](https://github.com/symfony/symfony/pulls) diff --git a/src/Symfony/Component/Stopwatch/composer.json b/src/Symfony/Component/Stopwatch/composer.json index bd4989dd8e016..ed9866ffac768 100644 --- a/src/Symfony/Component/Stopwatch/composer.json +++ b/src/Symfony/Component/Stopwatch/composer.json @@ -25,10 +25,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/String/AbstractString.php b/src/Symfony/Component/String/AbstractString.php index c87f1506fb6f8..d3d95d40a4670 100644 --- a/src/Symfony/Component/String/AbstractString.php +++ b/src/Symfony/Component/String/AbstractString.php @@ -98,7 +98,6 @@ public static function wrap(array $values): array public function after($needle, bool $includeNeedle = false, int $offset = 0): self { $str = clone $this; - $str->string = ''; $i = \PHP_INT_MAX; foreach ((array) $needle as $n) { @@ -130,7 +129,6 @@ public function after($needle, bool $includeNeedle = false, int $offset = 0): se public function afterLast($needle, bool $includeNeedle = false, int $offset = 0): self { $str = clone $this; - $str->string = ''; $i = null; foreach ((array) $needle as $n) { @@ -167,7 +165,6 @@ abstract public function append(string ...$suffix): self; public function before($needle, bool $includeNeedle = false, int $offset = 0): self { $str = clone $this; - $str->string = ''; $i = \PHP_INT_MAX; foreach ((array) $needle as $n) { @@ -199,7 +196,6 @@ public function before($needle, bool $includeNeedle = false, int $offset = 0): s public function beforeLast($needle, bool $includeNeedle = false, int $offset = 0): self { $str = clone $this; - $str->string = ''; $i = null; foreach ((array) $needle as $n) { diff --git a/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php b/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php index 44f14c18af3a2..d9598d73637c3 100644 --- a/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php +++ b/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php @@ -597,6 +597,37 @@ public static function provideSlice() ['awesome', 'Symfony is awesome', 11, 7], ['awesome', 'Symfony is awesome', -7, null], ['awe', 'Symfony is awesome', -7, -4], + ['S', 'Symfony is awesome', -42, 1], + ['', 'Symfony is awesome', 42, 1], + ['', 'Symfony is awesome', 0, -42], + ]; + } + + /** + * @dataProvider provideSplice + */ + public function testSplice(string $expected, int $start, int $length = null) + { + $this->assertEquals( + static::createFromString($expected), + static::createFromString('Symfony is awesome')->splice('X', $start, $length) + ); + } + + public static function provideSplice() + { + return [ + ['X is awesome', 0, 7], + ['SymfonyXis awesome', 7, 1], + ['Symfony X awesome', 8, 2], + ['Symfony X', 8, null], + ['Symfony isXawesome', 10, 1], + ['Symfony is X', 11, 7], + ['Symfony is X', -7, null], + ['Symfony is Xsome', -7, -4], + ['Xymfony is awesome', -42, 1], + ['Symfony is awesomeX', 42, 1], + ['XSymfony is awesome', 0, -42], ]; } @@ -766,12 +797,12 @@ public function testBeforeAfter(string $expected, string $needle, string $origin public static function provideBeforeAfter() { return [ - ['', '', 'hello world', 0, true], - ['', '', 'hello world', 0, false], - ['', 'w', 'hello World', 0, true], - ['', 'w', 'hello World', 0, false], - ['', 'o', 'hello world', 10, true], - ['', 'o', 'hello world', 10, false], + ['hello world', '', 'hello world', 0, true], + ['hello world', '', 'hello world', 0, false], + ['hello World', 'w', 'hello World', 0, true], + ['hello World', 'w', 'hello World', 0, false], + ['hello world', 'o', 'hello world', 10, true], + ['hello world', 'o', 'hello world', 10, false], ['hello ', 'w', 'hello world', 0, true], ['world', 'w', 'hello world', 0, false], ['hello W', 'O', 'hello WORLD', 0, true], @@ -794,12 +825,12 @@ public function testBeforeAfterIgnoreCase(string $expected, string $needle, stri public static function provideBeforeAfterIgnoreCase() { return [ - ['', '', 'hello world', 0, true], - ['', '', 'hello world', 0, false], - ['', 'foo', 'hello world', 0, true], - ['', 'foo', 'hello world', 0, false], - ['', 'o', 'hello world', 10, true], - ['', 'o', 'hello world', 10, false], + ['hello world', '', 'hello world', 0, true], + ['hello world', '', 'hello world', 0, false], + ['hello world', 'foo', 'hello world', 0, true], + ['hello world', 'foo', 'hello world', 0, false], + ['hello world', 'o', 'hello world', 10, true], + ['hello world', 'o', 'hello world', 10, false], ['hello ', 'w', 'hello world', 0, true], ['world', 'w', 'hello world', 0, false], ['hello ', 'W', 'hello world', 0, true], @@ -822,12 +853,12 @@ public function testBeforeAfterLast(string $expected, string $needle, string $or public static function provideBeforeAfterLast() { return [ - ['', '', 'hello world', 0, true], - ['', '', 'hello world', 0, false], - ['', 'L', 'hello world', 0, true], - ['', 'L', 'hello world', 0, false], - ['', 'o', 'hello world', 10, true], - ['', 'o', 'hello world', 10, false], + ['hello world', '', 'hello world', 0, true], + ['hello world', '', 'hello world', 0, false], + ['hello world', 'L', 'hello world', 0, true], + ['hello world', 'L', 'hello world', 0, false], + ['hello world', 'o', 'hello world', 10, true], + ['hello world', 'o', 'hello world', 10, false], ['hello wor', 'l', 'hello world', 0, true], ['ld', 'l', 'hello world', 0, false], ['hello w', 'o', 'hello world', 0, true], @@ -851,12 +882,12 @@ public function testBeforeAfterLastIgnoreCase(string $expected, string $needle, public static function provideBeforeAfterLastIgnoreCase() { return [ - ['', '', 'hello world', 0, true], - ['', '', 'hello world', 0, false], - ['', 'FOO', 'hello world', 0, true], - ['', 'FOO', 'hello world', 0, false], - ['', 'o', 'hello world', 10, true], - ['', 'o', 'hello world', 10, false], + ['hello world', '', 'hello world', 0, true], + ['hello world', '', 'hello world', 0, false], + ['hello world', 'FOO', 'hello world', 0, true], + ['hello world', 'FOO', 'hello world', 0, false], + ['hello world', 'o', 'hello world', 10, true], + ['hello world', 'o', 'hello world', 10, false], ['hello wor', 'l', 'hello world', 0, true], ['ld', 'l', 'hello world', 0, false], ['hello wor', 'L', 'hello world', 0, true], diff --git a/src/Symfony/Component/String/Tests/AbstractUnicodeTestCase.php b/src/Symfony/Component/String/Tests/AbstractUnicodeTestCase.php index 84e64b02e9f6a..c0a3452f78923 100644 --- a/src/Symfony/Component/String/Tests/AbstractUnicodeTestCase.php +++ b/src/Symfony/Component/String/Tests/AbstractUnicodeTestCase.php @@ -396,8 +396,8 @@ public static function provideBeforeAfterIgnoreCase(): array ['dé', 'jÀ', 'déjàdéjà', 0, true], ['éjàdéjà', 'é', 'déjàdéjà', 0, false], ['d', 'é', 'déjàdéjà', 0, true], - ['', 'Ç', 'déjàdéjà', 0, false], - ['', 'Ç', 'déjàdéjà', 0, true], + ['déjàdéjà', 'Ç', 'déjàdéjà', 0, false], + ['déjàdéjà', 'Ç', 'déjàdéjà', 0, true], ] ); } @@ -407,8 +407,8 @@ public static function provideBeforeAfterLast(): array return array_merge( parent::provideBeforeAfterLast(), [ - ['', 'Ç', 'déjàdéjà', 0, false], - ['', 'Ç', 'déjàdéjà', 0, true], + ['déjàdéjà', 'Ç', 'déjàdéjà', 0, false], + ['déjàdéjà', 'Ç', 'déjàdéjà', 0, true], ['éjà', 'é', 'déjàdéjà', 0, false], ['déjàd', 'é', 'déjàdéjà', 0, true], ] @@ -420,7 +420,7 @@ public static function provideBeforeAfterLastIgnoreCase(): array return array_merge( parent::provideBeforeAfterLastIgnoreCase(), [ - ['', 'Ç', 'déjàdéjà', 0, false], + ['déjàdéjà', 'Ç', 'déjàdéjà', 0, false], ['éjà', 'é', 'déjàdéjà', 0, false], ['éjà', 'É', 'déjàdéjà', 0, false], ] diff --git a/src/Symfony/Component/String/Tests/UnicodeStringTest.php b/src/Symfony/Component/String/Tests/UnicodeStringTest.php index 5f3321d6da1c0..bcf3e2ecd441a 100644 --- a/src/Symfony/Component/String/Tests/UnicodeStringTest.php +++ b/src/Symfony/Component/String/Tests/UnicodeStringTest.php @@ -186,8 +186,8 @@ public static function provideBeforeAfterIgnoreCase(): array return array_merge( parent::provideBeforeAfterIgnoreCase(), [ - ['', 'छेछे', 'दछेच्नुअ', 0, false], - ['', 'छेछे', 'दछेच्नुअ', 0, true], + ['दछेच्नुअ', 'छेछे', 'दछेच्नुअ', 0, false], + ['दछेच्नुअ', 'छेछे', 'दछेच्नुअ', 0, true], ['छेच्नुअ', 'छे', 'दछेच्नुअ', 0, false], ['द', 'छे', 'दछेच्नुअ', 0, true], ] @@ -199,8 +199,8 @@ public static function provideBeforeAfterLast(): array return array_merge( parent::provideBeforeAfterLast(), [ - ['', 'छेछे', 'दछेच्नुअ-दछेच्नु-अदछेच्नु', 0, false], - ['', 'छेछे', 'दछेच्नुअ-दछेच्नु-अदछेच्नु', 0, true], + ['दछेच्नुअ-दछेच्नु-अदछेच्नु', 'छेछे', 'दछेच्नुअ-दछेच्नु-अदछेच्नु', 0, false], + ['दछेच्नुअ-दछेच्नु-अदछेच्नु', 'छेछे', 'दछेच्नुअ-दछेच्नु-अदछेच्नु', 0, true], ['-दछेच्नु', '-द', 'दछेच्नुअ-दछेच्नु-अद-दछेच्नु', 0, false], ['दछेच्नुअ-दछेच्नु-अद', '-द', 'दछेच्नुअ-दछेच्नु-अद-दछेच्नु', 0, true], ] @@ -212,8 +212,8 @@ public static function provideBeforeAfterLastIgnoreCase(): array return array_merge( parent::provideBeforeAfterLastIgnoreCase(), [ - ['', 'छेछे', 'दछेच्नुअ-दछेच्नु-अदछेच्नु', 0, false], - ['', 'छेछे', 'दछेच्नुअ-दछेच्नु-अदछेच्नु', 0, true], + ['दछेच्नुअ-दछेच्नु-अदछेच्नु', 'छेछे', 'दछेच्नुअ-दछेच्नु-अदछेच्नु', 0, false], + ['दछेच्नुअ-दछेच्नु-अदछेच्नु', 'छेछे', 'दछेच्नुअ-दछेच्नु-अदछेच्नु', 0, true], ['-दछेच्नु', '-द', 'दछेच्नुअ-दछेच्नु-अद-दछेच्नु', 0, false], ['दछेच्नुअ-दछेच्नु-अद', '-द', 'दछेच्नुअ-दछेच्नु-अद-दछेच्नु', 0, true], ] diff --git a/src/Symfony/Component/String/UnicodeString.php b/src/Symfony/Component/String/UnicodeString.php index 81bf8ea56b605..2db507d7bbf0e 100644 --- a/src/Symfony/Component/String/UnicodeString.php +++ b/src/Symfony/Component/String/UnicodeString.php @@ -267,11 +267,11 @@ public function replaceMatches(string $fromRegexp, $to): AbstractString public function slice(int $start = 0, int $length = null): AbstractString { $str = clone $this; - try { - $str->string = (string) grapheme_substr($this->string, $start, $length ?? \PHP_INT_MAX); - } catch (\ValueError $e) { - $str->string = ''; + + if (\PHP_VERSION_ID < 80000 && 0 > $start && grapheme_strlen($this->string) < -$start) { + $start = 0; } + $str->string = (string) grapheme_substr($this->string, $start, $length ?? 2147483647); return $str; } @@ -279,9 +279,13 @@ public function slice(int $start = 0, int $length = null): AbstractString public function splice(string $replacement, int $start = 0, int $length = null): AbstractString { $str = clone $this; + + if (\PHP_VERSION_ID < 80000 && 0 > $start && grapheme_strlen($this->string) < -$start) { + $start = 0; + } $start = $start ? \strlen(grapheme_substr($this->string, 0, $start)) : 0; - $length = $length ? \strlen(grapheme_substr($this->string, $start, $length ?? \PHP_INT_MAX)) : $length; - $str->string = substr_replace($this->string, $replacement, $start, $length ?? \PHP_INT_MAX); + $length = $length ? \strlen(grapheme_substr($this->string, $start, $length ?? 2147483647)) : $length; + $str->string = substr_replace($this->string, $replacement, $start, $length ?? 2147483647); normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); if (false === $str->string) { @@ -293,7 +297,7 @@ public function splice(string $replacement, int $start = 0, int $length = null): public function split(string $delimiter, int $limit = null, int $flags = null): array { - if (1 > $limit = $limit ?? \PHP_INT_MAX) { + if (1 > $limit = $limit ?? 2147483647) { throw new InvalidArgumentException('Split limit must be a positive integer.'); } diff --git a/src/Symfony/Component/String/composer.json b/src/Symfony/Component/String/composer.json index 75f39c6284ee9..9680748bb288a 100644 --- a/src/Symfony/Component/String/composer.json +++ b/src/Symfony/Component/String/composer.json @@ -36,10 +36,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Templating/composer.json b/src/Symfony/Component/Templating/composer.json index a6e3b6eaef4f9..de536fd58426c 100644 --- a/src/Symfony/Component/Templating/composer.json +++ b/src/Symfony/Component/Templating/composer.json @@ -31,10 +31,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php b/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php index 272ee15adc198..d9801a8fa14f0 100644 --- a/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php +++ b/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php @@ -179,10 +179,10 @@ protected function tearDown(): void { foreach ($this->files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } - rmdir(sys_get_temp_dir().'/translation-xliff-lint-test'); + @rmdir(sys_get_temp_dir().'/translation-xliff-lint-test'); } public function provideStrictFilenames() diff --git a/src/Symfony/Component/Translation/composer.json b/src/Symfony/Component/Translation/composer.json index 7aede943ef3d5..c333e94007862 100644 --- a/src/Symfony/Component/Translation/composer.json +++ b/src/Symfony/Component/Translation/composer.json @@ -53,10 +53,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Uid/composer.json b/src/Symfony/Component/Uid/composer.json index 9164c69932857..abc04e554de43 100644 --- a/src/Symfony/Component/Uid/composer.json +++ b/src/Symfony/Component/Uid/composer.json @@ -29,10 +29,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf index 1db88086cf528..8a4b0d606af66 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf @@ -334,6 +334,58 @@ This value should be valid JSON. Стойността трябва да е валиден JSON. + + This collection should contain only unique elements. + Колекцията трябва да съдържа само уникални елементи. + + + This value should be positive. + Стойността трябва да бъде положително число. + + + This value should be either positive or zero. + Стойността трябва бъде положително число или нула. + + + This value should be negative. + Стойността трябва да бъде отрицателно число. + + + This value should be either negative or zero. + Стойността трябва да бъде отрицателно число или нула. + + + This value is not a valid timezone. + Стойността не е валидна часова зона. + + + This password has been leaked in a data breach, it must not be used. Please use another password. + Тази парола е компрометирана, не трябва да бъде използвана. Моля използвайте друга парола. + + + This value should be between {{ min }} and {{ max }}. + Стойността трябва да бъде между {{ min }} и {{ max }}. + + + This value is not a valid hostname. + Стойността не е валиден hostname. + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + Броят на елементите в тази колекция трябва да бъде кратен на {{ compared_value }}. + + + This value should satisfy at least one of the following constraints: + Стойността трябва да отговаря на поне едно от следните ограничения: + + + Each element of this collection should satisfy its own set of constraints. + Всеки елемент от тази колекция трябва да отговаря на собствения си набор от ограничения. + + + This value is not a valid International Securities Identification Number (ISIN). + Стойността не е валиден Международен идентификационен номер на ценни книжа (ISIN). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf index ce32f1368de64..0cf53015addb6 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf @@ -382,6 +382,10 @@ Each element of this collection should satisfy its own set of constraints. Každý prvek v této kolekci musí splňovat svá vlastní omezení. + + This value is not a valid International Securities Identification Number (ISIN). + Tato hodnota není platné mezinárodní identifikační číslo cenného papíru (ISIN). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf index 57b07b2b5546a..2c586ca4a2571 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf @@ -382,6 +382,10 @@ Each element of this collection should satisfy its own set of constraints. Cada elemento de esta colección debería satisfacer su propio conjunto de restricciones. + + This value is not a valid International Securities Identification Number (ISIN). + Este valor no es un número de identificación internacional de valores (ISIN) válido. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf index 84c24720dae3c..261b8f34e62f9 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf @@ -290,6 +290,82 @@ The image is square ({{ width }}x{{ height }}px). Square images are not allowed. Pilt on ruudukujuline ({{ width }}x{{ height }}px). Ruudukujulised pildid pole lubatud. + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Pilt on horisontaalselt orienteeritud ({{ width }}x{{ height }}px). Maastikulised pildid pole lubatud. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Pilt on vertikaalselt orienteeritud ({{ width }}x{{ height }}px). Portreepildid pole lubatud. + + + An empty file is not allowed. + Tühi fail pole lubatud. + + + The host could not be resolved. + Peremeest ei õnnestunud lahendada. + + + This value does not match the expected {{ charset }} charset. + See väärtus ei ühti eeldatava tähemärgiga {{ charset }}. + + + This is not a valid Business Identifier Code (BIC). + See ei ole kehtiv ettevõtte identifitseerimiskood (BIC). + + + Error + Viga + + + This is not a valid UUID. + See pole kehtiv UUID. + + + This value should be a multiple of {{ compared_value }}. + See väärtus peaks olema väärtuse {{ compared_value }} kordne. + + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + See ettevõtte identifitseerimiskood (BIC) ei ole seotud IBAN-iga {{ iban }}. + + + This value should be valid JSON. + See väärtus peaks olema kehtiv JSON. + + + This collection should contain only unique elements. + See kogu peaks sisaldama ainult unikaalseid elemente. + + + This value should be positive. + See väärtus peaks olema positiivne. + + + This value should be either positive or zero. + See väärtus peaks olema kas positiivne või null. + + + This value should be negative. + See väärtus peaks olema negatiivne. + + + This value should be either negative or zero. + See väärtus peaks olema kas negatiivne või null. + + + This value is not a valid timezone. + See väärtus pole kehtiv ajavöönd. + + + This password has been leaked in a data breach, it must not be used. Please use another password. + See parool on lekkinud andmerikkumise korral, seda ei tohi kasutada. Palun kasutage muud parooli. + + + This value should be between {{ min }} and {{ max }}. + See väärtus peaks olema vahemikus {{ min }} kuni {{ max }}. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf index c0b42096b5bd7..688f394eab404 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf @@ -330,6 +330,62 @@ This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. این(BIC) با IBAN ارتباطی ندارد. + + This value should be valid JSON. + این مقدار باید یک JSON معتبر باشد. + + + This collection should contain only unique elements. + این مجموعه باید تنها شامل عناصر یکتا باشد. + + + This value should be positive. + این مقدار باید مثبت باشد. + + + This value should be either positive or zero. + این مقدار باید مثبت یا صفر باشد. + + + This value should be negative. + این مقدار باید منفی باشد. + + + This value should be either negative or zero. + این مقدار باید منفی یا صفر باشد. + + + This value is not a valid timezone. + این مقدار یک منطقه‌زمانی (timezone) معتبر نیست. + + + This password has been leaked in a data breach, it must not be used. Please use another password. + این رمزعبور در یک رخنه‌ی اطلاعاتی نشت کرده است. لطفاً از یک رمزعبور دیگر استفاده کنید. + + + This value should be between {{ min }} and {{ max }}. + این مقدار باید بین {{ min }} و {{ max }} باشد + + + This value is not a valid hostname. + این مقدار یک hostname معتبر نیست. + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + تعداد عناصر این مجموعه باید ضریبی از {{ compared_value }} باشد. + + + This value should satisfy at least one of the following constraints: + این مقدار باید حداقل یکی از محدودیت‌های زیر را ارضا کند: + + + Each element of this collection should satisfy its own set of constraints. + هر یک از عناصر این مجموعه باید دسته محدودیت‌های خودش را ارضا کند. + + + This value is not a valid International Securities Identification Number (ISIN). + این مقدار یک شماره شناسایی بین‌المللی اوراق بهادار (ISIN) معتبر نیست. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf index bf4b85deefc35..40d07cf57cbb9 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf @@ -330,6 +330,62 @@ This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. Business Identifier Code (BIC) ini tidak terkait dengan IBAN {{ iban }}. + + This value should be valid JSON. + Nilai ini harus berisi JSON yang sah. + + + This collection should contain only unique elements. + Kumpulan ini harus mengandung elemen yang unik. + + + This value should be positive. + Nilai ini harus positif. + + + This value should be either positive or zero. + Nilai ini harus positif atau nol. + + + This value should be negative. + Nilai ini harus negatif. + + + This value should be either negative or zero. + Nilai ini harus negatif atau nol. + + + This value is not a valid timezone. + Nilai ini harus merupakan zona waktu yang sah. + + + This password has been leaked in a data breach, it must not be used. Please use another password. + Kata sandi ini telah bocor di data breach, harus tidak digunakan kembali. Silahkan gunakan kata sandi yang lain. + + + This value should be between {{ min }} and {{ max }}. + Nilai ini harus berada diantara {{ min }} dan {{ max }}. + + + This value is not a valid hostname. + Nilai ini bukan merupakan hostname yang sah. + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + Angka dari setiap elemen di dalam kumpulan ini harus kelipatan dari {{ compared_value }}. + + + This value should satisfy at least one of the following constraints: + Nilai ini harus memenuhi setidaknya satu dari batasan berikut: + + + Each element of this collection should satisfy its own set of constraints. + Setiap elemen koleksi ini harus memenuhi batasannya sendiri. + + + This value is not a valid International Securities Identification Number (ISIN). + Nilai ini bukan merupakan International Securities Identification Number (ISIN) yang sah. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf index 8bff68b1ee90c..1a99117f930ad 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf @@ -374,6 +374,18 @@ The number of elements in this collection should be a multiple of {{ compared_value }}. 要素の数は{{ compared_value }}の倍数でなければなりません。 + + This value should satisfy at least one of the following constraints: + 以下の制約のうち少なくとも1つを満たす必要があります: + + + Each element of this collection should satisfy its own set of constraints. + コレクションの各要素は、それぞれの制約を満たす必要があります。 + + + This value is not a valid International Securities Identification Number (ISIN). + この値は有効な国際証券識別番号(ISIN)ではありません。 + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf index 4c0e192521d27..d70ffbc722d51 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf @@ -334,6 +334,58 @@ This value should be valid JSON. Šai vērtībai jābūt derīgam JSON. + + This collection should contain only unique elements. + Šai kolekcijai jāsatur tikai derīgi elementi. + + + This value should be positive. + Šai vērtībāi jābūt pozitīvai. + + + This value should be either positive or zero. + Šai vērtībāi jābūt pozitīvai vai vienādai ar nulli. + + + This value should be negative. + Šai vērtībāi jābūt negatīvai. + + + This value should be either negative or zero. + Šai vērtībāi jābūt negatīvai vai vienādai ar nulli. + + + This value is not a valid timezone. + Šī vērtība nav derīga laika zona. + + + This password has been leaked in a data breach, it must not be used. Please use another password. + Šī parole tika publicēta datu noplūdē, viņu nedrīkst izmantot. Lūdzu, izvēlieties citu paroli. + + + This value should be between {{ min }} and {{ max }}. + Šai vērtībai jābūt starp {{ min }} un {{ max }}. + + + This value is not a valid hostname. + Šī vērtība nav derīgs tīmekļa servera nosaukums. + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + Elementu skaitam šajā kolekcijā jābūt {{ compared_value }} reizinājumam. + + + This value should satisfy at least one of the following constraints: + Šai vērtībai jāiekļaujas vismaz vienā no sekojošiem ierobežojumiem: + + + Each element of this collection should satisfy its own set of constraints. + Šīs kolekcijas katram elementam jāiekļaujas savā ierobežojumu kopā. + + + This value is not a valid International Securities Identification Number (ISIN). + Šī vērtība nav derīgs starptautiskais vērtspapīru identifikācijas numurs (ISIN). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf index 3b2eb4131bd3a..c1a4c13dafa1f 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf @@ -366,6 +366,26 @@ This value should be between {{ min }} and {{ max }}. Deze waarde moet zich tussen {{ min }} en {{ max }} bevinden. + + This value is not a valid hostname. + Deze waarde is geen geldige hostnaam. + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + Het aantal elementen van deze collectie moet een veelvoud zijn van {{ compared_value }}. + + + This value should satisfy at least one of the following constraints: + Deze waarde moet voldoen aan tenminste een van de volgende voorwaarden: + + + Each element of this collection should satisfy its own set of constraints. + Elk element van deze collectie moet voldoen aan zijn eigen set voorwaarden. + + + This value is not a valid International Securities Identification Number (ISIN). + Deze waarde is geen geldig International Securities Identification Number (ISIN). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf index 8616edf4b9096..2dbd009ccdd53 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf @@ -334,6 +334,58 @@ This value should be valid JSON. Este valor deve ser um JSON válido. + + This collection should contain only unique elements. + Esta coleção deve conter somente elementos únicos. + + + This value should be positive. + Este valor deve ser positivo. + + + This value should be either positive or zero. + Este valor deve ser positivo ou zero. + + + This value should be negative. + Este valor deve ser negativo. + + + This value should be either negative or zero. + Este valor deve ser negativo ou zero. + + + This value is not a valid timezone. + Este valor não representa um fuso horário válido. + + + This password has been leaked in a data breach, it must not be used. Please use another password. + Esta senha foi divulgada num vazamento de dados e não deve ser utilizada. Por favor, utilize outra senha. + + + This value should be between {{ min }} and {{ max }}. + Este valor deve estar entre {{ min }} e {{ max }}. + + + This value is not a valid hostname. + Este valor não é um nome de host válido. + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + O número de elementos desta coleção deve ser um múltiplo de {{ compared_value }}. + + + This value should satisfy at least one of the following constraints: + Este valor deve satisfazer pelo menos uma das seguintes restrições: + + + Each element of this collection should satisfy its own set of constraints. + Cada elemento desta coleção deve satisfazer seu próprio grupo de restrições. + + + This value is not a valid International Securities Identification Number (ISIN). + Este valor não é um Número de Identificação de Títulos Internacionais (ISIN) válido. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf index 26b069ab02774..2f7660ea08e17 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf @@ -334,6 +334,58 @@ This value should be valid JSON. Această valoare trebuie să fie un JSON valid. + + This collection should contain only unique elements. + Acest set ar trebui să conțină numai elemente unice. + + + This value should be positive. + Această valoare ar trebui să fie pozitivă. + + + This value should be either positive or zero. + Această valoare trebuie să fie pozitivă sau zero. + + + This value should be negative. + Această valoare ar trebui să fie negativă. + + + This value should be either negative or zero. + Această valoare trebuie să fie negativă sau zero. + + + This value is not a valid timezone. + Această valoare nu este un fus orar valid. + + + This password has been leaked in a data breach, it must not be used. Please use another password. + Această parolă a fost compromisă și nu poate fi utilizată. Vă rugăm să utilizați o altă parolă. + + + This value should be between {{ min }} and {{ max }}. + Această valoare trebuie să fie între {{ min }} și {{ max }}. + + + This value is not a valid hostname. + Această valoare nu este un numele gazdei valid. + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + Numărul de elemente din această colecție ar trebui să fie un multiplu al {{ compared_value }}. + + + This value should satisfy at least one of the following constraints: + Această valoare trebuie să îndeplinească cel puțin una dintre următoarele reguli: + + + Each element of this collection should satisfy its own set of constraints. + Fiecare element din acest set ar trebui să îndeplinească propriul set de reguli. + + + This value is not a valid International Securities Identification Number (ISIN). + Această valoare nu este un număr internațional de identificare (ISIN) valabil. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf index 3c03fd8525cca..516fa2cf2a8bb 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf @@ -382,6 +382,10 @@ Each element of this collection should satisfy its own set of constraints. Каждый элемент этой коллекции должен удовлетворять своему собственному набору ограничений. + + This value is not a valid International Securities Identification Number (ISIN). + Значение не является корректным международным идентификационным номером ценных бумаг (ISIN). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf index a161ddbfe8845..a0c55ea6db146 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf @@ -366,6 +366,26 @@ This value should be between {{ min }} and {{ max }}. Táto hodnota by mala byť medzi {{ min }} a {{ max }}. + + This value is not a valid hostname. + Táto hodnota nie je platný hostname. + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + Počet prvkov v tejto kolekcii musí byť násobok {{ compared_value }}. + + + This value should satisfy at least one of the following constraints: + Táto hodnota musí spĺňať aspoň jedno z nasledujúcich obmedzení: + + + Each element of this collection should satisfy its own set of constraints. + Každý prvok v tejto kolekcii musí spĺňať svoje vlastné obmedzenia. + + + This value is not a valid International Securities Identification Number (ISIN). + Táto hodnota nie je platné medzinárodné označenie cenného papiera (ISIN). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf index 569ebca47f02e..6c0acb9fdf43f 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf @@ -330,6 +330,62 @@ This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. Ky Kod Identifikues i Biznesit (BIC) nuk është i lidhur me IBAN {{ iban }}. + + This value should be valid JSON. + Kjo vlerë duhet të jetë JSON i vlefshëm. + + + This collection should contain only unique elements. + Ky koleksion duhet të përmbajë vetëm elementë unikë. + + + This value should be positive. + Kjo vlerë duhet të jetë pozitive. + + + This value should be either positive or zero. + Kjo vlerë duhet të jetë pozitive ose zero. + + + This value should be negative. + Kjo vlerë duhet të jetë negative. + + + This value should be either negative or zero. + Kjo vlerë duhet të jetë negative ose zero. + + + This value is not a valid timezone. + Kjo vlerë nuk është një zonë e vlefshme kohore. + + + This password has been leaked in a data breach, it must not be used. Please use another password. + Ky fjalëkalim është zbuluar në një shkelje të të dhënave, nuk duhet të përdoret. Ju lutemi përdorni një fjalëkalim tjetër. + + + This value should be between {{ min }} and {{ max }}. + Kjo vlerë duhet të jetë ndërmjet {{ min }} dhe {{ max }}. + + + This value is not a valid hostname. + Kjo vlerë nuk është një emër i vlefshëm hosti. + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + Numri i elementeve në këtë koleksion duhet të jetë një shumëfish i {{ compared_value }}. + + + This value should satisfy at least one of the following constraints: + Kjo vlerë duhet të plotësojë të paktën njërën nga kufizimet e mëposhtme: + + + Each element of this collection should satisfy its own set of constraints. + Secili element i këtij koleksioni duhet të përmbushë kufizimet e veta. + + + This value is not a valid International Securities Identification Number (ISIN). + Kjo vlerë nuk është një numër i vlefshëm identifikues ndërkombëtar i sigurisë (ISIN). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf index bf7da2f06c907..4f2ae8c78ea12 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf @@ -366,6 +366,27 @@ This value should be between {{ min }} and {{ max }}. Detta värde bör ligga mellan {{ min }} och {{ max }}. + + This value is not a valid hostname. + Värdet är inte ett giltigt servernamn. + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + Antalet element i samlingen ska vara en multipel av {{ compared_value }}. + + + This value should satisfy at least one of the following constraints: + Det här värdet skall uppfylla minst ett av följande krav: + + + Each element of this collection should satisfy its own set of constraints. + Varje element i samlingen skall uppfylla sin egen uppsättning av krav. + + + This value is not a valid International Securities Identification Number (ISIN). + Det här värdet är inte ett giltigt "International Securities Identification Number" (ISIN). + + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf index 76de2214e6bcb..6c39fac818238 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf @@ -330,6 +330,62 @@ This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. Bu İşletme Tanımlayıcı Kodu (BIC), IBAN {{ iban }} ile ilişkili değildir. + + This value should be valid JSON. + Bu değer için geçerli olmalıdır JSON. + + + This collection should contain only unique elements. + Bu grup yalnızca benzersiz öğeler içermelidir. + + + This value should be positive. + Bu değer pozitif olmalı. + + + This value should be either positive or zero. + Bu değer pozitif veya sıfır olmalıdır. + + + This value should be negative. + Bu değer negatif olmalıdır. + + + This value should be either negative or zero. + Bu değer, negatif veya sıfır olmalıdır. + + + This value is not a valid timezone. + Bu değer, geçerli bir saat dilimi değil. + + + This password has been leaked in a data breach, it must not be used. Please use another password. + Bu parola, bir veri ihlali nedeniyle sızdırılmıştır ve kullanılmamalıdır. Lütfen başka bir şifre kullanın. + + + This value should be between {{ min }} and {{ max }}. + Bu değer arasında olmalıdır {{ min }} ve {{ max }}. + + + This value is not a valid hostname. + Bu değer, geçerli bir ana bilgisayar adı değil. + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + Bu gruptaki öğe sayısı birden fazla olmalıdır {{ compared_value }}. + + + This value should satisfy at least one of the following constraints: + Bu değer aşağıdaki kısıtlamalardan birini karşılamalıdır: + + + Each element of this collection should satisfy its own set of constraints. + Bu gruptaki her öğe kendi kısıtlamalarını karşılamalıdır. + + + This value is not a valid International Securities Identification Number (ISIN). + Bu değer geçerli bir Uluslararası Menkul Kıymetler Kimlik Numarası değil (ISIN). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf index 688e11fbe929c..7ea908e75706d 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf @@ -382,6 +382,10 @@ Each element of this collection should satisfy its own set of constraints. Кожен елемент цієї колекції повинен задовольняти власному набору обмежень. + + This value is not a valid International Securities Identification Number (ISIN). + Це значення не є дійсним міжнародним ідентифікаційним номером цінних паперів (ISIN). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf index 3c2f25c0f7bbc..43ac9143bb963 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf @@ -334,6 +334,58 @@ This value should be valid JSON. 该值应该是有效的JSON。 + + This collection should contain only unique elements. + 该集合应仅包含独一无二的元素。 + + + This value should be positive. + 数值应为正数。 + + + This value should be either positive or zero. + 数值应是正数,或为零。 + + + This value should be negative. + 数值应为负数。 + + + This value should be either negative or zero. + 数值应是负数,或为零。 + + + This value is not a valid timezone. + 无效时区。 + + + This password has been leaked in a data breach, it must not be used. Please use another password. + 此密码已被泄露,切勿使用。请更换密码。 + + + This value should be between {{ min }} and {{ max }}. + 该数值应在 {{ min }} 和 {{ max }} 之间。 + + + This value is not a valid hostname. + 该数值不是有效的主机名称。 + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + 该集合内的元素数量得是 {{ compared_value }} 的倍数。 + + + This value should satisfy at least one of the following constraints: + 该数值需符合以下其中一个约束: + + + Each element of this collection should satisfy its own set of constraints. + 该集合内的每个元素需符合元素本身规定的约束。 + + + This value is not a valid International Securities Identification Number (ISIN). + 该数值不是有效的国际证券识别码 (ISIN)。 + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf index 7cef875f5812e..aa476ea25de17 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf @@ -344,7 +344,7 @@ This value should be either positive or zero. - 數值應或未正數,或為零。 + 數值應是正數,或為零。 This value should be negative. @@ -352,7 +352,7 @@ This value should be either negative or zero. - 數值應或未負數,或為零。 + 數值應是負數,或為零。 This value is not a valid timezone. @@ -360,12 +360,32 @@ This password has been leaked in a data breach, it must not be used. Please use another password. - 依據您的密碼,發生數據泄露,請勿使用改密碼。請更換密碼。 + 此密碼已被泄露,切勿使用。請更換密碼。 This value should be between {{ min }} and {{ max }}. 該數值應在 {{ min }} 和 {{ max }} 之間。 + + This value is not a valid hostname. + 該數值不是有效的主機名稱。 + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + 該集合內的元素數量得是 {{ compared_value }} 的倍數。 + + + This value should satisfy at least one of the following constraints: + 該數值需符合以下其中一個約束: + + + Each element of this collection should satisfy its own set of constraints. + 該集合內的每個元素需符合元素本身規定的約束。 + + + This value is not a valid International Securities Identification Number (ISIN). + 該數值不是有效的國際證券識別碼 (ISIN)。 + diff --git a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php index f517baea8736a..ee0798f611dc6 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php @@ -45,7 +45,7 @@ protected function tearDown(): void } if (file_exists($this->path)) { - unlink($this->path); + @unlink($this->path); } $this->path = null; diff --git a/src/Symfony/Component/Validator/composer.json b/src/Symfony/Component/Validator/composer.json index d9b12beaeb6ab..aedb5cbb50034 100644 --- a/src/Symfony/Component/Validator/composer.json +++ b/src/Symfony/Component/Validator/composer.json @@ -34,7 +34,6 @@ "symfony/expression-language": "^5.1", "symfony/cache": "^4.4|^5.0", "symfony/mime": "^4.4|^5.0", - "symfony/phpunit-bridge": "^5.1.1", "symfony/property-access": "^4.4|^5.0", "symfony/property-info": "^4.4|^5.0", "symfony/translation": "^4.4|^5.0", @@ -72,10 +71,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php index bdbe3c2c766a4..08588fc339f92 100644 --- a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php +++ b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php @@ -222,7 +222,7 @@ protected function doClone($var) $stub->position = $len++; } elseif ($pos < $maxItems) { if ($maxItems < $pos += \count($a)) { - $a = \array_slice($a, 0, $maxItems - $pos); + $a = \array_slice($a, 0, $maxItems - $pos, true); if ($stub->cut >= 0) { $stub->cut += $pos - $maxItems; } diff --git a/src/Symfony/Component/VarDumper/Tests/Cloner/VarClonerTest.php b/src/Symfony/Component/VarDumper/Tests/Cloner/VarClonerTest.php index 10bf2541765da..b472963216770 100644 --- a/src/Symfony/Component/VarDumper/Tests/Cloner/VarClonerTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Cloner/VarClonerTest.php @@ -170,7 +170,7 @@ public function testLimits() 'Level 3 Item 3', ], [ - 'Level 3 Item 4', + 999 => 'Level 3 Item 4', 'Level 3 Item 5', 'Level 3 Item 6', ], @@ -250,7 +250,7 @@ public function testLimits() [1] => Array ( [0] => 2 - [2] => 7 + [1] => 7 ) [2] => Array @@ -307,7 +307,7 @@ public function testLimits() [7] => Array ( - [0] => Level 3 Item 4 + [999] => Level 3 Item 4 ) ) diff --git a/src/Symfony/Component/VarDumper/Tests/Dumper/ServerDumperTest.php b/src/Symfony/Component/VarDumper/Tests/Dumper/ServerDumperTest.php index c52ec191d8b87..6999809fa97c6 100644 --- a/src/Symfony/Component/VarDumper/Tests/Dumper/ServerDumperTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Dumper/ServerDumperTest.php @@ -89,6 +89,6 @@ private function getServerProcess(): Process 'VAR_DUMPER_SERVER' => self::VAR_DUMPER_SERVER, ]); - return $process->setTimeout(9); + return $process->setTimeout('\\' === \DIRECTORY_SEPARATOR ? 19 : 9); } } diff --git a/src/Symfony/Component/VarDumper/composer.json b/src/Symfony/Component/VarDumper/composer.json index 2a61aedee5fba..3c515c400fe82 100644 --- a/src/Symfony/Component/VarDumper/composer.json +++ b/src/Symfony/Component/VarDumper/composer.json @@ -45,10 +45,5 @@ "bin": [ "Resources/bin/var-dump-server" ], - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/VarExporter/composer.json b/src/Symfony/Component/VarExporter/composer.json index 67e4a4164d53f..30fe7d67b16ae 100644 --- a/src/Symfony/Component/VarExporter/composer.json +++ b/src/Symfony/Component/VarExporter/composer.json @@ -28,10 +28,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/WebLink/composer.json b/src/Symfony/Component/WebLink/composer.json index 0042ce10714e3..203dded951fa6 100644 --- a/src/Symfony/Component/WebLink/composer.json +++ b/src/Symfony/Component/WebLink/composer.json @@ -38,10 +38,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Workflow/composer.json b/src/Symfony/Component/Workflow/composer.json index c91e6cae91cb5..ade364096dbb1 100644 --- a/src/Symfony/Component/Workflow/composer.json +++ b/src/Symfony/Component/Workflow/composer.json @@ -37,10 +37,5 @@ "autoload": { "psr-4": { "Symfony\\Component\\Workflow\\": "" } }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php index 0727b863536e9..32dd30d495a84 100644 --- a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php +++ b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php @@ -129,11 +129,11 @@ protected function tearDown(): void { foreach ($this->files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } - rmdir(sys_get_temp_dir().'/framework-yml-lint-test'); + @rmdir(sys_get_temp_dir().'/framework-yml-lint-test'); } } diff --git a/src/Symfony/Component/Yaml/composer.json b/src/Symfony/Component/Yaml/composer.json index 4a1263aca1131..a8b8134bcfa44 100644 --- a/src/Symfony/Component/Yaml/composer.json +++ b/src/Symfony/Component/Yaml/composer.json @@ -38,10 +38,5 @@ "bin": [ "Resources/bin/yaml-lint" ], - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - } + "minimum-stability": "dev" } diff --git a/src/Symfony/Contracts/Cache/composer.json b/src/Symfony/Contracts/Cache/composer.json index 9744482ba0dc1..80a06c7f50890 100644 --- a/src/Symfony/Contracts/Cache/composer.json +++ b/src/Symfony/Contracts/Cache/composer.json @@ -27,12 +27,15 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - }, "thanks": { "name": "symfony/contracts", "url": "https://github.com/symfony/contracts" } + }, + "extra": { + "branch-version": "2.1", + "branch-alias": { + "dev-main": "2.1-dev" + } } } diff --git a/src/Symfony/Contracts/Deprecation/composer.json b/src/Symfony/Contracts/Deprecation/composer.json index c8ace825c325b..55bf64b73b26c 100644 --- a/src/Symfony/Contracts/Deprecation/composer.json +++ b/src/Symfony/Contracts/Deprecation/composer.json @@ -24,8 +24,9 @@ }, "minimum-stability": "dev", "extra": { + "branch-version": "2.1", "branch-alias": { - "dev-master": "2.1-dev" + "dev-main": "2.1-dev" } } } diff --git a/src/Symfony/Contracts/EventDispatcher/composer.json b/src/Symfony/Contracts/EventDispatcher/composer.json index c712bc2cc8d05..54f2c78bc8a9a 100644 --- a/src/Symfony/Contracts/EventDispatcher/composer.json +++ b/src/Symfony/Contracts/EventDispatcher/composer.json @@ -27,12 +27,15 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - }, "thanks": { "name": "symfony/contracts", "url": "https://github.com/symfony/contracts" } + }, + "extra": { + "branch-version": "2.1", + "branch-alias": { + "dev-main": "2.1-dev" + } } } diff --git a/src/Symfony/Contracts/HttpClient/Test/Fixtures/web/index.php b/src/Symfony/Contracts/HttpClient/Test/Fixtures/web/index.php index 96486ca3168c8..68406e69c4c3c 100644 --- a/src/Symfony/Contracts/HttpClient/Test/Fixtures/web/index.php +++ b/src/Symfony/Contracts/HttpClient/Test/Fixtures/web/index.php @@ -63,6 +63,15 @@ header('Content-Type: application/json', true, 404); break; + case '/404-gzipped': + header('Content-Type: text/plain', true, 404); + ob_start('ob_gzhandler'); + @ob_flush(); + flush(); + usleep(300000); + echo 'some text'; + exit; + case '/301': if ('Basic Zm9vOmJhcg==' === $vars['HTTP_AUTHORIZATION']) { header('Location: http://127.0.0.1:8057/302', true, 301); @@ -157,7 +166,7 @@ exit; case '/json': - header("Content-Type: application/json"); + header('Content-Type: application/json'); echo json_encode([ 'documents' => [ ['id' => '/json/1'], @@ -170,7 +179,7 @@ case '/json/1': case '/json/2': case '/json/3': - header("Content-Type: application/json"); + header('Content-Type: application/json'); echo json_encode([ 'title' => $vars['REQUEST_URI'], ]); diff --git a/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php b/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php index 76db9facd7b27..74997eaafcf92 100644 --- a/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php +++ b/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php @@ -860,6 +860,18 @@ public function testGetContentAfterDestruct() } } + public function testGetEncodedContentAfterDestruct() + { + $client = $this->getHttpClient(__FUNCTION__); + + try { + $client->request('GET', 'http://localhost:8057/404-gzipped'); + $this->fail(ClientExceptionInterface::class.' expected'); + } catch (ClientExceptionInterface $e) { + $this->assertSame('some text', $e->getResponse()->getContent(false)); + } + } + public function testProxy() { $client = $this->getHttpClient(__FUNCTION__); diff --git a/src/Symfony/Contracts/HttpClient/composer.json b/src/Symfony/Contracts/HttpClient/composer.json index 60c5ca03e7ccd..140b43e312b23 100644 --- a/src/Symfony/Contracts/HttpClient/composer.json +++ b/src/Symfony/Contracts/HttpClient/composer.json @@ -26,12 +26,15 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - }, "thanks": { "name": "symfony/contracts", "url": "https://github.com/symfony/contracts" } + }, + "extra": { + "branch-version": "2.1", + "branch-alias": { + "dev-main": "2.1-dev" + } } } diff --git a/src/Symfony/Contracts/Service/composer.json b/src/Symfony/Contracts/Service/composer.json index bb1824d72d827..e6785e45cc126 100644 --- a/src/Symfony/Contracts/Service/composer.json +++ b/src/Symfony/Contracts/Service/composer.json @@ -27,12 +27,15 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - }, "thanks": { "name": "symfony/contracts", "url": "https://github.com/symfony/contracts" } + }, + "extra": { + "branch-version": "2.1", + "branch-alias": { + "dev-main": "2.1-dev" + } } } diff --git a/src/Symfony/Contracts/Translation/composer.json b/src/Symfony/Contracts/Translation/composer.json index 0295ce63ce297..c9a6f15758d28 100644 --- a/src/Symfony/Contracts/Translation/composer.json +++ b/src/Symfony/Contracts/Translation/composer.json @@ -26,12 +26,15 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - }, "thanks": { "name": "symfony/contracts", "url": "https://github.com/symfony/contracts" } + }, + "extra": { + "branch-version": "2.1", + "branch-alias": { + "dev-main": "2.1-dev" + } } } diff --git a/src/Symfony/Contracts/composer.json b/src/Symfony/Contracts/composer.json index 83e5db3996ab4..a9f481a76acef 100644 --- a/src/Symfony/Contracts/composer.json +++ b/src/Symfony/Contracts/composer.json @@ -48,8 +48,9 @@ }, "minimum-stability": "dev", "extra": { + "branch-version": "2.1", "branch-alias": { - "dev-master": "2.1-dev" + "dev-main": "2.1-dev" } } } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy