Commit Graph

35352 Commits

Author SHA1 Message Date
Gabriel Caruso
4683f6d454 Improve assertions 2018-01-23 18:17:18 -02:00
Fabien Potencier
1b92f0685d minor #25898 [minor] SCA: reduce repetitive method calls (sequential and in loop) (kalessil)
This PR was merged into the 2.7 branch.

Discussion
----------

[minor] SCA: reduce repetitive method calls (sequential and in loop)

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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
-------

609372252f SCA: get rid of repetitive calls
2018-01-23 20:05:41 +01:00
Vladimir Reznichenko
609372252f SCA: get rid of repetitive calls 2018-01-23 12:06:14 +01:00
Fabien Potencier
332ad0ab9b feature #24632 [DependencyInjection] Anonymous services in PHP DSL (unkind)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[DependencyInjection] Anonymous services in PHP DSL

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | no
| New feature?  | enhancement for fluent PHP configs
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #24493
| License       | MIT
| Doc PR        | not yet

See #24493:
```php
$s->anonymous(SendEmailForRegisteredUser::class)->tag('listener');
```

Commits
-------

ee4227683d [DI] Add way to register service with implicit name using the PHP DSL
2018-01-23 08:22:37 +01:00
Fabien Potencier
3cbd01acaf feature #25836 [HttpKernel] Make session-related services extra-lazy (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[HttpKernel] Make session-related services extra-lazy

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

Commits
-------

5f535581b9 [HttpKernel] Make session-related services extra-lazy
2018-01-23 08:05:01 +01:00
Nikita Konstantinov
ee4227683d [DI] Add way to register service with implicit name using the PHP DSL 2018-01-23 07:58:25 +01:00
Fabien Potencier
f004895e46 bug #25858 [DI] Fix initialization of legacy containers by delaying include_once (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix initialization of legacy containers by delaying include_once

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

Best reviewed ignoring whitespaces:
https://github.com/symfony/symfony/pull/25858/files?w=1

Noticed while removing a package: silencing the failing `include_once` as introduced in #25255 is not working for the `$oldContainer` in `Kernel`, and fails with a fatal error when an include succeeds but the class inside misses a parent.

Delaying the calls to `include_once` to the moment where the fresh container is actually used first,  when setting the "kernel" service, works around the situation.

Commits
-------

5e750ec4b5 [DI] Fix initialization of legacy containers by delaying include_once
2018-01-23 07:50:41 +01:00
Fabien Potencier
1850ffca36 feature #25775 Introduce signaled process specific exception class (Soullivaneuh)
This PR was merged into the 4.1-dev branch.

Discussion
----------

Introduce signaled process specific exception class

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

Introduced the `ProcessSignaledException` class to properly catch signaled process errors.

I took benefit to refactor process exception with a new `ProcessRuntimeException` class.

Commits
-------

68adb3b903 Introduce signaled process specific exception class
2018-01-23 07:39:39 +01:00
Fabien Potencier
73cbb01953 bug #25891 [DependencyInjection] allow null values for root nodes in YAML configs (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] allow null values for root nodes in YAML configs

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

Commits
-------

52dd825bf1 allow null values for root nodes in YAML configs
2018-01-23 07:36:50 +01:00
Fabien Potencier
af4b46995c minor #25890 [FrameworkBundle] revert useless tests fixtures changes (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle] revert useless tests fixtures changes

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

This will revert #25847. Basically, the changes done in #25847 were not
wrong per se. However, those changes were not necessary as the tests
were not failing because of the missing "assets" config, but due to an
issue introduced in the Config component. Furthermore, removing this
part of the config fixtures gives us the benefit that our before
normalization logic that enables assets support when the templating
integration is enabled is properly tested.

Commits
-------

fb1be51a5c revert useless tests fixtures changes
2018-01-23 07:23:32 +01:00
Christian Flothmann
52dd825bf1 allow null values for root nodes in YAML configs 2018-01-22 21:35:04 +01:00
Ryan Weaver
f92e03de97 adding an array adapter 2018-01-22 15:22:54 -05:00
Christian Flothmann
fb1be51a5c revert useless tests fixtures changes
This will revert #25847. Basically, the changes done in #25847 were not
wrong per se. However, those changes were not necessary as the tests
were not failing because of the missing "assets" config, but due to an
issue introduced in the Config component. Furthermore, removing this
part of the config fixtures gives us the benefit that our before
normalization logic that enables assets support when the templating
integration is enabled is properly tested.
2018-01-22 21:13:54 +01:00
Sullivan SENECHAL
68adb3b903
Introduce signaled process specific exception class 2018-01-22 17:26:31 +01:00
Christian Flothmann
a1b1484376 always call the parent class' constructor 2018-01-22 14:46:57 +01:00
Nicolas Grekas
8cf8d1619f Merge branch '4.0'
* 4.0:
  cs fix
