Commit Graph

39128 Commits

Author SHA1 Message Date
Alexander M. Turek
0bc15ff759 [PhpUnitBridge] Lint files with PHP 5.5 2020-12-14 16:00:48 +01:00
Nicolas Grekas
c052542e65 minor #39451 [Serializer] Fix EncoderInterface::encode() return type (jeroennoten)
This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer] Fix EncoderInterface::encode() return type

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | N.A.
| License       | MIT
| Doc PR        | N.A.

I might have missed something (in that case, please let me know), but I believe that `EncoderInterface::encode()` will and should always return a `string`. This makes more sense because `DecoderInterface::decode()` only accepts a string as input.

Commits
-------

ae6f054cc1 Fix EncoderInterface::encode() return type
2020-12-14 11:44:27 +01:00
Jeroen Noten
ae6f054cc1 Fix EncoderInterface::encode() return type 2020-12-14 11:44:14 +01:00
Nicolas Grekas
43ab20e4f2 bug #39476 [Lock] Prevent store exception break combined store (dzubchik)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Lock] Prevent store exception break combined store

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? |no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #39470 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

Handle exception to preserve expected behavior - one or multiple stores could be unreachable in a moment and combined store will handle this according to strategy.

Commits
-------

0daff35bae [Lock] Prevent store exception break combined store
2020-12-14 11:21:44 +01:00
Dmytro Dzubenko
0daff35bae [Lock] Prevent store exception break combined store 2020-12-14 11:21:37 +01:00
Jérémy Derussé
d651fb539c
Fix tests 2020-12-13 23:21:11 +01:00
Vincent Langlet
337174fa4b
Use more explicit variable name 2020-12-11 17:32:02 +01:00
Nicolas Grekas
8f6c52a19a minor #39467 Fix wrong comment about SES region (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix wrong comment about SES region

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

This list is wrong (or maybe no more exact). And maintain such list does not make sens in code.

https://docs.aws.amazon.com/general/latest/gr/ses.html

Commits
-------

759774750e Fix wrong comment about SES region
2020-12-11 16:21:07 +01:00
Nicolas Grekas
8d6794f6b6 minor #39459 Remove void return type from test methods (OskarStark)
This PR was merged into the 4.4 branch.

Discussion
----------

Remove void return type from test methods

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | ---
| License       | MIT
| Doc PR        | ---

cc @nicolas-grekas

Commits
-------

94f823fd4a Remove void return type from test methods
2020-12-11 16:19:13 +01:00
Jérémy Derussé
759774750e
Fix wrong comment about SES region 2020-12-11 15:43:01 +01:00
Maxime Steinhausser
278688deeb minor #39465 [Mailer] [Sendgrid] Use $scheme variable to stay consistent (OskarStark)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] [Sendgrid] Use $scheme variable to stay consistent

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | ---
| License       | MIT
| Doc PR        | ---

Its used like this in all other mailer bridges

Commits
-------

1a40d7c75a [Mailer] [Sendgrid] Use $scheme variable to stay consistent
2020-12-11 15:13:33 +01:00
Maxime Steinhausser
7f49e15f40 minor #39464 [Mailer] [Amazon] Fix @param annotation (OskarStark)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] [Amazon] Fix @param annotation

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | ---
| License       | MIT
| Doc PR        | ---

Commits
-------

514881c708 [Mailer] [Amazon] Fix @param annotation
2020-12-11 15:11:17 +01:00
Oskar Stark
1a40d7c75a [Mailer] [Sendgrid] Use $scheme variable to stay consistent 2020-12-11 14:18:32 +01:00
Oskar Stark
514881c708 [Mailer] [Amazon] Fix @param annotation 2020-12-11 14:09:19 +01:00
Oskar Stark
9ebfa6034a [Mailer] Rename testsuites
to stay consistent with other bridges
2020-12-11 13:58:29 +01:00
Oskar Stark
94f823fd4a Remove void return type from test methods 2020-12-11 13:39:31 +01:00
Robin Chalas
4ad158e519 minor #39437 Fix licence (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix licence

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Backport of #39435 for 4.4 (the file has been renamed and the git history trapped me)

Commits
-------

