8000 Merge branch '2.7' into 2.8 · symfony/symfony@85cad75 · GitHub
[go: up one dir, main page]

Skip to content

Commit 85cad75

Browse files
Merge branch '2.7' into 2.8
* 2.7: [Routing] added a suggestion to add the HttpFoundation component. [travis] Add some comments changed operator from and to && Fixed the Bootstrap form theme for inlined checkbox/radio Conflicts: src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php
2 parents c8678f4 + fc93958 commit 85cad75

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ cache:
3131
services: mongodb
3232

3333
before_install:
34+
# Matrix lines for intermediate PHP versions are skipped for pull requests
3435
- if [[ ! $deps && ! $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} && $TRAVIS_PHP_VERSION != hhvm && $TRAVIS_PULL_REQUEST != false ]]; then deps=skip; fi;
36+
# A sigchild-enabled-PHP is used to test the Process component on the lowest PHP matrix line
3537
- 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;
3638
- 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;
3739
- echo memory_limit = -1 >> $INI_FILE
@@ -51,9 +53,12 @@ before_install:
5153

5254
install:
5355
- if [[ $deps != skip ]]; then COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi;
56+
# Create local composer packages for each patched components and reference them in composer.json files when cross-testing components
5457
- if [[ $deps != skip && $deps ]]; then php .travis.php $TRAVIS_COMMIT_RANGE $TRAVIS_BRANCH $COMPONENTS; fi;
58+
# For the master branch when deps=high, the version before master is checked out and tested with the locally patched components
5559
- 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;
5660
- 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;
61+
# Legacy tests are skipped when deps=high and when the current branch version has not the same major version number than the next one
5762
- 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;
5863
- export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev;
5964
- if [[ ! $deps ]]; then composer update --prefer-dist; else export SYMFONY_DEPRECATIONS_HELPER=weak; fi;

src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
{%- endblock choice_widget_expanded %}
116116

117117
{% block checkbox_widget -%}
118-
{% set parent_label_class = parent_label_class|default('') -%}
118+
{%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%}
119119
{% if 'checkbox-inline' in parent_label_class %}
120120
{{- form_label(form, null, { widget: parent() }) -}}
121121
{% else -%}
@@ -126,7 +126,7 @@
126126
{%- endblock checkbox_widget %}
127127

128128
{% block radio_widget -%}
129-
{%- set parent_label_class = parent_label_class|default('') -%}
129+
{%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%}
130130
{% if 'radio-inline' in parent_label_class %}
131131
{{- form_label(form, null, { widget: parent() }) -}}
132132
{% else -%}

src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
)) ?>
88
<?php if ($multiple): ?> multiple="multiple"<?php endif ?>
99
>
10-
<?php if (null !== $placeholder): ?><option value=""<?php if ($required and empty($value) && '0' !== $value): ?> selected="selected"<?php endif?>><?php echo '' != $placeholder ? $view->escape(false !== $translation_domain ? $view['translator']->trans($placeholder, array(), $translation_domain) : $placeholder) : '' ?></option><?php endif; ?>
10+
<?php if (null !== $placeholder): ?><option value=""<?php if ($required && empty($value) && '0' !== $value): ?> selected="selected"<?php endif?>><?php echo '' != $placeholder ? $view->escape(false !== $translation_domain ? $view['translator']->trans($placeholder, array(), $translation_domain) : $placeholder) : '' ?></option><?php endif; ?>
1111
<?php if (count($preferred_choices) > 0): ?>
1212
<?php echo $view['form']->block($form, 'choice_widget_options', array('choices' => $preferred_choices)) ?>
1313
<?php if (count($choices) > 0 && null !== $separator): ?>

src/Symfony/Component/Routing/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"symfony/config": "<2.7"
3232
},
3333
"suggest": {
34+
"symfony/http-foundation": "For using a Symfony Request object",
3435
"symfony/config": "For using the all-in-one router or any loader",
3536
"symfony/yaml": "For using the YAML loader",
3637
"symfony/expression-language": "For using expression matching",

0 commit comments

Comments
 (0)
0