Commit Graph

34631 Commits

Author SHA1 Message Date
Fabien Potencier
a74cb27baf updated CHANGELOG for 4.0.2 2017-12-14 19:06:11 -08:00
Fabien Potencier
a91b5a56b7 Merge branch '3.4' into 4.0
* 3.4:
  Revert "bug #25151 [FrameworkBundle] Automatically enable the CSRF protection if CSRF manager exists (sroze)"
  Revert "bug #25502 Fixing wrong class_exists on interface (weaverryan)"
2017-12-14 17:44:28 -08:00
Fabien Potencier
903f120816 Revert "bug #25151 [FrameworkBundle] Automatically enable the CSRF protection if CSRF manager exists (sroze)"
This reverts commit d5f04284f9, reversing
changes made to e52825e253.
2017-12-14 17:44:04 -08:00
Fabien Potencier
8013b4b2d3 Revert "bug #25502 Fixing wrong class_exists on interface (weaverryan)"
This reverts commit 5fd5f19eaf, reversing
changes made to 826d545ba0.
2017-12-14 17:44:00 -08:00
Nicolas Grekas
a6fa4a3f63 Merge branch '3.4' into 4.0
* 3.4:
  [Routing] Fix tests
  [SecurityBundle] fix test by always disabling CSRF
  [FrameworkBundle] remove esi/ssi renderers if inactive
2017-12-14 23:39:22 +01:00
Nicolas Grekas
3c67741954 [Routing] Fix tests 2017-12-14 23:37:31 +01:00
Nicolas Grekas
1e1b85c99c Merge branch '3.3' into 3.4
* 3.3:
  [SecurityBundle] fix test by always disabling CSRF
  [FrameworkBundle] remove esi/ssi renderers if inactive
2017-12-14 23:31:23 +01:00
Nicolas Grekas
e273d8107e [SecurityBundle] fix test by always disabling CSRF 2017-12-14 23:23:34 +01:00
Nicolas Grekas
e5d178e55a Merge branch '2.8' into 3.3
* 2.8:
  [FrameworkBundle] remove esi/ssi renderers if inactive
2017-12-14 21:27:16 +01:00
Nicolas Grekas
39bcfd4702 Merge branch '2.7' into 2.8
* 2.7:
  [FrameworkBundle] remove esi/ssi renderers if inactive
2017-12-14 21:21:22 +01:00
Fabien Potencier
76b7cacdd3 bug #25489 [FrameworkBundle] remove esi/ssi renderers if inactive (dmaicher)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] remove esi/ssi renderers if inactive

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

As found out within #25246 the esi/ssi fragment renderer services were registered for < 3.4 even when the framework config for it was disabled.

On 3.4+ this has been fixed already and the service definitions are removed.

With this fix the usual exception message appears when `framework.esi` or `framework.ssi` are disabled and using `render_esi(...)` or `render_ssi(...)`:

```
An exception has been thrown during the rendering of a template ("The "esi" renderer does not exist.").
```

**Note: Some people may see this exception when updating to this patch but this just means they are using esi/ssi without enabling it.**

Commits
-------

e1c36525fd [FrameworkBundle] remove esi/ssi renderers if inactive
2017-12-14 11:54:21 -08:00
Fabien Potencier
0116c32c71 Merge branch '3.4' into 4.0
* 3.4:
  fixed wrong merge
  Tweak message to be Flex friendly
  [Routing] fixed tests
  Fixing wrong class_exists on interface
  Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
  [Console] Fix a bug when passing a letter that could be an alias
  add missing validation options to XSD file
  Take advantage of AnnotationRegistry::registerUniqueLoader
  [DI] Optimize Container::get() for perf
  fix merge
  Fix tests
  Refactoring tests.
2017-12-14 11:48:22 -08:00
Fabien Potencier
032de3abf4 Merge branch '3.3' into 3.4
* 3.3:
  Tweak message to be Flex friendly
2017-12-14 11:45:05 -08:00
Fabien Potencier
51c7b2dc1e minor #25503 Tweak message to be Flex friendly (weaverryan)
This PR was merged into the 3.3 branch.

Discussion
----------

Tweak message to be Flex friendly

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

If the user activates this without the component, this gives them an actionable message.

Commits
-------

eaf5642b95 Tweak message to be Flex friendly
2017-12-14 11:43:39 -08:00
Fabien Potencier
5fd5f19eaf bug #25502 Fixing wrong class_exists on interface (weaverryan)
This PR was merged into the 3.4 branch.

Discussion
----------

Fixing wrong class_exists on interface

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | symfony/symfony-docs#8873 already does not mention changing anything in the config

This was a bug introduced in #25151 on the 3.4 branch. It's... pretty self-explanatory I hope :).