6d7893cdaa Fix licence
2020-12-10 19:19:49 +01:00
Jérémy Derussé
6d7893cdaa
Fix licence 2020-12-10 19:10:51 +01:00
Nicolas Grekas
0bc3deeebd [Cache] remove no-op 2020-12-10 18:56:42 +01:00
Nicolas Grekas
9186d149df bug #39433 [Cache] fix setting "read_timeout" when using Redis (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] fix setting "read_timeout" when using Redis

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Being inspired by #39431

Commits
-------

7acca31e66 [Cache] fix setting "read_timeout" when using Redis
2020-12-10 18:39:37 +01:00
Nicolas Grekas
7acca31e66 [Cache] fix setting "read_timeout" when using Redis 2020-12-10 17:45:19 +01:00
Jérémy Derussé
a46cff26c6
Fix CS in changelogs 2020-12-10 17:34:26 +01:00
Bastien Jaillot
a91ac74906 [Cache] Prevent notice on case matching metadata trick
On saving an array of one element with a int key of strlen 10
it matches the first conditions of the trick used to save metadata.

> Notice: Trying to access array offset on value of type int

Casting it to string fixes it.
2020-12-10 08:50:50 +01:00
Fabien Potencier
2dd4561d3f bug #39203 [DI] Fix not working if only "default_index_method" used (malteschlueter)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] Fix not working if only "default_index_method" used

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35349
| License       | MIT

The default index method wasn't used if the "index_by" attribute is missing. The documentation is showing an example, see https://symfony.com/doc/current/service_container/tags.html#tagged-services-with-index.

This problem also appears in symfony 5.

I created two example projects, the first in the current behaviour and the second with my bugfix branch.

Current 4.4: https://github.com/malteschlueter/symfony-reproducers/blob/bugfix/dependency-injection-default-index-method-not-working--not-fixed/tests/HandlerCollectionTest.php

This bugfix branch: https://github.com/malteschlueter/symfony-reproducers/blob/bugfix/dependency-injection-default-index-method-not-working--with-fix/tests/HandlerCollectionTest.php

Commits
-------

eb25d5c275 [DI] The default index method wasn't used if the "index_by" attribute is missing
2020-12-10 08:05:48 +01:00
Nicolas Grekas
52a0233905 [PhpUnitBridge] CS fix 2020-12-09 19:44:45 +01:00
Thomas Calvet
fe7abcd1e9 [PhpUnitBridge] Fix PHP 5.5 compatibility 2020-12-09 17:54:32 +01:00
Nicolas Grekas
32a56a6389 Add missing param annotation abouts $fileLinkFormat 2020-12-09 12:15:38 +01:00
Nicolas Grekas
55d2723c84 bug #39142 [Config] Stop treating multiline resources as globs (michaelKaefer)
This PR was merged into the 4.4 branch.

Discussion
----------

[Config] Stop treating multiline resources as globs

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #23412
| License       | MIT

Would fix the linked issue.

In https://github.com/symfony/symfony/issues/22938 it was suggested to enhance the glob-detection logic by detecting newlines.

Cons:
- it only solves an edge case
- it is not possible to use a multiline glob (like `bar\nbaz*.txt`) as a resource anymore - maybe in another edge case this is needed

Commits
-------

1e3baad386 23412 Stop treating multiline resources as globs
2020-12-09 09:58:17 +01:00
Alexander M. Turek
558ce1b4d3 bug #39341 [Form] Fixed StringUtil::trim() to trim ZERO WIDTH SPACE (U+200B) and SOFT HYPHEN (U+00AD) (pmishev)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] Fixed StringUtil::trim() to trim ZERO WIDTH SPACE (U+200B) and SOFT HYPHEN (U+00AD)

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #39230 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too.)
 - Features and deprecations must be submitted against branch 5.x.
-->

Commits
-------

