Commit Graph

51342 Commits

Author SHA1 Message Date
Fabien Potencier
7f6a21cd6b Update VERSION for 5.2.0-BETA1 2020-10-05 16:36:53 +02:00
Fabien Potencier
ff6495272d Update CHANGELOG for 5.2.0-BETA1 2020-10-05 16:36:41 +02:00
Lars Strojny
a2508ac3e7 [Cache] Allow ISO 8601 time intervals to specify default lifetime 2020-10-05 15:19:55 +02:00
Nicolas Grekas
5a3e1db9ce minor #38413 [HttpClient] change piority of RetryableHttpClient (jderusse)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[HttpClient] change piority of RetryableHttpClient

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

This make the RetryableHttpClient decorated the TraceableHttpClient.
User will be able to check content of each sub-request

Commits
-------

9568d437f9 Change priority of RetryableHttpClient
2020-10-05 10:23:57 +02:00
Jérémy Derussé
9568d437f9
Change priority of RetryableHttpClient 2020-10-05 10:04:53 +02:00
Fabien Potencier
3f2af74158 minor #38411 Use PHPUnit 9.4 to run the test suite (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Use PHPUnit 9.4 to run the test suite

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

Commits
-------

de6a852b46 Use PHPUnit 9.4 to run the test suite.
2020-10-05 08:28:29 +02:00
Alexander M. Turek
de6a852b46 Use PHPUnit 9.4 to run the test suite. 2020-10-04 22:06:12 +02:00
Alexander M. Turek
d8c186938e [Validator] Migrate File and Image constraints to attributes. 2020-10-04 21:22:16 +02:00
Fabien Potencier
a60c0af953 minor #38408 Fix type annotation in ExpressionLanguage\Token (m-vo)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix type annotation in ExpressionLanguage\Token

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

The expected argument `$type` should be a string - the strict comparison would always fail with the current annotated types (`array|int`).

See the constructor + constants for reference:
7db7dcc431/src/Symfony/Component/ExpressionLanguage/Token.php (L33)

7db7dcc431/src/Symfony/Component/ExpressionLanguage/Token.php (L25-L30)

Commits
-------

bfde15b728 Fix type annotation
2020-10-04 18:40:24 +02:00
Fabien Potencier
cb3e18a925 Merge branch '5.1'
* 5.1:
  Change test
2020-10-04 18:36:01 +02:00
Fabien Potencier
5e808b59ec Merge branch '4.4' into 5.1
* 4.4:
  Change test
2020-10-04 18:35:53 +02:00
Fabien Potencier
20969e604b Merge branch '3.4' into 4.4
* 3.4:
  Change test
2020-10-04 18:35:43 +02:00
Fabien Potencier
bfcf65f61c Change test 2020-10-04 18:34:28 +02:00
Fabien Potencier
57ad83e7e1 Merge branch '5.1'
* 5.1:
  Added Stopwatch example to the README
  Bump Symfony version to 5.1.8
  Update VERSION for 5.1.7
  Update CHANGELOG for 5.1.7
  Bump Symfony version to 4.4.16
  Update VERSION for 4.4.15
  Update CHANGELOG for 4.4.15
2020-10-04 18:29:51 +02:00
Fabien Potencier
84bec1df2d Merge branch '4.4' into 5.1
* 4.4:
  Added Stopwatch example to the README
  Bump Symfony version to 4.4.16
  Update VERSION for 4.4.15
  Update CHANGELOG for 4.4.15
2020-10-04 18:29:28 +02:00
Fabien Potencier
619509e3c3 minor #38409 [Stopwatch] Added example to the README (wouterj)
This PR was merged into the 4.4 branch.

Discussion
----------

[Stopwatch] Added example to the README

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

Commits
-------