2018-01-22 13:03:11 +01:00
Nicolas Grekas
9bd28fc728 cs fix 2018-01-22 13:02:44 +01:00
Fabien Potencier
34b6bdc8d0 minor #25881 [VarDumper] Fix docblock (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix docblock

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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
-------

36cd267590 [VarDumper] Fix docblock
2018-01-22 07:17:56 +01:00
Robin Chalas
36cd267590 [VarDumper] Fix docblock 2018-01-22 02:54:24 +01:00
Nicolas Grekas
fb7be04d83 minor #25879 Improve phpdoc to make it more explicit (mnapoli)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #25879).

Discussion
----------

Improve phpdoc to make it more explicit

| 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?   |
| Fixed tickets |
| License       | MIT
| Doc PR        |

It confused me a lot that the method took an array and that the phpdoc said we should pass a string instead of an array. This small change should clear up the confusion.

Commits
-------

ecdbea2 Improve phpdoc to make it more explicit
2018-01-21 20:40:00 +01:00
Matthieu Napoli
ecdbea2ba9 Improve phpdoc to make it more explicit
It confused me a lot that the method took an array and that the phpdoc said we should pass a string instead of an array. This small change should clear up the confusion.
2018-01-21 20:40:00 +01:00
Nicolas Grekas
87adf25091 Merge branch '4.0'
* 4.0:
  Have weak_vendors ignore deprecations from outside
  [HttpFoundation] fixed return type of method HeaderBag::get
  [HttpFoundation] Added "resource" type on Request::create docblock
  [Console] Fix using finally where the catch can also fail
  [Process] Skip environment variables with false value in Process
  Revert "bug #25789  Enableable ArrayNodeDefinition is disabled for empty configuration (kejwmen)"
  Formatting fix in upgrade 3.0 document
  don't split lines on carriage returns when dumping
  trim spaces from unquoted scalar values
  Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
  [DI] compilation perf tweak
  [Validator] Conflict with egulias/email-validator 2.0
  [Validator] add missing parent isset and add test
2018-01-21 20:07:38 +01:00
Nicolas Grekas
ee04e5b58f Merge branch '3.4' into 4.0
* 3.4:
  Have weak_vendors ignore deprecations from outside
  [HttpFoundation] fixed return type of method HeaderBag::get
  [HttpFoundation] Added "resource" type on Request::create docblock
  [Process] Skip environment variables with false value in Process
  Revert "bug #25789  Enableable ArrayNodeDefinition is disabled for empty configuration (kejwmen)"
  Formatting fix in upgrade 3.0 document
  don't split lines on carriage returns when dumping
  Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
  [DI] compilation perf tweak
  [Validator] Conflict with egulias/email-validator 2.0
  [Validator] add missing parent isset and add test
2018-01-21 20:06:11 +01:00
Nicolas Grekas
8d4e3c52c0 Merge branch '3.3' into 3.4
* 3.3:
  Have weak_vendors ignore deprecations from outside
  [HttpFoundation] fixed return type of method HeaderBag::get
  [HttpFoundation] Added "resource" type on Request::create docblock
  [Process] Skip environment variables with false value in Process
  Revert "bug #25789  Enableable ArrayNodeDefinition is disabled for empty configuration (kejwmen)"
  Formatting fix in upgrade 3.0 document
  don't split lines on carriage returns when dumping
  Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
  [DI] compilation perf tweak
  [Validator] Conflict with egulias/email-validator 2.0
  [Validator] add missing parent isset and add test
2018-01-21 20:05:02 +01:00
Nicolas Grekas
fa7b76059f Merge branch '2.8' into 3.3
* 2.8:
  [HttpFoundation] fixed return type of method HeaderBag::get
  [HttpFoundation] Added "resource" type on Request::create docblock
  Revert "bug #25789  Enableable ArrayNodeDefinition is disabled for empty configuration (kejwmen)"
  Formatting fix in upgrade 3.0 document
  Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
  [Validator] add missing parent isset and add test
