Commit Graph

36054 Commits

Author SHA1 Message Date
Nicolas Grekas e32b518818 Merge branch '2.8' into 3.4
* 2.8:
  [Form] Hardened test suite for empty data
  Bump phpunit XSD version to 5.2
  Add required key attribute
2018-11-11 20:48:54 +01:00
Nicolas Grekas 131a42b38a minor #29174 Add required key attribute (greg0ire)
This PR was merged into the 2.8 branch.

Discussion
----------

Add required key attribute

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

I am getting warnings when running tests with recent phpunit versions (since 7.2.0) :

> `- Element 'element': The attribute 'key' is required but missing.`

This requirement is far from being new, what is recent is phpunit
validating its configuration file against the XSD schema.

See d4484be1a9

This is pedantic (not a bugfix), and might be a bit painful to merge upstream, so if you feel like I should target a more recent instead and let the old branches go on with their lives, please tell me.

Commits
-------

c0733c22cb Add required key attribute
2018-11-11 20:41:05 +01:00
Nicolas Grekas c88755899e minor #29175 Bump phpunit XSD version to 5.2 (greg0ire)
This PR was merged into the 2.8 branch.

Discussion
----------

Bump phpunit XSD version to 5.2

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| 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 attributes being used in the phpunit configuration files, namely
`failOnRisky` and `failOnWarning` were introduced in phpunit 5.2.0. The
Composer configuration shows that tests should run with old versions of
phpunit, but phpunit only validates the configuration against the XSD
since phpunit 7.2.0
These changes can be tested as follows:

```
wget http://schema.phpunit.de/5.2/phpunit.xsd
xargs xmllint --schema phpunit.xsd  1>/dev/null
find src -name phpunit.xml.dist| xargs xmllint --schema phpunit.xsd  1>/dev/null
```

See 7e06a82806
See 46e3745a03/composer.json (L98)

Commits
-------

4dce4b7c30 Bump phpunit XSD version to 5.2
2018-11-11 20:39:52 +01:00
Nicolas Grekas fa1cd6b4fb minor #29179 [Form] Hardened test suite for empty data (HeahDude)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Hardened test suite for empty data

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

Finally the continuation of #21877, giving some more love to 2.8 before it is not maintained anymore <3.

Commits
-------

b0dab6257b [Form] Hardened test suite for empty data
2018-11-11 20:38:43 +01:00
Jules Pietri b0dab6257b [Form] Hardened test suite for empty data 2018-11-11 19:20:21 +01:00
Grégoire Paris 4dce4b7c30
Bump phpunit XSD version to 5.2
Some attributes being used in the phpunit configuration files, namely
failOnRisky and failOnWarning were introduced in phpunit 5.2.0. The
Composer configuration shows that tests should run with old versions of
phpunit, but phpunit only validates the configuration against the XSD
since phpunit 7.2.0.
These changes can be tested as follows:

wget http://schema.phpunit.de/5.2/phpunit.xsd
xargs xmllint --schema phpunit.xsd  1>/dev/null
find src -name phpunit.xml.dist| xargs xmllint --schema phpunit.xsd  1>/dev/null

See 7e06a82806
See 46e3745a03/composer.json (L98)
2018-11-11 12:18:13 +01:00
Nicolas Grekas 49ddced965 minor #29172 [Fwb][EventDispatcher][HttpKernel] Fix getClosureScopeClass usage to describe callables (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[Fwb][EventDispatcher][HttpKernel] Fix getClosureScopeClass usage to describe callables

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://github.com/symfony/symfony/pull/29054   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

`\ReflectionFunctionAbstract::getClosureScopeClass` returns a `\ReflectionClass` instance, not the class name.

Before this patch:

```diff
--- Expected
+++ Actual
@@ @@
-'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen'
+'Class [ <user> class Symfony\Component\EventDispatcher\Tests\Debug\FooListener ] {
+  @@ [...]/src/Symfony/Component/EventDispatcher/Tests/Debug/WrappedListenerTest.php 28-33
+
+  - Constants [0] {
+  }
+
+  - Static properties [0] {
+  }
+
+  - Static methods [0] {
+  }
+
+  - Properties [0] {
+  }
+
+  - Methods [1] {
+    Method [ <user> public method listen ] {
+      @@ [...]/src/Symfony/Component/EventDispatcher/Tests/Debug/WrappedListenerTest.php 30 - 32
+    }
+  }
+}
+::listen'
```

