Skip to content

Commit 15915fd

Browse files
Merge branch '3.4' into 4.0
* 3.4: (22 commits) fix merge [Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files Fixed exit code with non-integer throwable code [HttpFoundation] Support 0 bit netmask in IPv6 () [DI] Impossible to set an environment variable and then an array as container parameter [Process] remove false-positive BC breaking exception on Windows Tweaking class not found autowiring error [LDAP] added missing dots at the end of some exception messages. [TwigBridge] Add missing dev requirement for workflow fixed symfony#25440 empty lines don't count for indent detection Set `width: auto` on WebProfiler toolbar's reset. [Lock] Fix incorrect phpdoc [Process] Dont rely on putenv(), it fails on ZTS PHP [HttpKernel] detect deprecations thrown by container initialization during tests [HttpKernel] Fix logging of post-terminate errors/exceptions [DI] Add context to service-not-found exceptions thrown by service locators [Debug] Fix catching fatal errors in case of nested error handlers [VarDumper] Fixed file links leave blank pages when ide is configured Fix hidden currency element with Bootstrap 3 theme ...
2 parents 1277219 + 6aa18bf commit 15915fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+531
-126
lines changed

UPGRADE-4.0.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,40 @@
11
UPGRADE FROM 3.x to 4.0
22
=======================
33

4+
Symfony Framework
5+
-----------------
6+
7+
The first step to upgrade a Symfony 3.x application to 4.x is to update the
8+
file and directory structure of your application:
9+
10+
| Symfony 3.x | Symfony 4.x
11+
| ----------------------------------- | --------------------------------
12+
| `app/config/` | `config/`
13+
| `app/config/*.yml` | `config/*.yaml` and `config/packages/*.yaml`
14+
| `app/config/parameters.yml.dist` | `config/services.yaml` and `.env.dist`
15+
| `app/config/parameters.yml` | `config/services.yaml` and `.env`
16+
| `app/Resources/<BundleName>/views/` | `templates/bundles/<BundleName>/`
17+
| `app/Resources/` | `src/Resources/`
18+
| `app/Resources/assets/` | `assets/`
19+
| `app/Resources/translations/` | `translations/`
20+
| `app/Resources/views/` | `templates/`
21+
| `src/AppBundle/` | `src/`
22+
| `var/logs/` | `var/log/`
23+
| `web/` | `public/`
24+
| `web/app.php` | `public/index.php`
25+
| `web/app_dev.php` | `public/index.php`
26+
27+
Then, upgrade the contents of your console script and your front controller:
28+
29+
* `bin/console`: https://github.com/symfony/recipes/blob/master/symfony/console/3.3/bin/console
30+
* `public/index.php`: https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/3.3/public/index.php
31+
32+
Lastly, read the following article to add Symfony Flex to your application and
33+
upgrade the configuration files: https://symfony.com/doc/current/setup/flex.html
34+
35+
If you use Symfony components instead of the whole framework, you can find below
36+
the upgrading instructions for each individual bundle and component.
37+
438
ClassLoader
539
-----------
640

src/Symfony/Bridge/Monolog/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"suggest": {
3333
"symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel.",
3434
"symfony/console": "For the possibility to show log messages in console commands depending on verbosity settings. You need version ~2.3 of the console for it.",
35-
"symfony/event-dispatcher": "Needed when using log messages in console commands."
35+
"symfony/event-dispatcher": "Needed when using log messages in console commands.",
36+
"symfony/var-dumper": "For using the debugging handlers like the console handler or the log server handler."
3637
},
3738
"autoload": {
3839
"psr-4": { "Symfony\\Bridge\\Monolog\\": "" },

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

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,21 @@
88
{%- endblock textarea_widget %}
99

1010
{% block money_widget -%}
11-
<div class="input-group{{ group_class|default('') }}">
12-
{%- set append = money_pattern starts with '{{' -%}
13-
{%- if not append -%}
14-
<span class="input-group-addon">{{ money_pattern|replace({ '{{ widget }}':''}) }}</span>
15-
{%- endif -%}
11+
{% set prepend = not (money_pattern starts with '{{') %}
12+
{% set append = not (money_pattern ends with '}}') %}
13+
{% if prepend or append %}
14+
<div class="input-group{{ group_class|default('') }}">
15+
{% if prepend %}
16+
<span class="input-group-addon">{{ money_pattern|replace({ '{{ widget }}':''}) }}</span>
17+
{% endif %}
18+
{{- block('form_widget_simple') -}}
19+
{% if append %}
20+
<span class="input-group-addon">{{ money_pattern|replace({ '{{ widget }}':''}) }}</span>
21+
{% endif %}
22+
</div>
23+
{% else %}
1624
{{- block('form_widget_simple') -}}
17-
{%- if append -%}
18-
<span class="input-group-addon">{{ money_pattern|replace({ '{{ widget }}':''}) }}</span>
19-
{%- endif -%}
20-
</div>
25+
{% endif %}
2126
{%- endblock money_widget %}
2227

2328
{% block percent_widget -%}

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ class WorkflowExtensionTest extends TestCase
2525

2626
protected function setUp()
2727
{
28-
if (!class_exists(Workflow::class)) {
29-
$this->markTestSkipped('The Workflow component is needed to run tests for this extension.');
30-
}
31-
3228
$places = array('ordered', 'waiting_for_payment', 'processed');
3329
$transitions = array(
3430
new Transition('t1', 'ordered', 'waiting_for_payment'),

src/Symfony/Bridge/Twig/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"twig/twig": "^1.35|^2.4.4"
2121
},
2222
"require-dev": {
23-
"fig/link-util": "^1.0",
2423
"symfony/asset": "~3.4|~4.0",
2524
"symfony/dependency-injection": "~3.4|~4.0",
2625
"symfony/finder": "~3.4|~4.0",
@@ -38,7 +37,8 @@
3837
"symfony/console": "~3.4|~4.0",
3938
"symfony/var-dumper": "~3.4|~4.0",
4039
"symfony/expression-language": "~3.4|~4.0",
41-
"symfony/web-link": "~3.4|~4.0"
40+
"symfony/web-link": "~3.4|~4.0",
41+
"symfony/workflow": "~3.4|~4.0"
4242
},
4343
"conflict": {
4444
"symfony/form": "<3.4",

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
box-sizing: content-box;
4242
vertical-align: baseline;
4343
letter-spacing: normal;
44+
width: auto;
4445
}
4546

4647
.sf-toolbarreset {

src/Symfony/Bundle/WebServerBundle/Command/ServerLogCommand.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bundle\WebServerBundle\Command;
1313

14+
use Monolog\Formatter\FormatterInterface;
1415
use Symfony\Bridge\Monolog\Formatter\ConsoleFormatter;
1516
use Symfony\Bridge\Monolog\Handler\ConsoleHandler;
1617
use Symfony\Component\Console\Command\Command;
@@ -37,6 +38,11 @@ public function isEnabled()
3738
return false;
3839
}
3940

41+
// based on a symfony/symfony package, it crashes due a missing FormatterInterface from monolog/monolog
42+
if (!class_exists(FormatterInterface::class)) {
43+
return false;
44+
}
45+
4046
return parent::isEnabled();
4147
}
4248

src/Symfony/Bundle/WebServerBundle/composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
"/Tests/"
3030
]
3131
},
32+
"suggest": {
33+
"symfony/monolog-bridge": "For using the log server.",
34+
"symfony/expression-language": "For using the filter option of the log server."
35+
},
3236
"minimum-stability": "dev",
3337
"extra": {
3438
"branch-alias": {

src/Symfony/Component/BrowserKit/Client.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ protected function doRequestInProcess($request)
346346
{
347347
$deprecationsFile = tempnam(sys_get_temp_dir(), 'deprec');
348348
putenv('SYMFONY_DEPRECATIONS_SERIALIZE='.$deprecationsFile);
349+
$_ENV['SYMFONY_DEPRECATIONS_SERIALIZE'] = $deprecationsFile;
349350
$process = new PhpProcess($this->getScript($request), null, null);
350351
$process->run();
351352

src/Symfony/Component/Console/Event/ConsoleErrorEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ public function setExitCode(int $exitCode): void
5353

5454
public function getExitCode(): int
5555
{
56-
return null !== $this->exitCode ? $this->exitCode : ($this->error->getCode() ?: 1);
56+
return null !== $this->exitCode ? $this->exitCode : (is_int($this->error->getCode()) ? $this->error->getCode() : 1);
5757
}
5858
}

0 commit comments

Comments
 (0)