Commit Graph

24991 Commits

Author SHA1 Message Date
Nicolas Grekas 27a6c1f604 minor #23613 [DI] Remove unused props from the PhpDumper (dunglas)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #23613).

Discussion
----------

[DI] Remove unused props from the PhpDumper

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| 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 | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

f1aa45c [DI] Remove unused props from the PhpDumper
2017-07-28 10:50:39 +02:00
Kévin Dunglas f1aa45c517 [DI] Remove unused props from the PhpDumper 2017-07-28 10:50:38 +02:00
Fabien Potencier 3f31266f18 minor #23689 [ProxyManager] Cleanup fixtures (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[ProxyManager] Cleanup fixtures

| 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 noticed that these fixture files are not maintainable. And we don't need them at all in fact, let's drop them.

Commits
-------

31843d6f98 [ProxyManager] Cleanup fixtures
2017-07-28 07:41:14 +02:00
Nicolas Grekas 31843d6f98 [ProxyManager] Cleanup fixtures 2017-07-27 10:00:51 +02:00
Fabien Potencier a96d85ecff minor #23633 [Form] Add some phpdocs for IDE autocompletion and better SCA (Koc)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Add some phpdocs for IDE autocompletion and better SCA

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

@ogizanagi I've tryed add single phpdoc `@method FormInterface[] getIterator()` to `FormInterface` but it not works correctly in PHPStorm. Have you any ideas?

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

d30c751781 Add some phpdocs for IDE autocompletion and better SCA
2017-07-27 08:21:20 +02:00
Nicolas Grekas 50b5696779 bug #23684 [Debug] Missing escape in debug output (c960657)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Missing escape in debug output

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

When pretty-printing an exception, the debug handler does not properly escape array keys.

The problem only occurs when debug output is enabled, so this is not considered a [security issue](http://symfony.com/doc/current/contributing/code/security.html) (according to @fabpot), because the debug tools [should not be used in production](https://symfony.com/doc/current/components/debug.html#usage).

A test for this is included in my patch for #18722.

Commits
-------

636777d [Debug] HTML-escape array key
2017-07-26 22:00:18 +02:00
Christian Schmidt 636777dc61 [Debug] HTML-escape array key 2017-07-26 17:00:11 +02:00
Fabien Potencier a90250d8da minor #23673 [DI] Make dumped docblocks less verbose (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Make dumped docblocks less verbose

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

When I open a dumped container, I always find there are too much noise in docblocs.
As a bonus side effect, this will reduce the memory requirement in dev :)

Commits
-------

1ade5d8658 [DI] Make dumped docblocks less verbose
2017-07-26 09:36:19 +02:00
Nicolas Grekas 1ade5d8658 [DI] Make dumped docblocks less verbose 2017-07-26 09:27:50 +02:00
Nicolas Grekas 072c866d70 minor #23670 [DI] use assertStringEqualsFile when possible (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] use assertStringEqualsFile when possible

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

To make failure reporting more accurate, and maintaining tests easier (assertStringEqualsFile is already heavily used in the same file.)

Commits
-------

eebae7e [DI] use assertStringEqualsFile when possible
2017-07-26 08:23:02 +02:00
Nicolas Grekas e5790afa80 bug #23662 [VarDumper] Adapt to php 7.2 changes (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Adapt to php 7.2 changes

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

As required by this change on PHP 7.2:
https://wiki.php.net/rfc/convert_numeric_keys_in_object_array_casts

Tests pass locally (until we add 7.2 to Travis)

Commits
-------

