Skip to content

Commit 40280f2

Browse files
committed
Merge branch '3.2'
* 3.2: [WebProfilerBundle] Fix AJAX panel with fetch requests Don’t compile when Opcache is not enabled on CLI DateIntervalType: 'invert' should not inherit the 'required' option [Form] DateIntervalType: Do not try to translate choices [TwigBridge] fix constructor args check Allow simple-phpunit to be used with an HTTP proxy Minor fixes for 3.2 Fix a web profiler form issue with fields added to the form after the form was built do not trigger deprecations for valid YAML Write an exception message in a one heading line [Workflow] Added missing docblock [Finder] Refine phpdoc about argument for NumberComparator Fixed max width from ajax request url element (td) Fix unresolved parameters from default bundle configs in debug:config [github] Tweak PR template [Serializer] Optimize max depth checking
2 parents 5126639 + 1943c26 commit 40280f2

File tree

26 files changed

+121
-64
lines changed

26 files changed

+121
-64
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
| Q | A
22
| ------------- | ---
3-
| Branch? | "master" for new features / 2.7, 2.8 or 3.1 for fixes
3+
| Branch? | master / 2.7, 2.8, 3.1 or 3.2 <!--see comment below-->
44
| Bug fix? | yes/no
55
| New feature? | yes/no
66
| BC breaks? | yes/no
77
| Deprecations? | yes/no
88
| Tests pass? | yes/no
9-
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
9+
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
1010
| License | MIT
11-
| Doc PR | reference to the documentation PR, if any
11+
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
12+
13+
<!--
14+
- Bug fixes must be submitted against the lowest branch where they apply
15+
(lowest branches are regularly merged to upper ones so they get the fixes too).
16+
- Features and deprecations must be submitted against the master branch.
17+
- Please fill in this template according to the PR you're about to submit.
18+
- Replace this comment by a description of what your PR is solving.
19+
-->

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
3737
if (file_exists("phpunit-$PHPUNIT_VERSION")) {
3838
passthru(sprintf('\\' === DIRECTORY_SEPARATOR ? '(del /S /F /Q %s & rmdir %1$s) >nul': 'rm -rf %s', "phpunit-$PHPUNIT_VERSION"));
3939
}
40-
if (extension_loaded('openssl') && ini_get('allow_url_fopen')) {
40+
if (extension_loaded('openssl') && ini_get('allow_url_fopen') && !isset($_SERVER['http_proxy']) && !isset($_SERVER['https_proxy'])) {
4141
stream_copy_to_stream(fopen("https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip", 'rb'), fopen("$PHPUNIT_VERSION.zip", 'wb'));
4242
} else {
4343
@unlink("$PHPUNIT_VERSION.zip");

src/Symfony/Bridge/Twig/Extension/FormExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class FormExtension extends \Twig_Extension implements \Twig_Extension_InitRunti
3131

3232
public function __construct($renderer = null)
3333
{
34-
if ($this->renderer instanceof TwigRendererInterface) {
34+
if ($renderer instanceof TwigRendererInterface) {
3535
@trigger_error(sprintf('Passing a Twig Form Renderer to the "%s" constructor is deprecated since version 3.2 and won\'t be possible in 4.0. Pass the Twig_Environment to the TwigRendererEngine constructor instead.', static::class), E_USER_DEPRECATED);
3636
} elseif (null !== $renderer && !(is_array($renderer) && isset($renderer[0], $renderer[1]) && $renderer[0] instanceof ContainerInterface)) {
3737
throw new \InvalidArgumentException(sprintf('Passing any arguments the constructor of %s is reserved for internal use.', __CLASS__));

src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
105105

106106
$io->title(sprintf('Current configuration for "%s.%s"', $extensionAlias, $path));
107107

108-
$io->writeln(Yaml::dump($config, 10));
108+
$io->writeln(Yaml::dump($container->getParameterBag()->resolveValue($config), 10));
109109
}
110110

111111
private function compileContainer()

src/Symfony/Bundle/FrameworkBundle/Command/WorkflowDumpCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use Symfony\Component\Workflow\Dumper\GraphvizDumper;
1818
use Symfony\Component\Workflow\Dumper\StateMachineGraphvizDumper;
1919
use Symfony\Component\Workflow\Marking;
20-
use Symfony\Component\Workflow\Workflow;
2120

2221
/**
2322
* @author Grégoire Pineau <[email protected]>

src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ protected function json($data, $status = 200, $headers = array(), $context = arr
137137
protected function file($file, $fileName = null, $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT)
138138
{
139139
$response = new BinaryFileResponse($file);
140-
$response->setContentDisposition($disposition, $fileName === null ? $response->getFile()->getFileName() : $fileName);
140+
$response->setContentDisposition($disposition, $fileName === null ? $response->getFile()->getFilename() : $fileName);
141141

142142
return $response;
143143
}

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
use Symfony\Component\Cache\Adapter\ProxyAdapter;
2121
use Symfony\Component\Cache\Adapter\RedisAdapter;
2222
use Symfony\Component\DependencyInjection\ContainerBuilder;
23-
use Symfony\Component\DependencyInjection\Definition;
2423
use Symfony\Component\DependencyInjection\DefinitionDecorator;
2524
use Symfony\Component\DependencyInjection\Loader\ClosureLoader;
2625
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;

src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.html.twig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
<div class="text-exception">
1010
<div class="open-quote">“</div>
1111

12-
<h1>
13-
{{ exception.message|nl2br|format_file_from_text }}
14-
</h1>
12+
<h1>{{ exception.message|nl2br|format_file_from_text }}</h1>
1513

1614
<div>
1715
<strong>{{ status_code }}</strong> {{ status_text }} - {{ exception.class|abbr_class }}

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@
457457
{% import _self as tree %}
458458
<div class="tree-details{% if not show|default(false) %} hidden{% endif %}" {% if data.id is defined %}id="{{ data.id }}-details"{% endif %}>
459459
<h2 class="dump-inline">
460-
{{ name|default('(no name)') }} ({{ profiler_dump(data.type_class) }})
460+
{{ name|default('(no name)') }} {% if data.type_class is defined %}({{ profiler_dump(data.type_class) }}){% endif %}
461461
</h2>
462462

463463
{% if data.errors is defined and data.errors|length > 0 %}

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

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,28 @@
234234
var oldFetch = window.fetch;
235235
window.fetch = function () {
236236
var promise = oldFetch.apply(this, arguments);
237-
if (!arguments[0].match(new RegExp({{ excluded_ajax_paths|json_encode|raw }}))) {
237+
var url = arguments[0];
238+
var params = arguments[1];
239+
var paramType = Object.prototype.toString.call(arguments[0]);
240+
if (paramType === '[object Request]') {
241+
url = arguments[0].url;
242+
params = {
243+
method: arguments[0].method,
244+
credentials: arguments[0].credentials,
245+
headers: arguments[0].headers,
246+
mode: arguments[0].mode,
247+
redirect: arguments[0].redirect
248+
};
249+
}
250+
if (!url.match(new RegExp({{ excluded_ajax_paths|json_encode|raw }}))) {
238251
var method = 'GET';
239-
if (arguments[1] && arguments[1].method !== undefined) {
240-
method = arguments[1].method;
252+
if (params && params.method !== undefined) {
253+
method = params.method;
241254
}
242255
243256
var stackElement = {
244257
error: false,
245-
url: arguments[0],
258+
url: url,
246259
method: method,
247260
type: 'fetch',
248261
start: new Date()

0 commit comments

Comments
 (0)