Commit Graph

20144 Commits

Author SHA1 Message Date
Nicolas Grekas 18eef21118 bug #14609 [DebugBundle] Remove inlined dumps on XHR (nicolas-grekas)
This PR was merged into the 2.6 branch.

Discussion
----------

[DebugBundle] Remove inlined dumps on XHR

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

Commits
-------

d0eb208 [DebugBundle] Remove inlined dumps on XHR
2015-05-13 09:25:21 +02:00
Nicolas Grekas 52ba805467 Merge branch '2.3' into 2.6
* 2.3:
  [travis] Use container-based infrastructure
  ContainerInterface: unused exception dropped
2015-05-12 16:25:36 +02:00
Nicolas Grekas cd0a63d8e2 minor #14613 [travis] Use container-based infrastructure (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] Use container-based infrastructure

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

Let's see if this works...

Commits
-------

2aea3aa [travis] Use container-based infrastructure
2015-05-12 16:16:12 +02:00
Nicolas Grekas 2aea3aa67b [travis] Use container-based infrastructure 2015-05-12 11:50:11 +02:00
Nicolas Grekas d0eb208358 [DebugBundle] Remove inlined dumps on XHR 2015-05-12 08:20:42 +02: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
Tobias Schultze 49ea81b2ff bug #14605 [PropertyAccess] Fix setting public property on a class having a magic getter (lolautruche)
This PR was merged into the 2.6 branch.

Discussion
----------

[PropertyAccess] Fix setting public property on a class having a magic getter

| 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 using PropertyAccessor with an object having both a public property and a magic getter, and one wants to update this property, PropertyAccessor may lose the property reference.
This occurs when the public property value is a hash:

```php
class Foo
{
    /**
     * Example: $this->someProperty['foo']['bar'] = 'baz'
     * @var array
     */
    public $someProperty;

    public function __get($name)
    {
        // ...
    }
}

$obj = new Foo();
$obj->someProperty = ['foo' => ['bar' => 'some_value']];

$propertyAccessor->setValue($obj, 'someProperty[foo][bar]', 'another_value');

echo $obj->someProperty['foo']['bar'];
// Before this patch: 'some_value' => fail
// After this patch: 'another_value' => correct
```

Furthermore, public properties are always used before `__get()` by PHP.

This bug is visible since v2.6.5 as d733a887 changed the way
`setValue()` works.

Commits
-------

8b8feff [PropertyAccess] Fix setting public property on a class having a magic getter
2015-05-11 17:24:49 +02:00
Jérôme Vieilledent 8b8feff246 [PropertyAccess] Fix setting public property on a class having a magic getter
| 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 using PropertyAccessor with an object having both a public property
and a magic getter, and one wants to update this property,
PropertyAccessor may lose the property reference.
This occurs when the public property value is a hash:

```php
class Foo
{
    /**
     * Example: $this->someProperty['foo']['bar'] = 'baz'
     * @var array
     */
    public $someProperty;

    public function __get($name)
    {
        // ...
    }
}

$obj = new Foo();
$obj->someProperty = ['foo' => ['bar' => 'some_value']];

$propertyAccessor->setValue($obj, 'someProperty[foo][bar]', 'another_value');

echo $obj->someProperty['foo']['bar'];
// Before this patch: 'some_value' => fail
// After this patch: 'another_value' => correct
```

Furthermore, public properties are always used before `__get()` by PHP.

This bug is visible since v2.6.5 as d733a887 changed the way
`setValue()` works.
2015-05-11 17:09:39 +02:00
Tomas Votruba 8e0d96ca80 ContainerInterface: unused exception dropped 2015-05-11 14:02:11 +02:00
Fabien Potencier c7bb672f10 bumped Symfony version to 2.6.8 2015-05-11 04:25:53 +02:00
Fabien Potencier 0449d0e117 updated VERSION for 2.6.7 2015-05-11 03:58:49 +02:00
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