Commit Graph

52502 Commits

Author SHA1 Message Date
Nicolas Grekas
0dce5cf0ba minor #38490 [ErrorHandler] fix html W3C compliance (awoimbee)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[ErrorHandler] fix html W3C compliance

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | yes but not really
| New feature?  | no
| Deprecations? | no
| Tickets       | Fixes #38471
| License       | MIT

Fixes:
- `<h3>` inside `<span></span>`
- `name` attribute on `<a>` is deprecated
- stray `</span>`
- `nowrap` attribute is deprecated
- `<h3>` inside `<th>` (heading content in a table header)

Commits
-------

7f9237e88c [ErrorHandler] fix html W3C compliance
2020-12-08 15:46:38 +01:00
Arthur Woimbée
7f9237e88c [ErrorHandler] fix html W3C compliance 2020-12-08 15:46:05 +01:00
Nicolas Grekas
219d51188b feature #38622 [BrowserKit] Allowing body content from GET with a content-type (thiagomp)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[BrowserKit] Allowing body content from GET with a content-type

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

This allows a GET request to sent a payload if it specifies a content-type in the HTTP header as per our conversation in the ticket.

Commits
-------

93c2f5e891 [BrowserKit] Allowing body content from GET with a content-type
2020-12-08 15:40:18 +01:00
Thiago Melo
93c2f5e891 [BrowserKit] Allowing body content from GET with a content-type 2020-12-08 15:40:01 +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
e4e3b454e5 minor #39385 Use php8 stable (OskarStark)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Use php8 stable

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| 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 is only part of the development pipeline and should be considered a bugfix, thats why I target `4.4` branch.

Commits
-------

570e75f7cd Use php8 stable
2020-12-08 14:47:09 +01:00
Oskar Stark
570e75f7cd Use php8 stable 2020-12-08 14:47:02 +01:00
Nicolas Grekas
3a9f73d0fc minor #39384 [Notifier] Streamline changelogs of notifier bridges (OskarStark)
This PR was merged into the 5.1 branch.

Discussion
----------

[Notifier] Streamline changelogs of notifier bridges

| 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        | ---

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
-------

95bcab29d1 [Notifier] Streamline changelogs of notifier bridges
2020-12-08 14:28:57 +01:00
Oskar Stark
95bcab29d1 [Notifier] Streamline changelogs of notifier bridges 2020-12-08 14:24:03 +01:00
Nicolas Grekas
d07b9517d2 minor #39016 [HttpKernel] Marked the class DebugHandlersListener as internal (lyrixx)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[HttpKernel] Marked the class DebugHandlersListener as internal

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

Commits
-------

1ee7e4c94c [HttpKernel] Marked the class `Symfony\Component\HttpKernel\EventListener\DebugHandlersListener` as internal
2020-12-08 14:18:29 +01:00
Grégoire Pineau
1ee7e4c94c [HttpKernel] Marked the class Symfony\Component\HttpKernel\EventListener\DebugHandlersListener as internal 2020-12-08 14:18:11 +01:00
Wouter de Jong
9a7034efe3 bug #39375 [SecurityBundle] fix LDAP-based HTTP Basic Auth entry point registration (xabbuh)
This PR was merged into the 5.2 branch.

Discussion
----------

[SecurityBundle] fix LDAP-based HTTP Basic Auth entry point registration

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

Commits
-------

67d6624c2f fix LDAP-based HTTP Basic Auth entry point registration
2020-12-08 13:15:04 +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
d4fa223c5b minor #39379 [FrameworkBundle] fix lowest required HttpFoundation component (xabbuh)
This PR was merged into the 5.2 branch.

Discussion
----------

[FrameworkBundle] fix lowest required HttpFoundation component

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

Commits
-------

cdb1c2e6f9 fix lowest required HttpFoundation component
2020-12-08 12:19:55 +01:00
Nicolas Grekas
620ee34b90 [Cache] hotfix 2020-12-08 12:16:55 +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
Grégoire Pineau
a885ba844d [Messenger] Use "warning" intead of "error" log level for RecoverableException 2020-12-08 11:59:01 +01:00
Christian Flothmann
cdb1c2e6f9 fix lowest required HttpFoundation component 2020-12-08 11:49:51 +01:00
Nicolas Grekas
bd44eb69a2 [Cache] fix checking for redis_sentinel support 2020-12-08 11:44:58 +01:00
Nicolas Grekas
979a539dc6 feature #39363 [Cache] Support Redis Sentinel mode when using phpredis/phpredis extension (renan)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[Cache] Support Redis Sentinel mode when using phpredis/phpredis extension

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #39362
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/14668

