Commit Graph

25346 Commits

Author SHA1 Message Date
Nicolas Grekas
66e694ed57 [Process] Fix write access check for pipes on Windows 2016-07-26 10:11:15 +02:00
Nicolas Grekas
af47008bc9 Merge branch '2.7' into 2.8
* 2.7:
  [Console] Application update PHPDoc of add and register methods
  [Config] Extra tests for Config component
  Fixed bugs in names of classes and methods.
  [DoctrineBridge] Fixed php doc
  [FrameworkBundle] Fixed parameters number mismatch declaration
  [BrowserKit] Added test for followRedirect method (POST method)
  Fix the money form type render with Bootstrap3
  [BrowserKit] Uppercase the "GET" method in redirects
  [WebProfilerBundle] Fixed  JSDoc parameter definition
  [HttpFoundation] HttpCache refresh stale responses containing an ETag

Conflicts:
	src/Symfony/Component/BrowserKit/Tests/ClientTest.php
	src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php
2016-07-26 10:02:44 +02:00
Matthias Pigulla
2668edd05b [HttpKernel] Use flock() for HttpCache's lock files 2016-07-26 09:56:53 +02:00
Nicolas Grekas
eeaa0c7fd1 minor #19389 [Console] Application update PHPDoc of add and register methods (SpacePossum)
This PR was squashed before being merged into the 2.7 branch (closes #19389).

Discussion
----------

[Console] Application update PHPDoc of add and register methods

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

The [PHPDoc](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Console/Application.php#L354) states the method will always return a command, but it doesn't. Since [Application::register](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Console/Application.php#L328) returns the result of `add` directly is also doesn't always return the command (as its PHPDoc states).

Commits
-------

6f0474f [Console] Application update PHPDoc of add and register methods
2016-07-26 06:44:12 +02:00
SpacePossum
6f0474f9a6 [Console] Application update PHPDoc of add and register methods 2016-07-26 06:44:10 +02:00
Nicolas Grekas
4af4878e3d minor #19399 [Config] Extra tests for Config component (zomberg)
This PR was squashed before being merged into the 2.7 branch (closes #19399).

Discussion
----------

[Config] Extra tests for Config component

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

Commits
-------

d0f4434 [Config] Extra tests for Config component
2016-07-26 06:42:31 +02:00
Vyacheslav Pavlov
d0f4434c4e [Config] Extra tests for Config component 2016-07-26 06:42:29 +02:00
Nicolas Grekas
b27b0a93bb minor #19405 Fixed bugs in names of classes and methods. (zomberg)
This PR was squashed before being merged into the 2.7 branch (closes #19405).

Discussion
----------

Fixed bugs in names of classes and methods.

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

It's related to case sensitive.

I changed only calls of names of called methods but not definition of methods because BC.

Commits
-------

c41aa03 Fixed bugs in names of classes and methods.
2016-07-26 06:40:56 +02:00
Vyacheslav Pavlov
c41aa03c48 Fixed bugs in names of classes and methods. 2016-07-26 06:40:54 +02:00
Nicolas Grekas
0f0703497f minor #19410 [DoctrineBridge] Fixed php doc (zomberg)
This PR was squashed before being merged into the 2.7 branch (closes #19410).

Discussion
----------

[DoctrineBridge] Fixed php doc

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

Commits
-------

b2d25f4 [DoctrineBridge] Fixed php doc
2016-07-26 06:38:52 +02:00
Vyacheslav Pavlov
b2d25f4d18 [DoctrineBridge] Fixed php doc 2016-07-26 06:38:50 +02:00
Nicolas Grekas
16af6a4d83 minor #19411 [FrameworkBundle] Fixed parameters number mismatch declaration (zomberg)
This PR was squashed before being merged into the 2.7 branch (closes #19411).

Discussion
----------

[FrameworkBundle] Fixed parameters number mismatch declaration

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

Commits
-------

9c4efd0 [FrameworkBundle] Fixed parameters number mismatch declaration
2016-07-26 06:37:23 +02:00
Vyacheslav Pavlov
9c4efd0d91 [FrameworkBundle] Fixed parameters number mismatch declaration 2016-07-26 06:37:20 +02:00
Nicolas Grekas
c4069a4016 minor #19392 [BrowserKit] Added test for followRedirect method (POST method) (zomberg)
This PR was squashed before being merged into the 2.7 branch (closes #19392).

Discussion
----------

[BrowserKit] Added test for followRedirect method (POST method)

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

Test covers 'else' branches in these conditions:
```php
if (in_array($this->internalResponse->getStatus(), array(302, 303))) {
    $method = 'get';
    $files = array();
    $content = null;
} else {
    $method = $request->getMethod();
    $files = $request->getFiles();
    $content = $request->getContent();
}

if ('get' === strtolower($method)) {
    // Don't forward parameters for GET request as it should reach the redirection URI
    $parameters = array();
} else {
    $parameters = $request->getParameters();
}
```

Commits
-------

2ace5d8 [BrowserKit] Added test for followRedirect method (POST method)
2016-07-25 18:30:57 +02:00
Vyacheslav Pavlov
2ace5d812c [BrowserKit] Added test for followRedirect method (POST method) 2016-07-25 18:30:50 +02:00
Nicolas Grekas
f6a77a1a3e bug #19397 [2.7] [HttpFoundation] HttpCache refresh stale responses containing an ETag (maennchen)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] [HttpFoundation] HttpCache refresh stale responses containing an ETag

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

This PR is the replacement of #19391, which points at the wrong branch.

Commits
-------

96df6b9 [HttpFoundation] HttpCache refresh stale responses containing an ETag
2016-07-25 18:30:07 +02:00
Nicolas Grekas
544a0739a1 minor #19412 [WebProfilerBundle] Fixed JSDoc parameter definition (zomberg)
This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] Fixed  JSDoc parameter definition

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

Commits
-------

191aef9 [WebProfilerBundle] Fixed  JSDoc parameter definition
2016-07-25 18:11:21 +02:00
Nicolas Grekas
44da6e8137 bug #19426 [Form] Fix the money form type render with Bootstrap3 (Th3Mouk)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fix the money form type render with Bootstrap3

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | Part fixing https://github.com/symfony/symfony/issues/19424
| License       | MIT
| Doc PR        | none

There is a confusion between the variable naming, and the result expected.

When prepend variable is false, the currency symbol must be add after the widget.
When the `money_pattern`starts with `{{`, `prepend` variable must be `false`.

Commits
-------

637a441 Fix the money form type render with Bootstrap3
2016-07-25 18:10:47 +02:00
Nicolas Grekas
bf823a72e4 bug #19422 [DomCrawler] Inherit the namespace cache in subcrawlers (stof)
This PR was merged into the 2.8 branch.

Discussion
----------

[DomCrawler] Inherit the namespace cache in subcrawlers

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

This inherits any already discovered/registered namespace with subcrawlers, improving performance when using namespaces.

I submitted to 2.8 rather than 2.7, because the namespace mapping feature was actually buggy in 2.x, because of the fact that nodes could belong to different documents in the same Crawler while the namespace map was shared. The fact that the map was not inherited in subcrawler mitigated this issue (by reducing changes to have multiple documents in the same subcrawler). 2.8 deprecated this possibility to have multiple documents, so I'm fine with applying this here.

Note that the subcrawler inherits the namespace cache at the time it is created, but the cache is not shared between instance (so if a subcrawler discovers an additional namespace of the document, it will not be available for the parent crawler of other subcrawlers of the parent). Sharing the cache would be totally possible (as they share the same document anyway) and would make the experience even better (removing the need to ensure that the root crawler discovers namespace before filtering). But it would require moving from an array to an object. I'm not sure we want to do this in a patch release. What do you think @symfony/deciders ?

Commits
-------

e89c758 [DomCrawler] Inherit the namespace cache in subcrawlers
2016-07-25 18:05:24 +02:00
Nicolas Grekas
27d416d79e bug #19425 [BrowserKit] Uppercase the "GET" method in redirects (jakzal)
This PR was merged into the 2.7 branch.

Discussion
----------

[BrowserKit] Uppercase the "GET" method in redirects

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

Commits
-------

7b117d3 [BrowserKit] Uppercase the "GET" method in redirects
2016-07-25 18:04:00 +02:00
Jérémy Marodon
637a4411d7 Fix the money form type render with Bootstrap3
There is a confusion between the variable naming, and the result expected.

When prepend variable is false, the currency symbol must be add after the widget.
When the money_patternstarts with {{, prepend variable must be false.
2016-07-25 16:48:47 +02:00
Jakub Zalas
7b117d3320 [BrowserKit] Uppercase the "GET" method in redirects 2016-07-25 14:54:45 +01:00
Christophe Coevoet
e89c758a76 [DomCrawler] Inherit the namespace cache in subcrawlers 2016-07-25 10:49:59 +02:00
Vyacheslav Pavlov
191aef975c [WebProfilerBundle] Fixed JSDoc parameter definition 2016-07-23 18:20:27 +03:00
Jonatan Männchen
96df6b984c [HttpFoundation] HttpCache refresh stale responses containing an ETag 2016-07-20 22:30:20 +00:00
Nicolas Grekas
579801157a Fix merge 2016-07-20 08:41:28 +03:00
Fabien Potencier
15ab32bf9b Merge branch '2.7' into 2.8
* 2.7:
  Fix PHP 7.1 related failures
  [VarDumper] Fix for 7.1
2016-07-19 12:40:24 +02:00
Fabien Potencier
37cd583e78 bug #19384 Fix PHP 7.1 related failures (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix PHP 7.1 related failures

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

PHP 7.1 triggers notices on previously silent implicit type changes.

Commits
-------

07467ed Fix PHP 7.1 related failures
2016-07-19 12:36:45 +02:00
Nicolas Grekas
07467ed3a3 Fix PHP 7.1 related failures 2016-07-19 10:44:18 +02:00
Fabien Potencier
37b299bb3e bug #19379 [VarDumper] Fix for PHP 7.1 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix for PHP 7.1

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

Tests fail on 7.1 otherwise

Commits
-------

d422939 [VarDumper] Fix for 7.1
2016-07-18 16:29:02 +02:00
Nicolas Grekas
d422939f6c [VarDumper] Fix for 7.1 2016-07-18 14:55:17 +02:00
Fabien Potencier
00ab2d661f bug #19342 Added class existence check if is_subclass_of() fails in compiler passes (SCIF)
This PR was merged into the 2.8 branch.

Discussion
----------

Added class existence check if is_subclass_of() fails in compiler passes

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

If you create an event subscriber and make typo in file name it will cause next error:

```
  [InvalidArgumentException]
  Service "event.notification_subscriber" must implement interface "Symfony\Component\EventDispatcher\EventSubscriberInterface".
```

That's because of `is_subclass_of()` fails on class absentee. I made error message more clear.

Commits
-------

72db6e7 Added class existence check if is_subclass_of() fails in compiler passes
2016-07-18 13:36:17 +02:00
Christophe Coevoet
88aff45c4d Merge branch '2.7' into 2.8
* 2.7:
  fixed CS
  Fix the DBAL session handler version check for Postgresql
2016-07-18 11:48:43 +02:00
Fabien Potencier
1376e14e7e fixed CS 2016-07-18 11:42:57 +02:00
Fabien Potencier
28029a2ed1 bug #19369 Fix the DBAL session handler version check for Postgresql (stof)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix the DBAL session handler version check for Postgresql

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

https://github.com/symfony/symfony/pull/19048 broken the DBAL session handler when using Postgresql by using method which does not exist on the main DBAL Connection class.

Commits
-------

e98c584 Fix the DBAL session handler version check for Postgresql
2016-07-18 11:41:50 +02:00
Alexander Zhuravlev
72db6e7068 Added class existence check if is_subclass_of() fails in compiler passes 2016-07-18 19:09:40 +12:00
Nicolas Grekas
7a57903fd8 Merge branch '2.7' into 2.8
* 2.7:
  [VarDumper] Fix dumping jsons casted as arrays
  PassConfig::getMergePass is not an array
  Revert "bug #19114 [HttpKernel] Dont close the reponse stream in debug (nicolas-grekas)"
  Fix the retrieval of the last username when using forwarding
  [Yaml] Fix PHPDoc of the Yaml class
  [HttpFoundation] Add OPTIONS and TRACE to the list of safe methods
  Update getAbsoluteUri() for query string uris
2016-07-17 11:06:15 +02:00
Nicolas Grekas
45907598bc bug #19368 [VarDumper] Fix dumping jsons casted as arrays (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix dumping jsons casted as arrays

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

Commits
-------

56549e7 [VarDumper] Fix dumping jsons casted as arrays
2016-07-17 11:05:05 +02:00
Nicolas Grekas
56549e7a70 [VarDumper] Fix dumping jsons casted as arrays 2016-07-16 15:16:34 +02:00
Christophe Coevoet
e98c5841da Fix the DBAL session handler version check for Postgresql 2016-07-15 19:07:32 +02:00
Fabien Potencier
d303b9dffe minor #19343 PassConfig::getMergePass is not an array (aschempp)
This PR was squashed before being merged into the 2.7 branch (closes #19343).

Discussion
----------

PassConfig::getMergePass is not an array

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

Just a minor glitch my IDE noticed :-)

Commits
-------

edbefac PassConfig::getMergePass is not an array
2016-07-14 11:24:46 +02:00
Andreas Schempp
edbefacdd1 PassConfig::getMergePass is not an array 2016-07-14 11:24:45 +02:00
Fabien Potencier
482e185daf Revert "bug #19114 [HttpKernel] Dont close the reponse stream in debug (nicolas-grekas)"
This reverts commit a0cdcb0ffb, reversing
changes made to 9c8a3e9563.
2016-07-13 12:53:11 +02:00
Fabien Potencier
30997a4005 bug #19334 [Security] Fix the retrieval of the last username when using forwarding (stof)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Fix the retrieval of the last username when using forwarding

| 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

When using forwarding to render the login page (which is not the default), the info are stored in the subrequest attributes rather than the session. ``getLastAuthenticationError`` was handling this properly but ``getLastUsername`` was not checking the attributes.
This fixes it by checking the attributes (I'm checking them before the session, to be consistent with ``getLastAuthenticationError``)

Commits
-------

e041365 Fix the retrieval of the last username when using forwarding
2016-07-13 10:42:38 +02:00
Christophe Coevoet
e04136524c Fix the retrieval of the last username when using forwarding 2016-07-11 11:55:50 +02:00
Christian Flothmann
5922d715d8 minor #19327 [Yaml] Fix PHPDoc of the Yaml class (dunglas)
This PR was squashed before being merged into the 2.7 branch (closes #19327).

Discussion
----------

[Yaml] Fix PHPDoc of the Yaml class

| 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

The YAML dumper is able to serialize any PHP type, not just arrays.

Commits
-------

a3fd991 [Yaml] Fix PHPDoc of the Yaml class
2016-07-11 09:20:57 +02:00
Kévin Dunglas
a3fd991c4b [Yaml] Fix PHPDoc of the Yaml class 2016-07-11 09:20:55 +02:00
Fabien Potencier
500c2cd694 bug #19321 [HttpFoundation] Add OPTIONS and TRACE to the list of safe methods (dunglas)
This PR was squashed before being merged into the 2.7 branch (closes #19321).

Discussion
----------

[HttpFoundation] Add OPTIONS and TRACE to the list of safe methods

| 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

According to [RFC 7231](https://tools.ietf.org/html/rfc7231#section-8.1.3) `OPTIONS` and `TRACE` are safe methods.

Commits
-------

1404607 [HttpFoundation] Add OPTIONS and TRACE to the list of safe methods
2016-07-10 11:40:50 +02:00
Kévin Dunglas
1404607072 [HttpFoundation] Add OPTIONS and TRACE to the list of safe methods 2016-07-10 11:40:48 +02:00
Fabien Potencier
8b6d74e1e7 bug #19317 [BrowserKit] Update Client::getAbsoluteUri() for query string only URIs (georaldc)
This PR was merged into the 2.7 branch.

Discussion
----------

[BrowserKit] Update Client::getAbsoluteUri() for query string only URIs

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

This PR allows BrowserKit to treat a value containing only query string parameters the same way anchor/hash values are treated when passed as a URI argument to the getAbsoluteUri() method. Helps when encountering sites that force a redirect with a location header value containing only a query string.

Commits
-------

965408f Update getAbsoluteUri() for query string uris
2016-07-10 11:39:24 +02:00