Commit Graph

20133 Commits

Author SHA1 Message Date
Fabien Potencier 89360e0785 updated CHANGELOG for 2.6.7 2015-05-11 03:58:28 +02:00
Fabien Potencier 9ab729199c Merge branch '2.3' into 2.6
* 2.3:
  bumped Symfony version to 2.3.29
  updated VERSION for 2.3.28
  update CONTRIBUTORS for 2.3.28
  updated CHANGELOG for 2.3.28
  PhpDoc fix in AbstractRememberMeServices

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
2015-05-11 03:52:28 +02:00
Fabien Potencier 415245ee89 bumped Symfony version to 2.3.29 2015-05-11 03:22:26 +02:00
Fabien Potencier 56bc4057e3 updated VERSION for 2.3.28 2015-05-10 17:02:48 +02:00
Fabien Potencier 76a2a68952 update CONTRIBUTORS for 2.3.28 2015-05-10 17:02:28 +02:00
Fabien Potencier 25927d8d71 updated CHANGELOG for 2.3.28 2015-05-10 17:02:01 +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
Fabien Potencier 45cd637cae minor #14588 [Debug] Fixed ClassNotFoundFatalErrorHandlerTest (xelaris)
This PR was merged into the 2.6 branch.

Discussion
----------

[Debug] Fixed ClassNotFoundFatalErrorHandlerTest

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

Since `testCannotRedeclareClass` is skipped on case-sensitive filesystems, it won't have any effect on the travis build, but fixes the issue described in #14573 for e.g. OS X.

Commits
-------

f7def8c [Debug] Fixed ClassNotFoundFatalErrorHandlerTest
2015-05-08 16:42:46 +02:00
Alexander Schwenn f7def8c1d1 [Debug] Fixed ClassNotFoundFatalErrorHandlerTest 2015-05-08 15:17:44 +02:00
Tobias Schultze 54311dafae [SecurityBundle] use access decision constants in config 2015-05-08 02:10:43 +02:00
Tobias Schultze e12359303d Merge branch '2.3' into 2.6
Conflicts:
	src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
2015-05-08 02:09:07 +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
Fabien Potencier 8e0f822edb minor #14567 [Filesystem] Simplify if statement (kix)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #14567).

Discussion
----------

[Filesystem] Simplify if statement

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

Simplified the `if` statement if `Symfony\Component\Filesystem\Filesystem::isAbsolutePath`

Commits
-------

4d974ced [Filesystem] Simplified an if statement
2015-05-06 18:34:37 +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 115fc32541 Merge branch '2.3' into 2.6
* 2.3:
  [Debug 2.3] Fix test for PHP7
  Run tests on hhvm instead of hhvm-nightly
  Use HTTPS in README and some other fixes
  add more entropy to generated classnames

Conflicts:
	src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
2015-05-06 16:13:47 +02:00
Nicolas Grekas 6e314dc733 minor #14566 [Debug 2.3] Fix test for PHP7 (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Debug 2.3] Fix test for PHP7

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

Commits
-------

fafcb64 [Debug 2.3] Fix test for PHP7
2015-05-06 16:11:21 +02: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
Abdellatif Ait boudad 09cb24bbad minor #14549 [Translation] simplify getMessages. (aitboudad)
This PR was merged into the 2.6 branch.

Discussion
----------

[Translation] simplify getMessages.

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

Commits
-------

db077c1 [Translation] simplify getMessages.
2015-05-05 16:51:00 +00:00
Fabien Potencier c4867485d7 bug #14478 [DebugBundle] Fix dump() output in API / No-Toolbar context (nicolas-grekas)
This PR was merged into the 2.6 branch.

Discussion
----------

[DebugBundle] Fix dump() output in API / No-Toolbar context

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

With this PR, dumps are written as plain text when the main content-type is not HTML.
With HTML, dumps are inlined when the web debug toolbar is not enabled.

Commits
-------

62f8469 [DebugBundle] Fix dump() output in API/No-Toolbar context
2015-05-05 03:50:03 +02:00
Fabien Potencier b77d8c5bc5 bug #14501 [ProxyBridge] Fix proxy classnames generation (xphere)
This PR was merged into the 2.3 branch.

Discussion
----------

[ProxyBridge] Fix proxy classnames generation

| 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

When having many lazy services based on the same class, proxy classnames collision is more prone to happen on cache regeneration.

