Commit Graph

36799 Commits

Author SHA1 Message Date
Nicolas Grekas
2c1b1bad6e bug #34464 [Form] group constraints when calling the validator (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] group constraints when calling the validator

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

Follow up of https://github.com/symfony/symfony/pull/34081
Spotted during the workshop at SymfonyCon, while trying to fix deprecation notices on symfony-demo:
the Form component currently passes constraints one by one for validation, effectively preventing the validator from taking care of cross-constraints dependencies.

This PR fixes it.

This will prevent ppl from having to fix things like
> Using the "Symfony\Component\Validator\Constraints\Length" constraint with the "min" option without setting the "allowEmptyString" one is deprecated and defaults to true. In 5.0, it will become optional and default to false.

Commits
-------

d15f77f33e [Form] group constraints when calling the validator
2019-11-21 08:01:17 +01:00
Nicolas Grekas
698cc6bb3b [Routing] fix tests 2019-11-20 14:44:34 +01:00
Nicolas Grekas
6f110581df Merge branch '4.3' into 4.4
* 4.3:
  [DependencyInjection] Fix dumping multiple deprecated aliases
2019-11-20 14:27:43 +01:00
Nicolas Grekas
d15f77f33e [Form] group constraints when calling the validator 2019-11-20 13:58:23 +01:00
Nicolas Grekas
8d84ac34a5 Remove wrong @group legacy annotations 2019-11-20 11:44:55 +01:00
Soner Sayakci
60b0dae174
[DependencyInjection] Fix dumping multiple deprecated aliases 2019-11-19 16:12:52 +01:00
Nicolas Grekas
12f00e3e15 Merge branch '4.3' into 4.4
* 4.3:
  allow button names to start with uppercase letter
2019-11-19 13:20:06 +01:00
Christian Flothmann
d811b0e9b5 allow button names to start with uppercase letter 2019-11-19 08:55:12 +01:00
Baptiste Clavié
8a460cefef
States that the HttpClient provides a Http Async implementation 2019-11-18 13:47:27 +01:00
Robin Chalas
aab9b43d03 [HttpKernel] Make ErrorListener::onKernelException()'s dispatcher argument explicit 2019-11-18 00:49:10 +01:00
Robin Chalas
76d3112d8e bug #34428 [Security] Fix best encoder not wired using migrate_from (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Fix best encoder not wired using migrate_from

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

Thanks @wouterj for spotting it.

Commits
-------

4132a60392 [Security] Fix best encoder not wired using migrate_from
2019-11-17 23:59:41 +01:00
Graham Campbell
754fbe41fb
Removed extra whitespace 2019-11-17 22:49:13 +00:00
Robin Chalas
4132a60392 [Security] Fix best encoder not wired using migrate_from 2019-11-17 23:41:50 +01:00
Nicolas Grekas
80e4ed1a32 Merge branch '4.3' into 4.4
* 4.3:
  [Finder] Fixed docs
  Fix PR template
  Adjust pull request template for 5.0 branchout
  Update HttpKernel.php
2019-11-17 22:56:56 +01:00
Nicolas Grekas
90431e78e2 Merge branch '3.4' into 4.3
* 3.4:
  [Finder] Fixed docs
  Fix PR template
  Adjust pull request template for 5.0 branchout
  Update HttpKernel.php
2019-11-17 22:56:13 +01:00
Markus Staab
e7d0787a4d [Finder] Fixed docs 2019-11-17 22:55:15 +01:00
Nardberjean
7b7f966711 Update HttpKernel.php 2019-11-17 21:23:00 +01:00
Fabien Potencier
7ed6d35f2c bumped Symfony version to 4.4.0 2019-11-17 15:29:13 +01:00
Fabien Potencier
bef727c673 updated VERSION for 4.4.0-RC1 2019-11-17 15:24:08 +01:00
Nicolas Grekas
0c12b9e31b Merge branch '4.3' into 4.4
* 4.3:
  [Cache] Disable igbinary on PHP >= 7.4
2019-11-17 12:01:12 +01:00
Nicolas Grekas
a2c924d772 [Cache] Disable igbinary on PHP >= 7.4 2019-11-17 11:56:39 +01:00
Nicolas Grekas
88cf8a7d48 Merge branch '4.3' into 4.4
* 4.3:
  [FrameworkBundle] Remove project dir from Translator cache vary scanned directories
  [HttpFoundation] Allow redirecting to URLs that contain a semicolon
  catch exceptions when using PDO directly
  [SecurityBundle] fix failing test
2019-11-17 11:10:42 +01:00
Nicolas Grekas
d20f544e14 Merge branch '3.4' into 4.3
* 3.4:
  [HttpFoundation] Allow redirecting to URLs that contain a semicolon
2019-11-17 11:10:32 +01:00
Fabien Potencier
085c6c069e bug #34347 [Messenger] Perform no deep merging of bus middleware (vudaltsov)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Perform no deep merging of bus middleware

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

