Commit Graph

25053 Commits

Author SHA1 Message Date
Javier Eguiluz
e5ef9fb74a Avoid infinite loops when profiler data is malformed 2017-08-03 22:11:44 +02:00
Fabien Potencier
e1ffb3341d bug #23729 [Bridge\ProxyManager] Dont call __destruct() on non-instantiated services (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Bridge\ProxyManager] Dont call __destruct() on non-instantiated services

| 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 working on making #23678 green, I discovered that if a lazy service implements `__destruct`, then that service is not lazy anymore: it is created at destruct time.
That behavior is documented at https://github.com/Ocramius/ProxyManager/issues/258 (+related issues).

While I may understand why this behavior is the default for ProxyManager, it does not fit our "lazy-services" use case to me. Typically, nobody wants a database connection to be created to destruct the uninitialized lazy-proxy.

Blocks #23678

Commits
-------

2d79ffa0ca [Bridge\ProxyManager] Dont call __destruct() on non-instantiated services
2017-08-03 14:06:53 +02:00
Nicolas Grekas
2d79ffa0ca [Bridge\ProxyManager] Dont call __destruct() on non-instantiated services 2017-08-03 13:36:00 +02:00
Fabien Potencier
8acbd12a24 bumped Symfony version to 2.7.34 2017-08-01 09:21:40 +02:00
Fabien Potencier
26c9a0dc46 Merge pull request #23734 from fabpot/release-2.7.33
released v2.7.33
2017-08-01 09:07:27 +02:00
Fabien Potencier
b30d34baf6 updated VERSION for 2.7.33 2017-08-01 09:07:03 +02:00
Fabien Potencier
55123da8f5 update CONTRIBUTORS for 2.7.33 2017-08-01 09:07:01 +02:00
Fabien Potencier
a0cd96812e updated CHANGELOG for 2.7.33 2017-08-01 09:06:55 +02:00
Fabien Potencier
8f5141d4f7 bug #22244 [Console] Fix passing options with defaultCommand (Jakub Sacha)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix passing options with defaultCommand

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

Seems like overwriting input for the default command is not needed (anymore?). I don't know where the removed comment comes from originally.

Use case: i want to call default command and use options at the same time:
app/console --abc=true

Commits
-------

761de99552 Fix passing options with defaultCommand
2017-07-29 09:58:31 +02:00
Robin Chalas
ae7e2cd7a5 minor #23704 Remove unused constant (AbdElKader Bouadjadja)
This PR was merged into the 2.7 branch.

Discussion
----------

Remove unused constant

| 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

Just a micro clean-up PR, to assimilate the Symfony PR process.
Hope the next one will be more useful 🤔

Commits
-------

7168d89 Remove unused constant
2017-07-28 23:54:00 +02:00
AbdElKader Bouadjadja
7168d89cf2 Remove unused constant 2017-07-28 23:20:34 +02:00
Alexander Schwenn
8fd5569577 [HttpFoundation] Generate safe fallback filename for wrongly encoded filename 2017-07-28 22:45:10 +02:00
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