Commit Graph

20180 Commits

Author SHA1 Message Date
Jonathan Vollebregt
5508a00e74 [HttpFoundation] Set meta refresh time to 0 in RedirectResponse content 2017-07-17 12:22:37 +02:00
Christian Flothmann
878198cefa [Security] validate empty passwords again 2017-07-14 16:25:02 +02:00
Nicolas Grekas
62fdf9c72b minor #23435 [TwigBridge] cleaner implementation of the TwigRenderer (Tobion)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] cleaner implementation of the TwigRenderer

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/23432#discussion_r125880092
| License       | MIT
| Doc PR        |

<!--
- 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 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

c7c5ba8 [TwigBridge] cleaner implementation of the TwigRenderer
2017-07-13 15:48:31 +02:00
Nicolas Grekas
87a6845b4d bug #23468 [DI] Handle root namespace in service definitions (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #23468).

Discussion
----------

[DI] Handle root namespace in service definitions

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Fixes

```
Cannot dump definition because of invalid class name ('\\stdClass')
```

for

```yaml
services:
    foo: {class: '\stdClass' }
```

`ContainerBuilder` allows it, so `PhpDumper` should as well.

Commits
-------

05170c8 [DI] Handle root namespace in service definitions
2017-07-12 13:53:19 +02:00
Roland Franssen
05170c84a2 [DI] Handle root namespace in service definitions 2017-07-12 13:53:12 +02:00
Nicolas Grekas
c2a6a6e9b5 bug #23256 [Security] Fix authentication.failure event not dispatched on AccountStatusException (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Fix authentication.failure event not dispatched on AccountStatusException

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

Authentication fails if the user exists but its account is disabled/expired/locked, the failure event should be dispatched in this case, so that you can hook into as for any authentication exception.

Commits
-------

64c2efd [Security] Fix authentication.failure event not dispatched on AccountStatusException
2017-07-12 08:41:53 +02:00
Nicolas Grekas
676a17e22b bug #23461 Use rawurlencode() to transform the Cookie into a string (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #23461).

Discussion
----------

Use rawurlencode() to transform the Cookie into a string

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

Commits
-------

