Skip to content

Commit 1c248e5

Browse files
Merge branch '4.1'
* 4.1: fix merge [travis][appveyor] use symfony/flex to accelerate builds Add missing stderr redirection clean up unused code Remove the HTML5 validation from the profiler URL search form [Filesystem] Add test to prevent regression when using array|resource with dumpFile Add help texts for checkboxes in horizontal bootstrap 4 forms [Security] Call AccessListener after LogoutListener
2 parents 662548f + ff93f1a commit 1c248e5

File tree

14 files changed

+139
-47
lines changed

14 files changed

+139
-47
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,15 @@ install:
188188
SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*')
189189
fi
190190
191+
- |
192+
# Install symfony/flex
193+
if [[ $deps = low ]]; then
194+
export SYMFONY_REQUIRE='>=2.3'
195+
else
196+
export SYMFONY_REQUIRE=">=$SYMFONY_VERSION"
197+
fi
198+
composer global require symfony/flex dev-master
199+
191200
- |
192201
# Legacy tests are skipped when deps=high and when the current branch version has not the same major version number than the next one
193202
[[ $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) ]] && LEGACY=,legacy

appveyor.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ init:
1010
- SET PATH=c:\php;%PATH%
1111
- SET COMPOSER_NO_INTERACTION=1
1212
- SET SYMFONY_DEPRECATIONS_HELPER=strict
13+
- SET "SYMFONY_REQUIRE=>=4.2"
1314
- SET ANSICON=121x90 (121x90)
1415
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f
1516

@@ -40,9 +41,10 @@ install:
4041
- echo extension=php_curl.dll >> php.ini-max
4142
- copy /Y php.ini-max php.ini
4243
- cd c:\projects\symfony
43-
- IF NOT EXIST composer.phar (appveyor DownloadFile https://getcomposer.org/download/1.3.0/composer.phar)
44+
- IF NOT EXIST composer.phar (appveyor DownloadFile https://github.com/composer/composer/releases/download/1.7.1/composer.phar)
4445
- php composer.phar self-update
4546
- copy /Y .composer\* %APPDATA%\Composer\
47+
- php composer.phar global require --no-progress symfony/flex dev-master
4648
- php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit
4749
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)
4850
- php composer.phar update --no-progress --no-suggest --ansi

src/Symfony/Bridge/PhpUnit/Tests/CoverageListenerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function test()
1212
$this->markTestSkipped('This test cannot be run on Windows.');
1313
}
1414

15-
exec('type phpdbg', $output, $returnCode);
15+
exec('type phpdbg 2> /dev/null', $output, $returnCode);
1616

1717
if (\PHP_VERSION_ID >= 70000 && 0 === $returnCode) {
1818
$php = 'phpdbg -qrr';

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ col-sm-10
8181
<div class="{{ block('form_label_class') }}"></div>{#--#}
8282
<div class="{{ block('form_group_class') }}">
8383
{{- form_widget(form) -}}
84+
{{- form_help(form) -}}
8485
{{- form_errors(form) -}}
8586
</div>{#--#}
8687
</div>

src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap4HorizontalLayoutTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,4 +214,24 @@ public function testCheckboxRow()
214214

215215
$this->assertMatchesXpath($html, '/div[@class="form-group row"]/div[@class="col-sm-2" or @class="col-sm-10"]', 2);
216216
}
217+
218+
public function testCheckboxRowWithHelp()
219+
{
220+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType');
221+
$view = $form->createView();
222+
$html = $this->renderRow($view, array('label' => 'foo', 'help' => 'really helpful text'));
223+
224+
$this->assertMatchesXpath($html,
225+
'/div
226+
[@class="form-group row"]
227+
[
228+
./div[@class="col-sm-2" or @class="col-sm-10"]
229+
/following-sibling::div[@class="col-sm-2" or @class="col-sm-10"]
230+
[
231+
./small[text() = "[trans]really helpful text[/trans]"]
232+
]
233+
]
234+
'
235+
);
236+
}
217237
}

src/Symfony/Bundle/SecurityBundle/Tests/Functional/LogoutTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,14 @@ public function testCsrfTokensAreClearedOnLogout()
4949

5050
$this->assertFalse(static::$container->get('security.csrf.token_storage')->hasToken('foo'));
5151
}
52+
53+
public function testAccessControlDoesNotApplyOnLogout()
54+
{
55+
$client = $this->createClient(array('test_case' => 'LogoutAccess', 'root_config' => 'config.yml'));
56+
57+
$client->request('POST', '/login', array('_username' => 'johannes', '_password' => 'test'));
58+
$client->request('GET', '/logout');
59+
60+
$this->assertRedirect($client->getResponse(), '/');
61+
}
5262
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
13+
use Symfony\Bundle\SecurityBundle\SecurityBundle;
14+
15+
return array(
16+
new FrameworkBundle(),
17+
new SecurityBundle(),
18+
);
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
imports:
2+
- { resource: ./../config/framework.yml }
3+
4+
security:
5+
encoders:
6+
Symfony\Component\Security\Core\User\User: plaintext
7+
8+
providers:
9+
in_memory:
10+
memory:
11+
users:
12+
johannes: { password: test, roles: [ROLE_USER] }
13+
14+
firewalls:
15+
default:
16+
form_login:
17+
check_path: login
18+
remember_me: true
19+
require_previous_session: false
20+
logout: ~
21+
anonymous: ~
22+
stateless: true
23+
24+
access_control:
25+
- { path: ^/login$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
26+
- { path: .*, roles: IS_AUTHENTICATED_FULLY }
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
login:
2+
path: /login
3+
4+
logout:
5+
path: /logout

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/search.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<div class="form-group">
2424
<label for="url">URL</label>
25-
<input type="url" name="url" id="url" value="{{ url }}">
25+
<input type="text" name="url" id="url" value="{{ url }}">
2626
</div>
2727

2828
<div class="form-group">

0 commit comments

Comments
 (0)