Commit Graph

31714 Commits

Author SHA1 Message Date
Oskar Stark
32014199d0 [Notifier] Add PHP 8 support for bridges 2020-12-11 10:00:54 +01:00
Nicolas Grekas
613ac0c0e9 Merge branch '5.1' into 5.2
* 5.1:
  [PropertyInfo][Serializer] Fixed extracting ignored properties
  [travis] fix checking if the current branch has same major as the next release
2020-12-10 23:56:34 +01:00
javer
594ce465ce [PropertyInfo][Serializer] Fixed extracting ignored properties 2020-12-10 23:52:33 +01:00
Jérémy Derussé
25a8a0a81b
Fix CS in Changelogs in 5.2 2020-12-10 21:03:43 +01:00
Alexander M. Turek
e4f757d948 Merge branch '5.1' into 5.2
* 5.1:
  Fix licence
  Fix CS in link binary
  [Cache] remove no-op
  Fix CS in Changelogs
  [Notifier][Sinch] Add tests
  [Notifier] [Nexmo] Add tests
  [Notifier][OvhCloud] Add tests
  [Notifier] [Free Mobile] Rename method to match other bridges
  [Cache] fix setting "read_timeout" when using Redis
  Fix CS in changelogs
  [Notifier] Streamline README files
2020-12-10 20:16:15 +01:00
Alexander M. Turek
59d32c1e72 minor #39383 [Notifier] Streamline README files (OskarStark)
This PR was merged into the 5.1 branch.

Discussion
----------

[Notifier] Streamline README files

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

This should be considered a bug fix as it does not touches any PHP file.

I will continue the work for `5.2` branch after the merge

Commits
-------

dfddc899ce [Notifier] Streamline README files
2020-12-10 19:54:36 +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
eb1a490261 minor #39435 Fix CS in Changelogs in 5.1 (jderusse)
This PR was merged into the 5.1 branch.

Discussion
----------

Fix CS in Changelogs in 5.1

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

Commits
-------

4557e4d55d Fix CS in Changelogs
2020-12-10 18:59:56 +01:00
Nicolas Grekas
4e7d0c16cd Merge branch '4.4' into 5.1
* 4.4:
  [Cache] remove no-op
2020-12-10 18:56:50 +01:00
Nicolas Grekas
0bc3deeebd [Cache] remove no-op 2020-12-10 18:56:42 +01:00
Jérémy Derussé
4557e4d55d
Fix CS in Changelogs 2020-12-10 18:56:13 +01:00
Oskar Stark
46d5fb1f30 [Notifier][Sinch] Add tests 2020-12-10 18:52:05 +01:00
Nicolas Grekas
185ba9cc9a minor #39404 [Notifier] [Nexmo] Add tests (OskarStark)
This PR was squashed before being merged into the 5.1 branch.

Discussion
----------

[Notifier] [Nexmo] Add tests

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

Commits
-------

8e566ef84d [Notifier] [Nexmo] Add tests
2020-12-10 18:50:52 +01:00
Oskar Stark
8e566ef84d [Notifier] [Nexmo] Add tests 2020-12-10 18:50:45 +01:00
Oskar Stark
0c3fe30513 [Notifier][OvhCloud] Add tests 2020-12-10 18:49:11 +01:00
Nicolas Grekas
ec23ebeec9 minor #39426 [Notifier] [Free Mobile] Rename method to match other bridges (OskarStark)
This PR was squashed before being merged into the 5.1 branch.

Discussion
----------

[Notifier] [Free Mobile] Rename method to match other bridges

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

All other bridges use `create*` instead of `init*`

Commits
-------

f53ae7c40a [Notifier] [Free Mobile] Rename method to match other bridges
2020-12-10 18:45:24 +01:00
Oskar Stark
f53ae7c40a [Notifier] [Free Mobile] Rename method to match other bridges 2020-12-10 18:45:17 +01:00
Nicolas Grekas
bec247dbc7 Merge branch '4.4' into 5.1
* 4.4:
  [Cache] fix setting "read_timeout" when using Redis
  Fix CS in changelogs
