Commit Graph

52502 Commits

Author SHA1 Message Date
Fabien Potencier
0fa187d0c6 Fix CS 2020-12-10 08:10:12 +01:00
Fabien Potencier
14a94dc104 bug #39413 [Notifier] [Discord] Make webhookId argument required (OskarStark)
This PR was submitted for the 5.x branch but it was merged into the 5.2 branch instead.

Discussion
----------

[Notifier] [Discord] Make webhookId argument required

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | yes (but the code was introduced in 5.x)
| 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        | ---

From the code perspective it looks like `$webhookId` cannot be `null` so I removed that and added a test.

cc @mpiot

Commits
-------

21c47680f9 [Notifier][Discord] Make webhookId argument required
2020-12-10 08:09:29 +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
b82bc85786 feature #39352 [TwigBridge] export concatenated translations (Stephen)
This PR was submitted for the 4.4 branch but it was squashed and merged into the 5.3-dev branch instead.

Discussion
----------

[TwigBridge] export concatenated translations

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

This PR will fix that concatenated strings are ignored by the translation:update command. Suppose you have a twig file like this:
```
{{ ('aa' ~ 'bb') | trans }}
```
This is not exported when using the command. This PR will fix that.

Commits
-------

122eaba746 [TwigBridge] export concatenated translations
2020-12-10 08:04:07 +01:00
Stephen
122eaba746 [TwigBridge] export concatenated translations 2020-12-10 08:04:00 +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
Fabien Potencier
8b8bffb83b feature #39378 [Messenger] Use "warning" instead of "error" log level for RecoverableException (lyrixx)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Messenger] Use "warning" instead of "error" log level for RecoverableException

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

When one throw a `RecoverableExceptionInterface`, one knows somethings
wrong occurs, so if an `error` should be emmited, it's in place where the
exception is thrown.

And, by extension, if nothing really wrong occurs (like a random network
error), one may want to retry the message **without** any errors.

That's why in this PR, if an exception of type `RecoverableExceptionInterface`
is thrown, it uses `warning` insteand of `error` log level. So
everything stay under the radar.

Commits
-------

a885ba844d [Messenger] Use "warning" intead of "error" log level for RecoverableException
2020-12-10 07:47:10 +01:00
Alexander M. Turek
9052b2b1ee bug #39401 [DoctrineBridge] no-op RegisterUidTypePass if DBAL types aren't loaded (craue)
This PR was squashed before being merged into the 5.2 branch.

Discussion
----------

[DoctrineBridge] no-op RegisterUidTypePass if DBAL types aren't loaded

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

Commits
-------

