Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 80cd480

Browse filesBrowse files
Merge branch '4.3' into 4.4
* 4.3: [Debug] fix ClassNotFoundFatalErrorHandler [Routing] Fix using a custom matcher & generator dumper class [Dotenv] Fixed infinite loop with missing quote followed by quoted value [HttpClient] Added missing sprintf [TwigBridge] button_widget now has its title attr translated even if its label = null or false [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script [Messenger] Added check if json_encode succeeded [Security] Prevent canceled remember-me cookie from being accepted [FrameworkBundle][TranslationUpdateCommand] Do not output positive feedback on stderr [Security\Guard] Fix missing typehints
2 parents 9589dee + 9b11c36 commit 80cd480
Copy full SHA for 80cd480

18 files changed

+61-37Lines changed: 61 additions & 37 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎UPGRADE-4.2.md‎

Copy file name to clipboardExpand all lines: UPGRADE-4.2.md
+11-11Lines changed: 11 additions & 11 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,15 @@ HttpKernel
192192

193193
* The `Kernel::getRootDir()` and the `kernel.root_dir` parameter have been deprecated
194194
* The `KernelInterface::getName()` and the `kernel.name` parameter have been deprecated
195-
* Deprecated the first and second constructor argument of `ConfigDataCollector`
196-
* Deprecated `ConfigDataCollector::getApplicationName()`
195+
* Deprecated the first and second constructor argument of `ConfigDataCollector`
196+
* Deprecated `ConfigDataCollector::getApplicationName()`
197197
* Deprecated `ConfigDataCollector::getApplicationVersion()`
198198

199199
Messenger
200200
---------
201201

202202
* The `MiddlewareInterface::handle()` and `SenderInterface::send()` methods must now return an `Envelope` instance.
203-
* The return value of handlers isn't forwarded anymore by middleware and buses.
203+
* The return value of handlers isn't forwarded anymore by middleware and buses.
204204
If you used to return a value, e.g in query bus handlers, you can either:
205205
- get the result from the `HandledStamp` in the envelope returned by the bus.
206206
- use the `HandleTrait` to leverage a message bus, expecting a single, synchronous message handling and returning its result.
@@ -214,23 +214,23 @@ Messenger
214214
$query->setResult($yourResult);
215215
```
216216
* The `EnvelopeAwareInterface` was removed and the `MiddlewareInterface::handle()` method now requires an `Envelope` object
217-
as first argument. When using built-in middleware with the provided `MessageBus`, you will not have to do anything.
218-
If you use your own `MessageBusInterface` implementation, you must wrap the message in an `Envelope` before passing it to middleware.
217+
as first argument. When using built-in middleware with the provided `MessageBus`, you will not have to do anything.
218+
If you use your own `MessageBusInterface` implementation, you must wrap the message in an `Envelope` before passing it to middleware.
219219
If you created your own middleware, you must change the signature to always expect an `Envelope`.
220220
* The `MiddlewareInterface::handle()` second argument (`callable $next`) has changed in favor of a `StackInterface` instance.
221-
When using built-in middleware with the provided `MessageBus`, you will not have to do anything.
222-
If you use your own `MessageBusInterface` implementation, you can use the `StackMiddleware` implementation.
221+
When using built-in middleware with the provided `MessageBus`, you will not have to do anything.
222+
If you use your own `MessageBusInterface` implementation, you can use the `StackMiddleware` implementation.
223223
If you created your own middleware, you must change the signature to always expect an `StackInterface` instance
224224
and call `$stack->next()->handle($envelope, $stack)` instead of `$next` to call the next middleware:
225-
225+
226226
Before:
227227
```php
228228
public function handle($message, callable $next): Envelope
229229
{
230230
// do something before
231231
$message = $next($message);
232232
// do something after
233-
233+
234234
return $message;
235235
}
236236
```
@@ -242,7 +242,7 @@ Messenger
242242
// do something before
243243
$envelope = $stack->next()->handle($envelope, $stack);
244244
// do something after
245-
245+
246246
return $envelope;
247247
}
248248
```
@@ -251,7 +251,7 @@ Messenger
251251
respectively `ReceivedStamp`, `ValidationStamp`, `SerializerStamp` and moved to the `Stamp` namespace.
252252
* `AllowNoHandlerMiddleware` has been removed in favor of a new constructor argument on `HandleMessageMiddleware`
253253
* The `ConsumeMessagesCommand` class now takes an instance of `Psr\Container\ContainerInterface`
254-
as first constructor argument, i.e a message bus locator. The CLI command now expects a mandatory
254+
as first constructor argument, i.e a message bus locator. The CLI command now expects a mandatory
255255
`--bus` option value if there is more than one bus in the locator.
256256
* `MessageSubscriberInterface::getHandledMessages()` return value has changed. The value of an array item
257257
needs to be an associative array or the method name.
Collapse file

‎UPGRADE-5.0.md‎

Copy file name to clipboardExpand all lines: UPGRADE-5.0.md
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ FrameworkBundle
243243
* Removed `routing.loader.service`.
244244
* Added support for PHPUnit 8. A `void` return-type was added to the `KernelTestCase::tearDown()` and `WebTestCase::tearDown()` method.
245245
* Removed the `lock.store.flock`, `lock.store.semaphore`, `lock.store.memcached.abstract` and `lock.store.redis.abstract` services.
246+
* Removed the `router.cache_class_prefix` parameter.
246247

247248
HttpClient
248249
----------
Collapse file

‎src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
|| ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar`) : `which composer.phar 2> /dev/null`))
107107
|| ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer`) : `which composer 2> /dev/null`))
108108
|| file_exists($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? `git rev-parse --show-toplevel 2> NUL` : `git rev-parse --show-toplevel 2> /dev/null`).DIRECTORY_SEPARATOR.'composer.phar')
109-
? $PHP.' '.escapeshellarg($COMPOSER)
109+
? (file_get_contents($COMPOSER, null, 0, 18) === '#!/usr/bin/env php' ? $PHP : '').' '.escapeshellarg($COMPOSER) // detect shell wrappers by looking at the shebang
110110
: 'composer';
111111