2020-12-10 18:44:54 +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
Alexander M. Turek
4f08a8a0dd Merge branch '5.1' into 5.2
* 5.1:
  [Notifier] [Twilio] Fix tests
  [Cache] Prevent notice on case matching metadata trick
  [Notifier][Slack] Remove :void from test methods
  [Notifier] Remove @internal annotation from notifier transports
  [Notifier][Twilio] Add tests
  [Notifier][Free Mobile] Tests
  [DI] The default index method wasn't used if the "index_by" attribute is missing
2020-12-10 15:02:11 +01:00
Maxime Steinhausser
243b370c72 minor #39427 [Serializer][Validator] Mention annotation loaders handle PHP8 attributes (ogizanagi)
This PR was merged into the 5.2 branch.

Discussion
----------

[Serializer][Validator] Mention annotation loaders handle PHP8 attributes

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

Just a small note for the ones reading docblocks first and expecting to find a PhpAttributeLoader or whatever: the annotation loaders handle both doctrine annotations & PHP 8 attributes.
The route loader already mentions this.

Commits
-------

3cbe758df3 [Serializer][Validator] Mention annotation loaders handle PHP8 attributes
2020-12-10 14:55:54 +01:00
Alexander M. Turek
651bd12d75 Merge branch '4.4' into 5.1
* 4.4:
  [Cache] Prevent notice on case matching metadata trick
  [DI] The default index method wasn't used if the "index_by" attribute is missing
2020-12-10 14:41:20 +01:00
Nicolas Grekas
359bcc5686 bug #39228 [HttpClient] Fix content swallowed by AsyncClient initializer (jderusse)
This PR was merged into the 5.2 branch.

Discussion
----------

[HttpClient] Fix content swallowed by AsyncClient initializer

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

I'm not sure if it should be fixed in RetryableHttpClient or AsycClient.
The issue is: when the Strategy needs the body to take a decision BUT decide to NOT retry the request, the content is "lost"

In fact, when the first chunk is yield, the AsyncResponse's initializer is stopped, and nothing consume the remaining chunks. Moreover, because the `passthru` were disabled before yielding the first chunk in RetryableHttpClient, the callback is never called again to yield the remaining content.

Commits
-------

d324271691 Fix content swallowed by AsyncClient initializer
2020-12-10 14:39:20 +01:00
Jérémy Derussé
d324271691 Fix content swallowed by AsyncClient initializer 2020-12-10 14:39:06 +01:00
Maxime Steinhausser
3cbe758df3 [Serializer][Validator] Mention annotation loaders handle PHP8 attributes 2020-12-10 14:01:49 +01:00
Oskar Stark
f7f5f869cf [Notifier] [Twilio] Fix tests 2020-12-10 13:14:12 +01:00
Oskar Stark
dfddc899ce [Notifier] Streamline README files 2020-12-10 08:54:19 +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
Oskar Stark
483ea426eb [Notifier][Slack] Remove :void from test methods 2020-12-10 08:36:59 +01:00
Fabien Potencier
0fa187d0c6 Fix CS 2020-12-10 08:10:12 +01:00
Oskar Stark
21c47680f9 [Notifier][Discord] Make webhookId argument required 2020-12-10 08:09:23 +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
Fabien Potencier
25dc5ee6c4 bug #39409 [Notifier] [Twilio] Add tests (OskarStark)
This PR was merged into the 5.1 branch.

Discussion
----------

[Notifier] [Twilio] Add tests

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

Commits
-------

568523bf7a [Notifier][Twilio] Add tests
2020-12-10 07:51:26 +01:00
Fabien Potencier
e8e01d56d2 minor #39403 [Notifier] [Free Mobile] Add test (OskarStark)
This PR was merged into the 5.1 branch.

Discussion
----------

[Notifier] [Free Mobile] Add test

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

Commits
-------

f7d5c48313 [Notifier][Free Mobile] Tests
2020-12-10 07:48:27 +01:00
Alexander M. Turek
65225b9a1b minor #39414 [Notifier] Remove @internal annotation from notifier transports (OskarStark)
This PR was merged into the 5.2 branch.

