Commit Graph

46950 Commits

Author SHA1 Message Date
Nicolas Grekas
a337ba5547 [HttpClient] fix issues in tests 2020-05-30 20:33:03 +02:00
Fabien Potencier
5e0e9a8019 bug #36868 [Validator] Use Mime component to determine mime type for file validator (pierredup)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Use Mime component to determine mime type for file validator

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

When validating the mime type for a file, the Validator component relies on the `Symfony\Component\HttpFoundation\File\File` class, but if the HttpFoundation component is not installed, then you just get the error

```
PHP Fatal error:  Uncaught Error: Class 'Symfony\Component\HttpFoundation\File\File' not found
```

This PR uses the Mime component to get the mime type for a file and throws an exception if the Mime component is not installed.

Commits
-------

472883313f [Validator] Use Mime component to determine mime type for file validator
2020-05-30 09:26:56 +02:00
Pierre du Plessis
472883313f
[Validator] Use Mime component to determine mime type for file validator 2020-05-29 14:10:59 +02:00
Fabien Potencier
96d2d19de2 bug #36995 [TwigBridge] fix fallback html-to-txt body converter (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[TwigBridge] fix fallback html-to-txt body converter

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

Right now, the content of the `<head>` and `<style>` are dumped as text. This fixes it.

Of course, use `league/html-to-markdown` if you need a better parser.

Commits
-------

6f59d60508 [TwigBridge] fix fallback html-to-txt body converter
2020-05-28 15:43:01 +02:00
Nicolas Grekas
6f59d60508 [TwigBridge] fix fallback html-to-txt body converter 2020-05-28 15:20:36 +02:00
Nicolas Grekas
15d4f7ac04 [Security/Http] fix merge 2020-05-28 14:17:38 +02:00
Nicolas Grekas
0d2bc7bd6a bug #36993 [ErrorHandler] fix setting $trace to null in FatalError (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] fix setting $trace to null in FatalError

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

Spotted by @nikic in https://github.com/php/php-src/pull/5620#issuecomment-635258024

Commits
-------

aa50c9287c [ErrorHandler] fix setting $trace to null in FatalError
2020-05-28 14:15:08 +02:00
Nicolas Grekas
aa50c9287c [ErrorHandler] fix setting $trace to null in FatalError 2020-05-28 12:39:14 +02:00
Nicolas Grekas
5fe0f9490e minor #36992 Handle fetch mode deprecation of DBAL 2.11 (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Handle fetch mode deprecation of DBAL 2.11

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

Continuation of #36987 on the 4.4 branch.

Commits
-------

1385213a9a Handle fetch mode deprecation of DBAL 2.11.
2020-05-28 10:58:00 +02:00
Alexander M. Turek
1385213a9a Handle fetch mode deprecation of DBAL 2.11. 2020-05-28 10:27:51 +02:00
Nicolas Grekas
dfe8c816a6 Merge branch '3.4' into 4.4
* 3.4:
  Handle fetch mode deprecation of DBAL 2.11.
  Fixed handling of CSRF logout error
2020-05-28 10:15:49 +02:00
Nicolas Grekas
e1e314d257 bug #36987 Handle fetch mode deprecation of DBAL 2.11. (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Handle fetch mode deprecation of DBAL 2.11.

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

See doctrine/dbal#4019

DBAL has deprecated PDO-style fetch modes in favor of more explicit methods.

Commits
-------

ed518551e1 Handle fetch mode deprecation of DBAL 2.11.
2020-05-28 10:12:42 +02:00
Alexander M. Turek
ed518551e1 Handle fetch mode deprecation of DBAL 2.11. 2020-05-28 09:55:04 +02:00
Fabien Potencier
9f52228d86 minor #36972 [WebProfilerBundle] changed label of memory usage in time panel (Mb into MiB) (Lozik)
This PR was merged into the 4.4 branch.

Discussion
----------

[WebProfilerBundle] changed label of memory usage in time panel (Mb into MiB)

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

This PR fixes the memory usage labels in the time panel of the web profiler for 4.4+. PR #36571 already fixed this for 3.4 but since the time panel has been rewritten in 4.3, that minor fix has not correctly been transferred into 4.4+.

Commits
-------

a91204a79d [WebProfilerBundle] changed label of memory usage in time panel (Mb into MiB)
2020-05-26 18:21:35 +02:00
Robin Chalas
ce61bb0750 bug #36974 [Security] Fixed handling of CSRF logout error (wouterj)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Fixed handling of CSRF logout error

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