025dfff Use rawurlencode() to transform the Cookie into a string
2017-07-11 16:37:20 +02:00
Javier Eguiluz
025dfff675 Use rawurlencode() to transform the Cookie into a string 2017-07-11 16:37:17 +02:00
Christian Flothmann
5a3a24b0ac allow to configure custom formats in XML configs 2017-07-09 16:08:05 +02:00
Roland Franssen
595a225a0f [DI] Remove irrelevant comment from container 2017-07-08 10:35:50 +02:00
Tobias Schultze
c7c5ba8946 [TwigBridge] cleaner implementation of the TwigRenderer 2017-07-06 14:34:37 +02:00
Christian Flothmann
032e654acb require the XML PHP extension 2017-07-06 10:51:23 +02:00
Fabien Potencier
4e2a404f03 bug #23261 Fixed absolute url generation for query strings and hash urls (alexander-schranz)
This PR was squashed before being merged into the 2.7 branch (closes #23261).

Discussion
----------

Fixed absolute url generation for query strings and hash urls

| Q             | A
| ------------- | ---
| Branch?       | 2.7, ...
| Bug fix?      | yes
| New feature?  |no
| BC breaks?    | yes? absolute_url will change its output but the old was incorrect
| Deprecations? |no
| Tests pass?   | yes?
| Fixed tickets | fixes #23260
| License       | MIT

Fixed absolute url generation for query strings

Commits
-------

89ad27d544 Fixed absolute url generation for query strings and hash urls
2017-07-06 09:01:21 +03:00
Alexander Schranz
89ad27d544 Fixed absolute url generation for query strings and hash urls 2017-07-06 09:01:12 +03:00
Fabien Potencier
311e627828 bug #23398 [Filesystem] Dont copy perms when origin is remote (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Filesystem] Dont copy perms when origin is remote

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

Commits
-------

7b442211dc [Filesystem] Dont copy perms when origin is remote
2017-07-05 17:24:07 +03:00
Robin Chalas
64c2efd8cb [Security] Fix authentication.failure event not dispatched on AccountStatusException 2017-07-05 14:02:28 +02:00
Fabien Potencier
39fc4ddec7 bumped Symfony version to 2.7.32 2017-07-05 11:52:01 +03:00
Nicolas Grekas
7b442211dc [Filesystem] Dont copy perms when origin is remote 2017-07-05 10:27:10 +03:00
Fabien Potencier
beee4332a1 updated VERSION for 2.7.31 2017-07-05 10:16:12 +03:00
Dariusz
58ba4818a6 Fix indent of methods 2017-07-04 23:00:55 +02:00
Gábor Egyed
6ed9c8d8c5 [FrameworkBundle] Do not remove files from assets dir 2017-07-04 11:39:25 +02:00
Fabien Potencier
fa6b45bc58 bumped Symfony version to 2.7.31 2017-07-03 18:37:36 +03:00
Fabien Potencier
75443d232b updated VERSION for 2.7.30 2017-07-03 17:22:50 +03:00
Thomas Perez
3a529e3391 Improve CircularReferenceException message 2017-07-03 15:09:40 +02:00
Fabien Potencier
77d06b5d39 bug #23341 [DoctrineBridge][Security][Validator] do not validate empty values (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DoctrineBridge][Security][Validator] do not validate empty values

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

Nearly all validators operating on scalar values (except for some special constraints) do ignore empty values. If you want to forbid them, you have to use the `NotBlank` constraint instead.

Commits
-------

fd7ad234bc do not validate empty values
2017-07-03 10:38:34 +03:00
mcorteel
b576f46c26 Misspelled word
The French word "chaine" should be spelled "chaîne".
2017-07-03 10:29:33 +03:00
Fabien Potencier
4c00279360 minor #23107 [Security] Fix annotation (enumag)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Fix annotation

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

8a4d4eb563 [Security] Fix annotation
2017-07-03 10:26:42 +03:00
Fabien Potencier
64ea580eae bug #23274 Display a better error design when the toolbar cannot be displayed (yceruto)
This PR was squashed before being merged into the 2.7 branch (closes #23274).

Discussion
----------

Display a better error design when the toolbar cannot be displayed

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (failure unrelated)
| Fixed tickets | https://github.com/symfony/symfony/pull/23266
| License       | MIT
| Doc PR        | n/a

Fixing the left position of the bar (tested in app without style) and escaping the literal newline (ES5) as some IDEs fails with previous syntax (and Github diff too). Btw, I have added the Symfony icon to make clear that this message comes from Symfony ;)

**Before:**
![current_toolbar_error](https://user-images.githubusercontent.com/2028198/27466735-cd5f0da8-57aa-11e7-8431-3025c41557e6.png)

**After:**
![after_toolbar_27](https://user-images.githubusercontent.com/2028198/27467928-75e45d4e-57b4-11e7-9e1f-e252d9085596.png)

Commits
-------

ed3e403b4b Display a better error design when the toolbar cannot be displayed
2017-07-03 10:01:20 +03:00
Yonel Ceruto
ed3e403b4b Display a better error design when the toolbar cannot be displayed 2017-07-03 10:01:07 +03:00
Fabien Potencier
03945c7d20 minor #23309 Identify tty tests in Component/Process (pmmaga)
This PR was merged into the 2.7 branch.

Discussion
----------

Identify tty tests in Component/Process

| 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

Commits
-------

65d89ec224 Identify tty tests in Component/Process
2017-07-03 09:43:33 +03:00
Fabien Potencier
c1e8183f1b bug #23333 [PropertyAccess] Fix TypeError discard (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[PropertyAccess] Fix TypeError discard

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? |no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Given the following code:

```php
class Bar
{
    private $foos = [];

    public function getFoos(): array
    {
        return 'It doesn\'t respect the return type';
    }

    public function addFoo(Foo $foo)
    {
        // ...
    }

    public function removeFoo(Foo $dateTime)
    {
        // ...
    }
}

$object = new Bar();
$this->propertyAccessor->setValue($object, 'foos', array(new \DateTime()));
```

The `PropertyAccessor` will  crash (`[Symfony\Component\Debug\Exception\ContextErrorException]  Notice: Undefined offset: 0`) instead of displaying the (valid) PHP error.

This PR fixes the issue.

Commits
-------

e0c5040398 [PropertyAccess] Fix TypeError discard
2017-07-03 09:09:23 +03:00
Fabien Potencier
44c3f58265 minor #23327 [Validator] Throw exception on Comparison constraints null options (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Throw exception on Comparison constraints null options

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see comment below -->
| Bug fix?      | no. There is no bug, but the constraint can be silently created in an invalid state.
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes (failure unrelated)
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

2de59a7381 [Validator] Throw exception on Comparison constraints null options
2017-07-03 08:46:34 +03:00
Christian Flothmann
fd7ad234bc do not validate empty values 2017-07-02 09:03:13 +02:00
Christian Flothmann
d8ba440def [Console] fix description of INF default values 2017-07-01 11:26:27 +02:00
Kévin Dunglas
e0c5040398
[PropertyAccess] Fix TypeError discard 2017-06-30 11:24:55 +02:00
Maxime Steinhausser
2de59a7381 [Validator] Throw exception on Comparison constraints null options 2017-06-30 08:56:32 +02:00
Pedro Magalhães
65d89ec224 Identify tty tests in Component/Process 2017-06-27 18:14:10 +02:00
Fabien Potencier
7acc34537b bug #23279 Don't call count on non countable object (pierredup)
This PR was merged into the 2.7 branch.

Discussion
----------

Don't call count on non countable object

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

From PHP 7.2, calling `count` on a non-countable object will emit a warning (https://wiki.php.net/rfc/counting_non_countables).
Based on the current test suit, this is the only place where I found this warning

Commits
-------

635bccdf8f Dont call count on non countable object
2017-06-24 09:42:08 -07:00
Christian Flothmann
46c38df0fd [TwigBundle] add back exception check 2017-06-24 11:40:57 +02:00
Pierre du Plessis
635bccdf8f Dont call count on non countable object 2017-06-23 12:52:30 +02:00
George Mponos
a433ceca41 Show exception is checked twice in ExceptionController of twig 2017-06-22 16:15:38 -07:00
Fabien Potencier
f7de083cbd bug #23266 Display a better error message when the toolbar cannot be displayed (javiereguiluz)
This PR was merged into the 2.7 branch.

Discussion
----------

Display a better error message when the toolbar cannot be displayed

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

In action:

![profiler-error](https://user-images.githubusercontent.com/73419/27444352-5d0a1d60-5776-11e7-89c3-430cd6f38454.png)

Commits
-------

cc7275bccc Display a better error message when the toolbar cannot be displayed
2017-06-22 16:02:01 -07:00
Christian Flothmann
99931a994b allow SSI fragments configuration in XML files 2017-06-22 22:44:44 +02:00
Javier Eguiluz
cc7275bccc Display a better error message when the toolbar cannot be displayed 2017-06-22 18:11:34 +02:00
Christian Flothmann
0ee3f57533 render hidden _method field in form_rest() 2017-06-21 18:08:25 +02:00
Christian Flothmann
3c21650d9e return fallback locales whenever possible 2017-06-21 13:03:18 +02:00
Fabien Potencier
6e75cee83e bug #22732 [Security] fix switch user _exit without having current token (dmaicher)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] fix switch user _exit without having current token

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

Attempting to `_exit` from a switched user caused an error when not having any token in the storage (for example happens when not logged in + disallowing anonymous users on that firewall):

`[1] Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 1 passed to Symfony\Component\Security\Http\Firewall\SwitchUserListener::getOriginalToken()
        must be an instance of Symfony\Component\Security\Core\Authentication\Token\TokenInterface, null given, called in
        symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php on line 164`

Commits
-------

16da6861be [Security] fix switch user _exit without having current token
2017-06-19 11:57:05 -07:00
Fabien Potencier
71b61b04a1 minor #23222 [Routing] Fix XmlFileLoader exception message (voronkovich)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Fix XmlFileLoader exception message

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

When an `XmlFileLoader` encounters an unknown tag it throws an exception with message like `Unknown tag "foo" used in file "bar". Expected "default", "requirement" or "option".`. A proper message should be `Unknown tag "foo" used in file "bar". Expected "default", "requirement", "option"  or "condition".`

Commits
-------

f6a94cb56f [Routing] Fix XmlFileLoader exception message
2017-06-19 07:02:36 -07:00
Oleg Voronkovich
f6a94cb56f [Routing] Fix XmlFileLoader exception message 2017-06-18 21:08:05 +03:00
Dawid Nowak
90e192e824 Sessions: configurable "use_strict_mode" option for NativeSessionStorage
https://github.com/symfony/symfony/pull/22352#issuecomment-302113533
2017-06-16 20:49:16 +02:00
Fabien Potencier
436d5e4e94 bug #23195 [FrameworkBundle] [Command] Clean bundle directory, fixes #23177 (NicolasPion)
This PR was squashed before being merged into the 2.7 branch (closes #23195).

Discussion
----------

[FrameworkBundle] [Command] Clean bundle directory, fixes #23177

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see comment below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | no
| Fixed tickets | #23177
| License       | MIT

This PR fix #23177
when running an assets:install, it will remove directorys who do not have anymore a valid Bundle

Commits
-------

180f178f43 [FrameworkBundle] [Command] Clean bundle directory, fixes #23177
2017-06-16 11:24:38 -07:00
Nicolas Pion
180f178f43 [FrameworkBundle] [Command] Clean bundle directory, fixes #23177 2017-06-16 11:24:36 -07:00
Fabien Potencier
c8884e7d9a bug #23052 [TwigBundle] Add Content-Type header for exception response (rchoquet)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] Add Content-Type header for exception response

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

This PR comes after I was looking to customize the way exceptions are served for a JSON API (grabbed the info at http://symfony.com/doc/current/controller/error_pages.html#overriding-the-default-exceptioncontroller).

I noticed that even when changing the request format to 'json' so that the right json.twig template is served:
```php
// in my override of the ExceptionController
public function showAction(Request $request, FlattenException $exception, DebugLoggerInterface $logger = null)
{
    $request->setRequestFormat('json');
    return parent::showAction($request, $exception, $logger);
}
```
the response Content-Type header was still 'text/html'.

By now, the response Content-Type should be corresponding to the given request format.

I also feel there's some room for improvement with the general "displaying error for a JSON API" chapter as it feels strange that there's no configuration option to just say "serve me anything as json", but that's another issue.

Commits
-------

9e2b408f25 add content-type header on exception response
2017-06-16 08:39:36 -07:00
Fabien Potencier
b8c94d03c2 bug #23199 Reset redirectCount when throwing exception (hvanoch)
This PR was merged into the 2.7 branch.

Discussion
----------

Reset redirectCount when throwing exception

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

When catching the exception throw when exceeding the redirect limit, all new request which results in a redirect fail. By resetting the redirectCount we can still use the same client instance.

Commits
-------

83fd578f96 Reset redirectCount when throwing exception
2017-06-15 07:57:21 -07:00
Henne Van Och
83fd578f96 Reset redirectCount when throwing exception 2017-06-15 15:33:54 +02:00
Maxime Steinhausser
6ac0de8c2f [TwigBundle] Remove template.xml services when templating is disabled 2017-06-15 13:54:31 +02:00
rchoquet
9e2b408f25 add content-type header on exception response 2017-06-15 11:47:56 +02:00
Matthias Pigulla
09bcbc70e7 Embedding a response that combines expiration and validation, that should not defeat expiration on the combined response 2017-06-14 23:57:46 +02:00
Fabien Potencier
551e5ba515 bug #23129 Fix two edge cases in ResponseCacheStrategy (mpdude)
This PR was squashed before being merged into the 2.7 branch (closes #23129).

Discussion
----------

Fix two edge cases in ResponseCacheStrategy

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

While reviewing how `ResponseCacheStrategy` calculates the caching-related headers for responses that embed subrequests, I came across two cases that I think are currently implemented incorrectly.

a) When the main response is public and cacheable with an expiration time, but it embeds (via ESI) a controller that does not set any caching-related headers, this embedded response is more constrained. So, the resulting (combined) response must not be cacheable, especially it may not keep the s-maxage.

b) When the main response is public and cacheable with an expiration time, but it embeds (via ESI) a controller that explicitly creates a "private" response, the resulting (combined) response must be private as well.

Commits
-------

c6e8c07e4d Fix two edge cases in ResponseCacheStrategy
2017-06-14 14:29:16 -07:00
Matthias Pigulla
c6e8c07e4d Fix two edge cases in ResponseCacheStrategy 2017-06-14 14:29:14 -07:00
Fabien Potencier
f392282984 bug #22636 [Routing] Expose request in route conditions, if needed and possible (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #22636).

Discussion
----------

[Routing] Expose request in route conditions, if needed and possible

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

given

```
/**
 * @Route("/", name="homepage", condition="request.isXmlHttpRequest()")
 */
```

```
$ app/console route:match /
```

before

![image](https://cloud.githubusercontent.com/assets/1047696/25716808/b9ab518e-3100-11e7-8b59-21351b5c14ca.png)

after

![image](https://cloud.githubusercontent.com/assets/1047696/25716833/d08065fc-3100-11e7-9462-987b2c6eaa26.png)

Commits
-------

016e976691 [Routing] Expose request in route conditions, if needed and possible
2017-06-14 13:57:27 -07:00
Roland Franssen
016e976691 [Routing] Expose request in route conditions, if needed and possible 2017-06-14 13:57:25 -07:00
Fabien Potencier
53a911194d minor #23185 [HttpFoundation] Add missing docs (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Add missing docs

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

Commits
-------

c6b9101e06 [HttpFoundation] added missing docs
2017-06-14 13:11:47 -07:00
Fabien Potencier
baf988d3d8 bug #23057 [Translation][FrameworkBundle] Fix resource loading order inconsistency reported in #23034 (mpdude)
This PR was squashed before being merged into the 2.7 branch (closes #23057).

Discussion
----------

[Translation][FrameworkBundle] Fix resource loading order inconsistency reported in #23034

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

Fixes the bug reported in #23034:

When mixing `addResource()` calls and providing the `resource_files` option, the order in which resources are loaded depends on the `kernel.debug` setting and whether a cache is used.

In particular, when several loaders provide translations for the same message, the one that "wins" may change between development and production mode.

Commits
-------

2a9e65dea9 [Translation][FrameworkBundle] Fix resource loading order inconsistency reported in #23034
2017-06-14 13:10:55 -07:00
Matthias Pigulla
2a9e65dea9 [Translation][FrameworkBundle] Fix resource loading order inconsistency reported in #23034 2017-06-14 13:10:50 -07:00
Fabien Potencier
d44f143c75 bug #23092 [Filesystem] added workaround in Filesystem::rename for PHP bug (VolCh)
This PR was squashed before being merged into the 2.7 branch (closes #23092).

Discussion
----------

[Filesystem] added workaround in Filesystem::rename for PHP bug

[Filesystem] added workaround in Filesystem::rename for https://bugs.php.net/bug.php?id=54097

Standard PHP rename() of dirs across devices/mounted filesystems  produces confusing copy error & throws IOException in Filesystem::rename. I got it during console cache:clear  in the Docker environment. This PR possible fixes https://github.com/symfony/symfony/issues/19851 and other environment related issues.

Workaround is on \rename() fails try to Filesystem::mirror & Filesystem::remove if $origin is directory

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

3ccbc479da [Filesystem] added workaround in Filesystem::rename for PHP bug
2017-06-14 12:55:44 -07:00
VolCh
3ccbc479da [Filesystem] added workaround in Filesystem::rename for PHP bug 2017-06-14 12:55:43 -07:00
Fabien Potencier
f0abe11a42 minor #23123 Add tests for ResponseCacheStrategy to document some more edge cases (mpdude)
This PR was squashed before being merged into the 2.7 branch (closes #23123).

Discussion
----------

Add tests for ResponseCacheStrategy to document some more edge cases

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

Adds some test cases for possible combinations of master/subrequest responses to better document behaviour in edge cases. Should now cover the entire `ResponseCacheStrategy`.

I hope 2.7 is the right target branch because having more tests for all releases should be a good thing™️.

Commits
-------

69e84633dd Add tests for ResponseCacheStrategy to document some more edge cases
2017-06-14 12:53:11 -07:00
Matthias Pigulla
69e84633dd Add tests for ResponseCacheStrategy to document some more edge cases 2017-06-14 12:53:08 -07:00
Fabien Potencier
c6b9101e06 [HttpFoundation] added missing docs 2017-06-14 12:35:44 -07:00
Fabien Potencier
4cff0522d7 bug #23128 [HttpFoundation] fix for Support for new 7.1 session options (vincentaubert)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] fix for Support for new 7.1 session options

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

Commits
-------

71c1b6f5bf fixes #21606
2017-06-14 12:27:50 -07:00
Vincent AUBERT
71c1b6f5bf fixes #21606 2017-06-14 19:36:27 +02:00
Nicolas Grekas
d7238c9d96 [VarDumper] fixes 2017-06-14 18:20:11 +02:00
Fabien Potencier
78f028cc75 fixed CS 2017-06-13 17:54:13 -07:00
Fabien Potencier
f1e2fbd486 minor #23101 [FormBuilderInterface] Fixed PHPdoc return references (Javan Eskander)
This PR was merged into the 2.7 branch.

Discussion
----------

[FormBuilderInterface] Fixed PHPdoc return references

| Q             | A
| ------------- | ---
| Branch?       | 2.7 and higher
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | N/A (phpdoc)
| License       | MIT

In a case where the method `createFormBuilder()` was used where the methods `add()` and `getForm()` were chained onto it, the final resulting object was no longer a FormBuilder object as the `add()` and `remove()` methods was using a return variable that didn't work.
Should reference `self` as interfaces do not have a `$this` object.

Commits
-------

2f350d1d38 Fixed PHPdoc return references in FormBuilderInterface
2017-06-12 11:43:34 -07:00
Fabien Potencier
0dbba7bf4f minor #22931 SCA with Php Inspections (EA Extended): 2.7 (kalessil)
This PR was squashed before being merged into the 2.7 branch (closes #22931).

Discussion
----------

SCA with Php Inspections (EA Extended): 2.7

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

Static Code Analysis with Php Inspections (EA Extended): dead code and control flow tweaks.

Commits
-------

598ae56cc9 SCA with Php Inspections (EA Extended): 2.7
2017-06-10 17:25:34 -07:00
Vladimir Reznichenko
598ae56cc9 SCA with Php Inspections (EA Extended): 2.7 2017-06-10 17:25:31 -07:00
Fabien Potencier
9e2f394bf3 minor #23120 Remove deprecated each function (pierredup)
This PR was squashed before being merged into the 2.7 branch (closes #23120).

Discussion
----------

Remove deprecated each function

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

Replace the `each()` function which is deprecated in PHP 7.2 (https://wiki.php.net/rfc/deprecations_php_7_2#each)

Commits
-------

232caad876 Remove deprecated each function
2017-06-10 07:57:49 -07:00
Pierre du Plessis
232caad876 Remove deprecated each function 2017-06-10 07:57:48 -07:00
Fabien Potencier
0c17767dd5 bug #23086 [FrameworkBundle] Fix perf issue in CacheClearCommand::warmup() (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix perf issue in CacheClearCommand::warmup()

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

On slow file systems (eg on Windows), I noticed that writing files without doing any changes just kills perf.
Limiting the depth also helps when the symfony/cache component is used (because it can store thousands of files in its cache pool directory structure, and iterating there is also a waste of *fs* time).
I choose the max depth by looking at where existing apps put their files and added one level more just in case.

Commits
-------

b58f060fda [FrameworkBundle] Fix perf issue in CacheClearCommand::warmup()
2017-06-08 17:11:05 -07:00
Fabien Potencier
589f2b1a6c bug #23098 Cache ipCheck (2.7) (gonzalovilaseca)
This PR was merged into the 2.7 branch.

Discussion
----------

Cache ipCheck (2.7)

In our app we use trusted proxies. Using Blackfire we found `IpUtils::checkIp` was being called 454 times taking 3.15ms.
Caching the result saves those 3ms.

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

bcb80569cb Cache ipCheck
2017-06-08 16:52:20 -07:00
Jáchym Toušek
8a4d4eb563 [Security] Fix annotation 2017-06-08 15:38:34 +02:00
Javan Eskander
2f350d1d38 Fixed PHPdoc return references in FormBuilderInterface 2017-06-08 17:18:54 +10:00
Fabien Potencier
ccb6543839 bumped Symfony version to 2.7.30 2017-06-07 13:11:41 -07:00
Gonzalo Vilaseca
bcb80569cb Cache ipCheck 2017-06-07 20:32:30 +01:00
Fabien Potencier
c713d69827 updated VERSION for 2.7.29 2017-06-07 11:50:32 -07:00
Nicolas Grekas
b58f060fda [FrameworkBundle] Fix perf issue in CacheClearCommand::warmup() 2017-06-07 09:57:32 +02:00
Fabien Potencier
62cbfdd2e2 bug #23069 [SecurityBundle] Show unique Inherited roles in profile panel (yceruto)
This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] Show unique Inherited roles in profile panel

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

When more than one assigned role reaches the same inherited role then it's duplicated in the "Inherited roles" list.

The changes in the test case show the unexpected result before fix it:

```console
There was 1 failure:

1) Symfony\Bundle\SecurityBundle\Tests\DataCollector\SecurityDataCollectorTest::testCollectAuthenticationTokenAndRoles with data set #4 (array('ROLE_ADMIN', 'ROLE_OPERATOR'), array('ROLE_ADMIN', 'ROLE_OPERATOR'), array('ROLE_USER', 'ROLE_ALLOWED_TO_SWITCH'))
Failed asserting that Array &0 (
    0 => 'ROLE_USER'
    1 => 'ROLE_ALLOWED_TO_SWITCH'
    2 => 'ROLE_USER'
) is identical to Array &0 (
    0 => 'ROLE_USER'
    1 => 'ROLE_ALLOWED_TO_SWITCH'
)
```

Commits
-------

7061bfbf3a show unique inherited roles
2017-06-06 07:50:26 -07:00
Maxime Steinhausser
a1cdc2d46e [TwigBridge] Fix namespaced classes 2017-06-05 17:06:12 -07:00
Yonel Ceruto
7061bfbf3a show unique inherited roles 2017-06-05 14:17:49 -04:00
Fabien Potencier
621b7698fb bug #22936 [Form] Mix attr option between guessed options and user options (yceruto)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Mix attr option between guessed options and user options

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

Commits
-------

84f5de902d mix attr options between type-guess options and user options
2017-06-03 08:53:19 -07:00
Nicolas Grekas
1542925d8d minor #22986 CS: adjust chaining indentation (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

CS: adjust chaining indentation

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

Commits
-------

8c3c0fe CS: adjust chaining indentation
2017-06-02 16:34:38 +02:00
Nicolas Grekas
36f00509bc minor #22962 Use namespaced Twig (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Use namespaced Twig

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | needs https://github.com/twigphp/Twig/pull/2490 and https://github.com/twigphp/Twig/pull/2491
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

c3d1262 Use namespaced Twig
2017-06-02 09:20:11 +02:00
Nicolas Grekas
e7c4149e78 [EventDispatcher] Fix ContainerAwareEventDispatcher::hasListeners(null) 2017-06-01 23:49:12 +02:00
Nicolas Grekas
c3d1262208 Use namespaced Twig 2017-06-01 23:44:38 +02:00
Fabien Potencier
f91a020b84 Using FQ name for PHP_VERSION_ID 2017-06-01 13:44:56 -07:00
Nicolas Grekas
36bd06a152 bug #22996 [2.7][Form] Fix \IntlDateFormatter timezone parameter usage to bypass PHP bug #66323 (romainneutron)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7][Form] Fix \IntlDateFormatter timezone parameter usage to bypass PHP bug #66323

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

The issue is documented here.
The current symfony code works when `intl.use_exception` is off. however, it's on on PHP 7+ and the issue is reproducible. See https://3v4l.org/PllP1 and https://3v4l.org/3XnKI

Commits
-------

f42c73f [Form] Fix \IntlDateFormatter timezone parameter usage to bypass PHP bug #66323
2017-06-01 14:45:44 +02:00
Romain Neutron
f42c73f213
[Form] Fix \IntlDateFormatter timezone parameter usage to bypass PHP bug #66323 2017-06-01 11:48:44 +02:00
Christophe Coevoet
63a8aff2c8 Harden the debugging of Twig filters and functions
Removing the environment and context arguments is now based on Twig metadata
rather than on some wild guessing which might go wrong.
2017-05-31 17:20:46 +02:00
Dariusz
8c3c0fe65e CS: adjust chaining indentation 2017-05-31 11:30:46 +02:00