Discussion
----------

[Notifier] Remove @internal annotation from notifier transports

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

Same like https://github.com/symfony/symfony/pull/39380 but for `5.2`

Commits
-------

3d8c55e75c [Notifier] Remove @internal annotation from notifier transports
2020-12-09 21:31:50 +01:00
Alexander M. Turek
8a003527c7 minor #39380 [Notifier] Remove @internal annotation from notifier transports (OskarStark)
This PR was merged into the 5.1 branch.

Discussion
----------

[Notifier] Remove @internal annotation from notifier transports

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

All other transports does not have the `@internal` annotation, so I think we can safely remove it.

I consider this a bugfix, as this does not break BC.

cc @fabpot

Commits
-------

d75f50d3a7 [Notifier] Remove @internal annotation from notifier transports
2020-12-09 21:30:32 +01:00
Nicolas Grekas
20cd8c62ce Merge branch '5.1' into 5.2
* 5.1:
  [PhpUnitBridge] CS fix
  [Notifier] Only use sprintf instead of sprintf and string concat
  [PhpUnitBridge] Fix PHP 5.5 compatibility
  Add missing param annotation abouts $fileLinkFormat
  [Form] Fixed StringUtil::trim() to trim ZERO WIDTH SPACE (U+200B) and SOFT HYPHEN (U+00AD)
  23412 Stop treating multiline resources as globs
2020-12-09 19:54:12 +01:00
Nicolas Grekas
58f3302e42 Merge branch '4.4' into 5.1
* 4.4:
  [PhpUnitBridge] CS fix
  [PhpUnitBridge] Fix PHP 5.5 compatibility
  Add missing param annotation abouts $fileLinkFormat
  [Form] Fixed StringUtil::trim() to trim ZERO WIDTH SPACE (U+200B) and SOFT HYPHEN (U+00AD)
  23412 Stop treating multiline resources as globs
2020-12-09 19:49:55 +01:00
Nicolas Grekas
35bb7bd20a minor #39411 [Notifier] Remove trailing argument in tests (OskarStark)
This PR was merged into the 5.2 branch.

Discussion
----------

[Notifier] Remove trailing argument in tests

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

Commits
-------

d3fb308bd1 [Notifier] Remove trailing argument in tests
2020-12-09 19:31:30 +01:00
Oskar Stark
ca65c54018 [Notifier] Only use sprintf instead of sprintf and string concat 2020-12-09 19:30:29 +01:00
Oskar Stark
d75f50d3a7 [Notifier] Remove @internal annotation from notifier transports 2020-12-09 15:30:49 +01:00
Oskar Stark
3d8c55e75c [Notifier] Remove @internal annotation from notifier transports 2020-12-09 15:29:32 +01:00
Oskar Stark
d3fb308bd1 [Notifier] Remove trailing argument in tests 2020-12-09 15:05:59 +01:00
Oskar Stark
568523bf7a [Notifier][Twilio] Add tests 2020-12-09 14:38:16 +01:00
Maxime Steinhausser
bdcd745232 [Serializer] Make fabbot happy with 5.2 tests CS 2020-12-09 14:07:31 +01:00
Oskar Stark
f7d5c48313 [Notifier][Free Mobile] Tests 2020-12-09 13:53:43 +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
555697df61 Merge branch '5.1' into 5.2
* 5.1:
  Update .php_cs.dist
  Apply "visibility_required" CS rule to constants
2020-12-08 18:03:37 +01:00
Nicolas Grekas
a8b992f8a2 Merge branch '4.4' into 5.1
* 4.4:
  Update .php_cs.dist
  Apply "visibility_required" CS rule to constants
2020-12-08 18:02:38 +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
Nicolas Grekas
f37f56c1bb Merge branch '5.1' into 5.2
* 5.1:
  minor cs fix
  [Config][TwigBundle] Fixed syntax error in config
  [DI] Fix Xdebug 3.0 detection
  Use php8 stable
  [Notifier] Streamline changelogs of notifier bridges
  [Cache] fix checking for redis_sentinel support
  [Messenger] Fixed wording in php doc
  [Intl] Update the ICU data to 68.1
  [FrameworkBundle] acces public-deprecated services via the private container to remove false-positive deprecations
  Remove unused @throws tags and handling of never thrown exceptions
  [PhpUnitBridge] Fix disabling DeprecationErrorHandler from phpunit configuration file
