Commit Graph

26936 Commits

Author SHA1 Message Date
ReenExe
217274b3c1 Console table cleanup 2016-07-28 12:57:42 -04:00
Fabien Potencier
77b5fc4c4b Merge branch '2.7' into 2.8
* 2.7:
  undefined offset fix (#19406)
  [EventDispatcher] Removed unused variable
2016-07-28 12:56:28 -04:00
Fabien Potencier
382ad65372 bug #19470 undefined offset fix (#19406) (ReenExe)
This PR was squashed before being merged into the 2.7 branch (closes #19470).

Discussion
----------

undefined offset fix (#19406)

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

9813888 undefined offset fix (#19406)
2016-07-28 12:53:57 -04:00
ReenExe
9813888a4f undefined offset fix (#19406) 2016-07-28 12:53:55 -04:00
Nicolas Grekas
75ebbf826c Merge branch '3.0' into 3.1
* 3.0:
  [TwigBundle] Removed redundant return statement.
  [DependencyInjection] Fixed deprecated default message template with XML
  [TwigBridge] Removed extra arguments in 2 places.
  [Process] Fix write access check for pipes on Windows
  [HttpKernel] Use flock() for HttpCache's lock files
2016-07-28 13:13:48 +02:00
Nicolas Grekas
1d5f391c89 Merge branch '2.8' into 3.0
* 2.8:
  [TwigBundle] Removed redundant return statement.
  [DependencyInjection] Fixed deprecated default message template with XML
  [TwigBridge] Removed extra arguments in 2 places.
  [Process] Fix write access check for pipes on Windows
  [HttpKernel] Use flock() for HttpCache's lock files
2016-07-28 13:13:34 +02:00
Nicolas Grekas
3a78921b38 Merge branch '2.7' into 2.8
* 2.7:
  [TwigBundle] Removed redundant return statement.
  [TwigBridge] Removed extra arguments in 2 places.
  [Process] Fix write access check for pipes on Windows
  [HttpKernel] Use flock() for HttpCache's lock files
2016-07-28 13:13:19 +02:00
Christophe Coevoet
42ea173247 minor #19459 [EventDispatcher] Removed unused variable (zomberg)
This PR was merged into the 2.7 branch.

Discussion
----------

[EventDispatcher] Removed unused variable

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

891e2ea [EventDispatcher] Removed unused variable
2016-07-28 13:09:20 +02:00
Vyacheslav Pavlov
891e2ea17b [EventDispatcher] Removed unused variable 2016-07-28 10:50:15 +03:00
Nicolas Grekas
a8a9923260 bug #19300 [HttpKernel] Use flock() for HttpCache's lock files (mpdude)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Use flock() for HttpCache's lock files

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | #16777, #15813 and #16312 are also related
| License       | MIT
| Doc PR        |

When a PHP process crashes or terminates (maybe the OOM killer kicks in or other bad things ™️ happen) while the `HttpCache` holds a `.lck` file, that lock file may not get `unlink()`ed.

The result is that other requests trying to access this cache entry will see a few seconds delay while waiting for the lock; they will eventually continue but send 503 status codes along with the response. The sudden buildup of PHP processes caused by the additional delay may cause further problems (sudden load increase).

As `LockHandler` is using `flock()`-based locking, locks should be released by the OS when the PHP process terminates.

I wrote this as bugfix against 2.7 because every once in a while I encounter situations (not always reproducible) where `.lock` files are left over and keep the cache locked.

Commits
-------

2668edd [HttpKernel] Use flock() for HttpCache's lock files
2016-07-28 09:16:08 +02:00
Nicolas Grekas
f9ba34f871 bug #19428 [Process] Fix write access check for pipes on Windows (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Process] Fix write access check for pipes on Windows

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

Commits
-------

66e694e [Process] Fix write access check for pipes on Windows
2016-07-28 08:53:02 +02:00
Nicolas Grekas
aaff0d1da3 bug #19442 [Cache] Fix default lifetime being ignored (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[Cache] Fix default lifetime being ignored

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/cache/pull/1
| License       | MIT
| Doc PR        | -

Courtesy of @ecanovas

Commits
-------

35ba478 [Cache] Fix default lifetime being ignored
2016-07-28 08:49:58 +02:00
Fabien Potencier
76dbd3c66c minor #19451 [TwigBundle] Removed redundant return statement. (zomberg)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] Removed redundant return statement.

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

7f3145c [TwigBundle] Removed redundant return statement.
2016-07-27 23:07:26 -04:00
Vyacheslav Pavlov
7f3145c606 [TwigBundle] Removed redundant return statement. 2016-07-27 23:41:42 +03:00
Nicolas Grekas
26dfa2f879 bug #19435 [Cache] Fix incorrect timestamps generated by FilesystemAdapter (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[Cache] Fix incorrect timestamps generated by FilesystemAdapter

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

Commits
-------

bd2e795 [Cache] Fix incorrect timestamps generated by FilesystemAdapter
2016-07-27 16:06:17 +02:00
Alexander Zhuravlev
77adea7110 Added class existence check if is_subclass_of() fails in compiler passes 2016-07-27 22:26:20 +12:00
Nicolas Grekas
3a57de19cd bug #19434 [Serializer] enable property info in framework bundle (David Badura)
This PR was submitted for the master branch but it was merged into the 3.1 branch instead (closes #19434).

Discussion
----------

[Serializer] enable property info in framework bundle

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

I've been wondering why the datetime normalizer won't work in combination with object normalizer in symfony 3.1 by default. I also found nothing in the documentation. Only http://symfony.com/blog/new-in-symfony-3-1-datetime-normalizer but here is not described how to use it with the object normalizer and how to configure the config.yml.

After debugging i found out that the object normalizer don't use the new property info component. With my change, you can enabled it with following config:

```yml
    serializer:
         enabled: true
    property_info: ~
```

Should i add analog to `enable_annotation` an `enable_property_info` option?

```yml
    serializer:
         enabled: true
         enable_property_info: true
    property_info: ~
```

Commits
-------

c02933d enable property info
2016-07-27 10:27:32 +02:00
David Badura
c02933dba3 enable property info 2016-07-27 10:27:32 +02:00
Nicolas Grekas
90e95a605f minor #19438 Reference the actual location of the documentation (greg0ire)
This PR was merged into the 3.1 branch.

Discussion
----------

Reference the actual location of the documentation

| Q             | A
| ------------- | ---
| Branch?       | 3.1 because bug is not present before
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

The old link was giving a 404

Commits
-------

98dc69e Reference the actual location of the documentation
2016-07-27 10:23:35 +02:00
Nicolas Grekas
35ba478680 [Cache] Fix default lifetime being ignored 2016-07-27 10:15:52 +02:00
Christophe Coevoet
db3f5544d9 bug #19439 [DependencyInjection] Fixed deprecated default message template with XML (jeremyFreeAgent)
This PR was merged into the 2.8 branch.

Discussion
----------

[DependencyInjection] Fixed deprecated default message template with XML

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

165529b [DependencyInjection] Fixed deprecated default message template with XML
2016-07-27 09:15:16 +02:00
Jérémy Romey
165529bb55 [DependencyInjection] Fixed deprecated default message template with XML 2016-07-26 18:50:32 +02:00
Grégoire Paris
98dc69eb10
Reference the actual location of the documentation 2016-07-26 17:33:44 +02:00
Nicolas Grekas
35c70be59f minor #19433 [TwigBridge] Removed extra arguments in 2 places. (zomberg)
This PR was squashed before being merged into the 2.7 branch (closes #19433).

Discussion
----------

[TwigBridge] Removed extra arguments in 2 places.

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

754bd4e [TwigBridge] Removed extra arguments in 2 places.
2016-07-26 15:09:57 +02:00
Vyacheslav Pavlov
754bd4ecd4 [TwigBridge] Removed extra arguments in 2 places. 2016-07-26 15:09:55 +02:00
Nicolas Grekas
bd2e79577f [Cache] Fix incorrect timestamps generated by FilesystemAdapter 2016-07-26 15:05:38 +02:00
Nicolas Grekas
66e694ed57 [Process] Fix write access check for pipes on Windows 2016-07-26 10:11:15 +02:00
Nicolas Grekas
54043a084f Merge branch '3.0' into 3.1
* 3.0:
  [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
  [DomCrawler] Inherit the namespace cache in subcrawlers
  [WebProfilerBundle] Fixed  JSDoc parameter definition
  [HttpFoundation] HttpCache refresh stale responses containing an ETag
2016-07-26 10:04:17 +02:00
Nicolas Grekas
667ad70127 Merge branch '2.8' into 3.0
* 2.8:
  [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
  [DomCrawler] Inherit the namespace cache in subcrawlers
  [WebProfilerBundle] Fixed  JSDoc parameter definition
  [HttpFoundation] HttpCache refresh stale responses containing an ETag

Conflicts:
	src/Symfony/Component/Finder/Tests/Shell/CommandTest.php
2016-07-26 10:03:56 +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