258bea7fd5 [Form] Fixed StringUtil::trim() to trim ZERO WIDTH SPACE (U+200B) and SOFT HYPHEN (U+00AD)
2020-12-08 18:57:51 +01:00
Nicolas Grekas
236400c03a [PhpUnitBridge] Fix CS for PHP 5.5 2020-12-08 18:05:36 +01:00
Nicolas Grekas
ff22d30cb0 Apply "visibility_required" CS rule to constants
php-cs-fixer fix --rules='{"visibility_required": ["property", "method", "const"]}'
2020-12-08 17:59:59 +01:00
Malte Schlüter
eb25d5c275 [DI] The default index method wasn't used if the "index_by" attribute is missing 2020-12-08 17:11:59 +01:00
Nicolas Grekas
a7fcb0b84e minor cs fix 2020-12-08 15:13:31 +01:00
Alexander M. Turek
8f331f2df2 bug #39334 [Config][TwigBundle] Fixed syntax error in config (Nyholm)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Config][TwigBundle] Fixed syntax error in config

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Sorry for such small PR. I found this when I was parsing the yaml after running `bin/console config:dump-reference TwigBundle`

#SymfonyHackday

Commits
-------

04d369d336 [Config][TwigBundle] Fixed syntax error in config
2020-12-08 15:10:36 +01:00
Nyholm
04d369d336 [Config][TwigBundle] Fixed syntax error in config 2020-12-08 15:10:25 +01:00
Nicolas Grekas
891e2afb64 bug #39196 [DI] Fix Xdebug 3.0 detection (vertexvaar)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[DI] Fix Xdebug 3.0 detection

| Q             | A
| ------------- | ---
| Branch?       | 4.4 (for bug fixes)
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39195
| License       | MIT
| Doc PR        | n/a