2020-12-08 17:43:38 +01:00
Nicolas Grekas
a2f073472f Merge branch '4.4' into 5.1
* 4.4:
  minor cs fix
  [Config][TwigBundle] Fixed syntax error in config
  [DI] Fix Xdebug 3.0 detection
  Use php8 stable
  [Cache] fix checking for redis_sentinel support
  [Intl] Update the ICU data to 68.1
  Remove unused @throws tags and handling of never thrown exceptions
  [PhpUnitBridge] Fix disabling DeprecationErrorHandler from phpunit configuration file
2020-12-08 17:43:25 +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
Oskar Stark
95bcab29d1 [Notifier] Streamline changelogs of notifier bridges 2020-12-08 14:24:03 +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
5f08c617cd bug #39298 [Cache] Fixed incorrect usage of UNLINK with PHPRedis with Redis < 4.0 (wickex)
This PR was merged into the 5.2 branch.

Discussion
----------

[Cache] Fixed incorrect usage of UNLINK with PHPRedis with Redis < 4.0

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

Currently, deleting cache keys is broken for users using PhpRedis with Redis-server < 4.0.0. The current implementation expects PhpRedis to throw an exception if the 'unlink'-function is used but unavailable, after which it's supposed to switch to using the 'del'-function. Using the 'unlink'-function on lower Redis-server versions seems to not throw an exception, but instead it appears to silently fail.

This pull request changes this behavior and checks the Redis-server version instead. If the version is 4.0 or higher, it uses the unlink function. If not, it uses the del-function.

Also see https://redis.io/commands/unlink > "Available since 4.0.0".

(Footnote: this is one of my first times contributing to an open-source project and my first time contributing to Symfony. I've tried following the guidelines, but please let me know if I missed anything. I'm unsure how I would go about unit testing this specific bugfix due to it being dependent on the Redis version, so I omitted it. Please let me know if a unit test is indeed required for this and if so, let me know if you have any suggestions on how to go about that.)

Commits
-------

9363f3b973 [Cache] Fixed incorrect usage of UNLINK with PHPRedis with Redis < 4.0
2020-12-08 12:05:08 +01:00
Wickex
9363f3b973 [Cache] Fixed incorrect usage of UNLINK with PHPRedis with Redis < 4.0 2020-12-08 12:04:54 +01:00
Nicolas Grekas
bd44eb69a2 [Cache] fix checking for redis_sentinel support 2020-12-08 11:44:58 +01:00
Nicolas Grekas
ed46cb5b25 bug #39361 [FrameworkBundle] acces public-deprecated services via the private container to remove false-positive deprecations (nicolas-grekas)
This PR was merged into the 5.1 branch.

Discussion
----------

[FrameworkBundle] acces public-deprecated services via the private container to remove false-positive deprecations

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

Something we missed in #36470 apparently.

Commits
-------

d502ba9e5d [FrameworkBundle] acces public-deprecated services via the private container to remove false-positive deprecations
2020-12-08 11:40:38 +01:00
Grégoire Pineau
e3354d974c [Messenger] Fixed wording in php doc 2020-12-08 10:57:28 +01:00
Jakub Zalas
f3eda44058
[Intl] Update the ICU data to 68.1 2020-12-08 08:18:40 +00:00
Fabien Potencier
fd34c9c22f bug #39358 [HttpFoundation] fix parsing some special chars with HeaderUtils::parseQuery() (nicolas-grekas)
This PR was merged into the 5.2 branch.

Discussion
----------

[HttpFoundation] fix parsing some special chars with HeaderUtils::parseQuery()

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

Same as #39357 for 5.2

Commits
-------