e2461c90d2 Added Stopwatch example to the README
2020-10-04 17:43:30 +02:00
Wouter de Jong
e2461c90d2 Added Stopwatch example to the README 2020-10-04 14:01:13 +02:00
M. Vondano
bfde15b728
Fix type annotation 2020-10-04 12:25:24 +02:00
Fabien Potencier
c91ad1239f feature #38382 [Validator] Use comparison constraints as attributes (derrabus)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Validator] Use comparison constraints as attributes

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | yes
| Tickets       | #38096
| License       | MIT
| Doc PR        | TODO, let's add it to symfony/symfony-docs#14305

This PR enables all child classes of `AbstractComparison` to be used as attributes.

Some of those constraints used a trait called `NumberConstraintTrait` for a shared implementation. After my changes, that trait did not fit well anymore, so I've added a new `ZeroComparisonConstraintTrait` as a replacement. Although I don't expect `NumberConstraintTrait` to provide much value outside of the Symfony codebase, I think we cannot safely change it because it was not labelled as `@internal`. This is basically why I went for the deprecation.

Commits
-------

b5bdf8288f [Validator] Use comparison constraints as attributes.
2020-10-04 10:54:16 +02:00
Fabien Potencier
dfcde5b409 feature #38369 [HttpFoundation] Expired cookies string representation consistency & tests (iquito)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[HttpFoundation] Expired cookies string representation consistency & tests

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| License       | MIT

These changes add consistent behavior when converting expired cookies back and forth from string representation into `Symfony\Component\HttpFoundation\Cookie` instances in `Cookie::fromString`:

- When `Max-Age` is zero and `expires` is in the past, the `expires` date is kept as is (previous behavior: `expires` is overwritten with current timestamp because it is reset to current timestamp + `Max-Age`)
- When `Max-Age` is zero and `expires` is in the future, expires is reset to current timestamp, as `Max-Age` is the preferred "source of truth" (same as previous behavior)
- Add tests for how the Cookie class handles `Max-Age` in a cookie string and how `expires` and `Max-Age` interact
- Extract helper function `expiresTimestamp` so converting to a unix timestamp can be reused in `Cookie::fromString`

This is more a new feature than a bug fix in my mind, therefore I would include it in 5.1+.

Commits
-------

4f5d5eceb0 [HttpFoundation] Expired cookies string representation consistency & tests
2020-10-04 10:45:41 +02:00
Andreas
4f5d5eceb0 [HttpFoundation] Expired cookies string representation consistency & tests 2020-10-04 10:45:35 +02:00
Fabien Potencier
383d73ed60 feature #38407 [Mime] Prefer .jpg instead of .jpeg (fabpot)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Mime] Prefer .jpg instead of .jpeg

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 #38364 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        |

Commits
-------

89adb2133b [Mime] Prefer .jpg instead of .jpeg
2020-10-04 10:37:55 +02:00
Fabien Potencier
89adb2133b [Mime] Prefer .jpg instead of .jpeg 2020-10-04 10:36:21 +02:00
Fabien Potencier
a6103adcf9 Bump Symfony version to 5.1.8 2020-10-04 10:00:52 +02:00
Fabien Potencier
ccdb433279
Merge pull request #38406 from fabpot/release-5.1.7
released v5.1.7
2020-10-04 09:57:45 +02:00
Fabien Potencier
1d18312db6 Update VERSION for 5.1.7 2020-10-04 09:57:28 +02:00
Fabien Potencier
a2b45cc3bc Update CHANGELOG for 5.1.7 2020-10-04 09:57:11 +02:00
Fabien Potencier
8cb3387ce2 Bump Symfony version to 4.4.16 2020-10-04 09:55:30 +02:00
Fabien Potencier
d6cc026bc1
Merge pull request #38405 from fabpot/release-4.4.15
released v4.4.15
2020-10-04 09:48:33 +02:00
Fabien Potencier
e42cfee451 Update VERSION for 4.4.15 2020-10-04 09:48:13 +02:00
Fabien Potencier
edb5fed4bb feature #36479 [Notifier][WebProfilerBundle][FrameworkBundle] Add notifier section to profiler (jschaedl)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[Notifier][WebProfilerBundle][FrameworkBundle] Add notifier section to profiler

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | - <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