Xdebug 3.0 removed the function `xdebug_is_enabled()`. To detect if Xdebug 3.0 is installed (it doesn't even need to be enabled to reproduce the bug) i added `function_exists('xdebug_info')`. AFAIS `xdebug_info()` is available in Xdebug >= 3.0 only.

Commits
-------

38f8edddb1 [DI] Fix Xdebug 3.0 detection
2020-12-08 15:03:26 +01:00
Oliver Eglseder
38f8edddb1 [DI] Fix Xdebug 3.0 detection 2020-12-08 15:03:00 +01:00
Nicolas Grekas
cba70a6547 bug #39226 [PhpUnitBridge] Fix disabling DeprecationErrorHandler from PHPUnit configuration file (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Fix disabling DeprecationErrorHandler from PHPUnit configuration file

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/38239
| License       | MIT
| Doc PR        | -

The linked issue description is right, the bridge's bootstrap is hit before the env variables from the phpunit.xml file are read and set. So the easiest solution is to read it ourselves in the root script (like we already do for some of them).

Commits
-------

41158b8878 [PhpUnitBridge] Fix disabling DeprecationErrorHandler from phpunit configuration file
2020-12-08 12:21:32 +01:00
Nicolas Grekas
1ea5a8c3ce minor #39246 [HttpFoundation] Throws cleanup (kick-the-bucket)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Throws cleanup

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

The actual throw statements have been removed years ago, but the annotations stayed.
Such annotations fool static analysis tools to trigger false positives for unhandled exceptions.

Commits
-------

8b9b62048c Remove unused @throws tags and handling of never thrown exceptions
2020-12-08 12:12:36 +01:00
Nicolas Grekas
bd44eb69a2 [Cache] fix checking for redis_sentinel support 2020-12-08 11:44:58 +01:00
Jakub Zalas
f3eda44058
[Intl] Update the ICU data to 68.1 2020-12-08 08:18:40 +00:00
Fabien Potencier
a630685da1 bug #39357 [FrameworkBundle] fix preserving some special chars in the query string (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] fix preserving some special chars in the query string

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39307
| License       | MIT
| Doc PR        | -

Commits
-------

6ecae5719c [FrameworkBundle] fix preserving some special chars in the query string when redirecting
2020-12-08 08:04:52 +01:00
Alexander M. Turek
306914a96d bug #39271 [HttpFoundation] Fix TypeError: Argument 1 passed to JsonResponse::setJson() must be of the type string, object given (sidz)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Fix TypeError: Argument 1 passed to JsonResponse::setJson() must be of the type string, object given

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

This PR fixes the type error when user set `null` as data in the `new JsonResponse(null, 200, [], true)` and true in the fourth argument to mark that value is json.
```
TypeError: Argument 1 passed to Symfony\Component\HttpFoundation\JsonResponse::setJson() must be of the type string, object given, called in /home/projects/symfony/src/Symfony/Component/HttpFoundation/JsonResponse.php on line 52
```

Commits
-------

7fcba9611d [HttpFoundation] Fix TypeError: Argument 1 passed to JsonResponse::setJson() must be of the type string, object given
2020-12-07 23:02:04 +01:00
Oleg Zhulnev
7fcba9611d [HttpFoundation] Fix TypeError: Argument 1 passed to JsonResponse::setJson() must be of the type string, object given 2020-12-07 23:01:57 +01:00
Nicolas Grekas
6ecae5719c [FrameworkBundle] fix preserving some special chars in the query string when redirecting 2020-12-07 13:08:17 +01:00
Alexander M. Turek
03a072e07c minor #39345 [Security][Validator] Add missing Portuguese translations (NicolasJourdan)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Security][Validator] Add missing Portuguese translations

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #38774
| License       | MIT
| Doc PR        |

Commits
-------

ad4f6f2093 [Security][Validator] Add missing Portuguese translations
2020-12-07 10:01:52 +01:00
Nicolas Jourdan
ad4f6f2093 [Security][Validator] Add missing Portuguese translations 2020-12-07 10:01:46 +01:00
Alexander M. Turek
4404e6a3e9 minor #39332 Add Croatian (hr) translations (jseparovic1)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Add Croatian (hr) translations

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  |no
| Deprecations? | no
| Tickets       | Fix #38734
| License       | MIT

#SymfonyHackday

Commits
-------

f2dbbd2e58 Add Croatian (hr) translations
2020-12-07 10:00:22 +01:00
Jurica Šeparović
f2dbbd2e58 Add Croatian (hr) translations 2020-12-07 10:00:14 +01:00
pmishev
258bea7fd5 [Form] Fixed StringUtil::trim() to trim ZERO WIDTH SPACE (U+200B) and SOFT HYPHEN (U+00AD) 2020-12-05 20:51:30 +00:00
Fabien Potencier
bda2dcdf93 bug #39251 [DependencyInjection] Fix container linter for union types (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Fix container linter for union types

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39233
| License       | MIT
| Doc PR        | N/A

Commits
-------

e26893b122 [DependencyInjection] Fix container linter for union types.
2020-12-05 18:12:03 +01:00
Alexander M. Turek
cf07627956 minor #39214 [Messenger] Test generated SQL (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Test generated SQL

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

Follow-up to #39166.

This is an attempt to the SQL generated by the `Symfony\Component\Messenger\Transport\Doctrine\Connection::get()` method. The challange was to create a locking SELECT statement, taking into account the different ways to create a lock in different SQL dialects.

This test verifies if the correct lock statements are generated for MySQL and SQL Server.

Commits
-------

1f1b62afb6 [Messenger] Test generated SQL
2020-12-05 18:10:39 +01:00
Fabien Potencier
fd3c60b315 Fix CS 2020-12-05 18:09:55 +01:00
Alexander M. Turek
1f1b62afb6 [Messenger] Test generated SQL 2020-12-05 18:08:48 +01:00
Nyholm
9104fd4539
[Config] YamlReferenceDumper: No default value required for VariableNode with array example 2020-12-05 17:41:45 +01:00
Fabien Potencier
21ef411cc9 bug #39333 [Form] do not apply the Valid constraint on scalar form data (lchrusciel, xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] do not apply the Valid constraint on scalar form data

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #38039
| License       | MIT
| Doc PR        |

#SymfonyHackday

Commits
-------

453bb3ebde do not apply the Valid constraint on scalar form data
41b9457887 [Test] Reproduce issue with cascading validation
2020-12-05 17:02:18 +01:00
Fabien Potencier
935495868a bug #39331 [PhpUnitBridge] Fixed PHPunit 9.5 compatibility (wouterj)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Fixed PHPunit 9.5 compatibility

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39329
| License       | MIT
| Doc PR        | -

Let's see if this works 🍀

#SymfonyHackday

Commits
-------

5134de52f1 Added compatibility with PHPunit 9.5
2020-12-05 16:57:56 +01:00
Fabien Potencier
d0d0ee3c4f minor #39217 [Messenger] StopWorkersCommand improve doc helper (94noni)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Messenger] StopWorkersCommand improve doc helper

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix
| License       | MIT

Small improvement :)

Commits
-------