The problem comes from [`ProxyDumper`](https://github.com/symfony/symfony/blob/2.3/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php#L112) usage of [`spl_object_hash`](http://php.net/manual/en/function.spl-object-hash.php), because object hashes may be reused for others when destroyed.

To solve this, I added more entropy with an optional salt to allow multiple passes of the `ProxyDumper`, each time with a value coming from the filepath of the cache we're building, so no collision could happen.

This applies from `symfony/2.3` to `symfony/2.7`.
Related tests are passing.

Commits
-------

afc39ee add more entropy to generated classnames
2015-05-05 03:48:13 +02:00
Fabien Potencier b11ea0a553 minor #14523 [2.6][Framework][Translation] added test for debug command. (aitboudad)
This PR was merged into the 2.6 branch.

Discussion
----------

[2.6][Framework][Translation] added test for debug command.

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

for `2.7` #14524

Commits
-------

9a50252 [Framework][Translation] added test for debug command.
2015-05-05 03:47:26 +02:00
fago b3db07f5f2 [Validator] Property paths starting with 0 are broken. 2015-05-05 03:29:27 +02:00
Fabien Potencier 1ea4612d7e minor #14548 [Translation] Fixed test (dosten)
This PR was merged into the 2.6 branch.

Discussion
----------

[Translation] Fixed test

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

Since php7 version 20150301 the json error levels has changed. See http://3v4l.org/Omb8E.
This PR updated the fixture to trigger a syntax error. See http://3v4l.org/OMN7S

Commits
-------

5dca3ff Fixed test
2015-05-05 03:22:57 +02:00
Fabien Potencier 15648ffe30 bug #14527 Fix getOrigin (WouterJ)
This PR was merged into the 2.6 branch.

Discussion
----------

Fix getOrigin

I am far from sure if this is a correct fix, but I believe it is.

The problem is that `getOrigin()` now returns either the Form it was thrown in or `null`. This causes issues when using the `FormErrorIterator`, like:

```php
// note: errors are deep and flatten
foreach ($form->getErrors(true) as $error) {
    echo '* '.$error->getOrigin()->getName().': '.$error->getMessage();
}
```

This now doesn't work for fields that have `error_bubbling => false` or for the root form. In that case, it'll throw an error. Even if I first checked if `getOrigin()` returned `null` or a `FormInterface`, I still had a problem: There is no way to detect which field it was bound to.

Imo, `$error->getOrigin()` should always return the Form that caused them.

/cc @webmozart would love if you can verify that I'm correct here. The form error iterator stuff is still dizzling my head...

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

Commits
-------

01eac33 Fix getOrigin
2015-05-05 03:21:50 +02:00
Tobias Schultze 5b92067b9e minor #14544 [2.6][Validator] Fix Interface reference in docblock (xelaris)
This PR was merged into the 2.6 branch.

Discussion
----------

[2.6][Validator] Fix Interface reference in docblock

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

Commits
-------

7f8ff6a [2.6][Validator] Fix Interface reference in docblock
2015-05-05 02:22:48 +02:00
Tobias Schultze b6de1f37cc minor #14541 Use HTTPS in README and some other fixes (WouterJ)
This PR was merged into the 2.3 branch.

Discussion
----------

Use HTTPS in README and some other fixes

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

Commits
-------

89a1903 Use HTTPS in README and some other fixes
2015-05-05 02:20:54 +02:00
Abdellatif Ait boudad db077c1f3b [Translation] simplify getMessages. 2015-05-04 21:22:52 +00:00
Diego Saint Esteben 5dca3ffa69 Fixed test 2015-05-04 17:55:59 -03:00
Fabien Potencier b27a495734 minor #14545 Run tests on hhvm instead of hhvm-nightly (dosten)
This PR was merged into the 2.3 branch.

Discussion
----------

Run tests on hhvm instead of hhvm-nightly

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

Commits
-------

583b488 Run tests on hhvm instead of hhvm-nightly
2015-05-04 18:32:03 +02:00
Abdellatif Ait boudad 9a50252507 [Framework][Translation] added test for debug command. 2015-05-04 14:53:25 +00:00
Diego Saint Esteben 583b488ae2 Run tests on hhvm instead of hhvm-nightly 2015-05-04 10:28:20 -03:00
Alexander Schwenn 7f8ff6a7fd [2.6][Validator] Fix Interface reference in docblock 2015-05-04 14:41:38 +02:00
Wouter J 89a1903ac6 Use HTTPS in README and some other fixes 2015-05-04 12:21:54 +02:00
Wouter J 01eac33540 Fix getOrigin 2015-05-04 11:39:13 +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 f47d9055bc minor #14519 [2.6] link to https://symfony.com where possible (xabbuh)
This PR was merged into the 2.6 branch.

Discussion
----------

[2.6] 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        |

2.6-related changes of #14518.

Commits
-------

38bcab0 [2.6] link to https://symfony.com where possible
2015-05-02 17:19:33 +02:00
Fabien Potencier b8cd3ca3f8 Merge branch '2.3' into 2.6
* 2.3:
  link to https://symfony.com where possible
  [FrameworkBundle] Added missing log in server:run command
  [HttpFoundation] Allow curly braces in trusted host patterns
  [profiler][security] check authenticated user by tokenClass instead of username.
  Use https://symfony.com/search for searching

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php
	src/Symfony/Component/Form/README.md
	src/Symfony/Component/Intl/README.md
	src/Symfony/Component/Routing/composer.json
	src/Symfony/Component/Security/README.md
	src/Symfony/Component/Translation/README.md
	src/Symfony/Component/Validator/README.md
2015-05-02 17:18:45 +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 38bcab0823 [2.6] link to https://symfony.com where possible 2015-05-01 16:14:24 +02:00
Fabien Potencier 851c7b844a minor #14515 Do not override PHP constants, only use when available (dosten)
This PR was squashed before being merged into the 2.6 branch (closes #14515).

Discussion
----------

Do not override PHP constants, only use when available

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

In #12372, the override of internal constants has been deleted, but the definition of `JSON_PRETTY_PRINT` if not available is missing in that PR.

Commits
-------

d5cc056 Do not override PHP constants, only use when available
2015-05-01 16:09:34 +02:00
Diego Saint Esteben d5cc056cd3 Do not override PHP constants, only use when available 2015-05-01 16:09:32 +02:00
Christian Flothmann bf8a1ce2a2 link to https://symfony.com where possible 2015-05-01 16:06:45 +02:00
Fabien Potencier c780fdd2ec bug #14498 [FrameworkBundle] Added missing log in server:run command (lyrixx)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #14498).

Discussion
----------

[FrameworkBundle] Added missing log in server:run command

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

Because of the current implementation of `php -S` command,
logs are skipped if a front controller is specified.

This patch put back missing logs.

For both samples, I play twice an http request.

Before the patch:
```
>(6)[/tmp/symfony_demo] php app/console server:run  -vvv
[2015-04-28 21:45:28] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure".
[2015-04-28 21:45:28] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand".
Server running on http://127.0.0.1:8000

Quit the server with CONTROL-C.
  RUN  '/usr/bin/php5' '-S' '127.0.0.1:8000' '/tmp/symfony_demo/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/router_dev.php'
  ERR  [Tue Apr 28 21:45:30 2015] 127.0.0.1:42755 [200]: /css/app.css
  ERR  [Tue Apr 28 21:45:30 2015] 127.0.0.1:42757 [200]: /js/app.js
  ERR  [Tue Apr 28 21:45:34 2015] 127.0.0.1:42773 [200]: /css/app.css
  ERR  [Tue Apr 28 21:45:34 2015] 127.0.0.1:42774 [200]: /js/app.js
  ERR  ^C
```

After the pacth

```
>(6)[/tmp/symfony_demo] php app/console server:run  -vvv
[2015-04-28 21:45:58] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure".
[2015-04-28 21:45:58] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand".
Server running on http://127.0.0.1:8000

Quit the server with CONTROL-C.
  RUN  '/usr/bin/php5' '-S' '127.0.0.1:8000' '/tmp/symfony_demo/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/router_dev.php'
  ERR  [Tue Apr 28 21:46:00 2015] 127.0.0.1:42788 [200]: /
  ERR  [Tue Apr 28 21:46:00 2015] 127.0.0.1:42795 [200]: /css/app.css
  ERR  [Tue Apr 28 21:46:00 2015] 127.0.0.1:42797 [200]: /js/app.js
  ERR  [Tue Apr 28 21:46:00 2015] 127.0.0.1:42799 [200]: /_wdt/538cdc
  ERR  [Tue Apr 28 21:46:01 2015] 127.0.0.1:42806 [200]: /
  ERR  [Tue Apr 28 21:46:01 2015] 127.0.0.1:42813 [200]: /css/app.css
  ERR  [Tue Apr 28 21:46:01 2015] 127.0.0.1:42814 [200]: /js/app.js
  ERR  [Tue Apr 28 21:46:01 2015] 127.0.0.1:42817 [200]: /_wdt/52f8aa
  ERR  ^C
```

Commits
-------

5dd52c3 [FrameworkBundle] Added missing log in server:run command
2015-05-01 16:02:40 +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 8dcc7e3391 bug #14503 [Finder] Only use GLOB_BRACE when available (dosten)
This PR was squashed before being merged into the 2.6 branch (closes #14503).

Discussion
----------

[Finder] Only use GLOB_BRACE when available

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

Commits
-------

7632d27 [Finder] Only use GLOB_BRACE when available
2015-05-01 15:39:21 +02:00