Commit Graph

31044 Commits

Author SHA1 Message Date
Nicolas Grekas
0d0be12e07 [DI] fix combinatorial explosion when analyzing the service graph 2018-11-28 19:09:44 +01:00
Christian Flothmann
85af682834 add a test case 2018-11-28 11:23:21 +01:00
Michael Hudson-Doyle
d903dcbac5 [Form] Handle all case variants of "nan" when parsing a number
Fixes #29321
2018-11-28 11:23:21 +01:00
Nicolas Grekas
e2b4c8d3c9 [Debug] workaround opcache bug mutating "$this" !?! 2018-11-27 13:43:10 +01:00
Fabien Potencier
9fba843a2a bumped Symfony version to 4.1.9 2018-11-26 16:00:55 +01:00
Fabien Potencier
63201c518c updated VERSION for 4.1.8 2018-11-26 15:52:15 +01:00
Fabien Potencier
acce087074 bumped Symfony version to 3.4.20 2018-11-26 15:50:31 +01:00
Fabien Potencier
ecb09280ef updated VERSION for 3.4.19 2018-11-26 15:04:48 +01:00
Fabien Potencier
c16d0d98fe Merge branch '3.4' into 4.1
* 3.4:
  [Console] Move back root exception to stack trace in verbose mode
2018-11-26 15:00:40 +01:00
Fabien Potencier
d6bbde5a36 bug #29318 [Console] Move back root exception to stack trace in verbose mode (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Move back root exception to stack trace in verbose mode

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

Commits
-------

63cd219a5c [Console] Move back root exception to stack trace in verbose mode
2018-11-26 14:57:20 +01:00
Fabien Potencier
a1a21f97a2 updated VERSION for 2.8.48 2018-11-26 14:20:43 +01:00
Robin Chalas
63cd219a5c [Console] Move back root exception to stack trace in verbose mode 2018-11-26 13:48:07 +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
4fe566bbc6 [PropertyAccess] make cache keys encoding bijective 2018-11-26 13:13:27 +01:00
Nicolas Grekas
4a717266c6 fix merge 2018-11-26 12:45:21 +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
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
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
Roland Franssen
71aade3622 [WebProfiler] Detect empty file paths in file viewer 2018-11-26 08:36:52 +01:00
Fabien Potencier
18b3a52389 fixed CS 2018-11-26 08:26:42 +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
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
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
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
Fabien Potencier
7f310b4c77 bug #29222 [Dotenv] properly parse backslashes in unquoted env vars (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Dotenv] properly parse backslashes in unquoted env vars

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

Commits
-------

785fff56ce properly parse backslashes in unquoted env vars
2018-11-24 08:50:44 +01:00
Fabien Potencier
0f2d577ebd bug #29256 [HttpFoundation] Fixed absolute Request URI with default port (thomasbisignani)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Fixed absolute Request URI with default port

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

This PR fixes the #29234 issue, the request URI with default port was not properly generated.

Example :

```php
$request = Request::create('http://test.com:80/foo');
$request->server->set('REQUEST_URI', 'http://test.com:80/foo');
```

Before this fix, the `$request->getUri()` method returned `http://test.com/:80/foo` :

```diff
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'http://test.com/foo'
+'http://test.com/:80/foo'
```

Commits
-------

cddce2af61 [HttpFoundation] Fixed absolute Request URI with default port
2018-11-24 08:47:43 +01:00
Fabien Potencier
b178266bcd Merge branch '3.4' into 4.1
* 3.4:
  fix authorization checker variable name
  [Routing] Remove duplicate schemes and methods for invokable controllers
  [Bridge/PhpUnit] fix the fix
2018-11-24 08:45:31 +01:00
Fabien Potencier
812a878c47 bug #29274 [Routing] Remove duplicate schemes and methods for invokable controllers (claudusd)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] Remove duplicate schemes and methods for invokable controllers

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

This PR backport for 3.4 branch the same issue than the PR #29225.

I add a test to check the fix when annotation are on the class and rename another one when the route annotation is on the invoke method.

Commits
-------