This is the first iteration of adding a profiler panel for the new Notifier component:

WebProfiler Toolbar:
![Screenshot 2020-10-02 at 10 26 35](https://user-images.githubusercontent.com/1880467/94903474-28bece00-049a-11eb-945c-d6ce047b35e8.png)

WebProfiler Notifier Panel:

![Screenshot 2020-10-02 at 10 28 19](https://user-images.githubusercontent.com/1880467/94903594-5277f500-049a-11eb-8c1e-27e6ec87a51c.png)
![Screenshot 2020-10-02 at 10 28 29](https://user-images.githubusercontent.com/1880467/94903591-51df5e80-049a-11eb-935a-9ba130ef69f0.png)
![Screenshot 2020-10-02 at 10 28 35](https://user-images.githubusercontent.com/1880467/94903589-5146c800-049a-11eb-8a69-28d362ef6640.png)
![Screenshot 2020-10-02 at 10 28 42](https://user-images.githubusercontent.com/1880467/94903586-50159b00-049a-11eb-97bd-382a823087a6.png)

An example project can to test the new profiler panel can be found here: https://github.com/jschaedl/notifier-profiler-integration

Commits
-------

f39e74ba9f [Notifier][WebProfilerBundle][FrameworkBundle] Add notifier section to profiler
2020-10-04 09:43:38 +02:00
Jan Schädlich
f39e74ba9f [Notifier][WebProfilerBundle][FrameworkBundle] Add notifier section to profiler 2020-10-04 09:43:31 +02:00
Fabien Potencier
d88dd13e43 Update CHANGELOG for 4.4.15 2020-10-04 09:20:11 +02:00
Fabien Potencier
f8212cc9e3 Merge branch '5.1'
* 5.1:
  Update security.he.xlf
2020-10-04 09:09:29 +02:00
Fabien Potencier
936c6afdf0 Merge branch '4.4' into 5.1
* 4.4:
  Update security.he.xlf
2020-10-04 09:09:21 +02:00
Fabien Potencier
9c1b6fc985 Merge branch '3.4' into 4.4
* 3.4:
  Update security.he.xlf
2020-10-04 09:09:09 +02:00
Fabien Potencier
62a76ba871 Merge branch '5.1'
* 5.1:
  Handle consecutive supports() calls in the RememberMeAuthenticator
2020-10-04 09:09:00 +02:00
Fabien Potencier
3b524f6d70 feature #38395 [lock] Prevent user serializing the key when store does not support it. (jderusse)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[lock] Prevent user serializing the key when store does not support it.

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

Some store relies on connection with the running process. ie. kernel relaease flock/semaphore, or zookeeper neeeds a connection to the database.

When the users tries to serialize the key to send it to another process, they are not aware that they lose the lock.

This PR throws an exception in that situation.

Commits
-------

1ec0630262 Prevent user serializing the key
2020-10-04 09:08:28 +02:00
Fabien Potencier
c6a747d64b minor #38403 Remove array return type from Request::toArray() (GrahamCampbell)
This PR was merged into the 5.2-dev branch.

Discussion
----------

Remove array return type from Request::toArray()

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

Laravel already extends Symfony's `Request` class and defines it's own `toArray` method. https://github.com/symfony/symfony/pull/38224 added a new `toArray` method to this class with a different signature to the one that is in Laravel, causing fatal errors (https://github.com/laravel/framework/issues/34660). I think the best course of action here is to remove the return type for now, and only add it in Symfony 6. This will allow Symfony 6.0 and Laravel 11 to synchronize adding the return type.

Older versions of Laravel can't just change their signature to add an array return type to them, because that would be a breaking change for Laravel users extending Laravel's request class. I'm thinking, in particular, API packages and the like, or just straight up application code.

Commits
-------

8b291a49a6 Remove array return type from Request::toArray()
2020-10-04 09:07:32 +02:00
Fabien Potencier
7db7dcc431 minor #38402 Update security.he.xlf (ben29)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.

Discussion
----------

Update security.he.xlf

Update Hebrew translation

Commits
-------

8d4c2f052d Update security.he.xlf
2020-10-04 09:06:41 +02:00
Ben Hakim
8d4c2f052d Update security.he.xlf 2020-10-04 09:06:34 +02:00
Fabien Potencier
b94fef4670 bug #38396 Handle consecutive supports() calls in the RememberMeAuthenticator (wouterj)
This PR was merged into the 5.1 branch.

Discussion
----------

Handle consecutive supports() calls in the RememberMeAuthenticator

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

If I read the issue correctly, the problem is not so much that `autoLogin()` is called in supports, but that it is called multiple times in the same request (in lazy firewalls). This is fixed by this issue.

@qurben or @fancyweb do you have an application with this error, and can you please test the patch in this PR? Please let me know if this actually fixed the issue. (if you can't, I'll create a small demo app to test this one)

Commits
-------

e0d1867b54 Handle consecutive supports() calls in the RememberMeAuthenticator
2020-10-04 09:05:27 +02:00
Fabien Potencier
200392e473 minor #38404 [HttpClient] Minor fix of type and message in ExponentialBackOff (bohanyang)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[HttpClient] Minor fix of type and message in ExponentialBackOff

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

Make the type consistent and fix an error message

Commits
-------

6149a0c04b [HttpClient] Minor fix of type and message in ExponentialBackOff
2020-10-04 09:03:11 +02:00
Fabien Potencier
42d86cf2af minor #38397 [Console] Remove "php" invokation from help messages. (rodrigoaguilera)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Console] Remove "php" invokation from help messages.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| License       | MIT

Discusstion started here:
https://github.com/symfony/symfony/pull/38349

I was a bit puzzled to find that the help for the list and help commands suggests that you call the console application by prefixing it with `php myconsoleapp`.

As suggested in the PR above I am removing the `php ` prefix from the help.

I am providing a script with a shebang like the first example suggested in the following link:
https://symfony.com/doc/current/components/console.html
Eventually I want to distribute my console app as docker image so there is no need for php installed or the users even knowing is written in php.
The script name is easy to override by just setting a different value to `$_SERVER['PHP_SELF']` but this php prefix is hardcoded into the help strings for the the two default commands available.

Slightly related to #38347 as I am trying to improve the console help output.

Commits
-------

e036c30e7a [Console] Remove "php" invokation from help messages.
2020-10-04 09:01:38 +02:00
Bohan Yang
6149a0c04b [HttpClient] Minor fix of type and message in ExponentialBackOff 2020-10-04 10:23:35 +08:00
Graham Campbell
8b291a49a6
Remove array return type from Request::toArray() 2020-10-03 23:39:59 +01:00
Rodrigo Aguilera
e036c30e7a [Console] Remove "php" invokation from help messages. 2020-10-03 16:00:31 +02:00
Fabien Potencier
8fa6b3625b Merge branch '5.1'
* 5.1:
  Fix tests
  [Lock] Fix StoreFactory to accept same DSN syntax as AbstractAdapter
  [Serializer][Minor] Fix exception message
2020-10-03 15:58:25 +02:00
Fabien Potencier
40bc14ab78 Merge branch '4.4' into 5.1
* 4.4:
  Fix tests
  [Lock] Fix StoreFactory to accept same DSN syntax as AbstractAdapter
  [Serializer][Minor] Fix exception message
2020-10-03 15:58:17 +02:00
Wouter de Jong
e0d1867b54 Handle consecutive supports() calls in the RememberMeAuthenticator 2020-10-03 15:02:03 +02:00