2018-01-21 20:04:48 +01:00
Nicolas Grekas
75894936ac Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] fixed return type of method HeaderBag::get
  [HttpFoundation] Added "resource" type on Request::create docblock
  Revert "bug #25789  Enableable ArrayNodeDefinition is disabled for empty configuration (kejwmen)"
  Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
  [Validator] add missing parent isset and add test
2018-01-21 20:03:25 +01:00
Nicolas Grekas
f33382da34 bug #24864 Have weak_vendors ignore deprecations from outside (greg0ire)
This PR was merged into the 3.3 branch.

Discussion
----------

Have weak_vendors ignore deprecations from outside

phar:// and eval() can execute code that may or may not come from the vendors.

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | not yet
| Fixed tickets | #24853
| License       | MIT

I haven't managed to get the phar test to pass yet, but before I do, is it ok for me to commit a test phar in Symfony? I'm thinking trust issues? Although the phar is almost plain text.

~~Next, I'm stuck because it looks like symfony does not know how to load classes anymore... should I somehow load `vendor/autoload.php` from the phar or something like that?~~ solved, had nothing to do with that.

Commits
-------

9ce0ae2 Have weak_vendors ignore deprecations from outside
2018-01-21 19:49:14 +01:00
Grégoire Paris
9ce0ae23ae
Have weak_vendors ignore deprecations from outside
phar:// and eval() can execute code that may or may not come from the vendors.
2018-01-21 19:42:21 +01:00
Nicolas Grekas
44a03b1017 minor #24949 [HttpFoundation] fixed return type of method HeaderBag::get (AmsTaFFix)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] fixed return type of method HeaderBag::get

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

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

6b608e8 [HttpFoundation] fixed return type of method HeaderBag::get
2018-01-21 17:38:39 +01:00
AmsTaFFix
6b608e8a5a [HttpFoundation] fixed return type of method HeaderBag::get 2018-01-21 17:36:17 +01:00
Nicolas Grekas
b7d6963ef6 minor #25875 [HttpFoundation] Added "resource" type on Request::create docblock (Jack Wright)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Added "resource" type on Request::create docblock

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

Replaces #24902

Commits
-------

d1a96ca [HttpFoundation] Added "resource" type on Request::create docblock
2018-01-21 17:31:25 +01:00
Robin Chalas
6b2267b836 bug #25873 [Console] Fix using finally where the catch can also fail (nicolas-grekas)
This PR was merged into the 4.0 branch.

Discussion
----------

[Console] Fix using finally where the catch can also fail

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

Restores code to 3.4 state, which is free from the issue.

Commits
-------

763a914 [Console] Fix using finally where the catch can also fail
2018-01-21 17:29:43 +01:00
Jack Wright
d1a96ca9d3 [HttpFoundation] Added "resource" type on Request::create docblock 2018-01-21 17:28:26 +01:00
Nicolas Grekas
8ff4136d7a bug #25848 [Validator] add missing parent isset and add test (Simperfit)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] add missing parent isset and add test

| 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 | #25843 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |

This is a little PR to fix the error and to add the parent::__isset to the Constraints class, I'm adding a test too to be sure that this is not possible again.

