Commit Graph

34775 Commits

Author SHA1 Message Date
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
56537bf7aa feature #25478 [FrameworkBundle] add email_validation_mode option (xabbuh)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] add email_validation_mode option

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

Commits
-------

cda582595c add email_validation_mode option
2017-12-14 10:51:57 -08:00
Fabien Potencier
847fba406f minor #25473 [HttpFoundation] sync upgrade and changelog files (xabbuh)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[HttpFoundation] sync upgrade and changelog files

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

Commits
-------

e54109b0a0 sync upgrade and changelog files
2017-12-14 10:50:07 -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
a19afcd68e feature #25366 [HttpKernel] Decouple exception logging from rendering (ro0NL)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[HttpKernel] Decouple exception logging from rendering

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #25266
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Given your controller throws an exception and a custom exception listener sets a response.

Before
![image](https://user-images.githubusercontent.com/1047696/33676886-46e90e0a-dab7-11e7-9a3a-24c70b23d4e0.png)

After
![image](https://user-images.githubusercontent.com/1047696/33676832-1ac4f0aa-dab7-11e7-9ac4-483fcbdc06ee.png)

;-)

edit: raising the priority for the profiler listener fixes the exception panel also.

Commits
-------

a203d31838 [HttpKernel] Decouple exception logging from rendering
2017-12-13 16:29:47 -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
Fabien Potencier
1cf1ae79ca feature #25450 [PropertyAccess] add more information to NoSuchPropertyException Message (Simperfit)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[PropertyAccess] add more information to NoSuchPropertyException Message

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

Add more context to NoSuchPropertyException as discussed in the issue.

Commits
-------

dee00f8393 [PropertyAccess] add more information to NoSuchPropertyException Message
2017-12-13 16:16:10 -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
cda582595c add email_validation_mode option 2017-12-13 12:39:39 +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
Christian Flothmann
e54109b0a0 sync upgrade and changelog files 2017-12-12 20:03:06 +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
28bf816e74 Merge branch '4.0'
* 4.0:
  add missing logout_on_user_change options
  [HttpFoundation] Add immutable to setCache's PHPDoc
2017-12-12 12:47:36 +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
6f3de947ac minor #25458 [TwigBridge] Fix workflow test with deps=low (Simperfit)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[TwigBridge] Fix workflow test with deps=low

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 | none
| License       | MIT
| Doc PR        | none

In the original PR the tests were not failling but we should not use the new feature with deps=low until it fetch the branch with the new feature. So this fix the test for the WorkflowExtension in TwigBridge.

Commits
-------

e5c6b92 [TwigBridge] Fix workflow test with deps=low
2017-12-12 11:59:38 +01:00
Amrouche Hamza
e5c6b92e76
[TwigBridge] Fix workflow test with deps=low 2017-12-12 11:54:15 +01:00
Nicolas Grekas
193b98a1aa minor #25460 [FrameworkBundle] Move AbstractController::getParameter() from the trait to the class & use PSR-11 (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] Move AbstractController::getParameter() from the trait to the class & use PSR-11

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

Feels more specific this way to me. Ping @chalasr

Commits
-------

3051289 [FrameworkBundle] Move AbstractController::getParameter() from the trait to the class & use PSR-11
2017-12-12 11:40:51 +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
3051289791 [FrameworkBundle] Move AbstractController::getParameter() from the trait to the class & use PSR-11 2017-12-12 11:27:48 +01:00
Nicolas Grekas
72e189a356 Merge branch '4.0'
* 4.0:
  fix merge
2017-12-12 10:23:59 +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
7ecfc7fedc Merge branch '4.0'
* 4.0: (25 commits)
  [Form] fix how form type is referenced in test
  fix merge
  [Console] Fix console tests by adding the missing condition
  [Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files
  Fixed exit code with non-integer throwable code
  [HttpFoundation] Support 0 bit netmask in IPv6 ()
  [DI] Impossible to set an environment variable and then an array as container parameter
  [Process] remove false-positive BC breaking exception on Windows
  Tweaking class not found autowiring error
  [LDAP] added missing dots at the end of some exception messages.
  [TwigBridge] Add missing dev requirement for workflow
  fixed #25440
  empty lines don't count for indent detection
  Set `width: auto` on WebProfiler toolbar's reset.
  [Lock] Fix incorrect phpdoc
  [Process] Dont rely on putenv(), it fails on ZTS PHP
  [HttpKernel] detect deprecations thrown by container initialization during tests
  [HttpKernel] Fix logging of post-terminate errors/exceptions
  [DI] Add context to service-not-found exceptions thrown by service locators
  [Debug] Fix catching fatal errors in case of nested error handlers
  ...
2017-12-12 09:59:50 +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
Robin Chalas
e56c2659fa minor #25453 [Console] Fix console tests by adding the missing condition (Simperfit)
This PR was merged into the 3.3 branch.

Discussion
----------

[Console] Fix console tests by adding the missing condition

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| 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 | none
| License       | MIT
| Doc PR        |

The old conditions was testing that the exit code is different than 0. I just add this tests back since it is needed.
![resized_20171211_192030_2217](https://user-images.githubusercontent.com/3451634/33872253-5db07958-df16-11e7-85e9-4fc0cb5002ce.jpeg)

Commits
-------

57f8129 [Console] Fix console tests by adding the missing condition
2017-12-12 09:48:06 +01:00
Nicolas Grekas
15915fddf1 Merge branch '3.4' into 4.0
* 3.4: (22 commits)
  fix merge
  [Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files
  Fixed exit code with non-integer throwable code
  [HttpFoundation] Support 0 bit netmask in IPv6 ()
  [DI] Impossible to set an environment variable and then an array as container parameter
  [Process] remove false-positive BC breaking exception on Windows
  Tweaking class not found autowiring error
  [LDAP] added missing dots at the end of some exception messages.
  [TwigBridge] Add missing dev requirement for workflow
  fixed #25440
  empty lines don't count for indent detection
  Set `width: auto` on WebProfiler toolbar's reset.
  [Lock] Fix incorrect phpdoc
  [Process] Dont rely on putenv(), it fails on ZTS PHP
  [HttpKernel] detect deprecations thrown by container initialization during tests
  [HttpKernel] Fix logging of post-terminate errors/exceptions
  [DI] Add context to service-not-found exceptions thrown by service locators
  [Debug] Fix catching fatal errors in case of nested error handlers
  [VarDumper] Fixed file links leave blank pages when ide is configured
  Fix hidden currency element with Bootstrap 3 theme
  ...
2017-12-12 09:41:51 +01:00