640ccdf069 [Routing] Remove duplicate schemes and methods for invokable controllers
2018-11-24 08:36:54 +01:00
Nicolas Grekas
6968000a3c [Routing] fix trailing slash redirection when using RedirectableUrlMatcher 2018-11-23 18:35:50 +01:00
Samuel NELA
143597a2b9 Removed the return type phpdoc 2018-11-23 14:03:00 +01:00
Fabien Potencier
e4a7fd8eed bug #29271 [HttpFoundation] Fix trailing space for mime-type with parameters (Sascha Dens)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpFoundation] Fix trailing space for mime-type with parameters

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| 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 -->

<!--
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.
-->
This PR fixes a minor issue that we've discovered by exposing our API towards mobile applications which where sending the header as following `content-type: application/json ;charset=UTF-8`. Request is unable to determine the `getContentType -> getFormat` as **json** due to the whitespace at the end.

```php
$request = Request::createFromGlobals();
$request->headers->set('CONTENT_TYPE', 'application/json ;charset=UTF-8'); // Forcing header for test
if ($request->getContentType() !== 'json') {
    // Return 415 (Unsupported Media Type) status code..
}
```

When checking https://tools.ietf.org/html/rfc7231#section-3.1.1.1 it seems that a space is part of the RFC spec. (Where OWS is abbreviated for Optional WhiteSpace)
```
media-type = type "/" subtype *( OWS ";" OWS parameter )
```
Current the following cases are supported:
* application/json; charset=UTF-8
* application/json;charset=UTF-8

The following are failing:
* application/json ; charset=UTF-8
* application/json ;charset=UTF-8

Commits
-------

f4866bc371 [HttpFoundation] Fix trailing space for mime-type with parameters
2018-11-22 11:33:55 +01:00
Fabien Potencier
d713671b80 minor #29278 [Workflow] fix authorization checker variable name (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Workflow] fix authorization checker variable name

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

Commits
-------

9f4032d20f fix authorization checker variable name
2018-11-22 11:26:16 +01:00
Christian Flothmann
9f4032d20f fix authorization checker variable name 2018-11-22 08:01:54 +01:00
Claude Dioudonnat
640ccdf069 [Routing] Remove duplicate schemes and methods for invokable controllers 2018-11-21 20:17:55 +01:00
ValentineBoineau
24264facaa
Indentation error 2018-11-21 15:20:20 +01:00
Sascha Dens
f4866bc371 [HttpFoundation] Fix trailing space for mime-type with parameters 2018-11-21 13:53:33 +01:00
Thomas Bisignani
cddce2af61 [HttpFoundation] Fixed absolute Request URI with default port 2018-11-20 17:50:57 +01:00
Nicolas Grekas
dbb0f2ad77 [Bridge/PhpUnit] fix the fix 2018-11-20 17:47:12 +01:00
Nicolas Grekas
578f847c02 fix cs 2018-11-20 17:17:28 +01:00
Nicolas Grekas
6a1701e574 fix cs 2018-11-20 17:14:23 +01:00
Nicolas Grekas
713b7986fe Merge branch '3.4' into 4.1
* 3.4:
  fix cs
  SCA: consolidate non empty array checks across codebase
  [cs] correct invalid @param types
  [Bridge/PhpUnit] Use composer to download phpunit
  [DI] fix taking lazy services into account when dumping the container
  [Form] Fixed empty data for compound date interval
  [Cache] fix optimizing Psr6Cache for AdapterInterface pools
  deal with explicitly enabled workflow nodes