Commits
-------

61e459234b [Fwb][EventDispatcher][HttpKernel] Fix getClosureScopeClass usage to describe callables
2018-11-11 12:13:24 +01:00
Maxime Steinhausser 61e459234b [Fwb][EventDispatcher][HttpKernel] Fix getClosureScopeClass usage to describe callables 2018-11-11 12:01:26 +01:00
Grégoire Paris c0733c22cb
Add required key attribute
I am getting warnings when running tests with recent phpunit versions:

> - Element 'element': The attribute 'key' is required but missing.

This requirement is far from being new, what is recent is phpunit
validating its configuration file against the XSD schema.

See d4484be1a9
2018-11-11 11:17:31 +01:00
Nicolas Grekas b6dac0f93a bug #29165 [DI] align IniFileLoader to PHP bugfix #76965 (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] align IniFileLoader to PHP bugfix #76965

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

Our CI is currently red because of the fix for https://bugs.php.net/76965
This fixes it by aligning the behavior to the fix in PHP core.

Commits
-------

0ab87f44e6 [DI] align IniFileLoader to PHP bugfix #76965
2018-11-10 16:14:41 +01:00
Nicolas Grekas 0ab87f44e6 [DI] align IniFileLoader to PHP bugfix #76965 2018-11-10 16:03:16 +01:00
Nicolas Grekas 5916bbe743 bug #29115 Change button_widget class to btn-primary (neFAST)
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #29115).

Discussion
----------

Change button_widget class to btn-primary

FIX #29114

| Q             | A
| ------------- | ---
| Branch?       | master for features / 2.8 up to 4.1 for bug fixes <!-- see below -->
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29114   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Change button_widget class to btn-primary in Bootstrap 4 twig template

Commits
-------

59003bf27a Change button_widget class to btn-primary
2018-11-08 22:50:30 +01:00
neFAST 59003bf27a Change button_widget class to btn-primary 2018-11-08 22:50:22 +01:00
Nicolas Grekas d74a4eb2fa bug #29131 [Dotenv] dont use getenv() to read SYMFONY_DOTENV_VARS (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Dotenv] dont use getenv() to read SYMFONY_DOTENV_VARS

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

Since using it is not thread safe, let's not rely on it (already done in other places.)

Commits
-------

21a909a189 [Dotenv] dont use getenv() to read SYMFONY_DOTENV_VARS
2018-11-08 22:48:38 +01:00
Nicolas Grekas a141ab0105 Merge branch '2.8' into 3.4
* 2.8:
  [HttpFoundation] Fixed PHP doc of ParameterBag::getBoolean
  [HttpFoundation] replace any preexisting Content-Type headers
2018-11-08 22:47:40 +01:00
Nicolas Grekas 46e3745a03 bug #29057 [HttpFoundation] replace any preexisting Content-Type headers (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpFoundation] replace any preexisting Content-Type headers

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

Commits
-------

de2ce58a4f [HttpFoundation] replace any preexisting Content-Type headers
2018-11-08 22:38:31 +01:00
Nicolas Grekas 21a909a189 [Dotenv] dont use getenv() to read SYMFONY_DOTENV_VARS 2018-11-08 18:00:24 +01:00
Nicolas Grekas def89e26d0 minor #29111 [HttpFoundation] Fixed PHP doc of ParameterBag::getBoolean (lyrixx)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpFoundation] Fixed PHP doc of ParameterBag::getBoolean

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

---

Since the method should return a bool, then the default value should be
a bool too

Commits
-------

1fa5a9a0bd [HttpFoundation] Fixed PHP doc of ParameterBag::getBoolean
2018-11-06 19:44:49 +01:00
Grégoire Pineau 1fa5a9a0bd [HttpFoundation] Fixed PHP doc of ParameterBag::getBoolean
Since the method should return a bool, then the default value should be
a bool too
2018-11-06 18:42:22 +01:00
Nicolas Grekas 6006448997 bug #29104 [DI] fix dumping inlined services (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix dumping inlined services

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