3c2f5f7 [VarDumper] Adapt to php 7.2 changes
2017-07-26 08:17:43 +02:00
Nicolas Grekas eebae7ec71 [DI] use assertStringEqualsFile when possible 2017-07-26 08:11:54 +02:00
Nicolas Grekas 3c2f5f7a24 [VarDumper] Adapt to php 7.2 changes 2017-07-25 16:57:06 +02:00
Maxime Steinhausser 2af59599b1 bug #23649 [Form][TwigBridge] Don't render _method in form_rest() for a child form (fmarchalemisys)
This PR was squashed before being merged into the 2.7 branch (closes #23649).

Discussion
----------

[Form][TwigBridge] Don't render _method in form_rest() for a child form

The hidden `_method` must only be generated if the form is the top most form.

Always generating the hidden `_method` breaks forms using the POST method when they have children using the PUT method. If `_method` is generated for such a child form, it overrides the parent method and the form fails to validate.

See issue #23254

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

Commits
-------

973b2d3 [Form][TwigBridge] Don't render _method in form_rest() for a child form
2017-07-25 11:24:46 +02:00
fmarchalemisys 973b2d3973 [Form][TwigBridge] Don't render _method in form_rest() for a child form 2017-07-25 11:24:41 +02:00
Konstantin.Myakshin d30c751781 Add some phpdocs for IDE autocompletion and better SCA 2017-07-23 12:48:31 +03:00
Fabien Potencier ee58cfcf10 bug #23619 [Validator] Fix IbanValidator for ukrainian IBANs (paroe)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #23619).

Discussion
----------

[Validator] Fix IbanValidator for ukrainian IBANs

The ukrainian bank identifier consists of six digits and not letters.
Also fixes the broken links to the current SWIFT IBAN registry pdf.

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

1ba95738fb [Validator] Fix IbanValidator for ukrainian IBANs
2017-07-22 09:54:37 +02:00
Christopher Parotat 1ba95738fb [Validator] Fix IbanValidator for ukrainian IBANs
The ukrainian bank identifier consists of six digits and not letters.
Also fix the broken links to the current SWIFT IBAN registry pdf.
2017-07-22 09:54:37 +02:00
Nicolas Grekas da6ed16628 minor #23612 use Precise on Travis to keep PHP LDAP support (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

use Precise on Travis to keep PHP LDAP support

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

Travis CI [started to roll out Ubuntu Trusty](https://blog.travis-ci.com/2017-07-11-trusty-as-default-linux-is-coming) as the default distribution. However, it seems that the PHP LDAP extension is missing on Trusty (see travis-ci/travis-ci#7067) starting to make our builds fail. Thus, I suggest to keep using Precise until the linked issue has been fixed.

Commits
-------

5441b1a use Precise on Travis to keep PHP LDAP support
2017-07-21 13:02:19 +02:00
Christian Flothmann 5441b1ad38 use Precise on Travis to keep PHP LDAP support 2017-07-21 12:55:18 +02:00
Fabien Potencier f4fffc082c bug #23238 [Security] ensure the 'route' index is set before attempting to use it (gsdevme)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #23238).

Discussion
----------

[Security] ensure the 'route' index is set before attempting to use it

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

```
                // matching a request is more powerful than matching a URL path + context, so try that first
                if ($this->urlMatcher instanceof RequestMatcherInterface) {
                    $parameters = $this->urlMatcher->matchRequest($request);
                } else {
                    $parameters = $this->urlMatcher->match($request->getPathInfo());
                }

                return $path === $parameters['_route'];
```
Hi the issue here is the code is assuming a `_route` has been returned from the `match()` method.. however there is nothing to suggest that is always the case. For example if I just want to return a controller that is perhaps not added as an actual route I can & it works.. Although this will generate a notice warning.

**In terms of what happens if the `_route` is not defined should it return `false?` or actually  perform a similar condition as `return $path === rawurldecode($request->getPathInfo());` **

I have an implementation of a router that is just returning a controller path and its arguments without a `_route` which works aside from this notice.

Commits
-------

7ae578cc1a fix(security): ensure the 'route' index is set before attempting to use it
2017-07-20 09:38:10 +02:00
Gavin Staniforth 7ae578cc1a fix(security): ensure the 'route' index is set before attempting to use it 2017-07-20 09:38:09 +02:00
Fabien Potencier f4172b0bff bug #23580 Fix login redirect when referer contains a query string (fabpot)
This PR was squashed before being merged into the 2.7 branch (closes #23580).

Discussion
----------

Fix login redirect when referer contains a query string

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

In 3.3, #19026 was merged to fix a bug that should have been fixed in 2.7. The fix was wrong anyway, so this PR fixes it the proper way.

The first two commits refactors test (using mocks for data objects is a bad idea and using too many mocks actually makes tests test nothing).

The actual fix is in the third commit.

Commits
-------

022ac0be09 [Security] added more tests
9c7a1406cb [Security] fixed default target path when referer contains a query string
b1f1ae26b4 [Security] simplified tests
3387612451 [Security] refactored tests
2017-07-19 11:34:08 +02:00
Fabien Potencier 022ac0be09 [Security] added more tests 2017-07-19 08:09:02 +02:00
Fabien Potencier 9c7a1406cb [Security] fixed default target path when referer contains a query string 2017-07-19 07:57:00 +02:00
Fabien Potencier b1f1ae26b4 [Security] simplified tests 2017-07-19 07:53:07 +02:00
Fabien Potencier 3387612451 [Security] refactored tests 2017-07-19 07:49:47 +02:00
Fabien Potencier 2040770da5 bug #23574 [VarDumper] Move locale sniffing to dump() time (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Move locale sniffing to dump() time

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

Commits
-------

eed8a5143d [VarDumper] Move locale sniffing to dump() time
2017-07-19 06:11:13 +02:00
Nicolas Grekas eed8a5143d [VarDumper] Move locale sniffing to dump() time 2017-07-18 18:11:53 +02:00
Fabien Potencier 910a8debd8 minor #23559 [DI] Resolve aliases earlier (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Resolve aliases earlier

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

Not a bug fix because a compiler pass already resolves aliases, but makes reasoning locally about the code easier.

Commits
-------

9922827cc2 [DI] Resolve aliases earlier
2017-07-18 09:30:09 +02:00
Nicolas Grekas 9922827cc2 [DI] Resolve aliases earlier 2017-07-18 09:15:21 +02:00
Fabien Potencier 3d4e143619 bumped Symfony version to 2.7.33 2017-07-17 19:58:04 +02:00
Fabien Potencier f3f7d55052 Merge pull request #23552 from fabpot/release-2.7.32
released v2.7.32
2017-07-17 19:33:37 +02:00
Fabien Potencier f01f3d328a updated VERSION for 2.7.32 2017-07-17 19:33:19 +02:00
Fabien Potencier 5377fe5d6a update CONTRIBUTORS for 2.7.32 2017-07-17 19:33:09 +02:00
Fabien Potencier f62dc85fd9 updated CHANGELOG for 2.7.32 2017-07-17 19:33:01 +02:00
Fabien Potencier 559ccb2c66 security #23507 [Security] validate empty passwords again (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] validate empty passwords again

| 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/pull/23341#issuecomment-315341226
| License       | MIT
| Doc PR        |

It looks like this part of #23341 causes serious security issues for some users who rely on the validator to also compare the empty string with their user's password (see for example https://github.com/symfony/symfony/pull/23341#issuecomment-315341226). Thus I suggest to revert this part of #23341.

Commits
-------

878198cefa [Security] validate empty passwords again
2017-07-17 12:54:11 +02:00
Fabien Potencier 01cb493ed1 minor #23487 [Security] Fix wrong term in UserProviderInterface (issei-m)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #23487).

Discussion
----------

[Security] Fix wrong term in UserProviderInterface

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 | -
| License       | MIT
| Doc PR        | -

The term "account" is the just remnant from the days of AccountInterface, isn't it?

Commits
-------

b5b8c15831 [Security] Fix wrong term in UserProviderInterface
2017-07-17 12:41:14 +02:00
Issei.M b5b8c15831 [Security] Fix wrong term in UserProviderInterface 2017-07-17 12:41:13 +02:00
Fabien Potencier 0100ca145d minor #23452 [DI] Remove irrelevant comment from container (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Remove irrelevant comment from container

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes-ish
| 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-->

Spotted in #22811

Commits
-------

595a225a0f [DI] Remove irrelevant comment from container
2017-07-17 12:28:17 +02:00
Fabien Potencier d76171ee83 bug #23526 [HttpFoundation] Set meta refresh time to 0 in RedirectResponse content (jnvsor)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #23526).

Discussion
----------

[HttpFoundation] Set meta refresh time to 0 in RedirectResponse content

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

Set meta refresh time to 0 in RedirectResponse content

Commits
-------

5508a00e74 [HttpFoundation] Set meta refresh time to 0 in RedirectResponse content
2017-07-17 12:22:38 +02:00
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
Nicolas Grekas 05e3332fe2 bug #23459 [TwigBundle] allow to configure custom formats in XML configs (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] allow to configure custom formats in XML configs

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

Commits
-------

5a3a24b allow to configure custom formats in XML configs
2017-07-11 08:56:31 +02:00