8 years ago, a typo was made while refactoring the `ExceptionListener`, loosing this logic (46071f3238). I think we should fix it.

The `LogoutException` is a very generic name for something only used when the CSRF token is invalid. Should we match the exception message to make sure only this CSRF error is transformed into 403? I didn't yet do it because any usage of `LogoutException` would have resulted in 500, which always is worse than 403.

Commits
-------

50348f2eb7 Fixed handling of CSRF logout error
2020-05-26 17:59:18 +02:00
Wouter de Jong
50348f2eb7 Fixed handling of CSRF logout error 2020-05-26 17:30:38 +02:00
Loïc Beurlet
a91204a79d [WebProfilerBundle] changed label of memory usage in time panel (Mb into MiB) 2020-05-26 14:58:50 +02:00
Fabien Potencier
a4f8a49e94 minor #36959 [DotEnv][WebLink][Templating][ErrorHandler] Updated README with minimal example (wouterj)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[DotEnv][WebLink][Templating][ErrorHandler] Updated README with minimal example

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

We're about to delete some more component docs. The minimal examples where copy/pasted from the original component docs.

Commits
-------

f3b8a58513 [DotEnv][WebLink][Templating][ErrorHandler] Updated README with minimal example
2020-05-26 11:42:48 +02:00
Wouter de Jong
f3b8a58513 [DotEnv][WebLink][Templating][ErrorHandler] Updated README with minimal example 2020-05-26 11:42:42 +02:00
Nicolas Grekas
6a8b22d3b1 Merge branch '3.4' into 4.4
* 3.4:
  [FrameworkBundle] Removed detection of Serializer < 3.2
  Update pull request template for 5.1.
2020-05-25 14:18:50 +02:00
Fabien Potencier
4f40da5809 minor #36946 [FrameworkBundle] Removed detection of Serializer < 3.2 (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Removed detection of Serializer < 3.2

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

The test that is changed here contains detection logic for Serializer versions prior 3.2. However, accoring to FrameworkBundle's composer.json, we need at least Serializer 3.3, so that logic is obsolete.

I came across this piece of code because on the 5.1 branch, this test is actually skipped because the `use` statement for `CacheClassMetadataFactory` is missing there.

Commits
-------

9badd71687 [FrameworkBundle] Removed detection of Serializer < 3.2
2020-05-25 08:17:20 +02:00
Fabien Potencier
b6c43b6c72 minor #36942 Update pull request template for 5.1 (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Update pull request template for 5.1

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

Commits
-------

d4b598c789 Update pull request template for 5.1.
2020-05-25 08:16:18 +02:00
Fabien Potencier
b524e04300 bug #36947 [Mime] Allow email message to have "To", "Cc", or "Bcc" header to be valid (Ernest Hymel)
This PR was submitted for the master branch but it was merged into the 4.4 branch instead.

Discussion
----------

[Mime] Allow email message to have "To", "Cc", or "Bcc" header to be valid

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

Allow emails to have any one of To:, Cc:, or Bcc: fields rather than forcing a required To: field.

Commits
-------

35b7e1cb9a Allow email message to have "To", "Cc", or "Bcc" header to be valid
2020-05-25 07:42:40 +02:00
Ernest Hymel
35b7e1cb9a Allow email message to have "To", "Cc", or "Bcc" header to be valid 2020-05-25 07:42:33 +02:00
Alexander M. Turek
9badd71687 [FrameworkBundle] Removed detection of Serializer < 3.2 2020-05-24 17:32:05 +02:00
Alexander M. Turek
d4b598c789
Update pull request template for 5.1. 2020-05-24 14:21:57 +02:00
Nicolas Grekas
aa53bdb77b [Security/Core] fix PHP8 deprecation 2020-05-24 11:45:24 +02:00
Nicolas Grekas
6e7658baff Merge branch '3.4' into 4.4
* 3.4:
  [travis] display deprecations in nightly jobs
2020-05-24 10:57:28 +02:00
Nicolas Grekas
c08d8d116c minor #36934 [travis] display deprecations in nightly jobs (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[travis] display deprecations in nightly jobs

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

Commits
-------

83a34a84ab [travis] display deprecations in nightly jobs
2020-05-24 10:57:17 +02:00
Nicolas Grekas
83a34a84ab [travis] display deprecations in nightly jobs 2020-05-24 10:55:27 +02:00
Nicolas Grekas
6d02565ea7 bug #36914 Parse and render anonymous classes correctly on php 8 (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Parse and render anonymous classes correctly on php 8

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