8682bdc521 [HttpFoundation] fix parsing some special chars with HeaderUtils::parseQuery()
2020-12-08 08:08:22 +01:00
Fabien Potencier
f4e1556199 Merge branch '5.1' into 5.2
* 5.1:
  [Serializer] Fixed serialize and denormalize return types
  Run intl-data tests on resources change
  [FrameworkBundle] fix preserving some special chars in the query string when redirecting
2020-12-08 08:07:34 +01:00
Fabien Potencier
7652685ec1 minor #39337 [Serializer] Fixed serialize and denormalize return types (vudaltsov)
This PR was squashed before being merged into the 5.1 branch.

Discussion
----------

[Serializer] Fixed serialize and denormalize return types

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

Since #35235 `SerializerInterface::deserialize()` and `DenormalizerInterface::denormalize()` return types are no longer correct.

I suggest using `mixed` to allow custom denormalizers to denormalize to any type. For instance, I might add `ClosureDenormalizer` or `NullDenormalizer` or `ResourceDenormalizer`, technically there are no limits.

Commits
-------

67277e55f0 [Serializer] Fixed serialize and denormalize return types
2020-12-08 07:28:58 +01:00
vudaltsov
67277e55f0 [Serializer] Fixed serialize and denormalize return types 2020-12-08 07:28:50 +01:00
Fabien Potencier
619d54389e bug #39310 [Notifier] Add exception for deprecated slack dsn (malteschlueter)
This PR was merged into the 5.2 branch.

Discussion
----------

[Notifier] Add exception for deprecated slack dsn

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

The DSN for the Slack integration changed again from 5.1 to 5.2. There was the idea to output an exception for that.

Commits
-------

6b56b4c6f9 [Notifier] Add exception for deprecated slack dsn
2020-12-08 07:26:38 +01:00
Alexander M. Turek
cd3993ee88 Merge branch '5.1' into 5.2
* 5.1:
  [HttpFoundation] Removed obsolete test.
  [HttpFoundation] Fix TypeError: Argument 1 passed to JsonResponse::setJson() must be of the type string, object given
  [Security][Validator] Add missing Portuguese translations
  Add Croatian (hr) translations
2020-12-07 23:32:31 +01:00
Alexander M. Turek
2807a7950d [HttpFoundation] Removed obsolete test. 2020-12-07 23:31:01 +01:00
Alexander M. Turek
f8b9ee9333 Merge branch '4.4' into 5.1
* 4.4:
  [HttpFoundation] Fix TypeError: Argument 1 passed to JsonResponse::setJson() must be of the type string, object given
  [Security][Validator] Add missing Portuguese translations
  Add Croatian (hr) translations
2020-12-07 23:18:25 +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
Alexander M. Turek
6df4b04165 minor #39366 Fix: Indentation (OskarStark)
This PR was merged into the 5.2 branch.

Discussion
----------

Fix: Indentation

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

Commits
-------

37fddad0f2 Fix: Indentation
2020-12-07 17:06:35 +01:00
Malte Schlüter
6b56b4c6f9 [Notifier] Add exception for deprecated slack dsn 2020-12-07 16:39:20 +01:00
Oskar Stark
37fddad0f2 Fix: Indentation 2020-12-07 16:02:25 +01:00
Oskar Stark
c0dda8bd03 Fix: Remove unused sprintf() parameters 2020-12-07 16:01:25 +01:00
Nicolas Grekas
d502ba9e5d [FrameworkBundle] acces public-deprecated services via the private container to remove false-positive deprecations 2020-12-07 14:48:27 +01:00
Nicolas Grekas
8682bdc521 [HttpFoundation] fix parsing some special chars with HeaderUtils::parseQuery() 2020-12-07 13:06:47 +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
Jérémy Derussé
36f5ff1550
Add missing entries in gitattributes 2020-12-05 23:16:05 +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
Alexander M. Turek
cb66c523fe [Notifier] Fix tests with PHPUnit 9.5. 2020-12-05 19:56:23 +01:00
Alexander M. Turek
dbc1db21cd Merge branch '5.1' into 5.2
* 5.1:
  Fix merge.
  Fix CS
  [Messenger] Test generated SQL
  [Config] YamlReferenceDumper: No default value required for VariableNode with array example
  Remove PHPUnit configuration files from components without tests.
  [DependencyInjection] Fix container linter for union types.