112112
$SYMFONY_PHPUNIT_REMOVE = $getEnvVar('SYMFONY_PHPUNIT_REMOVE', 'phpspec/prophecy'.($PHPUNIT_VERSION < 6.0 ? ' symfony/yaml': ''));
Collapse file

‎src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig‎

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,11 @@
228228
'%name%': name,
229229
'%id%': id,
230230
}) %}
231-
{%- elseif label is same as(false) -%}
232-
{% set translation_domain = false %}
233-
{%- else -%}
231+
{%- elseif label is not same as(false) -%}
234232
{% set label = name|humanize %}
235233
{%- endif -%}
236234
{%- endif -%}
237-
<button type="{{ type|default('button') }}" {{ block('button_attributes') }}>{{ translation_domain is same as(false) ? label : label|trans(label_translation_parameters, translation_domain) }}</button>
235+
<button type="{{ type|default('button') }}" {{ block('button_attributes') }}>{{ translation_domain is same as(false) or label is same as(false) ? label : label|trans(label_translation_parameters, translation_domain) }}</button>
238236
{%- endblock button_widget -%}
239237

240238
{%- block submit_widget -%}
Collapse file

‎src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
213213
}
214214
}
215215

216-
$errorIo->title('Translation Messages Extractor and Dumper');
217-
$errorIo->comment(sprintf('Generating "<info>%s</info>" translation files for "<info>%s</info>"', $input->getArgument('locale'), $currentName));
216+
$io->title('Translation Messages Extractor and Dumper');
217+
$io->comment(sprintf('Generating "<info>%s</info>" translation files for "<info>%s</info>"', $input->getArgument('locale'), $currentName));
218218