Cheers!

Commits
-------

be75bd994b Fixing wrong class_exists on interface
2017-12-14 11:42:48 -08:00
Fabien Potencier
826d545ba0 fixed wrong merge 2017-12-14 11:41:37 -08:00
Fabien Potencier
e7cccb0575 fixed tests 2017-12-14 11:40:10 -08:00
Ryan Weaver
eaf5642b95
Tweak message to be Flex friendly 2017-12-14 11:37:45 -08:00
Fabien Potencier
f5f3dd7878 [Routing] fixed tests 2017-12-14 11:33:46 -08:00
Fabien Potencier
13f58b403c Merge branch '2.8' into 3.3
* 2.8:
  Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
  [Console] Fix a bug when passing a letter that could be an alias
  add missing validation options to XSD file
2017-12-14 11:31:56 -08:00
Ryan Weaver
be75bd994b
Fixing wrong class_exists on interface 2017-12-14 11:30:58 -08:00
Fabien Potencier
bdbdf73bdd Merge branch '2.7' into 2.8
* 2.7:
  Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
  [Console] Fix a bug when passing a letter that could be an alias
  add missing validation options to XSD file
2017-12-14 11:27:36 -08:00
Fabien Potencier
01229fb8aa bug #25427 Preserve percent-encoding in URLs when performing redirects in the UrlMatcher (mpdude)
This PR was squashed before being merged into the 2.7 branch (closes #25427).

Discussion
----------

Preserve percent-encoding in URLs when performing redirects in the UrlMatcher

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

While investigating #25373, I found that when the *dumped* `UrlMatcher` performs redirections due to missing trailing slashes on URLs, it does so using an url*de*coded URL.

This is wrong, as it may lead to wrong interpretations of URLs upon the next request. For example, think of an URL that contains `%23` in the middle of the path info. Upon redirection, this will be turned into `#` with an obvious effect.

Commits
-------

8146510304 Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
2017-12-14 10:48:49 -08:00
Matthias Pigulla
8146510304 Preserve percent-encoding in URLs when performing redirects in the UrlMatcher 2017-12-14 10:48:47 -08:00
Fabien Potencier
9ff3776b78 bug #25480 [FrameworkBundle] add missing validation options to XSD file (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] add missing validation options to XSD file

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

Commits
-------

e7d8e1783b add missing validation options to XSD file
2017-12-14 10:38:41 -08:00
Fabien Potencier
ccc93678fd bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix a bug when passing a letter that could be an alias

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | see https://github.com/symfony/symfony/pull/24987#issuecomment-351482175
| License       | MIT
| Doc PR        |

Fixing the global in console commands I've introduced a bug where when you pass -e=test it finds it a --shell, this fix the wrong behaviour.
cc @Zwartpet

Commits
-------

a8871de263 [Console] Fix a bug when passing a letter that could be an alias
2017-12-13 16:23:07 -08:00
Fabien Potencier
fa38335505 removed FIXME 2017-12-13 16:19:09 -08:00
David Maicher
e1c36525fd [FrameworkBundle] remove esi/ssi renderers if inactive 2017-12-13 20:39:50 +01:00
Amrouche Hamza
a8871de263
[Console] Fix a bug when passing a letter that could be an alias 2017-12-13 20:20:50 +01:00
Christian Flothmann
e7d8e1783b add missing validation options to XSD file 2017-12-13 08:51:34 +01:00
Fabien Potencier
258776b31d bug #25425 When available use AnnotationRegistry::registerUniqueLoader (jrjohnson)
This PR was merged into the 3.3 branch.

Discussion
----------

When available use AnnotationRegistry::registerUniqueLoader

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| References tickets | #24596
| License       | MIT

Take advantage of AnnotationRegistry::registerUniqueLoader which will only add 'class_exists' as an autoloader if it has not already been added. This helps alleviate a performance issue when the
same loader is added many times in tests.

Commits
-------

97c3f429eb Take advantage of AnnotationRegistry::registerUniqueLoader
2017-12-12 21:39:24 -08:00
Jonathan Johnson
97c3f429eb
Take advantage of AnnotationRegistry::registerUniqueLoader
This method will only add 'class_exists' as an autoloader if it has not
already been added. This helps alleviate a performance issue when the
same loader is added many times in tests.
2017-12-12 15:38:57 -08:00
Fabien Potencier
020664e1ef bug #25474 [DI] Optimize Container::get() for perf (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Optimize Container::get() for perf

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

As outlined in #25159, our beloved container suffers from a perf hit just because it has a second argument, and this second argument's default value makes it slower.

Let's fix this by inlining the value. This will put Symfony at a better rank on eg:
https://github.com/kocsismate/php-di-container-benchmarks

I benched also with the following script. The result is surprising (but matches the finding in #25159):
without the patch, it takes 2s, and with the patch, it's down to 1s (opcache enabled).

```php

require './vendor/autoload.php';

use Symfony\Component\DependencyInjection\Container;

$c = new Container();
$c->set('foo', new \stdClass());

$i = 10000000;

$s = microtime(1);

while (--$i) {
    $c->get('foo');
}

echo microtime(true) - $s, "\n";
```

Commits
-------

4fe2551545 [DI] Optimize Container::get() for perf
2017-12-12 15:28:37 -08:00
Nicolas Grekas
4fe2551545 [DI] Optimize Container::get() for perf 2017-12-12 22:54:52 +01:00
Nicolas Grekas
b49998ebd8 minor #25463 [HttpFoundation] Fix tests (chalasr)
This PR was merged into the 3.3 branch.

Discussion
----------

[HttpFoundation] Fix tests

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

Remains filesystem ones due to #25420, going to have a look in this PR in the next hour if nobody does before.

Commits
-------

ef6adb8 Fix tests
2017-12-12 13:02:43 +01:00
Nicolas Grekas
79b64ce328 fix merge 2017-12-12 13:01:02 +01:00
Robin Chalas
ef6adb89ef Fix tests 2017-12-12 12:55:28 +01:00
Robin Chalas
bf61b7b969 Merge branch '3.4' into 4.0
* 3.4:
  add missing logout_on_user_change options
  [HttpFoundation] Add immutable to setCache's PHPDoc
2017-12-12 12:44:17 +01:00
Robin Chalas
24e274d5f2 minor #25461 [SecurityBundle] add missing logout_on_user_change options (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] add missing logout_on_user_change options

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

Commits
-------

fde1f48 add missing logout_on_user_change options
2017-12-12 12:43:14 +01:00
Christian Flothmann
fde1f48874 add missing logout_on_user_change options 2017-12-12 12:26:50 +01:00
Nicolas Grekas
05ab1cd00d Merge branch '2.8' into 3.3
* 2.8:
  Refactoring tests.
2017-12-12 12:20:26 +01:00
Nicolas Grekas
263eda3dd6 Merge branch '2.7' into 2.8
* 2.7:
  Refactoring tests.
2017-12-12 12:12:43 +01:00
Nicolas Grekas
e77545ab8d minor #25420 Refactoring tests (carusogabriel)
This PR was merged into the 2.7 branch.

Discussion
----------

Refactoring tests

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

I've refactored some tests, using:
- `assertCount` instead of `count` function;
- `assertArrayHasKey`, `assertArrayNotHasKey`, `assertObjectHasAttribute` and `assertObjectNotHasAttribute` instead of `isset` function;
- `assertContains` instead of `in_array` function;
- `assertSame` and `assertNotSame` instead os strict comparisons `===`;
- `assertNotFalse` instead of strict comparisons `!==` with `false` keyword;
- `assertGreaterThan`, `assertLessThan` and `assertLessThanOrEqual` for mathematical comparisons;

Commits
-------

567e0ab Refactoring tests.
2017-12-12 12:07:15 +01:00
Nicolas Grekas
8151661f02 minor #25455 [HttpFoundation] Add immutable to setCache's PHPDoc (dunglas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Add immutable to setCache's PHPDoc

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

6e248ca [HttpFoundation] Add immutable to setCache's PHPDoc
2017-12-12 11:35:23 +01:00
Nicolas Grekas
527f7e4907 Merge branch '3.4' into 4.0
* 3.4:
  fix merge
2017-12-12 10:23:46 +01:00
Nicolas Grekas
76176d993c fix merge 2017-12-12 10:23:32 +01:00
Nicolas Grekas
b23ffea41f Merge branch '3.4' into 4.0
* 3.4:
  [Form] fix how form type is referenced in test
  [Console] Fix console tests by adding the missing condition
2017-12-12 09:58:23 +01:00
Nicolas Grekas
55374b5f36 Merge branch '3.3' into 3.4
* 3.3:
  [Form] fix how form type is referenced in test
  [Console] Fix console tests by adding the missing condition
2017-12-12 09:58:07 +01:00
Nicolas Grekas
33f16981c2 Merge branch '2.8' into 3.3
* 2.8:
  [Form] fix how form type is referenced in test
2017-12-12 09:57:55 +01:00
Nicolas Grekas
bff5014aa4 minor #25454 [Form] fix how form type is referenced in test (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] fix how form type is referenced in test

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

Commits
-------

f859ae9 [Form] fix how form type is referenced in test
2017-12-12 09:56:51 +01:00