Commit Graph

35764 Commits

Author SHA1 Message Date
Nicolas Grekas
6d9d329deb Merge branch '3.4' into 4.0
* 3.4:
  Fix tests
  PropertyInfo\DoctrineExtractor - There is bug when indexBy is meta key
  Fix PercentType error rendering.
  [minor] SCA
  [Cache] Inline some hot function calls
2018-04-20 12:04:09 +02:00
Nicolas Grekas
9a0422ce45 Merge branch '2.8' into 3.4
* 2.8:
  PropertyInfo\DoctrineExtractor - There is bug when indexBy is meta key
  [minor] SCA
2018-04-20 12:02:27 +02:00
Nicolas Grekas
8c5fe4461b Merge branch '2.7' into 2.8
* 2.7:
  [minor] SCA
2018-04-20 11:59:25 +02:00
Nicolas Grekas
939a42f623 Fix tests 2018-04-20 11:55:01 +02:00
Nicolas Grekas
733e81345b bug #25841 [DoctrineBridge] Fix bug when indexBy is meta key in PropertyInfo\DoctrineExtractor (insekticid)
This PR was submitted for the 3.4 branch but it was merged into the 2.8 branch instead (closes #25841).

Discussion
----------

[DoctrineBridge] Fix bug when indexBy is meta key in PropertyInfo\DoctrineExtractor

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #25834 <!-- #-prefixed issue number(s), if any -->
| License       | MIT

@dunglas could you check it?
<!--
- Bug fixes must be submitted against the lowest 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 the master branch.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

583759f PropertyInfo\DoctrineExtractor - There is bug when indexBy is meta key
2018-04-20 11:36:54 +02:00
insekticid
583759f0b6 PropertyInfo\DoctrineExtractor - There is bug when indexBy is meta key 2018-04-20 11:36:43 +02:00
Nicolas Grekas
09d1a2b099 bug #26983 [TwigBridge] [Bootstrap 4] Fix PercentType error rendering. (alexismarquis)
This PR was submitted for the 4.0 branch but it was merged into the 3.4 branch instead (closes #26983).

Discussion
----------

[TwigBridge] [Bootstrap 4] Fix PercentType error rendering.

| Q             | A
| ------------- | ---
| Branch?       | 4.0
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | /
| License       | MIT
| Doc PR        | /

Fixes displaying errors for Symfony\Component\Form\Extension\Core\Type\PercentType, as shown in the following screenshots :

**Before :**
![image](https://user-images.githubusercontent.com/4643674/38994012-83ea9598-43e5-11e8-94ac-0eaee1296982.png)

**After :**
![image](https://user-images.githubusercontent.com/4643674/38994047-9f26a50e-43e5-11e8-866d-0cbe0e30b114.png)

Commits
-------

4715397 Fix PercentType error rendering.
2018-04-20 11:32:48 +02:00
Alexis MARQUIS
4715397979 Fix PercentType error rendering. 2018-04-20 11:32:41 +02:00
Nicolas Grekas
b97a4ae031 minor #26938 [minor] SCA (kalessil)
This PR was squashed before being merged into the 2.7 branch (closes #26938).

Discussion
----------

[minor] SCA

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

- Control flow tweaks

Commits
-------

877e678 [minor] SCA
2018-04-20 10:39:24 +02:00
Vladimir Reznichenko
877e67883c [minor] SCA 2018-04-20 10:39:18 +02:00
Nicolas Grekas
bf871f4f69 minor #26984 [Cache] Inline some hot function calls (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] Inline some hot function calls

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

The Cache component is typically found in critical code paths, let's inline some calls.
I didn't change all calls but only those in potential hot paths.
Submitted against 3.4 to reduce future merge conflicts.

The PR also embeds edge-case behavior fixes for `ChainAdapter`.

Commits
-------

52b4bfc [Cache] Inline some hot function calls
2018-04-20 10:33:35 +02:00
Nicolas Grekas
52b4bfc042 [Cache] Inline some hot function calls 2018-04-20 10:22:20 +02:00
Fabien Potencier
dcbfd00b02 Merge branch '3.4' into 4.0
* 3.4:
  fixed Silex project's URL
2018-04-20 08:21:32 +02:00
Fabien Potencier
d0928fc14f Merge branch '2.8' into 3.4
* 2.8:
  fixed Silex project's URL
2018-04-20 08:21:16 +02:00
Fabien Potencier
d05f0a0e03 fixed Silex project's URL 2018-04-20 08:21:07 +02:00
Fabien Potencier
bb45c75d7b Merge branch '3.4' into 4.0
* 3.4:
  fixed deprecations in tests
  fixed Twig URL
  [Cache] Add missing `@internal` tag on ProxyTrait
  fix formatting arguments in plaintext format
  Fix PSR exception context key
  Don't assume that file binary exists on *nix OS
  Fix that ESI/SSI processing can turn a \"private\" response \"public\"
  [Form] Fixed trimming choice values
  fix rendering exception stack traces
  [Routing] Fix loading multiple class annotations for invokable classes
2018-04-20 08:20:23 +02:00
Fabien Potencier
f180bfe2a2 fixed deprecations in tests 2018-04-20 08:20:06 +02:00
Fabien Potencier
437acb4357 Merge branch '2.8' into 3.4
* 2.8:
  fixed Twig URL
  Don't assume that file binary exists on *nix OS
  Fix that ESI/SSI processing can turn a \"private\" response \"public\"
  [Form] Fixed trimming choice values
2018-04-20 08:18:40 +02:00
Fabien Potencier
e8e7ff2d7b Merge branch '2.7' into 2.8
* 2.7:
  fixed Twig URL
  Don't assume that file binary exists on *nix OS
  Fix that ESI/SSI processing can turn a \"private\" response \"public\"
  [Form] Fixed trimming choice values
2018-04-20 08:15:58 +02:00
Fabien Potencier
f981f7aae8 fixed Twig URL 2018-04-20 08:14:58 +02:00
Fabien Potencier
3f71d88915 minor #26982 [Cache] Add missing @internal tag on ProxyTrait (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] Add missing `@internal` tag on ProxyTrait

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

All traits in Cache are internal. We just forgot the annotation on this one.

Commits
-------

3d7c7cf39a [Cache] Add missing `@internal` tag on ProxyTrait
2018-04-19 14:17:05 +02:00
Nicolas Grekas
3d7c7cf39a [Cache] Add missing @internal tag on ProxyTrait 2018-04-19 13:01:15 +02:00
Fabien Potencier
e98454664a bug #26980 [TwigBundle] fix formatting arguments in plaintext format (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBundle] fix formatting arguments in plaintext format

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

f1c1d36fda fix formatting arguments in plaintext format
2018-04-19 11:13:32 +02:00
Christian Flothmann
f1c1d36fda fix formatting arguments in plaintext format 2018-04-19 10:26:28 +02:00
Fabien Potencier
b0410d457e bug #26886 Don't assume that file binary exists on *nix OS (teohhanhui)
This PR was merged into the 2.7 branch.

Discussion
----------

Don't assume that file binary exists on *nix OS

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Certain lightweight distributions such as Alpine Linux (popular for smaller Docker images) do not include it by default.

Commits
-------

e2c1f24fbd Don't assume that file binary exists on *nix OS
2018-04-17 12:07:04 +02:00
Fabien Potencier
2a529633f5 bug #26959 [Console] Fix PSR exception context key (scaytrase)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix PSR exception context key

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26957
| License       | MIT
| Doc PR        | None

Fixes context key according to PSR-3
cc. @xabbuh

Commits
-------

a28393e482 Fix PSR exception context key
2018-04-17 12:05:38 +02:00
Pavel.Batanov
a28393e482
Fix PSR exception context key 2018-04-17 12:32:18 +03:00
Teoh Han Hui
e2c1f24fbd Don't assume that file binary exists on *nix OS
Certain lightweight distributions such as Alpine Linux (popular for smaller Docker images) do not include it by default.
2018-04-17 11:15:40 +02:00
Fabien Potencier
8f2132fce3 bug #26899 [Routing] Fix loading multiple class annotations for invokable classes (1ed)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] Fix loading multiple class annotations for invokable classes

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | -

The support for full route definition for invokable controllers as class annotation was introduced by
https://github.com/symfony/symfony/pull/2172, but that works with one route only, which is inconsistent with how `@Route` works at other places. This PR adds support for multiple class annotations for invokable controllers and fixes the inconsistency.

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest 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 the master branch.
-->

Commits
-------

2a9c668ad7 [Routing] Fix loading multiple class annotations for invokable classes
2018-04-17 09:10:52 +02:00
Fabien Potencier
d17d38d291 bug #26643 Fix that ESI/SSI processing can turn a "private" response "public" (mpdude)
This PR was squashed before being merged into the 2.7 branch (closes #26643).

Discussion
----------

Fix that ESI/SSI processing can turn a "private" response "public"

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Under the condition that
* we are merging in at least one *embedded* response,
* all *embedded* responses are `public`,
* the *main* response is `private` and
* all responses use expiration-based caching (note: no `s-maxage` on the *main* response)

... the resulting response will turn to `Cache-Control: public`.

The real issue is that when all responses use expiration-based caching, a combined max age is computed. This is set on the *main* response using `Response::setSharedMaxAge()`, which implicitly sets `Cache-Control: public`.

The fix provided in this PR solves the problem by applying the same logic to the *main* response that is applied for *embedded* responses, namely that responses with `!Response::isCacheable()` will make the resulting response have `Cache-Control: private, no-cache, must-revalidate` and have `(s)max-age` removed.

This makes the change easy to understand, but makes responses uncacheable too often. This is because the `Response::isCacheable()` method was written to determine whether it is safe for a shared cache to keep the response, which is not the case as soon as a `private` response is involved. This might be improved upon in another PR.

Commits
-------

3d27b5946d Fix that ESI/SSI processing can turn a \"private\" response \"public\"
2018-04-16 19:47:59 +02:00
Matthias Pigulla
3d27b5946d Fix that ESI/SSI processing can turn a \"private\" response \"public\" 2018-04-16 19:47:52 +02:00
Fabien Potencier
a3af3d3ec2 bug #26932 [Form] Fixed trimming choice values (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed trimming choice values

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #24247, #24712
| License       | MIT
| Doc PR        | symfony/symfony-docs#9598

Follows #24712 discussion.

Commits
-------

00cdf5e0a5 [Form] Fixed trimming choice values
2018-04-16 19:16:07 +02:00
Fabien Potencier
baeb1bf671 bug #26922 [TwigBundle] fix rendering exception stack traces (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBundle] fix rendering exception stack traces

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

99302e72fc fix rendering exception stack traces
2018-04-16 16:11:39 +02:00
HeahDude
00cdf5e0a5 [Form] Fixed trimming choice values 2018-04-15 21:28:23 +02:00
Nicolas Grekas
594925a934 Merge branch '3.4' into 4.0
* 3.4:
  [HttpKernel] Make ServiceValueResolver work if controller namespace starts with a backslash in routing
  Add d-block to bootstrap 4 alerts
  [Console] Don't go past exact matches when autocompleting
  [DI] Improve error message for non-autowirable scalar argument
  Disable autoloader call on interface_exists check
  [Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't an existing class
  [HttpKernel] Dont create mock cookie for new sessions in tests
2018-04-14 11:34:42 -05:00
Nicolas Grekas
0a02fb1bdd Merge branch '2.8' into 3.4
* 2.8:
  [Console] Don't go past exact matches when autocompleting
  Disable autoloader call on interface_exists check
  [Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't an existing class
2018-04-14 11:33:56 -05:00
Nicolas Grekas
32c04bdcbb Merge branch '2.7' into 2.8
* 2.7:
  [Console] Don't go past exact matches when autocompleting
  Disable autoloader call on interface_exists check
  [Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't an existing class
2018-04-14 11:27:29 -05:00
Nicolas Grekas
811c4dd7cd bug #26773 [HttpKernel] Make ServiceValueResolver work if controller namespace starts with a backslash in routing (mathieutu)
This PR was submitted for the 4.0 branch but it was squashed and merged into the 3.4 branch instead (closes #26773).

Discussion
----------

[HttpKernel] Make ServiceValueResolver work if controller namespace starts with a backslash in routing

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26772
| License       | MIT

Hi folks,

This PR fixes https://github.com/symfony/symfony/issues/26772:
>Controller "App\Controllers\Foo" requires that you provide a value for the "$foo" argument. Either the argument is nullable and no null value has been provided, no default value has been provided or because there is a non optional argument after this one.

Thank you for your work!

PS: This is my first (of many planned!) PR to Symfony, so please let me know if I did something wrong.

Commits
-------

3b47441 [HttpKernel] Make ServiceValueResolver work if controller namespace starts with a backslash in routing
2018-04-14 10:06:58 -05:00
Mathieu TUDISCO
3b47441fd5 [HttpKernel] Make ServiceValueResolver work if controller namespace starts with a backslash in routing 2018-04-14 10:06:52 -05:00
Nicolas Grekas
6bdaa406d2 bug #26870 Add d-block to bootstrap 4 alerts (Normunds)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #26870).

Discussion
----------

Add d-block to bootstrap 4 alerts

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26869
| License       | MIT
| Doc PR        | N/A

Commits
-------

40bd8bd Add d-block to bootstrap 4 alerts
2018-04-14 09:57:28 -05:00
Normunds
40bd8bd797 Add d-block to bootstrap 4 alerts 2018-04-14 09:54:06 -05:00
Nicolas Grekas
16ae72059e bug #26857 [HttpKernel] Dont create mock cookie for new sessions in tests (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Dont create mock cookie for new sessions in tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26493
| License       | MIT
| Doc PR        | -

@romainneutron can you please check if this fixes your issue?

Commits
-------

86b850e [HttpKernel] Dont create mock cookie for new sessions in tests
2018-04-14 08:14:37 -05:00
Christian Flothmann
99302e72fc fix rendering exception stack traces 2018-04-13 17:45:35 +02:00
Gábor Egyed
2a9c668ad7 [Routing] Fix loading multiple class annotations for invokable classes 2018-04-12 11:01:03 +02:00
Tobias Schultze
11bdd807ab minor #26856 [DI] Improve error message for non-autowirable scalar argument (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Improve error message for non-autowirable scalar argument

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26838
| License       | MIT
| Doc PR        | -

Commits
-------

7f398117f4 [DI] Improve error message for non-autowirable scalar argument
2018-04-10 19:23:09 +02:00
Robin Chalas
10674688da bug #26875 [Console] Don't go past exact matches when autocompleting (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Don't go past exact matches when autocompleting

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #21789
| License       | MIT
| Doc PR        | -

Commits
-------

adba79a [Console] Don't go past exact matches when autocompleting
2018-04-10 11:58:27 +02:00
Nicolas Grekas
adba79a6b0 [Console] Don't go past exact matches when autocompleting 2018-04-09 15:41:45 -05:00
Nicolas Grekas
7f398117f4 [DI] Improve error message for non-autowirable scalar argument 2018-04-09 15:40:31 -05:00
Nicolas Grekas
0f9c45e145 bug #26823 [Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't existing class (Pascal Montoya, pmontoya)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't existing class

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26313
| License       | MIT

If @Assert\Valid is applied to a string value, the value is searched in metadata cache and some characters aren't allowed in this cache. This create an unexpected exception.

Class existence is now tested before cache read.

Commits
-------

5198f43 Disable autoloader call on interface_exists check
cd91420 [Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't an existing class
2018-04-09 13:33:44 -05:00
Pascal Montoya
5198f435a0
Disable autoloader call on interface_exists check 2018-04-09 10:32:24 +02:00