e136068743 [Messenger] StopWorkersCommand improve doc helper
2020-12-05 16:51:46 +01:00
Antoine Makdessi
e136068743 [Messenger] StopWorkersCommand improve doc helper 2020-12-05 16:51:39 +01:00
Wouter de Jong
5134de52f1 Added compatibility with PHPunit 9.5 2020-12-05 16:15:30 +01:00
Christian Flothmann
453bb3ebde do not apply the Valid constraint on scalar form data 2020-12-05 16:10:06 +01:00
Łukasz Chruściel
41b9457887 [Test] Reproduce issue with cascading validation 2020-12-05 16:10:06 +01:00
Fabien Potencier
4ce800f840 minor #39324 [SecurityBundle] Don't use the container as resource type in fixtures (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[SecurityBundle] Don't use the container as resource type in fixtures

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

Discovered while working on #39292: Some fixtures of SecurityBundle call config loaders and pass the whole container as resource type. This does not really make sense.

Commits
-------

e7e38b7213 [SecurityBundle] Don't use the container as resource type in fixtures.
2020-12-05 13:50:50 +01:00
Fabien Potencier
cdb1883843 bug #39220 [HttpKernel] Fix bug with whitespace in Kernel::stripComments() (ausi)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] Fix bug with whitespace in Kernel::stripComments()

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

`Kernel::stripComments()` removes significant whitespace in some cases.

I noticed this in one of the generated classes, the code `<?php include_once \dirname(__DIR__).'/file.php';` got replaced with `<?php include_once\dirname(__DIR__).'/file.php';` which is a syntax error.

Commits
-------

8d368e1fe3 Fix bug with whitespace in Kernel::stripComments()
2020-12-05 13:50:17 +01:00
Alexander M. Turek
e7e38b7213 [SecurityBundle] Don't use the container as resource type in fixtures. 2020-12-05 13:07:14 +01:00
Alexander M. Turek
cf94f2a591 [HttpFoundation] Make test pass without Xdebug. 2020-12-05 09:52:36 +01:00
Fabien Potencier
4a2946b46d bug #39252 [Mime] Leverage PHP 8's detection of CSV files (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mime] Leverage PHP 8's detection of CSV files

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #39237
| License       | MIT
| Doc PR        | N/A

Commits
-------

41a965cdc4 [Mime] Leverage PHP 8's detection of CSV files.
2020-12-05 09:45:34 +01:00
Alexander M. Turek
41a965cdc4 [Mime] Leverage PHP 8's detection of CSV files. 2020-12-05 09:25:17 +01:00
Fabien Potencier
66d3f22cdf minor #39295 [HttpFoundation] Make sure we reuse the current PHP binary for the webserver process in functional tests. (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Make sure we reuse the current PHP binary for the webserver process in functional tests.

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

While debugging HttpFoundation's functional tests with different PHP binaries, I noticed that the webserver process that is started there would always use the `php` binary from my `$PATH` instead of the binary I'm running PHPUnit with.

This PR attempts to fix this by using the `PHP_BINARY` constant.

Commits
-------

9208c69b21 [HttpFoundation] Make sure we reuse the current PHP binary for the webserver process in functional tests.
2020-12-05 09:21:21 +01:00
Alexander M. Turek
9208c69b21 [HttpFoundation] Make sure we reuse the current PHP binary for the webserver process in functional tests. 2020-12-05 09:17:15 +01:00
Fabien Potencier
eb6a79203b bug #39313 [FrameworkBundle] TextDescriptor::formatControllerLink checked method… (fjogeleit)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] TextDescriptor::formatControllerLink checked method…

…_exists method before it ensures that $controller is not null

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Today I tried PHP8 with Symfony 5.2. - by checking my routes with
```
bin/console debug:router
```

It throws
```
 method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given
```

The reason is the configured auth route for the login API defined in routes.yaml:
```
authorization::login:
  path: '/login'
```
This route has no controller configured and the value of $controller in `TextDescriptor::formatControllerLink` in the FrameworkBundle is `null`. This method has a elseif condition with `method_exists` without a check if $controller is a string or object.
In PHP8 this throws an exception/error and did not work. This PR checks that `$controller` is not null before the method_exists check to prevent this failure.

I'm not sure how to test this in the existing Testsuite