Same as #29103 but for 3.4.

This PR dump inline services using the call-stack to sort the code for instantiating them.
This makes easier to follow and matches the behavior one would expect (and has when using `ContainerBuiler` directly to create services.)

Commits
-------

a97606d58a [DI] fix dumping inlined services
2018-11-06 17:31:32 +01:00
Nicolas Grekas 41eaba5af5 bug #29054 [VarDumper] fix dump of closures created from callables (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] fix dump of closures created from callables

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

We are missing displaying full information about closures created using `ReflectionMethod::getClosure()` or `Closure::fromCallable()`.

This PR fixes it. For VarDumper but also other places where we have logic to display them.

Commits
-------

1c1818b876 [VarDumper] fix dump of closures created from callables
2018-11-06 17:26:47 +01:00
Nicolas Grekas 1c1818b876 [VarDumper] fix dump of closures created from callables 2018-11-06 17:20:05 +01:00
Nicolas Grekas a97606d58a [DI] fix dumping inlined services 2018-11-06 17:06:23 +01:00
Nicolas Grekas 85df96a41d Merge branch '2.8' into 3.4
* 2.8:
  Add framework asset changes to upgrade 3.0 guide
  [Travis] Bump ext-mongodb to 1.5.2 on Travis
  bumped Symfony version to 2.8.48
  updated VERSION for 2.8.47
  update CONTRIBUTORS for 2.8.47
  updated CHANGELOG for 2.8.47
2018-11-06 17:04:36 +01:00
Nicolas Grekas 69ae468351 bug #29102 [DI] fix GraphvizDumper ignoring inline definitions (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix GraphvizDumper ignoring inline definitions

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

Since SF3, inline definitions are first class citizen. I noticed that the GraphvizDumper does not inspect them. Here is the fix.

Commits
-------

ebe6265504 [DI] fix GraphvizDumper ignoring inline definitions
2018-11-06 17:03:43 +01:00
Nicolas Grekas 6cfd3de7bf minor #29041 Fix ini_get() for boolean values (deguif)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix ini_get() for boolean values

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

This follows #29020 for branch 3.4

Commits
-------

