From cb1a921bb918f7fea25521ce02fcdda43be7f580 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 29 Jan 2016 13:24:08 +0100 Subject: [PATCH 1/5] Fixed the Bootstrap form theme for inlined checkbox/radio --- .../Twig/Resources/views/Form/bootstrap_3_layout.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig index 5affc7a6a1..dfb1965ca1 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig @@ -115,7 +115,7 @@ {%- endblock choice_widget_expanded %} {% block checkbox_widget -%} - {% set parent_label_class = parent_label_class|default('') -%} + {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} {% if 'checkbox-inline' in parent_label_class %} {{- form_label(form, null, { widget: parent() }) -}} {% else -%} @@ -126,7 +126,7 @@ {%- endblock checkbox_widget %} {% block radio_widget -%} - {%- set parent_label_class = parent_label_class|default('') -%} + {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} {% if 'radio-inline' in parent_label_class %} {{- form_label(form, null, { widget: parent() }) -}} {% else -%} From c71840193ceaf37475bdc3d32e85e3fbbccef84e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 2 Feb 2016 15:23:07 +0100 Subject: [PATCH 2/5] changed operator from and to && --- .../Resources/views/Form/choice_widget_collapsed.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php b/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php index 0e180577ff..0399e43392 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php @@ -7,7 +7,7 @@ )) ?> multiple="multiple" > - + 0): ?> block($form, 'choice_widget_options', array('choices' => $preferred_choices)) ?> 0 && null !== $separator): ?> From 13ae32376dcd57339682bfec3442907d6477634f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 2 Feb 2016 17:13:46 +0100 Subject: [PATCH 3/5] [travis] Add some comments --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index f62aa14901..34423e84b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,9 @@ cache: services: mongodb before_install: + # Matrix lines for intermediate PHP versions are skipped for pull requests - if [[ ! $deps && ! $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} && $TRAVIS_PHP_VERSION != hhvm && $TRAVIS_PULL_REQUEST != false ]]; then deps=skip; fi; + # A sigchild-enabled-PHP is used to test the Process component on the lowest PHP matrix line - if [[ ! $deps && $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} && ! -d php-$MIN_PHP/sapi ]]; then wget http://museum.php.net/php5/php-$MIN_PHP.tar.bz2 -O - | tar -xj; (cd php-$MIN_PHP; ./configure --enable-sigchild --enable-pcntl; make -j2); fi; - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else INI_FILE=/etc/hhvm/php.ini; fi; - echo memory_limit = -1 >> $INI_FILE @@ -50,9 +52,12 @@ before_install: install: - if [[ $deps != skip ]]; then COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi; + # Create local composer packages for each patched components and reference them in composer.json files when cross-testing components - if [[ $deps != skip && $deps ]]; then php .travis.php $TRAVIS_COMMIT_RANGE $TRAVIS_BRANCH $COMPONENTS; 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 SYMFONY_VERSION=$(git ls-remote --heads | grep -o '/[1-9].*' | tail -n 1 | sed s/.//); else SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*'); fi; - if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then git fetch origin $SYMFONY_VERSION; git checkout -m FETCH_HEAD; COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi; + # Legacy tests are skipped when deps=high and when the current branch version has not the same major version number than the next one - if [[ $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) ]]; then LEGACY=,legacy; fi; - export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev; - if [[ ! $deps ]]; then composer update --prefer-dist; else export SYMFONY_DEPRECATIONS_HELPER=weak; fi; From a45e8bbc34d4d8cd0f8ff0ac5cb43c82dfb0fafd Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Wed, 3 Feb 2016 14:12:30 +0200 Subject: [PATCH 4/5] [Routing] added a suggestion to add the HttpFoundation component. --- src/Symfony/Component/Routing/composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Symfony/Component/Routing/composer.json b/src/Symfony/Component/Routing/composer.json index 5b0f24416f..d7760343f0 100644 --- a/src/Symfony/Component/Routing/composer.json +++ b/src/Symfony/Component/Routing/composer.json @@ -31,6 +31,7 @@ "symfony/config": "<2.7" }, "suggest": { + "symfony/http-foundation": "For using a Symfony Request object", "symfony/config": "For using the all-in-one router or any loader", "symfony/yaml": "For using the YAML loader", "symfony/expression-language": "For using expression matching", From 0e45a4a5de7bc8e087da5db3d0d6640ab59c97de Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 3 Feb 2016 18:56:43 +0100 Subject: [PATCH 5/5] [Console] remove readline support --- src/Symfony/Component/Console/CHANGELOG.md | 5 ++++ .../Console/Helper/QuestionHelper.php | 30 ++++--------------- 2 files changed, 10 insertions(+), 25 deletions(-) diff --git a/src/Symfony/Component/Console/CHANGELOG.md b/src/Symfony/Component/Console/CHANGELOG.md index 4e29d2ed45..8021068edf 100644 --- a/src/Symfony/Component/Console/CHANGELOG.md +++ b/src/Symfony/Component/Console/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +2.8.3 +----- + + * remove readline support from the question helper as it caused issues + 2.8.0 ----- diff --git a/src/Symfony/Component/Console/Helper/QuestionHelper.php b/src/Symfony/Component/Console/Helper/QuestionHelper.php index a09a56c239..5bb30df8ad 100644 --- a/src/Symfony/Component/Console/Helper/QuestionHelper.php +++ b/src/Symfony/Component/Console/Helper/QuestionHelper.php @@ -134,7 +134,11 @@ class QuestionHelper extends Helper } if (false === $ret) { - $ret = $this->readFromInput($inputStream); + $ret = fgets($inputStream, 4096); + if (false === $ret) { + throw new \RuntimeException('Aborted'); + } + $ret = trim($ret); } } else { $ret = trim($this->autocomplete($output, $question, $inputStream)); @@ -427,30 +431,6 @@ class QuestionHelper extends Helper return self::$shell; } - /** - * Reads user input. - * - * @param resource $stream The input stream - * - * @return string User input - * - * @throws RuntimeException - */ - private function readFromInput($stream) - { - if (STDIN === $stream && function_exists('readline')) { - $ret = readline(''); - } else { - $ret = fgets($stream, 4096); - } - - if (false === $ret) { - throw new RuntimeException('Aborted'); - } - - return trim($ret); - } - /** * Returns whether Stty is available or not. *