Commits
-------

67bd779ef4 [FrameworkBundle] TextDescriptor::formatControllerLink checked method…
2020-12-05 09:14:47 +01:00
Frank Jogeleit
67bd779ef4 [FrameworkBundle] TextDescriptor::formatControllerLink checked method… 2020-12-05 09:14:40 +01:00
Fabien Potencier
1e15aa69f4 minor #39293 [HttpFoundation] Ignore stack trace printed by Xdebug 3 (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Ignore stack trace printed by Xdebug 3

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

If we're running HttpFoundation's functional tests with Xdebug 3, a stack trace will be printed when a warning is emitted. This confuses our `cookie_max_age` test currently where we perform a `setcookie()` call that will emit a warning.

I have patched the corresponding fixture so the printed stack trace is ignored.

A failed test can be seen here: https://travis-ci.com/github/symfony/symfony/jobs/452077515#L11078

Commits
-------

b67baa4e7f [HttpFoundation] Ignore stack trace printed by Xdebug 3.
2020-12-05 07:41:35 +01:00
Fabien Potencier
fb2ea6f632 Fix CS 2020-12-05 07:27:59 +01:00
Fabien Potencier
1177baa770 bug #39286 [HttpClient] throw clearer error when no scheme is provided (BackEndTea)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[HttpClient] throw clearer error when no scheme is provided

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39285
| License       | MIT
| Doc PR        | N/A

This could be considred a BC break, as previously this would've  a `TransportExcepiton`, instead of an `InvalidArgumentException`. But i see no reason to catch this specific error, as it would generally be a configuration error.

Commits
-------

4d821d6c34 [HttpClient] throw clearer error when no scheme is provided
2020-12-05 07:03:15 +01:00
Gert de Pagter
4d821d6c34 [HttpClient] throw clearer error when no scheme is provided 2020-12-05 07:03:08 +01:00
Alexander M. Turek
b67baa4e7f [HttpFoundation] Ignore stack trace printed by Xdebug 3. 2020-12-04 13:53:59 +01:00
Christian Flothmann
626d61ee7d bug #39267 [Yaml] fix lexing backslashes in single quoted strings (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] fix lexing backslashes in single quoted strings

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39265
| License       | MIT
| Doc PR        |

Commits
-------

668732305a fix lexing backslashes in single quoted strings
2020-12-04 09:57:25 +01:00
Alexander M. Turek
fbd67c8f85 bug #39151 [DependencyInjection] Fixed incorrect report for private services if required service does not exist (Islam93)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Fixed incorrect report for private services if required service does not exist

…does not exist

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #29359
| License       | MIT
| Doc PR        | no

looks like `CheckExceptionOnInvalidReferenceBehaviorPass` can be moved to `beforeRemovingPasses` section without any consequences. this solves the problem and all tests still pass

Commits
-------

39bd05c5bc [DependencyInjection] Fixed incorrect report for private services if required service does not exist
2020-12-03 02:30:31 +01:00
Islam Israfilov (Islam93)
39bd05c5bc [DependencyInjection] Fixed incorrect report for private services if required service does not exist 2020-12-03 02:30:23 +01:00
kick-the-bucket
8b9b62048c Remove unused @throws tags and handling of never thrown exceptions 2020-12-02 16:16:03 +01:00
Alexander M. Turek
7882c4a0b1 bug #39274 [Yaml] fix lexing mapping values with trailing whitespaces (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] fix lexing mapping values with trailing whitespaces

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix https://github.com/symfony/symfony/issues/39265#issuecomment-736552123
| License       | MIT
| Doc PR        |

Commits
-------

5e455f321a fix lexing mapping values with trailing whitespaces
2020-12-01 21:08:57 +01:00
Alexander M. Turek
782ee5d1d3 bug #39270 [Inflector] Fix Notice when argument is empty string (moldman)
This PR was merged into the 4.4 branch.

Discussion
----------

[Inflector] Fix Notice when argument is empty string

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License       | MIT

Fixing issue when we call `Inflector` with empty string:

```
\Symfony\Component\Inflector\Inflector::singularize('');
```
```
Notice: Uninitialized string offset: 0 in src/Symfony/Component/Inflector/Inflector.php on line 363
PHP Notice:  Uninitialized string offset: 0 in src/Symfony/Component/Inflector/Inflector.php on line 363
...
Notice: Uninitialized string offset: 0 in src/Symfony/Component/Inflector/Inflector.php on line 363
PHP Notice:  Uninitialized string offset: 0 in src/Symfony/Component/Inflector/Inflector.php on line 363
```

Fix for 5.1 https://github.com/symfony/symfony/pull/39244

Commits
-------

2dfe342452 [Inflector] Fix Notice when argument is empty string
2020-12-01 18:03:27 +01:00
Christian Flothmann
5e455f321a fix lexing mapping values with trailing whitespaces 2020-12-01 17:24:09 +01:00
moldman
2dfe342452 [Inflector] Fix Notice when argument is empty string 2020-12-01 17:29:30 +02:00
Christian Flothmann
668732305a fix lexing backslashes in single quoted strings 2020-12-01 15:29:09 +01:00
Alexander M. Turek
e26893b122 [DependencyInjection] Fix container linter for union types. 2020-11-30 22:45:46 +01:00
Bernard van der Esch
668431fc09 remove return type definition in order to avoid type juggling 2020-11-30 18:07:19 +01:00
Robin Chalas
da65c57fb4 bug #39223 [Console] Re-enable hyperlinks in Konsole/Yakuake (OndraM)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Re-enable hyperlinks in Konsole/Yakuake

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #31809 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

Hyperlinks feature was broken in KDE's Konsole/Yakuake (#31809) and thus disabled by #31849.

But the feature has been recently [implemented](https://invent.kde.org/utilities/konsole/-/merge_requests/138), and is about to be released in KDE 20.12 on December 10th 2020, see [release notes](https://community.kde.org/Releases/20.12_Release_Notes#Konsole).

![obrazek](https://user-images.githubusercontent.com/793041/100556284-92dccf00-32a1-11eb-9907-f65c2eaa1335.png)

Tested in RC version and seems to be working fine. The feature is disabled by default (as per security concerns), but even when disabled, it just gracefully don't show the links.

Commits
-------

728edf36bf [Console] Enable hyperlinks in Konsole/Yakuake
2020-11-30 17:35:14 +01:00
Alexander M. Turek
f9e93342df bug #39241 [Yaml] fix lexing inline sequences/mappings with trailing whitespaces (Nyholm, xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] fix lexing inline sequences/mappings with trailing whitespaces

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39229
| License       | MIT
| Doc PR        |

Commits
-------

66bc898f61 fix lexing inline sequences/mappings with trailing whitespaces
b562a54e53 Added test for issue 39229
2020-11-30 17:34:03 +01:00
gechetspr
520a10c221 Added additional file existence check on temporary file cleanup for dumpFile method 2020-11-30 15:04:35 +02:00
Christian Flothmann
66bc898f61 fix lexing inline sequences/mappings with trailing whitespaces 2020-11-30 13:49:14 +01:00
Nyholm
b562a54e53
Added test for issue 39229 2020-11-30 13:01:48 +01:00
Thomas Calvet
41158b8878 [PhpUnitBridge] Fix disabling DeprecationErrorHandler from phpunit configuration file 2020-11-30 09:16:37 +01:00
Ondřej Machulda
728edf36bf
[Console] Enable hyperlinks in Konsole/Yakuake 2020-11-30 00:58:52 +01:00
Martin Auswöger
8d368e1fe3 Fix bug with whitespace in Kernel::stripComments() 2020-11-29 22:29:34 +01:00
Fabien Potencier
aa5ec20a0c Bump Symfony version to 4.4.18 2020-11-29 10:27:10 +01:00
Fabien Potencier
09df32693a Update VERSION for 4.4.17 2020-11-29 10:23:08 +01:00
bill moll
37be094992 [Messenger] Fix mssql compatibility for doctrine transport.
Add logic for locking row for update when the doctrine dbal connection is sqlsrv. This is a quick and dirty solution, but it prevents the need to rewrite the logic due to doctrine dbal limitations.

See issue https://github.com/symfony/symfony/issues/39117
2020-11-28 23:57:36 +01:00
Nicolas Grekas
faa1fd32f9 [HttpClient] fix binding to network interfaces 2020-11-28 14:23:02 +01:00