This change helps in case one needs to configure a bus differently for a custom environment while keeping existing handlers attached by name.

Commits
-------

c264583f28 [Messenger] Perform no deep merging of bus middleware
2019-11-17 11:09:18 +01:00
Valentin Udaltsov
c264583f28 [Messenger] Perform no deep merging of bus middleware 2019-11-17 11:02:20 +01:00
Fabien Potencier
2b05b71999 feature #34405 [HttpFoundation] Added possibility to configure expiration time in redis session handler (mantulo)
This PR was squashed before being merged into the 4.4 branch (closes #34405).

Discussion
----------

[HttpFoundation] Added possibility to configure expiration time in redis session handler

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

Add possibility to manually configure expiration time in redis session handler.

Commits
-------

4a9d947b1a [HttpFoundation] Added possibility to configure expiration time in redis session handler
2019-11-17 11:00:25 +01:00
Vladimir
4a9d947b1a [HttpFoundation] Added possibility to configure expiration time in redis session handler 2019-11-17 11:00:20 +01:00
Fabien Potencier
c1cab2bbc7 bug #34384 [DoctrineBridge] Improve queries parameters display in Profiler (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[DoctrineBridge] Improve queries parameters display in Profiler

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

##  Stringable object:
_The query is runnable._
### Before
<img width="773" alt="Screenshot 2019-11-14 at 21 05 53" src="https://user-images.githubusercontent.com/3658119/68892948-669cf180-0724-11ea-889b-8ce781956fc7.png">

### After
<img width="780" alt="Screenshot 2019-11-14 at 20 56 38" src="https://user-images.githubusercontent.com/3658119/68892978-787e9480-0724-11ea-843b-70a595633192.png">

## Non stringable object:
_Exception, the query is not runnable._
### Before
<img width="783" alt="Screenshot 2019-11-14 at 21 05 31" src="https://user-images.githubusercontent.com/3658119/68892993-80d6cf80-0724-11ea-9961-e32b65f81508.png">

### After
<img width="622" alt="Screenshot 2019-11-14 at 20 57 17" src="https://user-images.githubusercontent.com/3658119/68893007-87fddd80-0724-11ea-98cb-2ef695135673.png">

## Error with an object:
_`ConversionException` or a `\TypeError` when you specify the type when you set the parameter but you provide an invalid value and this value is an object (eg `->setParameter('foo', new \stdClass(), 'date')`), the query is not runnable._
### Before
<img width="775" alt="Screenshot 2019-11-14 at 21 04 45" src="https://user-images.githubusercontent.com/3658119/68893078-a9f76000-0724-11ea-9e9a-bb806ffa0a73.png">

### After
<img width="821" alt="Screenshot 2019-11-14 at 20 59 23" src="https://user-images.githubusercontent.com/3658119/68893098-b24f9b00-0724-11ea-8e9d-7179725b8bc1.png">

## Error with anything else:
_`ConversionException` or a `\TypeError` when you specify the type when you set the parameter but you provide an invalid value and this value is not an object (eg `->setParameter('foo', 'bar', 'date')`), the query is not runnable._
### Before
<img width="809" alt="Screenshot 2019-11-14 at 21 05 10" src="https://user-images.githubusercontent.com/3658119/68893031-93e99f80-0724-11ea-9c23-f8d05f2dbfbb.png">

### After
<img width="832" alt="Screenshot 2019-11-14 at 20 57 54" src="https://user-images.githubusercontent.com/3658119/68893055-9d730780-0724-11ea-8ce1-a7b8946aaf94.png">

The new `runnable` key will be used in `DoctrineBundle` profiler template to hide the `View runnable query` link when the query is not runnable.

Commits
-------

fe15f51d4d [DoctrineBridge] Improve queries parameters display in Profiler
2019-11-17 10:53:37 +01:00
Thomas Calvet
e75e01dda4 [FrameworkBundle] Remove project dir from Translator cache vary scanned directories 2019-11-17 10:27:11 +01:00
Mark Beech
bd0637ebe4 [HttpFoundation] Allow redirecting to URLs that contain a semicolon 2019-11-17 10:18:38 +01:00
David Prévot
1883af4d4b Drop useless executable bit 2019-11-16 08:59:35 -10:00
Thomas Calvet
fe15f51d4d [DoctrineBridge] Improve queries parameters display in Profiler 2019-11-16 19:56:08 +01:00
Nicolas Grekas
1fbe6157ba bug #34408 [Cache] catch exceptions when using PDO directly (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Cache] catch exceptions when using PDO directly

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

Commits
-------

5c1f5594f5 catch exceptions when using PDO directly
2019-11-16 18:08:55 +01:00
Christian Flothmann
5c1f5594f5 catch exceptions when using PDO directly 2019-11-16 17:52:07 +01:00
Nicolas Grekas
eaca085aa4 [SecurityBundle] fix failing test 2019-11-16 16:50:51 +01:00
Nicolas Grekas
4ac626a482 Merge branch '4.3' into 4.4
* 4.3:
  [HttpFoundation] fix docblock
  Fix MySQL column type definition.
  Link the right file depending on the new version
  [Config] fix id-generation for GlobResource
  [Finder] Allow ssh2 stream wrapper for sftp
  [DI] Use reproducible entropy to generate env placeholders
  [WebProfilerBundle] Require symfony/twig-bundle
  bumped Symfony version to 4.3.9
  updated VERSION for 4.3.8
  updated CHANGELOG for 4.3.8
  bumped Symfony version to 3.4.36
  updated VERSION for 3.4.35
  updated CHANGELOG for 3.4.35
2019-11-16 16:22:42 +01:00
Nicolas Grekas
769aced459 Merge branch '3.4' into 4.3
* 3.4:
  Fix MySQL column type definition.
2019-11-16 16:18:16 +01:00
Nicolas Grekas
4d9b6f1bbd [HttpFoundation] fix docblock 2019-11-16 16:17:02 +01:00
Robin Chalas
585216a8e8 [HttpKernel] Flatten "exception" controller argument if not typed 2019-11-16 13:16:23 +01:00
Jérémie Broutier
51c5f69274 Fix MySQL column type definition.
Fix wrong MySQL column type definition causing Numeric value out of range exception.

Ref #34409
2019-11-16 12:41:30 +01:00
Nicolas Grekas
476042d0fb Merge branch '3.4' into 4.3
* 3.4:
  Link the right file depending on the new version
  [Finder] Allow ssh2 stream wrapper for sftp
  [WebProfilerBundle] Require symfony/twig-bundle
  bumped Symfony version to 3.4.36
  updated VERSION for 3.4.35
  updated CHANGELOG for 3.4.35
2019-11-16 10:07:40 +01:00
Nicolas Grekas
278dcfb380 bug #34403 [Cache] Redis Tag Aware warn on wrong eviction policy (andrerom)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Cache] Redis Tag Aware warn on wrong eviction policy

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| Deprecations? | no
| Tickets       | n.a.
| License       | MIT
| Doc PR        | n.a.

Adds validation to make sure Redis has been setup with the supported eviction policy to avoid surprises when cache suddenly is inconsistent.

This PR replaces #34178, and instead of checking in constructor and throwing it only checks on save, warns about this and refuses to save cache as suggested on the other PR.

TODO:
- [x] ~Adapt test setups for this to set correct eviction policy~ _It already uses default noeviction_

Commits
-------

e77f6de1e8 [Cache] Redis Tag Aware warn on wrong eviction policy
2019-11-16 09:53:59 +01:00
André R
e77f6de1e8 [Cache] Redis Tag Aware warn on wrong eviction policy 2019-11-16 09:53:52 +01:00
Nicolas Grekas
fda36e84b3 bug #34400 [HttpKernel] collect bundle classes, not paths (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] collect bundle classes, not paths

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

Commits
-------

7824d75ac3 [HttpKernel] collect bundle classes, not paths
2019-11-16 09:51:49 +01:00
Nicolas Grekas
a90de43a8e bug #34398 [Config] fix id-generation for GlobResource (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Config] fix id-generation for GlobResource

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

I never encountered any issues related to this but still, it's a fix.

Commits
-------

6adbfa2ae7 [Config] fix id-generation for GlobResource
2019-11-16 09:51:12 +01:00
Nicolas Grekas
114a4b86ac bug #34404 [HttpClient] fix HttpClientDataCollector (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix HttpClientDataCollector

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

Commits
-------

f51adc53f8 [HttpClient] fix HttpClientDataCollector
2019-11-16 09:50:26 +01:00
Nicolas Grekas
f51adc53f8 [HttpClient] fix HttpClientDataCollector 2019-11-16 09:45:13 +01:00
Fabien Potencier
1374abd6e8 minor #34399 [HttpKernel] dont check cache freshness more than once per process (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] dont check cache freshness more than once per process

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

While running some functional tests in a loop, I noticed that half the time is spent computing cache freshness. This makes no sense - this mechanism is supposed to run once per process.

Here is the Blackfire comparison:
https://blackfire.io/profiles/compare/a4f2eb44-ae85-440b-ae87-edf43c2b2ef7/graph

![image](https://user-images.githubusercontent.com/243674/68955196-c5667780-07c5-11ea-9a19-f8e765664a8e.png)

Commits
-------

7f9556ce19 [HttpKernel] dont check cache freshness more than once per process
2019-11-15 18:39:48 +01:00
Nicolas Grekas
7824d75ac3 [HttpKernel] collect bundle classes, not paths 2019-11-15 17:50:43 +01:00
Nicolas Grekas
6adbfa2ae7 [Config] fix id-generation for GlobResource 2019-11-15 16:28:20 +01:00