Commit Graph

23170 Commits

Author SHA1 Message Date
Nicolas Grekas 5805cc5040 Merge branch '2.7' into 2.8
* 2.7:
  [Security][2.7] Clean deps
  [HttpKernel] Fix time-sensitive test case
  [travis] Fail early when an invalid composer.json is found

Conflicts:
	src/Symfony/Component/Security/Core/composer.json
	src/Symfony/Component/Security/composer.json
2015-11-03 15:28:10 +01:00
Nicolas Grekas 4883586c32 minor #16440 [Security] Clean deps (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security] Clean deps

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

This follows the split of security-acl.

Commits
-------

ae072b7 [Security] Clean deps
2015-11-03 15:26:27 +01:00
Nicolas Grekas 399b1d5cb0 minor #16441 [Security][2.7] Clean deps (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security][2.7] Clean deps

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

Commits
-------

d51ab88 [Security][2.7] Clean deps
2015-11-03 15:25:10 +01:00
Nicolas Grekas 5d8ce715f1 Merge branch '2.3' into 2.7
* 2.3:
  [HttpKernel] Fix time-sensitive test case
  [travis] Fail early when an invalid composer.json is found
2015-11-03 15:24:30 +01:00
Nicolas Grekas 27f7be6322 minor #16439 [HttpKernel] Fix time-sensitive test case (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Fix time-sensitive test case

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

Fixes these kind of failures:
```
1) Symfony\Component\HttpKernel\Tests\Fragment\FragmentHandlerTest::testRender
Expectation failed for method name is equal to <string:render> when invoked zero or more times

Parameter 1 for invocation Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface::render('/', Symfony\Component\HttpFoundation\Request Object (...), Array (...)) does not match expected value.

Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
             'SERVER_PROTOCOL' => 'HTTP/1.1'
-            'REQUEST_TIME' => 1446551470
+            'REQUEST_TIME' => 1446551469
             'PATH_INFO' => ''
             'REQUEST_METHOD' => 'GET'
```

Commits
-------

c188b35 [HttpKernel] Fix time-sensitive test case
2015-11-03 15:23:57 +01:00
Nicolas Grekas ae072b7366 [Security] Clean deps 2015-11-03 15:10:28 +01:00
Pierre du Plessis 7f891969c5 ldap_set_option should be called with a valid link identifier 2015-11-03 16:09:23 +02:00
Nicolas Grekas d51ab88541 [Security][2.7] Clean deps 2015-11-03 15:07:35 +01:00
Nicolas Grekas c188b35b18 [HttpKernel] Fix time-sensitive test case 2015-11-03 14:01:13 +01:00
Nicolas Grekas 2c1bb06e54 Merge branch '2.7' into 2.8
* 2.7:
  [Security] Fix composer.json
2015-11-03 12:42:49 +01:00
Nicolas Grekas 88b84b1a13 minor #16437 [Security] Fix composer.json (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Fix composer.json

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

Commits
-------

39420e1 [Security] Fix composer.json
2015-11-03 12:41:58 +01:00
Nicolas Grekas 39420e1eb9 [Security] Fix composer.json 2015-11-03 12:34:55 +01:00
Diego Agulló ebc751d868 Write the log message on a single line againn 2015-11-03 10:13:43 +01:00
Nicolas Grekas c4a31787a8 minor #16341 [travis] Fail early when an invalid composer.json is found (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] Fail early when an invalid composer.json is found

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

It happens :)

Commits
-------

437e268 [travis] Fail early when an invalid composer.json is found
2015-11-03 09:49:28 +01:00
Nicolas Grekas 973fbb310e feature #16325 [VarDumper] Casters for Generator, ReflectionGenerator and ReflectionType (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Casters for Generator, ReflectionGenerator and ReflectionType

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

I had this on a local branch since a few days:
- on PHP7, using ReflectionGenerator allows dumping interesting state info about generators (see test case for example output)
- caster for ReflectionType added
- source code excerpts are now left-trimmed (see adjusted test cases)

Commits
-------

d6c2d75 [VarDumper] Casters for Generator, ReflectionGenerator and ReflectionType
2015-11-03 09:48:22 +01:00
Fabien Potencier 9a1574a7e5 removed @covers annotations in tests 2015-11-02 21:29:39 +01:00
Fabien Potencier e3f09df02a Merge branch '2.7' into 2.8
* 2.7:
  removed @covers annotations in tests
  removed all @covers annotations
  [PropertyAccess] Major performance improvement