The format of the value that `get_class()` returns for anonymous classes has changed in php 8. This PR attempts to detect both formats, with the help of the PHP80 polyfill where possible.

Commits
-------

9d702fd94b Parse and render anonymous classes correctly on php 8
2020-05-24 10:35:29 +02:00
Alexander M. Turek
9d702fd94b Parse and render anonymous classes correctly on php 8 2020-05-24 10:33:35 +02:00
Nicolas Grekas
7224c1d6b9 Merge branch '3.4' into 4.4
* 3.4:
  Enable APCu for the php 8 build.
2020-05-23 23:42:41 +02:00
Nicolas Grekas
acbaf0020f minor #36932 Enable APCu for the php 8 build (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Enable APCu for the php 8 build

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

This PR enables APCu for the php 8 build on Travis.

Since the latest version release on PECL produces a lot of runtime warnings, I'm pulling the latest master commit from github.

Commits
-------

e3e1558a0b Enable APCu for the php 8 build.
2020-05-23 23:40:17 +02:00
Nicolas Grekas
3588a53270 minor #36933 [Process] Fix failing test on php 8 (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[Process] Fix failing test on php 8

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

Commits
-------

98e5105bd3 [Process] Fix failing test on php 8.
2020-05-23 23:38:59 +02:00
Alexander M. Turek
e3e1558a0b Enable APCu for the php 8 build. 2020-05-23 23:26:28 +02:00
Alexander M. Turek
98e5105bd3 [Process] Fix failing test on php 8. 2020-05-23 21:47:49 +02:00
Nicolas Grekas
d8bb5b2df5 Merge branch '3.4' into 4.4
* 3.4:
  [HttpKernel] fix test
2020-05-23 19:38:31 +02:00
Nicolas Grekas
5ebcd26f06 [HttpKernel] fix test 2020-05-23 19:37:50 +02:00
Nicolas Grekas
7b871133e9 Merge branch '3.4' into 4.4
* 3.4:
  Make PHP 8 green on Travis
2020-05-23 19:20:05 +02:00
Nicolas Grekas
d6902039c4 minor #36930 Make PHP 8 green on Travis (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Make PHP 8 green on Travis

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

See #36872 for preparatory work and remaining steps.

Commits
-------

571d46cf01 Make PHP 8 green on Travis
2020-05-23 19:17:25 +02:00
Nicolas Grekas
571d46cf01 Make PHP 8 green on Travis 2020-05-23 19:05:51 +02:00
Nicolas Grekas
9de714c3d4 minor #36928 [PropertyAccessor] Added missing property path on php 8 (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[PropertyAccessor] Added missing property path on php 8

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

This PR adds the property path to the exception message to fix failing tests on php 8.

Commits
-------

6a73bcdb8e [PropertyAccessor] Added missing property path on php 8.
2020-05-23 18:30:14 +02:00
Nicolas Grekas
098d84afd7 minor #36927 [Cache][Lock][Messenger] Don't execute tests with DBAL 2.x on php 8 (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache][Lock][Messenger] Don't execute tests with DBAL 2.x on php 8

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

Follow-up to #36895: If we autoload the `PDOConnection` from DBAL 2.x during a test on php8, our test suite goes 💥

What this PR does:
* Some more Cache tests are skipped if DBAL 2 is installed on php 8.
* The Lock and Messenger components are tested against DBAL 3.

Commits
-------

7dc3f9cb42 Don't execute tests with DBAL 2.x on php 8.
2020-05-23 18:27:24 +02:00
Nicolas Grekas
6e0593f210 Merge branch '3.4' into 4.4
* 3.4:
  Revert "[Cache] allow DBAL v3"
2020-05-23 18:26:58 +02:00
Nicolas Grekas
896b69c907 Revert "[Cache] allow DBAL v3"
This reverts commit d12b3b6a72.
2020-05-23 18:25:19 +02:00
Alexander M. Turek
6a73bcdb8e [PropertyAccessor] Added missing property path on php 8. 2020-05-23 17:44:24 +02:00
Alexander M. Turek
7dc3f9cb42 Don't execute tests with DBAL 2.x on php 8. 2020-05-23 17:32:20 +02:00
Nicolas Grekas
a14d8f9da4 minor #36924 [travis] skip extensions that dont compile on nightly (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[travis] skip extensions that dont compile on nightly

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

Commits
-------

c26044b0b1 [travis] skip extensions that dont compile on nightly
2020-05-23 15:53:53 +02:00
Nicolas Grekas
c26044b0b1 [travis] skip extensions that dont compile on nightly 2020-05-23 15:47:19 +02:00