Commit Graph

23681 Commits

Author SHA1 Message Date
Fabien Potencier
ed4e3e87ac feature #16423 [VarDumper] Deprecate VarDumperTestCase in favor of the trait (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Deprecate VarDumperTestCase in favor of the trait

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

Because people must upgrade to PHP 5.5 before upgrading to Sf 3.0, this can be done on the 2.8 branch.

Commits
-------

31e51ba [VarDumper] Deprecate VarDumperTestCase in favor of the trait
2015-11-04 01:37:54 +01:00
Fabien Potencier
a594b9fc18 feature #16424 [DI] Deprecate ContainerAware in favor of ContainerAwareTrait (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] Deprecate ContainerAware in favor of ContainerAwareTrait

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

To be merged before #16411 (that then should be rebased) if we agree that this is the right approach (which I believe personally).
The deprecation notice will be triggered by the existing mechanism in the DebugClassLoader (it can't be added inline because that would make symfony itself trigger it).
PHP 5.3 users migrating to 3.0 must already move to 2.8+5.5 beforehand so this is really on the CUP (Continuous Upgrade Path).

Commits
-------

807ebac [DI] Deprecate ContainerAware in favor of ContainerAwareTrait
2015-11-04 01:36:48 +01:00
Fabien Potencier
e53b3b3a78 minor #16428 asset test coverage (eventhorizonpl)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #16428).

Discussion
----------

asset test coverage

Hi,

This PR adds 100% tests code coverage for Asset component.

Best regards,
Michal

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

Commits
-------

5a6c1f2 asset test coverage
2015-11-04 01:23:36 +01:00
Michal Piotrowski
5a6c1f2626 asset test coverage 2015-11-04 01:23:35 +01:00
Fabien Potencier
4fd60aacd4 minor #16416 [Security][Guard] Check whether $this->logger is not null on GuardAuthenticationListener (aeoris, Diego Agulló)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security][Guard] Check whether $this->logger is not null on GuardAuthenticationListener

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

Commits
-------

ebc751d Write the log message on a single line againn
713b99f Check whether $this->logger is not null on GuardAuthenticationListener
2015-11-04 01:18:15 +01:00
Fabien Potencier
1da126802a feature #16430 [HttpKernel] PostResponseEvent should extend the KernelEvent (jakzal)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpKernel] PostResponseEvent should extend the KernelEvent

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

Technically the `PostResponseEvent` is a `KernelEvent`.

Commits
-------

b9863d5 [HttpKernel] PostResponseEvent should extend the KernelEvent
2015-11-04 01:17:14 +01:00
Fabien Potencier
38a92c825f minor #16443 [travis] session.gc_probability=0 to fix transient tests on hhvm (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] session.gc_probability=0 to fix transient tests on hhvm

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

Should fix tests failing with:
`ps_files_cleanup_dir: opendir(/var/lib/hhvm/sessions) failed: Permission denied (13)`

Commits
-------

b4dd254 [travis] session.gc_probability=0 to fix transient tests on hhvm
2015-11-04 01:15:33 +01:00
Kévin Dunglas
18913e15d5 [DependencyInjection] Add autowiring support to dumpers 2015-11-03 15:47:58 -08:00
Jakub Zalas
b9863d521d [HttpKernel] PostResponseEvent should extend the KernelEvent 2015-11-03 16:51:19 +00:00
Nicolas Grekas
b4dd254774 [travis] session.gc_probability=0 to fix transient tests on hhvm 2015-11-03 16:54:52 +01:00
Nicolas Grekas
3f0bb90ac6 Merge branch '2.8'
* 2.8:
  [Security] Clean deps
  [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:29:13 +01:00
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
0f6e478272 Merge branch '2.8'
* 2.8:
  [Security] Fix composer.json
  [VarDumper] Casters for Generator, ReflectionGenerator and ReflectionType

Conflicts:
	src/Symfony/Component/Security/composer.json
2015-11-03 12:45:45 +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
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