65b34cb53c Fix ini_get() for boolean values
2018-11-06 17:00:34 +01:00
Nicolas Grekas 613ace6874 minor #29077 Add framework asset changes to upgrade 3.0 guide (KatharinaSt)
This PR was squashed before being merged into the 2.8 branch (closes #29077).

Discussion
----------

Add framework asset changes to upgrade 3.0 guide

| Q             | A
| ------------- | ---
| Branch?       | 2.8 up to 4.1 <!-- see below -->
| Bug fix?      | no (upgrade guide improvement)
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29050   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

further reading:
https://symfony.com/blog/new-in-symfony-2-7-the-new-asset-component
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

7de10880a4 Add framework asset changes to upgrade 3.0 guide
2018-11-06 16:58:21 +01:00
KatharinaSt 7de10880a4 Add framework asset changes to upgrade 3.0 guide 2018-11-06 16:58:15 +01:00
Nicolas Grekas f898332fb5 bug #29107 [DI] dont track classes/interfaces used to compute autowiring error messages (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] dont track classes/interfaces used to compute autowiring error messages

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

This will also improve DX since tracking these files is not needed at all.

Commits
-------

09a0c23668 [DI] dont track classes/interfaces used to compute autowiring error messages
2018-11-06 16:54:19 +01:00
Nicolas Grekas 96894947cd minor #29099 [Travis] Bump ext-mongodb to 1.5.2 on Travis (ogizanagi)
This PR was submitted for the 2.7 branch but it was merged into the 2.8 branch instead (closes #29099).

Discussion
----------

[Travis] Bump ext-mongodb to 1.5.2 on Travis

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://travis-ci.org/symfony/symfony/jobs/451058906#L2679   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Should fix Travis builds after ba0b611acb being merged (but not released yet).

And/or use `composer require --dev --no-update mongodb/mongodb:@stable`?

Commits
-------

6e4af32284 [Travis] Bump ext-mongodb to 1.5.2 on Travis
2018-11-06 16:30:29 +01:00
Maxime Steinhausser 6e4af32284 [Travis] Bump ext-mongodb to 1.5.2 on Travis 2018-11-06 16:30:18 +01:00
Nicolas Grekas 09a0c23668 [DI] dont track classes/interfaces used to compute autowiring error messages 2018-11-06 14:23:35 +01:00
Nicolas Grekas ebe6265504 [DI] fix GraphvizDumper ignoring inline definitions 2018-11-06 10:26:47 +01:00
Fabien Potencier 3ed98de837 bumped Symfony version to 3.4.19 2018-11-03 12:10:01 +01:00
Fabien Potencier ee054aa62e
Merge pull request #29070 from fabpot/release-3.4.18
released v3.4.18
2018-11-03 11:03:29 +01:00
Fabien Potencier b22cad3743 updated VERSION for 3.4.18 2018-11-03 11:03:02 +01:00
Fabien Potencier 188481df60 updated CHANGELOG for 3.4.18 2018-11-03 11:02:53 +01:00
Fabien Potencier d1ca2ac4af bumped Symfony version to 2.8.48 2018-11-03 11:02:24 +01:00
Fabien Potencier 0a7bd0db86
Merge pull request #29069 from fabpot/release-2.8.47
released v2.8.47
2018-11-03 10:54:14 +01:00
Fabien Potencier 6f9c358e5d updated VERSION for 2.8.47 2018-11-03 10:53:57 +01:00
Fabien Potencier cefedf9da1 update CONTRIBUTORS for 2.8.47 2018-11-03 10:53:55 +01:00
Fabien Potencier 75558bf219 updated CHANGELOG for 2.8.47 2018-11-03 10:53:41 +01:00
Nicolas Grekas de2ce58a4f [HttpFoundation] replace any preexisting Content-Type headers 2018-11-01 18:15:47 +01:00
François-Xavier de Guillebon 65b34cb53c
Fix ini_get() for boolean values 2018-10-31 14:11:30 +01:00
Nicolas Grekas 5d1120593c bug #28820 [DependencyInjection] Fix tags on multiple decorated service (Soner Sayakci)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] Fix tags on multiple decorated service

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

After the first run in the loop with the same decorated service it goes only in the hasAlias condition. The tags will be not set here, so the `ResolveTaggedIteratorArgumentPass` will handle only the first decoration.

Commits
-------

90f8df2830 [DependencyInjection] Fix tags on multiple decorated service
2018-10-31 11:49:51 +01:00
Soner Sayakci 90f8df2830 [DependencyInjection] Fix tags on multiple decorated service 2018-10-31 11:41:01 +01:00
Nicolas Grekas bcc4454079 fix merge 2018-10-31 10:26:14 +01:00
Nicolas Grekas 63c74f7c29 Merge branch '2.8' into 3.4
* 2.8:
  Fixed typo
  Fix ini_get() for boolean values
2018-10-31 10:06:03 +01:00
Nicolas Grekas 555f2d922e minor #28994 SCA: minor code tweaks (vladimir.reznichenko, kalessil)
This PR was merged into the 3.4 branch.

Discussion
----------

SCA: minor code tweaks

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

Following tweaks included:
- repetitive method calls
- greedy regex
- unnecessary function calls (simplifications)

Commits
-------

b12c89d481 SCA: fixed broken tests
42e96ff7a2 SCA: applied code style as per guidelines
8dbd927a33 SCA: minor code tweaks
2018-10-31 09:57:11 +01:00
Fabien Potencier 5a2969cf68 bug #29020 Fix ini_get() for boolean values (deguif)
This PR was merged into the 2.8 branch.

Discussion
----------

Fix ini_get() for boolean values

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

Currently setting `false` or `off`, ... value to configure some PHP ini directives will make this evaluated to `true` as this is equal to a non empty string.

Commits
-------

a1538696c3 Fix ini_get() for boolean values
2018-10-31 06:52:40 +01:00