2015-11-02 21:29:24 +01:00
Fabien Potencier d3008b420a removed @covers annotations in tests 2015-11-02 21:25:31 +01:00
Fabien Potencier db54164a87 Merge branch '2.3' into 2.7
* 2.3:
  removed all @covers annotations
  [PropertyAccess] Major performance improvement
2015-11-02 21:20:53 +01:00
Fabien Potencier 30bd397366 minor #16414 removed all @covers annotations (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

removed all @covers annotations

| 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

Some unit tests have a `@covers` PHPUnit annotations. Most of them were added a very long time ago, but since then, we did not use them anymore and the existing ones are not maintained (see #16413). So, I propose to remove them all.

Commits
-------

1e0af36 removed all @covers annotations
2015-11-02 19:22:02 +01:00
Nicolas Grekas 807ebac08c [DI] Deprecate ContainerAware in favor of ContainerAwareTrait 2015-11-02 16:38:36 +01:00
Nicolas Grekas 31e51ba75c [VarDumper] Deprecate VarDumperTestCase in favor of the trait 2015-11-02 16:23:18 +01:00
ogizanagi 11d675fdcf [FrameworkBundle][Form] Better exception message for private form tagged services 2015-11-02 11:45:59 +01:00
Diego Agulló 713b99fc8f Check whether $this->logger is not null on GuardAuthenticationListener 2015-11-01 23:24:34 +01:00
Fabien Potencier 1e0af36c7d removed all @covers annotations 2015-11-01 14:17:24 -08:00
Kevin Bond be0a364c78 [Console] Add progress indicator helper 2015-11-01 12:44:27 +01:00
Fabien Potencier 64917c726d feature #16395 checkCredentials() force it to be an affirmative yes! (weaverryan)
This PR was squashed before being merged into the 2.8 branch (closes #16395).

Discussion
----------

checkCredentials() force it to be an affirmative yes!

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no (because 2.8 isn't released)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

This changes `GuardAuthenticatorInterface::checkCredentials()`: you now *must* return true in order for authentication to pass.

Before: You could do nothing (i.e. return null) and authentication would pass. You threw an AuthenticationException to cause a failure.

New: You *must* return `true` for authentication to pass. If you do nothing, we will throw a `BadCredentialsException` on your behalf. You can still throw your own exception.

This was a suggestion at symfony_live to make things more secure. I think it makes sense.

Commits
-------

14acadd checkCredentials() force it to be an affirmative yes!
2015-10-31 08:07:27 -07:00
Ryan Weaver 14acadda45 checkCredentials() force it to be an affirmative yes! 2015-10-31 08:07:17 -07:00
Fabien Potencier 3b2d0100ac bug #16294 [PropertyAccess] Major performance improvement (dunglas)
This PR was squashed before being merged into the 2.3 branch (closes #16294).

Discussion
----------

[PropertyAccess] Major performance improvement

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

This PR improves performance of the PropertyAccess component of ~70%.

The two main changes are:

* caching the `PropertyPath` initialization
* caching the guessed access strategy

This is especially important for the `ObjectNormalizer` (Symfony Serializer) and the JSON-LD normalizer ([API Platform](https://api-platform.com)) because they use the `PropertyAccessor` class in large loops (ex: normalization of a list of entities).

Here is the Blackfire comparison: https://blackfire.io/profiles/compare/c42fd275-2b0c-4ce5-8bf3-84762054d31e/graph

The code of the benchmark I've used (with Symfony 2.3 as dependency):

```php
<?php

require 'vendor/autoload.php';

class Foo
{
    private $baz;
    public $bar;

    public function getBaz()
    {
        return $this->baz;
    }

    public function setBaz($baz)
    {
        $this->baz = $baz;
    }
}

use Symfony\Component\PropertyAccess\PropertyAccess;

$accessor = PropertyAccess::createPropertyAccessor();

$start = microtime(true);

for ($i = 0; $i < 10000; ++$i) {
    $foo = new Foo();
    $accessor->setValue($foo, 'bar', 'Lorem');
    $accessor->setValue($foo, 'baz', 'Ipsum');
    $accessor->getValue($foo, 'bar');
    $accessor->getValue($foo, 'baz');
}

echo 'Time: '.(microtime(true) - $start).PHP_EOL;
```

This PR also adds an optional support for Doctrine cache to keep access information across requests and improve the overall application performance (even outside of loops).

Commits
-------

284dc75 [PropertyAccess] Major performance improvement
2015-10-30 15:37:44 -07:00
Kévin Dunglas 284dc75796 [PropertyAccess] Major performance improvement 2015-10-30 15:36:27 -07:00
Fabien Potencier a15c9eb82d Merge branch '2.7' into 2.8
* 2.7:
  added the new Composer exclude-from-classmap option
  added the new Composer exclude-from-classmap option
  fix expected argument type docblock
  Set back libxml settings after testings.
  fixed Twig deprecation notices
2015-10-30 13:15:42 -07:00
Fabien Potencier 6d0e05cd1d added the new Composer exclude-from-classmap option 2015-10-30 13:13:17 -07:00
Fabien Potencier 05c2ecc124 Merge branch '2.3' into 2.7
* 2.3:
  added the new Composer exclude-from-classmap option
  fix expected argument type docblock
  Set back libxml settings after testings.
  fixed Twig deprecation notices
2015-10-30 13:10:21 -07:00
Fabien Potencier ebd55fcb38 minor #16397 added the new Composer exclude-from-classmap option (annesosensio)
This PR was merged into the 2.3 branch.

Discussion
----------

added the new Composer exclude-from-classmap option

| 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

Commits
-------

65bef75 added the new Composer exclude-from-classmap option
2015-10-30 13:03:18 -07:00
Anne-Sophie Bachelard 65bef75bef added the new Composer exclude-from-classmap option 2015-10-30 12:48:51 -07:00
Fabien Potencier cd6351f2cd bug #16331 fixed Twig deprecation notices (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

fixed Twig deprecation notices

| 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

To avoid deprecation notices when upgrading to Twig 1.23.

Commits
-------

1bdd127 fixed Twig deprecation notices
2015-10-30 10:50:46 -07:00
Fabien Potencier f59286bbc1 minor #16373 [HttpFoundation] fix expected argument type docblock (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] fix expected argument type docblock

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

Commits
-------

1c01ebc fix expected argument type docblock
2015-10-29 15:36:51 -07:00
Christian Flothmann dd9d076a0b JsonDescriptor - encode container params only once 2015-10-29 22:04:12 +01:00
Fabien Potencier e2022ce0f2 minor #16374 [Routing] fix docblock description for the build() method (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Routing] fix docblock description for the build() method

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

Commits
-------

ca32ed4 fix docblock description for the build() method
2015-10-29 11:52:05 -07:00
Christian Flothmann ca32ed4c02 fix docblock description for the build() method 2015-10-29 19:49:03 +01:00
Christian Flothmann 1c01ebc48d fix expected argument type docblock 2015-10-29 19:47:17 +01:00
Fabien Potencier eed6a68f91 minor #16380 Set back libxml settings after testings. (SpacePossum)
This PR was merged into the 2.3 branch.

Discussion
----------

Set back libxml settings after testings.

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

Tests that change the `libxml_use_internal_errors` should set back the flag to the previous setting when done testing.

Commits
-------

29d6969 Set back libxml settings after testings.
2015-10-29 11:36:05 -07:00
Tobias Schultze 5e666e60d9 Merge branch '2.7' into 2.8 2015-10-29 15:11:20 +01:00
Tobias Schultze 7f62133939 fix php requirement in 2.7 2015-10-29 15:10:52 +01:00
Tobias Schultze 62db290453 bug #16382 [Serializer] polyfill for json_last_error_msg is in php 5.5 (Tobion)
This PR was merged into the 2.8 branch.

Discussion
----------

[Serializer] polyfill for json_last_error_msg is in php 5.5

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

We need the polyfill for `json_last_error_msg` which is part of php 5.5, not 5.4.

Commits
-------

fb031f1 [Serializer] polyfill for json_last_error_msg is in php 5.5
2015-10-29 15:05:12 +01:00
Tobias Schultze fb031f1c9f [Serializer] polyfill for json_last_error_msg is in php 5.5 2015-10-29 13:47:37 +01:00
Tobias Schultze de71e26429 Merge branch '2.7' into 2.8 2015-10-29 11:46:19 +01:00
Tobias Schultze 9ea4bce052 Merge branch '2.3' into 2.7 2015-10-29 11:45:39 +01:00
Tobias Schultze 9bb0133f94 bug #16365 Add the PHP 7 polyfill for the random_bytes function (pierredup)
This PR was merged into the 2.8 branch.

Discussion
----------

Add the PHP 7 polyfill for the random_bytes function

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

Some classes (like the `SecureRandom` class) currently depends on the `random_bytes` function, which is only available in the PHP 7 polyfill

Commits
-------

8ab8ca0 Add the PHP 7 polyfill for the random_bytes function
2015-10-29 11:44:29 +01:00
Possum 29d696944c Set back libxml settings after testings. 2015-10-29 11:26:44 +01:00