Btw, since this is instagihub, I'm coding at home and then I see a squirrel :
![img_3187 heic](https://user-images.githubusercontent.com/3451634/35149517-a9ddc0ba-fd16-11e7-9e22-cdba0b677071.jpeg)

Commits
-------

bcb79a3 [Validator] add missing parent isset and add test
2018-01-21 16:35:33 +01:00
Nicolas Grekas
02e5c67fb7 bug #25869 [Process] Skip environment variables with false value in Process (francoispluchino)
This PR was merged into the 3.3 branch.

Discussion
----------

[Process] Skip environment variables with false value in Process

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

With the commit 03adce239d, all env variables are injecting in the process, and the env variable with the `false` value are converted in empty string.

For example, it's problematic with the bundle SymfonyWebServerBundle and the last version of the [symfony/framework-bundle recipe](https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/3.3/public/index.php#L11), because the WebServer override the value of `APP_ENV` with `false` to override previously loaded variables (c5a1218555), and with the commit 03adce239d, the `APP_ENV` variable is injected with a empty string value, instead of not being injected, as was the case before.

This PR not use the same logic as the [getDefaultEnv()](https://github.com/symfony/symfony/blob/4.0/src/Symfony/Component/Process/Process.php#L1553) method.

Commits
-------

2daf4f9 [Process] Skip environment variables with false value in Process
2018-01-21 16:22:08 +01:00
Nicolas Grekas
f456b0f376 feature #22253 [Config] allow changing the path separator (bburnichon)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Config] allow changing the path separator

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

In bundles configuration, no dots are allowed in key names, but as a standalone config, there is no such limitation that should be enforced.

By using current `NodeBuilder` it should be possible to change path separator used (for example: `/`)

Commits
-------

15e05e1 Add feature allowing change of Path Separator
2018-01-21 16:17:35 +01:00
Benoît Burnichon
15e05e1e17 Add feature allowing change of Path Separator 2018-01-21 16:11:55 +01:00
Nicolas Grekas
763a9145a8 [Console] Fix using finally where the catch can also fail 2018-01-21 15:52:44 +01:00
Fabien Potencier
7d8577be8a bug #25864 [Yaml] don't split lines on carriage returns when dumping (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[Yaml] don't split lines on carriage returns when dumping

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

Commits
-------

845eb88f3b don't split lines on carriage returns when dumping
2018-01-21 13:26:08 +01:00
Fabien Potencier
4d70f9b695 bug #25863 [Yaml] trim spaces from unquoted scalar values (xabbuh)
This PR was merged into the 4.0 branch.

Discussion
----------

[Yaml] trim spaces from unquoted scalar values

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

Commits
-------

5e70ee898e trim spaces from unquoted scalar values
2018-01-21 13:23:47 +01:00
François Pluchino
2daf4f98ff [Process] Skip environment variables with false value in Process 2018-01-21 12:04:49 +01:00
Nicolas Grekas
5e750ec4b5 [DI] Fix initialization of legacy containers by delaying include_once 2018-01-21 10:59:06 +01:00
Fabien Potencier
bccab35aa2 minor #25854 [DI] compilation perf tweak (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] compilation perf tweak

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

![image](https://user-images.githubusercontent.com/243674/35181621-94c5c10a-fdc5-11e7-83fb-c640a0ed2fa9.png)

Commits
-------

ad8aff4203 [DI] compilation perf tweak
2018-01-21 08:39:11 +01:00
Fabien Potencier
ac3e1b172d minor #25870 Formatting fix in upgrade 3.0 document (Piotr Błasiak)
This PR was merged into the 2.8 branch.

Discussion
----------

Formatting fix in upgrade 3.0 document

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

Fixes formatting in upgrade file.
This fix was already done in https://github.com/symfony/symfony/pull/22436 but applied to 3.2.
Formatting error still exists in 2.8, 3.0, 3.1. I don't know if this was intentional.

Commits
-------

dc6d5e1083 Formatting fix in upgrade 3.0 document
2018-01-21 08:36:45 +01:00
Fabien Potencier
9312f794e8 Revert "bug #25789 Enableable ArrayNodeDefinition is disabled for empty configuration (kejwmen)"
This reverts commit 132cec44f2, reversing
changes made to d41130153e.
2018-01-21 08:24:24 +01:00
Fabien Potencier
1fedcffbb9 bug #25861 do not conflict with egulias/email-validator 2.0+ (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

do not conflict with egulias/email-validator 2.0+

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/25851#issuecomment-359166972
| License       | MIT
| Doc PR        |

Not allowing `egulias/email-validator` 2.0+ will prevent applications using this package from updating to the next patch release.

Commits
-------

1a1aaa74d6 Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
2018-01-21 08:22:52 +01:00
Piotr Błasiak
dc6d5e1083 Formatting fix in upgrade 3.0 document 2018-01-20 23:34:15 +01:00
Christian Flothmann
845eb88f3b don't split lines on carriage returns when dumping 2018-01-20 16:04:53 +01:00
Christian Flothmann
5e70ee898e trim spaces from unquoted scalar values 2018-01-20 15:02:12 +01:00
Christian Flothmann
1a1aaa74d6 Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
This reverts commit f1f18ad608, reversing
changes made to 8e8ee09747.
2018-01-20 13:12:25 +01:00