Commit Graph

23660 Commits

Author SHA1 Message Date
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
04eda701cc Merge branch '2.8'
* 2.8:
  removed @covers annotations in tests
  removed @covers annotations in tests
  removed all @covers annotations
  checkCredentials() force it to be an affirmative yes!
  [PropertyAccess] Major performance improvement
2015-11-02 21:34:04 +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
Tobias Schultze
d05023b125 feature #16400 [3.0] [Templating] remove deprecated method (TomasVotruba)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[3.0] [Templating] remove deprecated method

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

Commits
-------

5d4b5b4 PhpEngine: remove deprecated method
2015-10-31 02:13:50 +01:00
Tobias Schultze
a42a8720e8 minor #16396 [3.0] [VarDumper] Tests fixed (TomasVotruba)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[3.0] [VarDumper] Tests fixed

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

Fixes broken test after merge.
Original 2.8 commit: 303f05baaf (diff-c45f29f2b7f10a6e3583f92526da067dR55)

Fixes Travis failure of VarDumper: https://travis-ci.org/symfony/symfony/jobs/88382131#L2413

Commits
-------

358fb2d HtmlDumperTest fixed after merge
2015-10-31 02:11:10 +01:00
Fabien Potencier
bc0c8c1b5b Merge branch '2.8'
* 2.8:
  added the new Composer exclude-from-classmap option
  added the new Composer exclude-from-classmap option
  fix docblock description for the build() method
  fix expected argument type docblock
  Set back libxml settings after testings.
  fixed Twig deprecation notices
2015-10-30 16:35:59 -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
Tomas Votruba
5d4b5b4fc0 PhpEngine: remove deprecated method 2015-10-30 21:14:22 +01: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
Tomas Votruba
358fb2db22 HtmlDumperTest fixed after merge 2015-10-30 20:29:05 +01: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
Tobias Schultze
1db740efe7 feature #16381 remove polyfills for unsupported php versions (Tobion)
This PR was merged into the 3.0-dev branch.

Discussion
----------

remove polyfills for unsupported php versions

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

Remove obsolete polyfills in master as introduced in #16317

Commits
-------

78512cc remove polyfills for unsupported php versions
2015-10-30 17:48:58 +01:00
Tobias Schultze
8ecbab9310 [Security] remove obsolete test for removed StringUtils 2015-10-30 17:43:39 +01:00
Tobias Schultze
87b62bbb1e feature #16392 [3.0] [Security] remove deprecated SrtingUtils class (TomasVotruba)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[3.0] [Security] remove deprecated SrtingUtils class

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

Commits
-------

cd62d17 [Security] remove deprecated SrtingUtils class
2015-10-30 17:38:07 +01:00
Tobias Schultze
fdd70c9660 feature #16390 [3.0] [Serializer] JsonEncoder: remove deprecated method (TomasVotruba)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[3.0] [Serializer] JsonEncoder: remove deprecated method

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

Commits
-------

87d5589 [Serializer] JsonEncoder: remove deprecated method
2015-10-30 17:30:31 +01:00
Tobias Schultze
b28689054b fix merge. the acl is not automatically included in symfony/symfony in 3.0 2015-10-30 16:05:41 +01:00
Tomas Votruba
cd62d17a19 [Security] remove deprecated SrtingUtils class 2015-10-30 13:45:37 +01:00
Tomas Votruba
87d5589c7f [Serializer] JsonEncoder: remove deprecated method 2015-10-30 13:41:02 +01: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
78512cc388 remove polyfills for unsupported php versions 2015-10-29 15:17:40 +01:00
Tobias Schultze
fc2eff8475 Merge branch '2.8'
Conflicts:
	src/Symfony/Bridge/PhpUnit/composer.json
	src/Symfony/Component/Serializer/composer.json
2015-10-29 15:13:34 +01: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