2020-12-05 19:32:58 +01:00
Alexander M. Turek
7c31fa0537 Fix merge. 2020-12-05 19:20:45 +01:00
Alexander M. Turek
f13821e881 Merge branch '4.4' into 5.1 2020-12-05 18:55:33 +01: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
Alexander M. Turek
710340dfb2 Remove PHPUnit configuration files from components without tests. 2020-12-05 17:36:14 +01:00
Fabien Potencier
2f607dea7d Merge branch '5.1' into 5.2
* 5.1:
  [Messenger] StopWorkersCommand improve doc helper
  Added compatibility with PHPunit 9.5
  do not apply the Valid constraint on scalar form data
  [Test] Reproduce issue with cascading validation
  [SecurityBundle] Don't use the container as resource type in fixtures.
  Fix bug with whitespace in Kernel::stripComments()
2020-12-05 17:05:27 +01:00
Fabien Potencier
7e577b9cd9 Merge branch '4.4' into 5.1
* 4.4:
  [Messenger] StopWorkersCommand improve doc helper
  Added compatibility with PHPunit 9.5
  do not apply the Valid constraint on scalar form data
  [Test] Reproduce issue with cascading validation
  [SecurityBundle] Don't use the container as resource type in fixtures.
  Fix bug with whitespace in Kernel::stripComments()
2020-12-05 17:05:09 +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
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
72abcc3051 Merge branch '5.1' into 5.2
* 5.1:
  [HttpFoundation] Make test pass without Xdebug.
  [Mime] Leverage PHP 8's detection of CSV files.
  [HttpFoundation] Make sure we reuse the current PHP binary for the webserver process in functional tests.
  [FrameworkBundle] TextDescriptor::formatControllerLink checked method…
  Fix CS
  [HttpClient] throw clearer error when no scheme is provided
  Fix github pr template and include 5.2 for bugfixes
  [HttpFoundation] Ignore stack trace printed by Xdebug 3.
  fix lexing backslashes in single quoted strings
2020-12-05 11:51:53 +01:00
Alexander M. Turek
2cf0686f72 Merge branch '4.4' into 5.1
* 4.4:
  [HttpFoundation] Make test pass without Xdebug.
  [Mime] Leverage PHP 8's detection of CSV files.
  [HttpFoundation] Make sure we reuse the current PHP binary for the webserver process in functional tests.
  [FrameworkBundle] TextDescriptor::formatControllerLink checked method…
  Fix CS
  [HttpClient] throw clearer error when no scheme is provided
  Fix github pr template and include 5.2 for bugfixes
  [HttpFoundation] Ignore stack trace printed by Xdebug 3.
  fix lexing backslashes in single quoted strings
2020-12-05 11:32:07 +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
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
ac9858b0c8 minor #39318 Fix @experimental annotations (fabpot)
This PR was merged into the 5.2 branch.

Discussion
----------

Fix @experimental annotations

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

Commits
-------

07781474bc Fix @experimental annotations
2020-12-05 08:34:04 +01:00
Fabien Potencier
71591dfd38 Merge branch '5.1' into 5.2
* 5.1:
  Add missing entries in .gitattributes
  Update README.md
2020-12-05 08:33:16 +01:00
Fabien Potencier
a0e7fc36a3 Add missing entries in .gitattributes 2020-12-05 08:09:10 +01:00
Fabien Potencier
07781474bc Fix @experimental annotations 2020-12-05 07:51:44 +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
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
tsilefy
58ef54b229 Update README.md 2020-12-03 21:59:39 +01:00
Alexander M. Turek
2b36487983 Merge branch '5.1' into 5.2
* 5.1:
  [DependencyInjection] Fixed incorrect report for private services if required service does not exist
  Remove Xdebug from php-extra runs.
2020-12-03 10:29:40 +01:00
Alexander M. Turek
2d062df845 Merge branch '4.4' into 5.1
* 4.4:
  [DependencyInjection] Fixed incorrect report for private services if required service does not exist
  Remove Xdebug from php-extra runs.
