Commit Graph

20263 Commits

Author SHA1 Message Date
Christophe Coevoet
ab6400790b bug #14513 [console][formater] allow format toString object. (aitboudad)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #14513).

Discussion
----------

[console][formater] allow format toString object.

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

reported by @micayael ( https://twitter.com/juanardissone/status/593859683502325761 )

Commits
-------

70b4964 [console][formater] allow format toString object.
2015-05-20 11:08:20 +02:00
Abdellatif Ait boudad
70b4964e4e [console][formater] allow format toString object. 2015-05-20 11:08:20 +02:00
Fabien Potencier
905bbbdd90 bug #14335 [HttpFoundation] Fix baseUrl when script filename is contained in pathInfo (danez)
This PR was squashed before being merged into the 2.3 branch (closes #14335).

Discussion
----------

[HttpFoundation] Fix baseUrl when script filename is contained in pathInfo

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

When the script filename is just /index.php, dirname() returns '/' for it. In Request::prepareBaseUrl() we append '/' to it (as introduced in #13039), which is wrong in this scenario as the resulting string is '//'.

When we rtrim('/') the output of dirname() then '/' would be constructed in this case, and in all other cases it makes no difference as dirname() already trims the right forward slash if there are path segments.

The test-cases should clarify the exact scenario.

Commits
-------

f24a6dd [HttpFoundation] Fix baseUrl when script filename is contained in pathInfo
2015-05-20 10:53:09 +02:00
Daniel Tschinder
f24a6dd43a [HttpFoundation] Fix baseUrl when script filename is contained in pathInfo 2015-05-20 10:53:07 +02:00
Fabien Potencier
7a4fdf7e67 bug #14593 [Security][Firewall] Avoid redirection to XHR URIs (asiragusa)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #14593).

Discussion
----------

[Security][Firewall] Avoid redirection to XHR URIs

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

If `security.firewalls.main.form_login.always_use_default_target_path` is false, an user could be redirected to an URL called by an AJAX request after the login.

Commits
-------

9ee74ea Avoid redirection to XHR URIs
2015-05-20 10:40:29 +02:00
Alessandro Siragusa
9ee74eaef0 Avoid redirection to XHR URIs 2015-05-20 10:40:29 +02:00
Fabien Potencier
75ed3b1a02 bug #14618 [DomCrawler] Throw an exception if a form field path is incomplete (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] Throw an exception if a form field path is incomplete

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

Commits
-------

991e65c [DomCrawler] Throw an exception if a form field path is incomplete.
2015-05-20 10:21:21 +02:00
Fabien Potencier
f0cda43c33 minor #14684 [Console] Delete duplicate test in CommandTest (nanocom)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] Delete duplicate test in CommandTest

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

The __get method is not implemented in the Command class, and the deleted test was duplicated with the preceding one.

Commits
-------

4a4eda9 [Console] Delete duplicate test in CommandTest
2015-05-20 10:11:51 +02:00
Fabien Potencier
165bb00fc1 bug #14699 [2.6] Fix HTML escaping of to-source links (amenk, nicolas-grekas)
This PR was merged into the 2.6 branch.

Discussion
----------

[2.6] Fix HTML escaping of to-source links

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

Commits
-------

eecd197 [2.6] Fix HTML escaping of to-source links
e9bb160 ExceptionHandler: More Encoding
2015-05-20 10:08:04 +02:00
Fabien Potencier
96e9cca845 bug #14698 [2.3] Fix HTML escaping of to-source links (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Fix HTML escaping of to-source links

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

Commits
-------

385a6b7 Fix HTML escaping of to-source links
2015-05-20 09:45:20 +02:00
Fabien Potencier
ea6e3d5109 bug #14690 [HttpFoundation] IpUtils::checkIp4() should allow /0 networks (zerkms)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #14690).

Discussion
----------

[HttpFoundation] IpUtils::checkIp4() should allow `/0` networks

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

Technically it's a breaking change, since the result of the

    IpUtils::checkIp4('1.2.3.4', '0.0.0.0/0')

call was `false` now `true`.

Practically - no one should ever relied on this since it's simply wrong

Commits
-------

921ecff [HttpFoundation] IpUtils::checkIp4() should allow  networks
2015-05-20 09:39:40 +02:00
Ivan Kurnosov
921ecff9e2 [HttpFoundation] IpUtils::checkIp4() should allow networks 2015-05-20 09:39:40 +02:00
Nicolas Grekas
eecd197e6a [2.6] Fix HTML escaping of to-source links 2015-05-19 17:48:49 -07:00
Nicolas Grekas
385a6b799f Fix HTML escaping of to-source links 2015-05-19 17:44:44 -07:00
Alexander Menk
e9bb160bcc ExceptionHandler: More Encoding 2015-05-19 17:33:46 -07:00
Fabien Potencier
6989f2d1ef bug #14696 Fix the rendering of deprecation log messages (stof)
This PR was merged into the 2.6 branch.

Discussion
----------

Fix the rendering of deprecation log messages

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

A Twig variable was removed by mistake in #14182

Commits
-------

8b6efff Fix the rendering of deprecation log messages
2015-05-19 19:36:49 +02:00
Christophe Coevoet
8b6efffd5a Fix the rendering of deprecation log messages 2015-05-19 18:27:55 +02:00
Fabien Potencier
af0e02c35e minor #14681 [FrameworkBundle] Removed unnecessary parameter in TemplateController (King2500)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #14681).

Discussion
----------

[FrameworkBundle] Removed unnecessary parameter in TemplateController

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | They should
| License       | MIT

`Response::setPublic()` doesn't have any parameters, so this parameter call is not needed.

Commits
-------

7a4394e [FrameworkBundle] Removed unnecessary parameter in TemplateController
2015-05-19 12:17:14 +02:00
Thomas Schulz
7a4394e771 [FrameworkBundle] Removed unnecessary parameter in TemplateController
Response::setPublic doesn't have any parameters, so this parameter call is not needed.
2015-05-19 12:17:14 +02:00
Jakub Zalas
991e65c96f [DomCrawler] Throw an exception if a form field path is incomplete. 2015-05-19 09:01:33 +01:00
Fabien Potencier
a810fd13b9 bug #14683 Fixed the indentation in the compiled template for the DumpNode (stof)
This PR was merged into the 2.6 branch.

Discussion
----------

Fixed the indentation in the compiled template for the DumpNode

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

The Twig codebase is very careful at making compiled templates readable by formatting them properly. This fixes a case where Symfony does not respect this careful formatting (yes, I went debugging things into my compiled template today)

Commits
-------

9106ddb Fixed the indentation in the compiled template for the DumpNode
2015-05-19 09:56:36 +02:00
Christophe Coevoet
9106ddb779 Fixed the indentation in the compiled template for the DumpNode 2015-05-18 20:14:10 +02:00
Arnaud Kleinpeter
4a4eda93c8 [Console] Delete duplicate test in CommandTest
There is no __get method in the Command class, and the deleted test was duplicated with the preceding one.
2015-05-18 19:58:47 +02:00
Fabien Potencier
4d40852596 bug #14262 [TwigBundle] Refresh twig paths when resources change. (aitboudad)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #14262).

Discussion
----------

[TwigBundle] Refresh twig paths when resources change.

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

Commits
-------

cafb0d7 [TwigBundle] Refresh twig paths when resources change.
2015-05-16 16:20:38 +02:00
Abdellatif Ait boudad
cafb0d7b11 [TwigBundle] Refresh twig paths when resources change. 2015-05-16 16:20:37 +02:00
Fabien Potencier
dd2fb850a7 bug #13633 [ServerBag] Handled bearer authorization header in REDIRECT_ form (Lance0312)
This PR was merged into the 2.3 branch.

Discussion
----------

[ServerBag] Handled bearer authorization header in REDIRECT_ form

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

Apache rewrite module renames client request
header (`HTTP_`) by prepending `REDIRECT_` to
it. http basic authentication and http digest
authentication are properly processed in
REDIRECT_ form, while bearer is processed in
HTTP_ form, but dropped in REDIRECT_ form.

Example:
The following auth headers are handled in ServerBag,
```
HTTP_AUTHORIZATION => Basic aGVsbG86d29ybGQ=
REDIREDCT_HTTP_AUTHOIZATION => Basic aGVsbG86d29ybGQ=
HTTP_AUTHORIZATION => Digest blah
REDIRECT_HTTP_AUTHORIZATION => Digest blah
HTTP_AUTHORIZATION => Bearer mF_9.B5f-4.1JqM
```
while
```
REDIRECT_HTTP_AUTHORIZATION => Bearer mF_9.B5f-4.1JqM
```
is dropped.

Commits
-------

7b2e2df Handled bearer authorization header in REDIRECT_ form
2015-05-16 15:43:51 +02:00
Fabien Potencier
2ffd5a49fe bug #13637 [CSS] WebProfiler break words (nicovak)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #13637).

Discussion
----------

[CSS] WebProfiler break words

WebProfiler CSS word-break: break-all;
Do you need more description ?

Commits
-------

7259d72 WebProfiler break words
2015-05-16 15:40:55 +02:00
Kovacs Nicolas
7259d72676 WebProfiler break words
WebProfiler CSS word-break: break-all;
2015-05-16 15:40:55 +02:00
Fabien Potencier
3eb8ee7925 minor #14432 [Framework] added test for router commands. (aitboudad)
This PR was merged into the 2.3 branch.

Discussion
----------

[Framework] added test for router commands.

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

- [x] router:debug
- [x] router:match

Commits
-------

6d403a7 [Framework] added test for Router commands.
2015-05-16 15:35:20 +02:00
Fabien Potencier
991eec1e1e minor #14661 [Console] Remove a useless assert in QuestionHelperTest (ogizanagi)
This PR was merged into the 2.6 branch.

Discussion
----------

[Console] Remove a useless assert in QuestionHelperTest

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

This assert was pretty useless, as it is unreachable under expected circumstances, and does not bring anything to this test purpose otherwise.

Commits
-------

55b2361 [Console] Remove a useless assert in QuestionHelperTest
2015-05-16 15:28:59 +02:00
Fabien Potencier
624dafbd4d bug #14217 [WebProfilerBundle] Fix regexp (romqin)
This PR was squashed before being merged into the 2.6 branch (closes #14217).

Discussion
----------

[WebProfilerBundle] Fix regexp

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

Old PR #12124

Commits
-------

091b37e [WebProfilerBundle] Fix regexp
2015-05-16 15:05:13 +02:00
Romain Gautier
091b37ebea [WebProfilerBundle] Fix regexp 2015-05-16 15:05:10 +02:00
ogizanagi
55b236144f [Console] Remove a useless assert in QuestionHelperTest 2015-05-16 15:04:19 +02:00
Fabien Potencier
294cbb7521 fixed typo 2015-05-16 14:34:16 +02:00
Fabien Potencier
1b401b83eb minor #14601 [Security][Translation] fixes #14584 (MatTheCat)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security][Translation] fixes #14584

| Q             | A
| ------------- | ---
| Fixed tickets | #14584
| License       | MIT

Some french translations are wrong  in the security component.
As #14587 has been closed here's my fix.

Commits
-------

34c780f [Security][Translation] fixes #14584
2015-05-16 14:17:29 +02:00
Fabien Potencier
87fa40ee54 bug #14644 [Bridge\Twig] Adding a space between the icon and the error message (zmikael, nicolas-grekas)
This PR was merged into the 2.6 branch.

Discussion
----------

[Bridge\Twig] Adding a space between the icon and the error message

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

Commits
-------

d0f6342 [Form] Test for space in AbstractBootstrap3LayoutTest::testErrors
7a1fac2 Adding a space between the icon and the error message
2015-05-15 16:18:15 +02:00
Fabien Potencier
5ea91e9ff2 minor #14646 Update README.md (94noni)
This PR was merged into the 2.3 branch.

Discussion
----------

Update README.md

See https://github.com/symfony/symfony/pull/14347
@ping @nicolas-grekas

Commits
-------

ec89cfd Update README.md
2015-05-15 16:16:38 +02:00
Antoine Makdessi
ec89cfd226 Update README.md 2015-05-15 16:06:52 +02:00
Fabien Potencier
0678b3e6f8 fixed CS 2015-05-15 15:53:19 +02:00
Fabien Potencier
e83db434a2 Merge branch '2.3' into 2.6
* 2.3:
  fixed CS
2015-05-15 15:45:20 +02:00
Fabien Potencier
34d83a70b3 fixed CS 2015-05-15 15:45:10 +02:00
Fabien Potencier
fcfc876c5b Merge branch '2.3' into 2.6
* 2.3:
  Fix tests in HHVM
  CS: Pre incrementation/decrementation should be used if possible

Conflicts:
	src/Symfony/Bundle/TwigBundle/Command/LintCommand.php
	src/Symfony/Component/Console/Helper/TableHelper.php
	src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php
	src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php
	src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php
	src/Symfony/Component/Security/Acl/Dbal/AclProvider.php
	src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php
2015-05-15 15:32:45 +02:00
Nicolas Grekas
d0f63429b0 [Form] Test for space in AbstractBootstrap3LayoutTest::testErrors 2015-05-15 15:29:32 +02:00
Fabien Potencier
984d82cbe5 minor #14121 CS: Pre incrementation/decrementation should be used if possible (gharlan)
This PR was merged into the 2.3 branch.

Discussion
----------

CS: Pre incrementation/decrementation should be used if possible

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

Fixes provided by new fixer: https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1113

If this pr is merged I would change the level of the fixer to `symfony`.

Commits
-------

c5123d6 CS: Pre incrementation/decrementation should be used if possible
2015-05-15 15:28:34 +02:00
Fabien Potencier
525c149f92 bug #14640 [DebugBundle] Allow alternative destination for dumps (nicolas-grekas)
This PR was merged into the 2.6 branch.

Discussion
----------

[DebugBundle] Allow alternative destination for dumps

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

This PR fixes #14608 by adding a new `debug.dump_destination` configuration option to give users control over a stream destination where dumps will be written to.
In HTTP mode, dumps are still/also collected in the toolbar.
This supersedes #14627, #14631 and #14373

Commits
-------

5f255e5 [DebugBundle] Allow alternative destination for dumps
5368483 [DebugBundle] Use output mechanism of dumpers instead of echoing
8cb2abb [DebugBundle] Always collect dumps
2015-05-15 15:19:37 +02:00
Fabien Potencier
ebe78bb9ef minor #14598 [Security] Fix tests in HHVM (dosten)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Fix tests in HHVM

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

This PR fixes the tests in the Security components when run in HHVM. The failing tests are related to sebastianbergmann/phpunit-mock-objects#207

Commits
-------

139bae7 Fix tests in HHVM
2015-05-15 15:13:27 +02:00
Nicolas Grekas
1688b2ef4f Merge branch '2.3' into 2.6
* 2.3:
  Fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator)

Conflicts:
	src/Symfony/Component/Form/composer.json
	src/Symfony/Component/Validator/CHANGELOG.md
	src/Symfony/Component/Validator/Constraints/FalseValidator.php
	src/Symfony/Component/Validator/Constraints/NullValidator.php
	src/Symfony/Component/Validator/Constraints/TrueValidator.php
	src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php
2015-05-15 11:48:50 +02:00
Christophe Coevoet
da58ad74d5 minor #14228 Add PHP7 compatible versions for the Null/True/False constraints as they are reserved words in PHP7 (stefan.r)
This PR was merged into the 2.3 branch.

Discussion
----------

Add PHP7 compatible versions for the Null/True/False constraints as they are reserved words in PHP7

| Q             | A
| ------------- | ---
| Bug fix?      |  PHP7 compatibility
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | N/A
| Fixed tickets | N/A - helps towards https://github.com/symfony/symfony/issues/14086
| License       | MIT

Null, True and False are reserved words in PHP7:

https://wiki.php.net/rfc/reserve_more_types_in_php_7

Commits
-------

44edbdf Fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator)
2015-05-15 11:24:48 +02:00
Nicolas Grekas
5f255e5059 [DebugBundle] Allow alternative destination for dumps 2015-05-15 10:09:58 +02:00
Nicolas Grekas
5368483d9a [DebugBundle] Use output mechanism of dumpers instead of echoing 2015-05-15 10:09:57 +02:00