Commit Graph

14221 Commits

Author SHA1 Message Date
Vladimir Reznichenko aa5e616511 [2.3] Static Code Analysis for Components 2015-06-21 22:11:32 +02:00
Abdellatif Ait boudad a8f315b8dd [Translation][update cmd] taken account into bundle overrides path. 2015-06-19 15:48:24 +00:00
Nicolas Grekas 086c58c716 [DoctrineBridge] Bypass the db when no valid identifier is provided in ORMQueryBuilderLoader 2015-06-18 17:54:01 +02:00
Bernhard Schussek 45579fd7cd [Form] Fixed: Filter non-integers when selecting entities by int ID 2015-06-18 17:05:41 +02:00
Nicolas Grekas d29bfdcc31 [2.3][Debug] Fix fatal-errors handling on HHVM 2015-06-16 14:35:43 +02:00
Fabien Potencier 287a577b8c minor #14937 Standardize the name of the exception variables (javiereguiluz)
This PR was squashed before being merged into the 2.3 branch (closes #14937).

Discussion
----------

Standardize the name of the exception variables

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

See https://github.com/symfony/symfony-docs/pull/4491 for the context of this change.

In Symfony source code there are 410 `try ... catch` blocks. More than 95% of them use `$e` as the name of the exception variable. After applying these changes, 407 out of 410 variables are named `$e`.

These are the three cases where I didn't change the name of the `$e` variable:

  * Nested exception in https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php#L40. It uses `$e2` as the name of the nested variable.
  * Nested exception in https://github.com/symfony/symfony/blob/2.3/src/Symfony/Bundle/TwigBundle/TwigEngine.php#L82. I changed the name of the `$ex` variable to `$e2` to match the previous syntax.
  * https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Console/Helper/DialogHelper.php#L463. I don't know if it's safe to change the name of the `$error` exception variable.

Commits
-------

e8b924c Standardize the name of the exception variables
2015-06-15 18:26:37 +02:00
Javier Eguiluz e8b924c2d3 Standardize the name of the exception variables 2015-06-15 18:26:34 +02:00
Tobias Schultze d4b669bb63 minor #14890 [2.3] Static Code Analysis for Components (kalessil)
This PR was squashed before being merged into the 2.3 branch (closes #14890).

Discussion
----------

[2.3] Static Code Analysis for Components

| 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

Static Code Analysis with Php Inspections (EA Extended):
    - not optimal regular expressions usage
    - strlen miss-use
    - not optimal conditional statements in Process and Filesystem
    - unsafe uniquid usage

PS: re-creating to no spam history log with reverts

Commits
-------

4a4fea7 [2.3] Static Code Analysis for Components
2015-06-15 15:02:12 +02:00
Vladimir Reznichenko 4a4fea742b [2.3] Static Code Analysis for Components 2015-06-15 15:02:08 +02:00
Diego Saint Esteben 97de887222 Remove duplicated paths 2015-06-12 16:45:17 -03:00
Fabien Potencier 009efb8dec fixed CS 2015-06-11 15:53:10 +02:00
azine 786b8a664e Allow new lines in Messages translated with transchoice() (replacement for #14867) 2015-06-11 15:52:49 +02:00
WouterJ e3e5f3d661 [2.3] Fix tests on Windows 2015-06-10 02:09:26 +02:00
Fabien Potencier a48d36ae31 bug #14895 [Form] Support DateTimeImmutable in transform() (c960657)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Support DateTimeImmutable in transform()

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

When passing a DateTimeImmutable instance to DateTimeToLocalizedStringTransformer::transform($dateTime), it throws an exception, `TransformationFailedException('Expected a \DateTime.')`.

The method just converts a date-time object into a string, so there is no reason that it should not support all DateTimeInterface implementations.

DateTimeInterface was added in PHP 5.5, so in order to support earlier versions, we need to do instanceof checks for both DateTime and DateTimeInterface. When Symfony requires PHP 5.5 or larger, we can remove the DateTime check and only check for DateTimeInterface.

This was originally submitted as a PR against the 2.7 branch in #14676.

Commits
-------

17346c5 [Form] Support DateTimeImmutable in transform()
2015-06-08 15:59:27 +02:00
Christian Schmidt 17346c53dc [Form] Support DateTimeImmutable in transform() 2015-06-08 07:38:09 +02:00
Sergio Santoro fa9da42c22 [Form] Fix call to removed method (BC broken in 2.3)
ResolvedFormType#getTypeExtensions() was calling method
AbstractType#getExtensions() which has been removed in
commit b3081e85a0

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -
2015-06-06 18:24:30 +02:00
Fabien Potencier b1003d57f3 minor #14738 [HttpFoundation] Get response content as resource several times for PHP >= 5.6 (dunglas)
This PR was squashed before being merged into the 2.3 branch (closes #14738).

Discussion
----------

[HttpFoundation] Get response content as resource several times for PHP >= 5.6

| 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

Since PHP 5.6, `php://input` can be opened several times.

Commits
-------

9f9b0f7 [HttpFoundation] Get response content as resource several times for PHP >= 5.6
2015-06-05 22:09:35 +02:00
Kévin Dunglas 9f9b0f73aa [HttpFoundation] Get response content as resource several times for PHP >= 5.6 2015-06-05 22:09:27 +02:00
Fabien Potencier 662e2816e3 minor #14746 [Config] Improved duplicated code in FileLocator (dosten)
This PR was merged into the 2.3 branch.

Discussion
----------

[Config] Improved duplicated code in FileLocator

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

This PR improves a duplicate check prepending the current path (if exists) to the list of paths.

Commits
-------

30aa4e9 Improved duplicated code in FileLocator
2015-06-05 15:57:41 +02:00
Christophe Coevoet f4dfee3bea Improve the config validation in TwigBundle 2015-06-04 12:52:47 +02:00
Fabien Potencier 5607f71079 bug #14785 [BrowserKit] Fix bug when uri starts with http. (amouhzi)
This PR was merged into the 2.3 branch.

Discussion
----------

[BrowserKit] Fix bug when uri starts with http.

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

Commits
-------

6d3ec63 [BrowserKit] Fix bug when uri starts with http.
2015-06-01 17:27:09 +02:00
Fabien Potencier 013009b6c8 minor #14474 [2.3] Static Code Analysis for Components (kalessil)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Static Code Analysis for Components

| 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

Static Code Analysis with Php Inspections (EA Extended), no functional changes:
- resolved possible PHP Fatal in \Symfony\Component\BrowserKit\Cookie::__toString
- resolved callable name case mismatches

Commits
-------

9eb2b14 Php Inspections (EA Extended):     - resolved possible PHP Fatal in \Symfony\Component\BrowserKit\Cookie::__toString     -resolved implicit magic methods calls     -resolved callable name case mismatches
2015-06-01 17:18:16 +02:00
Christian Flothmann bbb1064c99 [Security][Acl] enforce string identifiers 2015-05-31 17:00:49 +02:00
Hassan Amouhzi 6d3ec633cd [BrowserKit] Fix bug when uri starts with http.
| Q             | A
| ------------- | ---
| Fixed tickets |
| License       | MIT
2015-05-30 22:07:20 +02:00
Fabien Potencier cff69aa18b bumped Symfony version to 2.3.31 2015-05-30 00:42:49 +02:00
Fabien Potencier 6dfe5551b7 updated VERSION for 2.3.30 2015-05-30 00:16:04 +02:00
Vladimir Reznichenko 9eb2b14115 Php Inspections (EA Extended):
- resolved possible PHP Fatal in \Symfony\Component\BrowserKit\Cookie::__toString
    -resolved implicit magic methods calls
    -resolved callable name case mismatches
2015-05-29 19:14:48 +02:00
Fabien Potencier a3ee1c5c09 Revert "bug #14262 [TwigBundle] Refresh twig paths when resources change. (aitboudad)"
This reverts commit 4d40852596, reversing
changes made to dd2fb850a7.
2015-05-29 16:42:01 +02:00
Ladislav Tánczos 2e04e23c6a InvalidResourceException file name 2015-05-28 22:42:23 +02:00
Fabien Potencier 41adf224b5 minor #14643 [DependencyInjection] Avoid unnecessary calls to strtolower() (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Avoid unnecessary calls to strtolower()

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

Commits
-------

c27f564 [DependencyInjection] Avoid unnecessary calls to strtolower()
2015-05-28 16:28:38 +02:00
Fabien Potencier a4e126d531 minor #14765 [Validators] Correct translation key and content [nl] (amouhzi)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validators] Correct translation key and content [nl]

The nl file is not up to date. Correct changed translation key.

Commits
-------

5bc4085 [Validators] Correct translation key and content [nl]
2015-05-28 05:26:02 +02:00
Hassan Amouhzi 51e3c222d4 [Validators] Remove forgotten space in a translation key [nl] 2015-05-27 23:21:50 +02:00
Hassan Amouhzi 5bc4085e4c [Validators] Correct translation key and content [nl] 2015-05-27 23:11:20 +02:00
Fabien Potencier 86ab2505a9 minor #14742 [CS] [Console] StreamOuput : fix loose comparison (ogizanagi)
This PR was merged into the 2.3 branch.

Discussion
----------

[CS] [Console] StreamOuput : fix loose comparison

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

Commits
-------

cd70ca8 [CS] [Console] StreamOuput : fix loose comparison
2015-05-27 20:33:26 +02:00
Fabien Potencier a8886615e4 bumped Symfony version to 2.3.30 2015-05-27 01:35:14 +02:00
Fabien Potencier c4da51ce0f updated VERSION for 2.3.29 2015-05-26 23:55:27 +02:00
Fabien Potencier 64e9584fae security #14759 n/a (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

d320d27 [HttpKernel] Do not call the FragmentListener if _controller is already defined
2015-05-26 23:41:30 +02:00
Hassan Amouhzi 9a26e4beba [Validators] Missing translations for arabic language. 2015-05-26 23:24:07 +02:00
Fabien Potencier 36dfdaf3db fixed C 2015-05-25 09:43:48 +02:00
Sergio Santoro b6e0a9246d [HttpKernel][Bundle] Check extension implements ExtensionInterface
- Avoid fatal errors on line 89 (calling getAlias on objects of
  unknown type).
- Help developers solve problems with their extensions
2015-05-25 09:42:57 +02:00
Diego Saint Esteben 30aa4e96c6 Improved duplicated code in FileLocator 2015-05-24 22:52:55 -03:00
ogizanagi cd70ca8a51 [CS] [Console] StreamOuput : fix loose comparison 2015-05-24 20:51:45 +02:00
Fabien Potencier cc749a67f6 bug #14715 [Form] Check instance of FormBuilderInterface instead of FormBuilder (dosten)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Check instance of FormBuilderInterface instead of FormBuilder

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

Commits
-------

44469d0 Check instance of FormBuilderInterface instead of FormBuilder
2015-05-22 13:54:11 +02:00
Possum 6ac8d29d18 Fix typo 2015-05-22 12:24:03 +02:00
Diego Saint Esteben 44469d01d1 Check instance of FormBuilderInterface instead of FormBuilder 2015-05-21 18:12:55 -03:00
Jakub Zalas d320d27699 [HttpKernel] Do not call the FragmentListener if _controller is already defined 2015-05-21 10:29:06 +01:00
Fabien Potencier 089d9f734a minor #14670 [Security] TokenBasedRememberMeServices test to show why encoding username is required (MacDada)
This PR was squashed before being merged into the 2.3 branch (closes #14670).

Discussion
----------

[Security] TokenBasedRememberMeServices test to show why encoding username is required

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

241538d shows that it's not actually tested, 257b796 reimplements it with test.

I can remove the POC commit if it's not needed.

Commits
-------

63a9736 [Security] TokenBasedRememberMeServices test to show why encoding username is required
2015-05-21 06:29:49 +02:00
Dawid Nowak 63a9736350 [Security] TokenBasedRememberMeServices test to show why encoding username is required 2015-05-21 06:29:39 +02:00
Fabien Potencier 2cf230d6a6 bug #14678 [Security] AbstractRememberMeServices::encodeCookie() validates cookie parts (MacDada)
This PR was squashed before being merged into the 2.3 branch (closes #14678).

Discussion
----------

[Security] AbstractRememberMeServices::encodeCookie() validates cookie parts

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

`AbstractRememberMeServices::encodeCookie()` guards against `COOKIE_DELIMITER` in `$cookieParts`.

* it would make `AbstractRememberMeServices::cookieDecode()` broken
* all current extending classes do it anyway (see #14670 )
* added tests – it's not a public method, but it is expected to be used by user implementations – as such, it's good to know that it works properly

Commits
-------

464c39a [Security] AbstractRememberMeServices::encodeCookie() validates cookie parts
2015-05-21 06:28:27 +02:00
Dawid Nowak 464c39a77f [Security] AbstractRememberMeServices::encodeCookie() validates cookie parts 2015-05-21 06:28:25 +02:00
Fabien Potencier 438d394a1c bug #14635 [HttpKernel] Handle an array vary header in the http cache store (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Handle an array vary header in the http cache store

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

Commits
-------

5930800 [HttpKernel] Handle an array vary header in the http cache store
2015-05-21 06:26:25 +02:00
Nicolas Grekas c27f564f68 [DependencyInjection] Avoid unnecessary calls to strtolower() 2015-05-20 11:44:03 -07: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
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 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
Ivan Kurnosov 921ecff9e2 [HttpFoundation] IpUtils::checkIp4() should allow networks 2015-05-20 09:39:40 +02:00
Nicolas Grekas 385a6b799f Fix HTML escaping of to-source links 2015-05-19 17:44:44 -07: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
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
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
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 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 34d83a70b3 fixed CS 2015-05-15 15:45:10 +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 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
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
Fabien Potencier 291cf61616 bug #14633 [2.3][EventDispatcher] make listeners removable from an executed listener (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][EventDispatcher] make listeners removable from an executed listener

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

This fixes #13972 for Symfony 2.3. On Symfony 2.6 and higher, this has already been fixed with #14355.

Commits
-------

54bb399 [EventDispatcher] make listeners removable from an executed listener
2015-05-14 19:40:02 +02:00
Christian Flothmann 54bb3995ab [EventDispatcher] make listeners removable from an executed listener 2015-05-14 17:38:12 +02:00
Jakub Zalas 5930800cfd [HttpKernel] Handle an array vary header in the http cache store 2015-05-14 16:01:09 +01:00
Nicolas Grekas 57571a9612 [HttpFoundation] Fix volatile MongoDbSessionHandlerTest::testRead() 2015-05-14 10:16:30 +02:00
stefan.r 44edbdf9c0 Fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator) 2015-05-13 11:33:22 +02:00
Diego Saint Esteben 139bae7047 Fix tests in HHVM 2015-05-11 23:26:17 -03:00
Fabien Potencier 5c996c4e9b minor #14604 [DependencyInjection] ContainerInterface: unused exception dropped (TomasVotruba)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] ContainerInterface: unused exception dropped

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

Ref https://github.com/symfony/symfony/pull/14599

Commits
-------

8e0d96c ContainerInterface: unused exception dropped
2015-05-11 19:13:05 +02:00
Tomas Votruba 8e0d96ca80 ContainerInterface: unused exception dropped 2015-05-11 14:02:11 +02:00
Fabien Potencier 415245ee89 bumped Symfony version to 2.3.29 2015-05-11 03:22:26 +02:00
MatTheCat 34c780f7e7 [Security][Translation] fixes #14584 2015-05-10 23:45:50 +02:00
Fabien Potencier 56bc4057e3 updated VERSION for 2.3.28 2015-05-10 17:02:48 +02:00
Fabien Potencier 492d66ee74 minor #14578 [Securty] PhpDoc fix in AbstractRememberMeServices (MacDada)
This PR was merged into the 2.3 branch.

Discussion
----------

[Securty] PhpDoc fix in AbstractRememberMeServices

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

All extending classes return `UserInterface`, not `TokenInterface`:

* https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php#L64
* https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php#L116

And `AbstractRememberMeServices` actually requires the return value to be `UserInterface`:

```
$user = $this->processAutoLoginCookie($cookieParts, $request);

if (!$user instanceof UserInterface) {
    throw new \RuntimeException('processAutoLoginCookie() must return a UserInterface implementation.');
}
```

Commits
-------

a73d2cc PhpDoc fix in AbstractRememberMeServices
2015-05-08 16:48:03 +02:00
Tobias Schultze a95559858d [SecurityBundle] use session auth constants in config 2015-05-08 02:01:21 +02:00
Tobias Schultze 2f5e72b807 minor #14570 [SecurityBundle] Use Enum Nodes Instead Of Scalar (vadim2404)
This PR was merged into the 2.3 branch.

Discussion
----------

[SecurityBundle] Use Enum Nodes Instead Of Scalar

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

Commits
-------

ce7fb04 [SecurityBundle] Use Enum Nodes Instead Of Scalar
2015-05-08 01:43:20 +02:00
Dawid Nowak a73d2cc685 PhpDoc fix in AbstractRememberMeServices
All extending classes return `UserInterface`, not TokenInterface:

* https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php#L64
* https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php#L116

And `AbstractRememberMeServices` actually required the return value to be `UserInterface`:

            $user = $this->processAutoLoginCookie($cookieParts, $request);

            if (!$user instanceof UserInterface) {
                throw new \RuntimeException('processAutoLoginCookie() must return a UserInterface implementation.');
            }
2015-05-07 16:20:47 +02:00
Stepan Anchugov 4d974ced7f [Filesystem] Simplified an if statement 2015-05-06 18:34:36 +02:00
Fabien Potencier cbcdb16bee bug #14266 [HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed (hason)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed

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

Commits
-------

43cc877 [HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed
2015-05-06 18:28:43 +02:00
Vadim Kharitonov ce7fb040b6 [SecurityBundle] Use Enum Nodes Instead Of Scalar 2015-05-06 18:42:39 +03:00
Nicolas Grekas fafcb64d00 [Debug 2.3] Fix test for PHP7 2015-05-06 12:13:27 +02:00
Martin Hasoň 43cc8776df [HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed 2015-05-06 11:52:26 +02:00
Berny Cantos afc39ee11f add more entropy to generated classnames
- use proxy destination filename to create and md5 salt
- apply fabbot patch
- inline salt generation
2015-05-02 20:46:11 +02:00
Fabien Potencier 3cdb539360 minor #14518 [2.3] link to https://symfony.com where possible (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] link to https://symfony.com where possible

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

Commits
-------

bf8a1ce link to https://symfony.com where possible
2015-05-02 17:15:45 +02:00
Christian Flothmann bf8a1ce2a2 link to https://symfony.com where possible 2015-05-01 16:06:45 +02:00
Grégoire Pineau 5dd52c3b00 [FrameworkBundle] Added missing log in server:run command
Because of the current implementation of `php -S` command,
logs are skipped if a front controller is specified.

This patch put back the missing logs
2015-05-01 16:01:56 +02:00
Fabien Potencier 5402035fd1 minor #14477 Use https://symfony.com/search for search form (jrobeson)
This PR was merged into the 2.3 branch.

Discussion
----------

Use https://symfony.com/search for search form

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

Using https for symfony.com/search stops chrome (and eventually firefox)
from warning us about "Mixed Content" when developing sites that use SSL
for the entire site.

Here is the warning text:

```
Mixed Content: The page at 'https://example.org/' was loaded over a secure connection, but contains a form which targets an insecure endpoint 'http://symfony.com/search'. This endpoint should be made available over a secure connection.
```

Commits
-------

74983d7 Use https://symfony.com/search for searching
2015-05-01 15:37:40 +02:00
Fabien Potencier 6d7574bc12 bug #14484 [SecurityBundle][WebProfiler] check authenticated user by tokenClass instead of username. (aitboudad)
This PR was merged into the 2.3 branch.

Discussion
----------

[SecurityBundle][WebProfiler] check authenticated user by tokenClass instead of username.

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

Commits
-------

79e005b [profiler][security] check authenticated user by tokenClass instead of username.
2015-05-01 15:18:43 +02:00