Commit Graph

34657 Commits

Author SHA1 Message Date
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
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
Kévin Dunglas
6e248cabe3
[HttpFoundation] Add immutable to setCache's PHPDoc 2017-12-12 09:38:51 +01:00
Christian Flothmann
f859ae9f1e [Form] fix how form type is referenced in test 2017-12-12 09:37:06 +01:00
Nicolas Grekas
6aa18bf6a8 Merge branch '3.3' into 3.4
* 3.3:
  fix merge
  [Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files
  Fixed exit code with non-integer throwable code
  Add suggestions
  Added instructions to upgrade Symfony applications to 4.x
2017-12-12 09:27:14 +01:00
Nicolas Grekas
5b51491c18 Merge branch '2.8' into 3.3
* 2.8:
  fix merge
2017-12-12 09:25:59 +01:00
Nicolas Grekas
fb52f94722 fix merge 2017-12-12 09:25:42 +01:00
Nicolas Grekas
6e29f187b7 minor #25026 [MonologBridge][WebServerBundle] Add suggestions for using the log server (maidmaid)
This PR was merged into the 3.3 branch.

Discussion
----------

[MonologBridge][WebServerBundle] Add suggestions for using the log server

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

If you want launch `server:log`, you need the monolog bridge and the VarDumper. Optionally, you need EL if you want use `server:log --filter`.

Commits
-------

aca0ddd Add suggestions
2017-12-12 09:03:31 +01:00
Amrouche Hamza
57f8129598
[Console] Fix console tests by adding the missing condition 2017-12-12 08:26:14 +01:00
Gabriel Caruso
567e0ab7e6 Refactoring tests. 2017-12-12 05:05:30 -02:00
Fabien Potencier
b4e0a45acf bug #24594 [Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files (BjornTwachtmann)
This PR was squashed before being merged into the 3.3 branch (closes #24594).

Discussion
----------

[Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #24593
| License       | MIT

This PR fixes the bug in #24593. It's not the absolutely ideal way to address the issue, but I don't see how else to handle it without either dropping support for pips in translation strings, or rearchitecting the code that feeds translations to the MessageSelector as pipe separated in the first place.

Commits
-------

fea815b2f5 [Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files
2017-12-11 15:28:37 -08:00
Bjorn Twachtmann
fea815b2f5 [Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files 2017-12-11 15:28:24 -08:00
Fabien Potencier
1725b50929 minor #24721 Added instructions to upgrade Symfony applications to 4.x (javiereguiluz)
This PR was merged into the 3.3 branch.

Discussion
----------

Added instructions to upgrade Symfony applications to 4.x

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

### Context

Related to #24718 and lots of past questions received in Slack, Stack Overflow, etc.

The UPGRADE guides are great for individual Symfony components/bundles, but we're lacking instructions to upgrade a whole Symfony app from 2.x to 3.x or from 3.x to 4.x.

In the past we had problems with the changes introduced in https://github.com/symfony/symfony-standard which were not documented in the main UPGRADE files.

### Proposal

We could:

1) Add a new section int he UPGRADE file to explain the upgrading process for whole Symfony apps. This is what this PR proposes (but it's still just a draft).
2) We could move the changes of this PR to a new article in the Symfony Docs.
3) We could move the entire UPGRADE files to the Symfony Docs and explain the changes for individual components and whole Symfony apps.
4) ... ?

Commits
-------

de4f8ac21d Added instructions to upgrade Symfony applications to 4.x
2017-12-11 15:22:19 -08:00
Wouter J
dfef227837 Fixed exit code with non-integer throwable code 2017-12-11 14:27:15 -08:00
Fabien Potencier
9ddf500a7a Merge branch '3.3' into 3.4
* 3.3:
  [HttpFoundation] Support 0 bit netmask in IPv6 ()
  [DI] Impossible to set an environment variable and then an array as container parameter
  [LDAP] added missing dots at the end of some exception messages.
  Set `width: auto` on WebProfiler toolbar's reset.
  [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
  [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-11 14:06:16 -08:00
Fabien Potencier
0a95168cd8 Merge branch '2.8' into 3.3
* 2.8:
  [HttpFoundation] Support 0 bit netmask in IPv6 ()
  Set `width: auto` on WebProfiler toolbar's reset.
  [HttpKernel] Fix logging of post-terminate errors/exceptions
  [Debug] Fix catching fatal errors in case of nested error handlers
  Fix hidden currency element with Bootstrap 3 theme
2017-12-11 14:02:38 -08:00
Fabien Potencier
eddd273351 Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] Support 0 bit netmask in IPv6 ()
  Set `width: auto` on WebProfiler toolbar's reset.
  [HttpKernel] Fix logging of post-terminate errors/exceptions
  [Debug] Fix catching fatal errors in case of nested error handlers
  Fix hidden currency element with Bootstrap 3 theme
2017-12-11 14:01:48 -08:00
Fabien Potencier
9ac08e8770 bug #25233 [TwigBridge][Form] Fix hidden currency element with Bootstrap 3 theme (julienfalque)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge][Form] Fix hidden currency element with Bootstrap 3 theme

| 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        | -

When using a `MoneyType` field, one can pass `currency=false` option to hide the currency symbol. This does not work well when using the Bootstrap 3 theme: the symbol is not displayed but HTML elements that are supposed to contain it are still rendered.

Commits
-------

c5af7fd938 Fix hidden currency element with Bootstrap 3 theme
2017-12-11 13:56:00 -08:00
Fabien Potencier
d200185563 bug #25413 [HttpKernel] detect deprecations thrown by container initialization during tests (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[HttpKernel] detect deprecations thrown by container initialization during tests

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

Commits
-------

81248bc855 [HttpKernel] detect deprecations thrown by container initialization during tests
2017-12-11 13:24:42 -08:00
Fabien Potencier
891b321f6b bug #25408 [Debug] Fix catching fatal errors in case of nested error handlers (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Fix catching fatal errors in case of nested error handlers

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

Fixing a bug from 2013 :)

Commits
-------

27dc9a6c7c [Debug] Fix catching fatal errors in case of nested error handlers
2017-12-11 13:15:46 -08:00
Fabien Potencier
0a7c6594c3 bug #25330 [HttpFoundation] Support 0 bit netmask in IPv6 (::/0) (stephank)
This PR was squashed before being merged into the 2.7 branch (closes #25330).

Discussion
----------

[HttpFoundation] Support 0 bit netmask in IPv6 (`::/0`)

| 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        | —

Proxy settings allow `0.0.0.0/0` but not `::/0`. This PR adds IpUtils support for 0 masked bits in IPv6.

Tests pass in the sense that results before and after are unchanged on my local PHP 7.2 / macOS setup. The IpUtils test cases were extended for the changes in this PR.

I've rebased on 2.7, but the issue is present up to 4.0 and master.

Commits
-------

9f1c9bd964 [HttpFoundation] Support 0 bit netmask in IPv6 ()
2017-12-11 13:06:42 -08:00
Stéphan Kochen
9f1c9bd964 [HttpFoundation] Support 0 bit netmask in IPv6 () 2017-12-11 13:06:40 -08:00
Fabien Potencier
7035d012cd bug #25378 [VarDumper] Fixed file links leave blank pages when ide is configured (antalaron)
This PR was merged into the 3.3 branch.

Discussion
----------

[VarDumper] Fixed file links leave blank pages when ide is configured

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

Commits
-------

138cd09948 [VarDumper] Fixed file links leave blank pages when ide is configured
2017-12-11 13:03:56 -08:00
Fabien Potencier
b78c0ae039 bug #25410 [HttpKernel] Fix logging of post-terminate errors/exceptions (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Fix logging of post-terminate errors/exceptions

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

After terminate, the request stack is empty, thus `terminateWithException` currently fails, preventing listeners to know about the failure.

Commits
-------

e85b371d72 [HttpKernel] Fix logging of post-terminate errors/exceptions
2017-12-11 12:54:46 -08:00