765ae9e16c [DoctrineBridge] no-op RegisterUidTypePass if DBAL types aren't loaded
2020-12-10 00:03:16 +01:00
Christian Raue
765ae9e16c [DoctrineBridge] no-op RegisterUidTypePass if DBAL types aren't loaded 2020-12-10 00:03:08 +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
266a6bb97e Merge branch '5.2' into 5.x
* 5.2:
  [PhpUnitBridge] CS fix
  [Notifier] Only use sprintf instead of sprintf and string concat
  [PhpUnitBridge] Fix PHP 5.5 compatibility
  Fix exception thrown by Form when converting UUID
  [Notifier] Remove trailing argument in tests
  [Serializer] Make fabbot happy with 5.2 tests CS
  Add missing param annotation abouts $fileLinkFormat
  [HttpClient] Use decoration instead of class replacement for mock factory
  [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:26 +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
52a0233905 [PhpUnitBridge] CS fix 2020-12-09 19:44:45 +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
Nicolas Grekas
56f04565b2 minor #39412 [Notifier] Only use sprintf instead of sprintf and string concat (OskarStark)
This PR was submitted for the 5.x branch but it was merged into the 5.1 branch instead.

Discussion
----------

[Notifier] Only use sprintf instead of sprintf and string concat

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| 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
-------

ca65c54018 [Notifier] Only use sprintf instead of sprintf and string concat
2020-12-09 19:30:38 +01:00
Oskar Stark
ca65c54018 [Notifier] Only use sprintf instead of sprintf and string concat 2020-12-09 19:30:29 +01:00
Jérémy Derussé
730b2a5d68
bug #39417 [Form] Fix UUID exception (jderusse)
This PR was merged into the 5.2 branch.

Discussion
----------

[Form] Fix UUID exception

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

When submitting an invalid UUID, the exception thrown by `Form\ChoiceList\ORMQueryBuilderLoader` should be a `TransformationFailedException` in order to be properly intercepted by the `Form\Form` class

Commits
-------

a41e7f0771 Fix exception thrown by Form when converting UUID
2020-12-09 19:13:41 +01:00
Alexander M. Turek
75b094cdbb minor #39418 [PhpUnitBridge] Fix PHP 5.5 compatibility (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Fix PHP 5.5 compatibility

| Q             | A
| ------------- | ---
| Branch?       |4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | cf620b6eb3 (commitcomment-44884087)
| License       | MIT
| Doc PR        | -

Thanks to @maximium for spotting it.

Commits
-------

fe7abcd1e9 [PhpUnitBridge] Fix PHP 5.5 compatibility
2020-12-09 18:10:44 +01:00
Thomas Calvet
fe7abcd1e9 [PhpUnitBridge] Fix PHP 5.5 compatibility 2020-12-09 17:54:32 +01:00
Jérémy Derussé
a41e7f0771
Fix exception thrown by Form when converting UUID 2020-12-09 17:04:36 +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
Alexander M. Turek
0676399b88 minor #39398 [ErrorHandler][HttpKernel] Add missing param annotation for $fileLinkFormat (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler][HttpKernel] Add missing param annotation for $fileLinkFormat

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

Commits
-------

32a56a6389 Add missing param annotation abouts $fileLinkFormat
2020-12-09 14:20:21 +01:00
Maxime Steinhausser
e974752280 minor #39405 [Serializer] Make fabbot happy with 5.2 tests CS (ogizanagi)
This PR was merged into the 5.2 branch.

Discussion
----------

[Serializer] Make fabbot happy with 5.2 tests CS

| 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       | Fix 95adc90512 <!-- 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
-------

bdcd745232 [Serializer] Make fabbot happy with 5.2 tests CS
2020-12-09 14:17:51 +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
4df63ab450 bug #39268 [HttpClient] Use decoration instead of class replacement for mock factory (GaryPEGEOT)
This PR was squashed before being merged into the 5.2 branch.

Discussion
----------

[HttpClient] Use decoration instead of class replacement for mock factory

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

Commits
-------

9a9823c99a [HttpClient] Use decoration instead of class replacement for mock factory
2020-12-08 18:14:40 +01:00
Gary PEGEOT
9a9823c99a [HttpClient] Use decoration instead of class replacement for mock factory 2020-12-08 18:14:23 +01:00
Nicolas Grekas
fda67f5c3d Merge branch '5.2' into 5.x
* 5.2:
  [PhpUnitBridge] Fix CS for PHP 5.5
2020-12-08 18:06:49 +01:00
Nicolas Grekas
2d73d4a880 Merge branch '5.1' into 5.2
* 5.1:
  [PhpUnitBridge] Fix CS for PHP 5.5
2020-12-08 18:06:25 +01:00
Nicolas Grekas
ec09d68df1 Merge branch '4.4' into 5.1
* 4.4:
  [PhpUnitBridge] Fix CS for PHP 5.5
2020-12-08 18:06:17 +01:00
Nicolas Grekas
236400c03a [PhpUnitBridge] Fix CS for PHP 5.5 2020-12-08 18:05:36 +01:00
Nicolas Grekas
e6f1136c2b Merge branch '5.2' into 5.x
* 5.2:
  Update .php_cs.dist
  Apply "visibility_required" CS rule to constants
2020-12-08 18:04:48 +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
018415e194 Update .php_cs.dist 2020-12-08 18:00:58 +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
be5f6e52ca Merge branch '5.2' into 5.x
* 5.2:
  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] Fixed incorrect usage of UNLINK with PHPRedis with Redis < 4.0
  fix lowest required HttpFoundation component
  [Cache] fix checking for redis_sentinel support
  [Messenger] Fixed wording in php doc
  fix LDAP-based HTTP Basic Auth entry point registration
  [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:44:35 +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