The version 5.2.0 of the [Redis PHP extension](http://pecl.php.net/package/redis), released back in March 2020, added support for Redis Sentinel mode with the help of the `RedisSentinel` class.

Usage of the `Symfony/Cache RedisAdapter` can continue to be the same, thus relying on the `$options['redis_persistent']` option to both enable and define the master name.

Commits
-------

814ffabbd8 [Cache] Support Redis Sentinel mode when using phpredis/phpredis extension
2020-12-08 11:42:52 +01:00
Renan Gonçalves
814ffabbd8 [Cache] Support Redis Sentinel mode when using phpredis/phpredis extension 2020-12-08 11:42:51 +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
Alexander M. Turek
a5b043c294 minor #39377 [Messenger] Fixed wording in php doc (lyrixx)
This PR was merged into the 5.1 branch.

Discussion
----------

[Messenger] Fixed wording in php doc

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

Commits
-------

e3354d974c [Messenger] Fixed wording in php doc
2020-12-08 11:01:45 +01:00
Grégoire Pineau
e3354d974c [Messenger] Fixed wording in php doc 2020-12-08 10:57:28 +01:00
Fabien Potencier
75a863d4c2 minor #39371 [Intl] Update the ICU data to 68.1 (jakzal)
This PR was merged into the 4.4 branch.

Discussion
----------

[Intl] Update the ICU data to 68.1

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

Ideally, this should be merged after #39370.

Commits
-------

f3eda44058 [Intl] Update the ICU data to 68.1
2020-12-08 10:54:41 +01:00
Christian Flothmann
67d6624c2f fix LDAP-based HTTP Basic Auth entry point registration 2020-12-08 10:17:19 +01:00
Jakub Zalas
f3eda44058
[Intl] Update the ICU data to 68.1 2020-12-08 08:18:40 +00:00
Fabien Potencier
4da4f50837 Merge branch '5.2' into 5.x
* 5.2:
  [Serializer] Fixed serialize and denormalize return types
  Run intl-data tests on resources change
  [Notifier] Add exception for deprecated slack dsn
  [FrameworkBundle] fix preserving some special chars in the query string when redirecting
  [HttpFoundation] fix parsing some special chars with HeaderUtils::parseQuery()
2020-12-08 08:09:22 +01: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
dde0f3c999 Merge branch '4.4' into 5.1
* 4.4:
  Run intl-data tests on resources change
  [FrameworkBundle] fix preserving some special chars in the query string when redirecting
2020-12-08 08:06:06 +01: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
Fabien Potencier
8fa29548e2 feature #39340 [Security] Assert voter returns valid decision (jderusse)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Security] Assert voter returns valid decision

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

Replace #39248

Commits
-------

ffdfb4fb53 Assert voter returns valid decision
2020-12-08 08:01:22 +01:00
Fabien Potencier
e9108e9938 feature #39327 [FrameworkBundle] Add validator.expression_language service (fbourigault)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[FrameworkBundle] Add validator.expression_language service

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

This add a `validator.expression_language` service to allow better than in-memory caching of validation expression.

This also opens possibilities to extend the expression language available in validation expression through the use of `ExpressionFunctionProviderInterface` and a compiler pass.

I tried to do something close as what exists for `security.expression_language` service but I still have some questions.

- Which kind of tests should I write for this feature?
- Does it deserve having it's own child `ExpressionLanguage` class?

#SymfonyHackday

Commits
-------

41c5901047 [FrameworkBundle] Add validator.expression_language service
2020-12-08 07:47:00 +01:00
Fabien Bourigault
41c5901047 [FrameworkBundle] Add validator.expression_language service 2020-12-08 07:46:55 +01:00
Fabien Potencier
7668a1e826 minor #39370 Run intl-data tests on resources change (jakzal)
This PR was merged into the 4.4 branch.

Discussion
----------

Run intl-data tests on resources change

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

`intl-data` tests are run whenever we update ICU data as they're rather time-consuming.

This proposal automates intl-data test runs with Github Actions. Tests will only be run on pull requests or pushes that modifyy ICU data. Full run on Github Actions takes 6-7mins. Example run: https://github.com/jakzal/symfony/actions/runs/406526765

<img width="1204" alt="image" src="https://user-images.githubusercontent.com/190447/101393171-92a28c00-38be-11eb-9efa-8f0a75ff04b0.png">

Commits
-------

745020892f Run intl-data tests on resources change
2020-12-08 07:37:22 +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
e9ab48f349 Merge branch '5.2' into 5.x
* 5.2:
  [HttpFoundation] Removed obsolete test.
  [HttpFoundation] Fix TypeError: Argument 1 passed to JsonResponse::setJson() must be of the type string, object given
  Fix: Indentation
  Fix: Remove unused sprintf() parameters
  [Security][Validator] Add missing Portuguese translations
  Add Croatian (hr) translations
  Add missing entries in gitattributes
2020-12-07 23:41:29 +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