2020-12-03 10:18:36 +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
Fabien Potencier
4b97b160a2 bug #39236 [Notifier] Fix slack section block (norkunas)
This PR was merged into the 5.2 branch.

Discussion
----------

[Notifier] Fix slack section block

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #...
| License       | MIT
| Doc PR        | symfony/symfony-docs#...

In SlackSectionBlock fields array is not initialized directly in the constructor so when running tests and trying to add a field to  it throws `Undefined index: fields`.

Commits
-------

472fa3b50a Fix checking slack section fields limit
2020-12-02 12:28:51 +01:00
Chi-teck
f90f27b63a Fix rate limiter documentation 2020-12-02 09:46:43 +01:00
Alexander M. Turek
56e79395c4 Merge branch '5.1' into 5.2
* 5.1:
  Fix merge.
  fix lexing mapping values with trailing whitespaces
  [String] Fix Notice when argument is empty string
  [Inflector] Fix Notice when argument is empty string
  Fix small typos
2020-12-02 09:39:23 +01:00
Alexander M. Turek
d4100fb453 Merge branch '4.4' into 5.1
* 4.4:
  fix lexing mapping values with trailing whitespaces
2020-12-01 21:33:29 +01:00
Alexander M. Turek
6f7e4dd8dc Fix merge. 2020-12-01 21:15:15 +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
88cbcf99c0 bug #39244 [String] Fix Notice when argument is empty string (moldman)
This PR was merged into the 5.1 branch.

Discussion
----------

[String] Fix Notice when argument is empty string

| Q             | A
| ------------- | ---
| Branch?       | 5.1 <!-- 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 -->
| License       | MIT

PHP Notice is generated when we pass empty string to `singularize` or `pluralize` method.
```
$inflector = new \Symfony\Component\String\Inflector\EnglishInflector();
$inflector->singularize('');
```
```
Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
PHP Notice:  Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
```
```
$inflector = new \Symfony\Component\String\Inflector\EnglishInflector();
$inflector->pluralize('');
```
```
Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 424
PHP Notice:  Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 424
```

**Background**:
When `\Symfony\Component\PropertyAccess\PropertyAccessorInterface::setValue` is used with `_` property, then it calls \Symfony\Component\String\Inflector\EnglishInflector::singularize with empty string.
```
class Check
{
    public $_;
}
$check = new Check();
$pr = PropertyAccess::createPropertyAccessorBuilder()
    ->getPropertyAccessor();
if($pr->isWritable($check, '_')){
    $pr->setValue($check, '_', 'test');
}
var_dump($check);
```
```
Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
PHP Notice:  Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
...
Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
PHP Notice:  Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344

Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
object(Check)#6 (1) {
  ["_"]=>
  string(4) "test"
}
```

P.S.
Another solution is to include empty string in \Symfony\Component\String\Inflector\EnglishInflector::$uninflected
```
    private static $uninflected = [
        '',
        'atad',
        'reed',
        'kcabdeef',
        'hsif',
        'ofni',
        'esoom',
        'seires',
        'peehs',
        'seiceps',
    ];
```

If this PR is not relevant please close and sorry for inconvenience.

Commits
-------

88c2b9be62 [String] Fix Notice when argument is empty string
2020-12-01 18:07:21 +01:00
Alexander M. Turek
f7c372e636 Merge branch '4.4' into 5.1
* 4.4:
  [Inflector] Fix Notice when argument is empty string
2020-12-01 18:05:45 +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
88c2b9be62 [String] Fix Notice when argument is empty string 2020-12-01 17:34:07 +02: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
Romaric Drigon
0222ed3a32 [Security] fix #39262, more defensive PasswordMigratingListener 2020-12-01 12:09:46 +01:00
Jérémy Benoist
529bbaf0a9
Fix small typos 2020-12-01 09:40:05 +01:00
Alexander M. Turek
0d9dd43ecc Merge branch '5.1' into 5.2
* 5.1:
  remove return type definition in order to avoid type juggling
2020-11-30 23:47:11 +01:00