Commit Graph

39309 Commits

Author SHA1 Message Date
Nicolas Grekas 721304eed4 Merge branch '4.1'
* 4.1:
  [PropertyAccess] make cache keys encoding bijective
2018-11-26 13:19:54 +01:00
Nicolas Grekas 97cca73de5 Merge branch '3.4' into 4.1
* 3.4:
  [PropertyAccess] make cache keys encoding bijective
2018-11-26 13:16:25 +01:00
Nicolas Grekas 1f59fa4d79 bug #29332 [PropertyAccess] make cache keys encoding bijective (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyAccess] make cache keys encoding bijective

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/29329#issuecomment-441585992
| License       | MIT
| Doc PR        | -

Commits
-------

4fe566bbc6 [PropertyAccess] make cache keys encoding bijective
2018-11-26 13:15:19 +01:00
Nicolas Grekas 4fe566bbc6 [PropertyAccess] make cache keys encoding bijective 2018-11-26 13:13:27 +01:00
Nicolas Grekas 124d07d878 Merge branch '4.1'
* 4.1:
  fix merge
2018-11-26 12:49:31 +01:00
Nicolas Grekas 4a717266c6 fix merge 2018-11-26 12:45:21 +01:00
Nicolas Grekas 2261e72896 Merge branch '4.1'
* 4.1: (23 commits)
  [Routing] fix trailing slash redirection when using RedirectableUrlMatcher
  [PropertyAccessor] fix encoding of cache keys
  [WebProfiler] Detect empty file paths in file viewer
  fixed CS
  Changes for upcoming Travis' infra migration
  Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD
  [MonologBridge] Return empty list for unknonwn requests
  [DomCrawler] exclude fields inside "template" tags
  Use XLIFF source rather than resname when there's no target
  [DoctrineBridge] catch errors while converting to db values in data collector
  [DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider
  [EventDispatcher] Unwrap wrapped listeners internally
  [Routing] fix trailing slash redirection when using RedirectableUrlMatcher
  Removed the return type phpdoc
  fix authorization checker variable name
  [Routing] Remove duplicate schemes and methods for invokable controllers
  Indentation error
  [HttpFoundation] Fix trailing space for mime-type with parameters
  [HttpFoundation] Fixed absolute Request URI with default port
  [Bridge/PhpUnit] fix the fix
  ...
2018-11-26 11:55:26 +01:00
Nicolas Grekas 9dc9d7e0b7 Merge branch '3.4' into 4.1
* 3.4:
  [Routing] fix trailing slash redirection when using RedirectableUrlMatcher
  [PropertyAccessor] fix encoding of cache keys
  [WebProfiler] Detect empty file paths in file viewer
  fixed CS
  Changes for upcoming Travis' infra migration
  Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD
  [DomCrawler] exclude fields inside "template" tags
  Use XLIFF source rather than resname when there's no target
  [DoctrineBridge] catch errors while converting to db values in data collector
  [DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider
  [EventDispatcher] Unwrap wrapped listeners internally
  Indentation error
  [HttpFoundation] Fix trailing space for mime-type with parameters
  [HttpFoundation] Fixed absolute Request URI with default port
  properly parse backslashes in unquoted env vars
  Use intersection type when referring to ParentNodeDefinitionInterface
  [BrowserKit] fixed BC Break for HTTP_HOST header; implemented same behaviour for HTTPS server parameter
2018-11-26 11:26:29 +01:00
Nicolas Grekas 95ebc9f38f bug #29298 [Routing] fix trailing slash redirection when using RedirectableUrlMatcher (nicolas-grekas)
This PR was merged into the 4.1 branch.

Discussion
----------

[Routing] fix trailing slash redirection when using RedirectableUrlMatcher

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

This is #29297 for 4.1

Commits
-------

6968000a3c [Routing] fix trailing slash redirection when using RedirectableUrlMatcher
2018-11-26 11:24:14 +01:00
Nicolas Grekas 0878006e22 bug #29297 [Routing] fix trailing slash redirection when using RedirectableUrlMatcher (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] fix trailing slash redirection when using RedirectableUrlMatcher

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

This fixes #29287 by considering that the behavior of the dumped matcher is the correct one: lower priority routes never impact previous ones. I think it's what makes the most sense because that's what requires the most local knowledge to understand what's going on (ie that's the less surprising behavior).

Commits
-------

dc4c3f6927 [Routing] fix trailing slash redirection when using RedirectableUrlMatcher
2018-11-26 11:22:13 +01:00
Nicolas Grekas 11053c5e86 Merge branch '2.8' into 3.4
* 2.8:
  fixed CS
  Changes for upcoming Travis' infra migration
  Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD
  [DomCrawler] exclude fields inside "template" tags
  Use XLIFF source rather than resname when there's no target
  [DoctrineBridge] catch errors while converting to db values in data collector
  [DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider
  Indentation error
  [HttpFoundation] Fix trailing space for mime-type with parameters
  Use intersection type when referring to ParentNodeDefinitionInterface
  [BrowserKit] fixed BC Break for HTTP_HOST header; implemented same behaviour for HTTPS server parameter
2018-11-26 11:17:44 +01:00
Fabien Potencier 11fde69c4c bug #29313 [PropertyAccessor] fix encoding of cache keys (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyAccessor] fix encoding of cache keys

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

Commits
-------

4568a0c904 [PropertyAccessor] fix encoding of cache keys
2018-11-26 10:46:06 +01:00
Nicolas Grekas e728edb7b8 bug #29328 [HttpKernel] handle anonymous classes when generating the dumped container class name (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[HttpKernel] handle anonymous classes when generating the dumped container class name

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

Commits
-------

ac84cb2fbe [HttpKernel] handle anonymous classes when generating the dumped container class name
2018-11-26 10:40:11 +01:00
Nicolas Grekas 7d99badff7 [Cache] fix typo 2018-11-26 10:38:19 +01:00
Fabien Potencier 316f96ea95 minor #28912 [Config] Use intersection type when referring to ParentNodeDefinitionInterface (thewilkybarkid)
This PR was merged into the 2.8 branch.

Discussion
----------

[Config] Use intersection type when referring to ParentNodeDefinitionInterface

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

Allows PHPStan to understand it correctly (refs https://github.com/libero/content-api-bundle/pull/2#discussion_r226237763).

PHPStorm 2018.3 will add support for it too, but to help older versions I've reversed the order (so `NodeDefinition` is recognised).

Commits
-------

e9cdabe570 Use intersection type when referring to ParentNodeDefinitionInterface
2018-11-26 10:38:12 +01:00
Fabien Potencier 7be8ca5079 bug #28917 [DoctrineBridge] catch errors while converting to db values in data collector (alekitto)
This PR was merged into the 2.8 branch.

Discussion
----------

[DoctrineBridge] catch errors while converting to db values in data collector

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

When the profiler is enabled and collecting doctrine queries data, if a query fails because of `ConversionException` or another error thrown while resolving parameters, the data collector is also throwing the same error.

This should fix this case. The tests for this case cannot be executed in 5.4 because Doctrine 2.5 fails with a fatal error in `DateType`.

Commits
-------

61c4531292 [DoctrineBridge] catch errors while converting to db values in data collector
2018-11-26 10:36:25 +01:00
Nicolas Grekas ac84cb2fbe [HttpKernel] handle anonymous classes when generating the dumped container class name 2018-11-26 10:17:19 +01:00
Nicolas Grekas dc4c3f6927 [Routing] fix trailing slash redirection when using RedirectableUrlMatcher 2018-11-26 09:40:22 +01:00
Nicolas Grekas 4568a0c904 [PropertyAccessor] fix encoding of cache keys 2018-11-26 09:15:01 +01:00
Fabien Potencier f747ea90a3 bug #29317 [WebProfiler] Detect non-file paths in file viewer (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfiler] Detect non-file paths in file viewer

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

We actually link directories sometimes :) now looks like:

![image](https://user-images.githubusercontent.com/1047696/48981263-7b2b4880-f0d3-11e8-9334-9e2f45d62c09.png)

Commits
-------

71aade3622 [WebProfiler] Detect empty file paths in file viewer
2018-11-26 08:39:17 +01:00
Roland Franssen 71aade3622 [WebProfiler] Detect empty file paths in file viewer 2018-11-26 08:36:52 +01:00
Fabien Potencier 511b070ed6 bug #29305 [EventDispatcher] Unwrap wrapped listeners internally (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[EventDispatcher] Unwrap wrapped listeners internally

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | partially #24275
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

I believe what happens is we re-register the listeners on the wrapped dispatcher, so in case of sub request we get those and wrap it again. The profiler seems to confirm this in case of an exception (default 404 here) and thus creates a sub-request.

## Before: (main request)

No exception: (OK)

![image](https://user-images.githubusercontent.com/1047696/48968597-295ec180-eff2-11e8-982c-756e9019e107.png)

Exception: (KO)

![image](https://user-images.githubusercontent.com/1047696/48968612-4abfad80-eff2-11e8-8556-37bfbd51bc3b.png)

## After (main request):

No exception: same

Exception: (OK)

![image](https://user-images.githubusercontent.com/1047696/48968636-9f632880-eff2-11e8-983e-b4099133600b.png)

I haven't furhter investigated if we should split events per request as done in #23659 for logs. It seems somewhere we deduplicate events.. so im not sure the profiler actually shows correct data.

Commits
-------

448e2e2445 [EventDispatcher] Unwrap wrapped listeners internally
2018-11-26 08:28:51 +01:00
Fabien Potencier 18b3a52389 fixed CS 2018-11-26 08:26:42 +01:00
Fabien Potencier 661225075c bug #29302 [Contracts][Cache] allow retrieving metadata of cached items (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Contracts][Cache] allow retrieving metadata of cached items

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

We added `ItemInterface::getMetadata()` because getting them in userland is useful to propagate to higher level caches (eg sending tags + remaining ttl to Varnish).
But we forgot to add a way to retrieve them when using the new `CacheInterface::get()`.
This PR fixes it by adding a 4th `&$metadata` to the method.

Commits
-------

302b8446a7 [Contracts][Cache] allow retrieving metadata of cached items
2018-11-26 08:23:01 +01:00
Fabien Potencier 14931b182f bug #29315 [DI] fix copying expression providers when analyzing the service graph (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[DI] fix copying expression providers when analyzing the service graph

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

Courtesy of @mishal, thanks for providing all the details.

Commits
-------

246164f748 [DI] fix copying expression providers when analyzing the service graph
2018-11-26 08:21:08 +01:00
Fabien Potencier 8f2ad36ff4 bug #27314 [DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider (PF4Public)
This PR was merged into the 2.8 branch.

Discussion
----------

[DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider

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

Commits
-------

0248d4f566 [DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider
2018-11-26 08:16:44 +01:00
Fabien Potencier d788976d7b bug #29310 [MonologBridge] Return empty list for unknown requests (ro0NL)
This PR was merged into the 4.1 branch.

Discussion
----------

[MonologBridge] Return empty list for unknown requests

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Small continuation of #23659. Currently if the specified request is unknown, you'll get all available requests merged. This fixes it.

Commits
-------

69be8e649e [MonologBridge] Return empty list for unknonwn requests
2018-11-26 08:13:50 +01:00
Fabien Potencier 22784d7037 bug #29316 [VarDumper] Fix ClassStub ellipsis (ro0NL)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarDumper] Fix ClassStub ellipsis

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

Confirmed by @nicolas-grekas this is the right fix.

Before:

![image](https://user-images.githubusercontent.com/1047696/48979309-56c27280-f0b9-11e8-85f8-5ce6837b58fc.png)

After:

![image](https://user-images.githubusercontent.com/1047696/48979310-617d0780-f0b9-11e8-8c43-b12febc1c859.png)

Commits
-------

88f4ba165f [VarDumper] Fix ClassStub ellipsis
2018-11-26 08:07:42 +01:00
Fabien Potencier 4ca1fe3f1b bug #29300 [Translation] fix dumping catalogues cache (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Translation] fix dumping catalogues cache

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

Commits
-------

4aab6e72c1 [Translation] fix dumping catalogues cache
2018-11-26 08:03:05 +01:00
Fabien Potencier c0bfdeb5c5 bug #29308 [Translation] Use XLIFF source rather than resname when there's no target (thewilkybarkid)
This PR was merged into the 2.8 branch.

Discussion
----------

[Translation] Use XLIFF source rather than resname when there's no target

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

Relates to https://github.com/symfony/symfony/issues/20076#issuecomment-251552328. If there's no `<target>` in an XLIFF but there is a `@resname` then that's used rather than the `<source>`.

If I'm using translation keys and my source locale is `en`, then it's a bit redundant to duplicate the `<source>` in the `<target>` in the `en` file (since there is no translation).

This isn't changing the behaviour when `<target>` is present but empty.

(Caveat: I'm definitely not an expert on XLIFF.)

Commits
-------

8633ebbca0 Use XLIFF source rather than resname when there's no target
2018-11-26 08:01:16 +01:00
Fabien Potencier 8a60f9870f bug #26244 [BrowserKit] fixed BC Break for HTTP_HOST header (brizzz)
This PR was merged into the 2.8 branch.

Discussion
----------

[BrowserKit] fixed BC Break for HTTP_HOST header

| Q             | A
| ------------- | ---
| Branch?       | 2.7, 2.8, 3.x, 4.x
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | #22933
| License       | MIT
| Doc PR        | n/a

The situation well described in the original issue. I will add only:

- #10549 - makes server parameters to take precedence over URI.
- #16265 - partially revererts  #10549. Makes server parameters do not affect URI. But this is only true for `Client::request()`. It is still possible to set host for URI by `Client::setServerParameters()` when URI is realative (see examples below).

I propose a compromise solution: add to HTTP_HOST header power to override URI when it is relative.

Proposed solution:
- if the request URI is relative, then use the HTTP_HOST header passed to Client::request() to generate an absolute URI
- if the request URI is absolute, then ignore the HTTP_HOST header (as it now works)
- do the same with HTTPS server parameter

Profit:
- fix BC Break
- the documentation will be correct
  - http://symfony.com/doc/2.8/routing/hostname_pattern.html#testing-your-controllers
  - https://symfony.com/doc/2.8/testing.html#testing-configuration

Before:

```
$client->setServerParameters(['HTTP_HOST' => 'example.com']);
$client->request('GET', '/');
$this->assertEquals('http://example.com/', $client->getRequest()->getUri());

$client->request('GET', '/', [], [], ['HTTP_HOST' => 'example.com']);
$this->assertEquals('http://localhost/', $client->getRequest()->getUri());
```

Fixed (see last line):

```
$client->setServerParameters(['HTTP_HOST' => 'example.com']);
$client->request('GET', '/');
$this->assertEquals('http://example.com/', $client->getRequest()->getUri());

$client->request('GET', '/', [], [], ['HTTP_HOST' => 'example.com']);
$this->assertEquals('http://example.com/', $client->getRequest()->getUri());
```

Commits
-------

8c4a59467f [BrowserKit] fixed BC Break for HTTP_HOST header; implemented same behaviour for HTTPS server parameter
2018-11-26 07:55:10 +01:00
Fabien Potencier 57c1432045 bug #28147 [DomCrawler] exclude fields inside "template" tags (Gorjunov)
This PR was merged into the 2.8 branch.

Discussion
----------

[DomCrawler] exclude fields inside "template" tags

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

Exclude fields values/files if fields are inside template tag. I think better to exclude values only instead of excluding fields at all (described in ticket #27285)

Commits
-------

19e3e154d7 [DomCrawler] exclude fields inside "template" tags
2018-11-26 07:47:09 +01:00
Fabien Potencier f02874e70f minor #29295 [Request] [Documentation] clarify that isMethodCacheable() returns true only for GET & HEAD (tamc)
This PR was merged into the 2.8 branch.

Discussion
----------

[Request] [Documentation] clarify that isMethodCacheable() returns true only for GET & HEAD

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

The current documentation points to https://tools.ietf.org/html/rfc7231#section-4.2.3.

The spec says: "this specification defines GET, HEAD, and POST as cacheable, although the overwhelming majority of cache implementations only support GET and HEAD.".

This fix to the documentation clarifies that Symfony follows majority (excluding POST) rather than the spec (including POST).

Commits
-------

9da998005b Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD
2018-11-26 07:39:41 +01:00
Fabien Potencier 145e9aa46b minor #29314 Changes for upcoming Travis' infra migration (sergeyklay)
This PR was merged into the 2.8 branch.

Discussion
----------

Changes for upcoming Travis' infra migration

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

Travis is deprecating the `sudo` keyword and moves everything to the same infrastructure (`sudo` really selects between two infrastructures).

See: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration

Commits
-------

b3742694d9 Changes for upcoming Travis' infra migration
2018-11-26 07:36:04 +01:00
Fabien Potencier e90fb68fd6 minor #29319 [WebProfilerBundle] Display messenger exception count instead of total count (ro0NL)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[WebProfilerBundle] Display messenger exception count instead of total count

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Each panel hides the count if zero, except messenger:

![image](https://user-images.githubusercontent.com/1047696/48981495-7ae07c80-f0d6-11e8-9dda-f40ce61844d6.png)

Now fixed.

Commits
-------

652c6eba89 [WebProfilerBundle] Hide messenger count if zero
2018-11-26 07:35:16 +01:00
Roland Franssen 652c6eba89 [WebProfilerBundle] Hide messenger count if zero 2018-11-25 17:27:13 +01:00
Serghei Iakovlev b3742694d9
Changes for upcoming Travis' infra migration
Travis is deprecating the sudo keyword and moves everything to the same
infrastructure (sudo really selects between two infrastructures).

See:
https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
2018-11-25 15:56:12 +02:00
Roland Franssen 88f4ba165f [VarDumper] Fix ClassStub ellipsis 2018-11-25 13:50:42 +01:00
Tom Counsell 9da998005b Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD
The current documentation points to https://tools.ietf.org/html/rfc7231#section-4.2.3.

The spec says: "this specification defines GET, HEAD, and POST as cacheable, although the overwhelming majority of cache implementations only support GET and HEAD.".

This fix to the documentation clarifies that Symfony follows majority (excluding POST) rather than the spec (including POST).
2018-11-25 12:27:05 +01:00
Nicolas Grekas 246164f748 [DI] fix copying expression providers when analyzing the service graph 2018-11-25 12:18:11 +01:00
Roland Franssen 69be8e649e [MonologBridge] Return empty list for unknonwn requests 2018-11-25 08:46:30 +01:00
Sergei Gorjunov 19e3e154d7 [DomCrawler] exclude fields inside "template" tags 2018-11-24 23:30:19 +01:00
Chris Wilkinson 8633ebbca0 Use XLIFF source rather than resname when there's no target 2018-11-24 21:16:41 +00:00
Alessandro Chitolina 61c4531292
[DoctrineBridge] catch errors while converting to db values in data collector 2018-11-24 18:30:29 +01:00
pf 0248d4f566 [DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider 2018-11-24 18:17:47 +01:00
Roland Franssen 448e2e2445 [EventDispatcher] Unwrap wrapped listeners internally 2018-11-24 14:14:57 +01:00
Nicolas Grekas f9414a8e81 bug #29260 [Lock] Fixed PdoStore::putOffExpiration(), PdoStore::getHashedKey() (PavelPrischepa)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Lock] Fixed PdoStore::putOffExpiration(), PdoStore::getHashedKey()

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

1. Fixed PDO Statement exception in PdoStore::putOffExpiration():

```
 An exception occurred while executing 'UPDATE lock_keys SET key_expiration = UNIX_TIMESTAMP() + 10, key_token = :token WHERE key_id = :id AND (key_token = :token OR key_expiration <= UNIX_TIMESTAMP())' with params ["dcfc5ff369bc1896563
  325c2e90478154eb670f6b6ebad3617e946ecb1f81517", "FRJOnftxRwPIgIRVb4EpOIVFwNjTmx0fwkBSTVJdViI="]:

  SQLSTATE[HY093]: Invalid parameter number
```

2. Added explicit casting `Key` to `string` in getHashedKey() to avoid error with `strict_types` enabled.

Commits
-------

a639301cd6 [Lock] Fixed PDOStatement exception "Invalid parameter number" in putOffExpiration()
2018-11-24 10:46:15 +01:00
Pavel Prischepa a639301cd6 [Lock] Fixed PDOStatement exception "Invalid parameter number" in putOffExpiration() 2018-11-24 10:44:51 +01:00
Nicolas Grekas 302b8446a7 [Contracts][Cache] allow retrieving metadata of cached items 2018-11-24 10:35:08 +01:00
Nicolas Grekas 4aab6e72c1 [Translation] fix dumping catalogues cache 2018-11-24 09:35:00 +01:00