219219
// load any messages from templates
220220
$extractedCatalogue = new MessageCatalogue($input->getArgument('locale'));
221-
$errorIo->comment('Parsing templates...');
221+
$io->comment('Parsing templates...');
222222
$this->extractor->setPrefix($input->getOption('prefix'));
223223
foreach ($viewsPaths as $path) {
224224
if (is_dir($path) || is_file($path)) {
@@ -228,7 +228,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
228228

229229
// load any existing messages from the translation files
230230
$currentCatalogue = new MessageCatalogue($input->getArgument('locale'));
231-
$errorIo->comment('Loading translation files...');
231+
$io->comment('Loading translation files...');
232232
foreach ($transPaths as $path) {
233233
if (is_dir($path)) {
234234
$this->reader->read($path, $currentCatalogue);
@@ -296,7 +296,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
296296
}
297297

298298
if ('xlf' === $input->getOption('output-format')) {
299-
$errorIo->comment(sprintf('Xliff output version is <info>%s</info>', $input->getOption('xliff-version')));
299+
$io->comment(sprintf('Xliff output version is <info>%s</info>', $input->getOption('xliff-version')));
300300
}
301301

302302
$resultMessage = sprintf('%d message%s successfully extracted', $extractedMessagesCount, $extractedMessagesCount > 1 ? 's were' : ' was');
@@ -308,7 +308,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
308308

309309
// save the files
310310
if (true === $input->getOption('force')) {
311-
$errorIo->comment('Writing files...');
311+
$io->comment('Writing files...');
312312

313313
$bundleTransPath = false;
314314
foreach ($transPaths as $path) {
@@ -328,7 +328,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
328328
}
329329
}
330330

331-
$errorIo->success($resultMessage.'.');
331+
$io->success($resultMessage.'.');
332332

333333
return 0;
334334
}
Collapse file

‎src/Symfony/Bundle/SecurityBundle/Tests/Functional/ClearRememberMeTest.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Functional/ClearRememberMeTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testUserChangeClearsCookie()
3333
$this->assertNotNull($cookieJar->get('REMEMBERME'));
3434

3535
$client->request('GET', '/foo');
36-
$this->assertSame(200, $client->getResponse()->getStatusCode());
36+
$this->assertRedirect($client->getResponse(), '/login');
3737
$this->assertNull($cookieJar->get('REMEMBERME'));
3838
}
3939
}
Collapse file

‎src/Symfony/Bundle/SecurityBundle/composer.json‎

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"symfony/security-core": "^4.4",
2525
"symfony/security-csrf": "^4.2|^5.0",
2626
"symfony/security-guard": "^4.2|^5.0",
27-
"symfony/security-http": "^4.4.1"
27+
"symfony/security-http": "^4.4.3"
2828
},
2929
"require-dev": {
3030
"doctrine/doctrine-bundle": "^1.5|^2.0",
Collapse file

‎src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ public static function setUpBeforeClass(): void
3232
// get class loaders wrapped by DebugClassLoader
3333
if ($function[0] instanceof DebugClassLoader) {
3434
$function = $function[0]->getClassLoader();
35+
36+
if (!\is_array($function)) {
37+
continue;
38+
}
3539
}
3640

3741
if ($function[0] instanceof ComposerClassLoader) {
Collapse file

‎src/Symfony/Component/Dotenv/Dotenv.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Dotenv/Dotenv.php
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,10 @@ private function lexValue(): string
277277
$this->cursor += 1 + $len;
278278
} elseif ('"' === $this->data[$this->cursor]) {
279279
$value = '';
280-
++$this->cursor;
280+
281+
if (++$this->cursor === $this->end) {
282+
throw $this->createFormatException('Missing quote to end the value');
283+
}
281284

282285
while ('"' !== $this->data[$this->cursor] || ('\\' === $this->data[$this->cursor - 1] && '\\' !== $this->data[$this->cursor - 2])) {
283286
$value .= $this->data[$this->cursor];
Collapse file

‎src/Symfony/Component/Dotenv/Tests/DotenvTest.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Dotenv/Tests/DotenvTest.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public function getEnvDataWithFormatErrors()
4040
['FOO', "Missing = in the environment variable declaration in \".env\" at line 1.\n...FOO...\n ^ line 1 offset 3"],
4141
['FOO="foo', "Missing quote to end the value in \".env\" at line 1.\n...FOO=\"foo...\n ^ line 1 offset 8"],
4242
['FOO=\'foo', "Missing quote to end the value in \".env\" at line 1.\n...FOO='foo...\n ^ line 1 offset 8"],
43+
["FOO=\"foo\nBAR=\"bar\"", "Missing quote to end the value in \".env\" at line 1.\n...FOO=\"foo\\nBAR=\"bar\"...\n ^ line 1 offset 18"],
4344
['FOO=\'foo'."\n", "Missing quote to end the value in \".env\" at line 1.\n...FOO='foo\\n...\n ^ line 1 offset 9"],
4445
['export FOO', "Unable to unset an environment variable in \".env\" at line 1.\n...export FOO...\n ^ line 1 offset 10"],
4546
['FOO=${FOO', "Unclosed braces on variable expansion in \".env\" at line 1.\n...FOO=\${FOO...\n ^ line 1 offset 9"],

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.