2018-11-20 17:14:00 +01:00
Nicolas Grekas
f103b6b91d fix cs 2018-11-20 17:10:26 +01:00
Nicolas Grekas
36527634f2 minor #29231 SCA: consolidate non empty array checks across codebase (kalessil)
This PR was squashed before being merged into the 3.4 branch (closes #29231).

Discussion
----------

SCA: consolidate non empty array checks across codebase

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

This PR replaces `is_array(...) && count(...) > 0` with `... && is_array(...)` construct used in the codebase.

Commits
-------

2f1fd54dda SCA: consolidate non empty array checks across codebase
2018-11-20 17:02:07 +01:00
Vladimir Reznichenko
2f1fd54dda SCA: consolidate non empty array checks across codebase 2018-11-20 17:01:59 +01:00
Nicolas Grekas
ab51fa84a5 bug #29243 [Cache] fix optimizing Psr6Cache for AdapterInterface pools (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] fix optimizing Psr6Cache for AdapterInterface pools

| 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        | -.

As described by @Tobion in https://github.com/symfony/symfony/pull/29236/files#r234324045:
> The problem I have experienced is that in dev mode the cache is decorated with a TraceableCache. This means it loses this optimization and introduces https://github.com/symfony/symfony/issues/28918#issuecomment-432399481 again

Commits
-------

b8100a9df0 [Cache] fix optimizing Psr6Cache for AdapterInterface pools
2018-11-20 17:01:33 +01:00
Nicolas Grekas
73d98049fa bug #29247 [DI] fix taking lazy services into account when dumping the container (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix taking lazy services into account when dumping the container

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

This PR fixes issues found while working on #29246.
It *does* fix the infinite loop, ~but replaces it by an exception (reopening #29078)~:
> ~It's a requirement to specify a Metadata Driver and pass it to Doctrine\ORM\Configuration::setMetadataDriverImpl()~

The full fix is not immediately accessible as it needs some core changes to the dumping logic. Requiring `symfony/proxy-manager-bridge` works around the issue properly.

See #29251 for 4.2

Commits
-------

67d7623e72 [DI] fix taking lazy services into account when dumping the container
2018-11-20 17:00:44 +01:00
Nicolas Grekas
d0698b2ec3 bug #29249 [Form] Fixed empty data for compound date interval (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Fixed empty data for compound date interval

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

Following #29182, since this type has been introduced in Symfony 3 but with the same limitation explained in #4715.
So for consistency this needs to be fixed here as well.

Commits
-------

38a2abc790 [Form] Fixed empty data for compound date interval
2018-11-20 16:59:47 +01:00
Nicolas Grekas
e166d96cf5 bug #29265 [Bridge/PhpUnit] Use composer to download phpunit (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Bridge/PhpUnit] Use composer to download phpunit

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

Commits
-------

e823f1df31 [Bridge/PhpUnit] Use composer to download phpunit
2018-11-20 16:58:54 +01:00
Nicolas Grekas
9e0f8e7804 Merge branch '2.8' into 3.4
* 2.8:
  [cs] correct invalid @param types
2018-11-20 16:57:17 +01:00
Tomas Votruba
40f26235eb [cs] correct invalid @param types 2018-11-20 16:55:20 +01:00
Nicolas Grekas
e823f1df31 [Bridge/PhpUnit] Use composer to download phpunit 2018-11-20 16:36:32 +01:00
Nicolas Grekas
67d7623e72 [DI] fix taking lazy services into account when dumping the container 2018-11-20 15:22:20 +01:00
Grégoire Pineau
b74a086ec2 bug #28769 [FrameworkBundle] deal with explicitly enabled workflow nodes (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] deal with explicitly enabled workflow nodes

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

Commits
-------

017fd56bd8 deal with explicitly enabled workflow nodes
2018-11-19 10:38:20 +01:00
Jules Pietri
38a2abc790 [Form] Fixed empty data for compound date interval 2018-11-18 13:25:16 +01:00
Nicolas Grekas
b8100a9df0 [Cache] fix optimizing Psr6Cache for AdapterInterface pools 2018-11-16 22:18:41 +01:00
Christian Flothmann
017fd56bd8 deal with explicitly enabled workflow nodes 2018-11-16 08:38:23 +01:00
Nicolas Grekas
17163ab430 Merge branch '3.4' into 4.1
* 3.4:
  [DI] dont fail on missing classes when resource tracking is disabled
  [Validator] Added the missing constraints instance checks
2018-11-15 13:40:31 +01:00
Nicolas Grekas
236565c87e [DI] dont fail on missing classes when resource tracking is disabled 2018-11-15 13:37:52 +01:00
Nicolas Grekas
654dc2209b Merge branch '2.8' into 3.4
* 2.8:
  [Validator] Added the missing constraints instance checks
2018-11-15 13:34:45 +01:00
Nicolas Grekas
b11ec05282 bug #29223 [Validator] Added the missing constraints instance checks (thomasbisignani)
This PR was merged into the 2.8 branch.

Discussion
----------

[Validator] Added the missing constraints instance checks

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

This PR adds the constraints instance checks missing to limit the validators use.

This behavior is already implemented in all built-in validators, but it was missed in two validators.

Commits
-------

0ecaead015 [Validator] Added the missing constraints instance checks
2018-11-15 13:27:27 +01:00
Nicolas Grekas
c8677f31bb Merge branch '3.4' into 4.1
* 3.4:
  Command::addOption should allow int in $default
  [Form] Fixed keeping hash of equal \DateTimeInterface on submit
  [PhpUnitBridge] Fix typo
  [Form] Minor fixes in docs and cs
  [Config] Unset key during normalization
  [Form] Fixed empty data for compound date types
  invalidate forms on transformation failures
  [PropertyAccessor] Fix unable to write to singular property using setter while plural adder/remover exist
2018-11-15 13:15:13 +01:00
Nicolas Grekas
4f18e76a0b Merge branch '2.8' into 3.4
* 2.8:
  Command::addOption should allow int in $default
  [Form] Minor fixes in docs and cs
  [Form] Fixed empty data for compound date types
2018-11-15 13:14:04 +01:00
Nicolas Grekas
1ac042b7b9 bug #28966 [PropertyAccessor] Fix unable to write to singular property using setter while plural adder/remover exist (karser)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyAccessor] Fix unable to write to singular property using setter while plural adder/remover exist

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

Please take a look at the tests I added - they describe the issue. It has to do with the priorities: `findAdderAndRemover('User', 'email')` is called earlier than `$this->isMethodAccessible('User', 'setEmail', 1)`

Commits
-------

8238f167ad [PropertyAccessor] Fix unable to write to singular property using setter while plural adder/remover exist
2018-11-15 13:12:43 +01:00
Nicolas Grekas
f975be24d4 bug #29182 [Form] Fixed empty data for compound date types (HeahDude)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Fixed empty data for compound date types

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

Commits
-------

9bab1e8aba [Form] Fixed empty data for compound date types
2018-11-15 13:10:15 +01:00
Christophe Coevoet
453efdfe1e Undeprecate the single-colon notation for controllers
This notation is the only way to support controllers as services in the 3.4
LTS version.
This deprecation has only a very small benefit for the Symfony codebase (the
amount of code involved is very small), but has a huge cost for the community
which cannot avoid this deprecation without dropping support for the LTS or
making crazy logic to switch routing files (as they cannot switch things
inline in YAML or XML files).
This deprecation will be delayed until a future 5.x version, when the current
LTS will be 4.4 (which supports the new notation).
2018-11-15 10:34:05 +01:00
Christian Flothmann
785fff56ce properly parse backslashes in unquoted env vars 2018-11-14 23:14:12 +01:00
Thomas Bisignani
0ecaead015 [Validator] Added the missing constraints instance checks 2018-11-14 15:06:48 +01:00
Robin Chalas
c513c18fdd minor #29201 Command::addOption should allow int in $default (hultberg)
This PR was merged into the 2.8 branch.

Discussion
----------

Command::addOption should allow int in $default

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

<!--
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.
-->

In #28714 the documentation for `$default` on `Command::addOption` was changed to specify more specifically than `mixed`. However, there is an inconsistency as `InputOption::__construct` allows int in its `$default`, but not `Command::addOption`. This PR makes fixes that inconsistency.

Commits
-------

5f8bd89 Command::addOption should allow int in $default
2018-11-14 10:59:29 +01:00
Nicolas Grekas
144a84a526 minor #29181 [Form] Minor fixes in docs and cs (HeahDude)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Minor fixes in docs and cs

| 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        | ~

Commits
-------

de40f5d07b [Form] Minor fixes in docs and cs
2018-11-13 22:12:31 +01:00
Nicolas Grekas
c96325ff57 bug #29191 [Routing] generate(null) should throw an exception (nicolas-grekas)
This PR was merged into the 4.1 branch.

Discussion
----------

[Routing] generate(null) should throw an exception

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

Commits
-------

710aafbc91 [Routing] generate(null) should throw an exception
2018-11-13 19:51:21 +01:00
Nicolas Grekas
b6f9f8d769 Merge branch '2.8' into 3.4
* 2.8:
  [Form] Fixed keeping hash of equal \DateTimeInterface on submit
  [PhpUnitBridge] Fix typo
  [Config] Unset key during normalization
  invalidate forms on transformation failures
2018-11-13 17:52:15 +01:00
Nicolas Grekas
32c01724cd bug #29185 [Form] Fixed keeping hash of equal \DateTimeInterface on submit (HeahDude)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Fixed keeping hash of equal \DateTimeInterface on submit

| 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        | ~

Commits
-------

bc2e2cb5ad [Form] Fixed keeping hash of equal \DateTimeInterface on submit
2018-11-13 17:38:43 +01:00
Grégoire Pineau
28cd88e261 bug #29141 [Workflow] Fixed bug of buildTransitionBlockerList when many transition are enabled (Tetragramat, lyrixx)
This PR was merged into the 4.1 branch.

Discussion
----------

[Workflow] Fixed bug of buildTransitionBlockerList when many transition are enabled

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

<!--
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
-------

732f343572 [Workflow] Made code simpler
db69ccc185 method buildTransitionBlockerList returns TransitionBlockerList of expected transition
2018-11-13 15:27:19 +01:00
Edvin Hultberg
5f8bd898b4 Command::addOption should allow int in $default
The constructor for InputOption allows int on the $default parameter, but not Command::addOption $default parameter

fixup: apply coding standards patch
2018-11-13 15:21:37 +01:00
Grégoire Pineau
ab9b40de1c Merge branch '3.4' into 4.1
* 3.4:
  Update symfony links to https
  [FrameworkBundle] fixed guard event names for transitions
  [FrameworkBundle] fixed guard event names for transitions
2018-11-13 15:13:43 +01:00
Grégoire Pineau
8dcefc9a27 bug #29137 [Workflow][FrameworkBundle] fixed guard event names for transitions (destillat, lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Workflow][FrameworkBundle] fixed guard event names for transitions

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

There is a bug when many transitions are defined with the same name.
I finished destillat's work and rebase against 3.4 as it's a bug fix.

There another point of failure, but it could not be fixed on 3.4. I will
be a need feature. The issue is related to `Workflow::can($subject, $transitionName)`.
Since the transitionName could be not unique, we will need to support
passing an instance of Transition. A new PR is incomming

Commits
-------

83dc473dd6 [FrameworkBundle] fixed guard event names for transitions
fb88bfc79a [FrameworkBundle] fixed guard event names for transitions
2018-11-13 15:03:53 +01:00
Roland Franssen
bea63a1399 Update symfony links to https 2018-11-13 13:17:51 +01:00
Jules Pietri
bc2e2cb5ad [Form] Fixed keeping hash of equal \DateTimeInterface on submit 2018-11-12 21:06:28 +01:00
Roland Franssen
78e386e87f
[PhpUnitBridge] Fix typo 2018-11-12 19:05:42 +01:00
Nicolas Grekas
710aafbc91 [Routing] generate(null) should throw an exception 2018-11-12 17:52:50 +01:00
Jules Pietri
de40f5d07b [Form] Minor fixes in docs and cs 2018-11-12 11:47:20 +01:00
Grégoire Pineau
732f343572 [Workflow] Made code simpler 2018-11-12 10:18:05 +01:00
Fabien Potencier
893237d58f bug #28731 [Form] invalidate forms on transformation failures (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] invalidate forms on transformation failures

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

Commits
-------

385d9df29c invalidate forms on transformation failures
2018-11-12 08:14:53 +01:00
Fabien Potencier
26f321cb01 bug #29152 [Config] Unset key during normalization (ro0NL)
This PR was squashed before being merged into the 2.8 branch (closes #29152).

Discussion
----------

[Config] Unset key during normalization

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes-ish
| 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 | #29142
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

2.8 vs. 4.x :) let me know.

Commits
-------

e1402d495e [Config] Unset key during normalization
2018-11-12 08:03:10 +01:00
Roland Franssen
e1402d495e [Config] Unset key during normalization 2018-11-12 08:03:04 +01:00
Jules Pietri
9bab1e8aba [Form] Fixed empty data for compound date types 2018-11-11 23:32:26 +01:00
Nicolas Grekas
913781baac Merge branch '3.4' into 4.1
* 3.4:
  [Form] Hardened test suite for empty data
  Bump phpunit XSD version to 5.2
  [Fwb][EventDispatcher][HttpKernel] Fix getClosureScopeClass usage to describe callables
  Add required key attribute
2018-11-11 20:51:29 +01:00