Commit Graph

35477 Commits

Author SHA1 Message Date
Cosmin-Romeo TANASE
826dfbd496 [HttpFoundation] Use the correct syntax for session gc based on Pdo driver 2018-01-29 09:51:44 +01:00
Jules Pietri
9722c063fb [Form] Fixed empty data on expanded ChoiceType and FileType 2018-01-28 12:59:04 +01:00
Alexander M. Turek
5b73d1c1e6 Removed assertDateTimeEquals() methods. 2018-01-27 12:01:42 +01:00
Alexander M. Turek
3d6c3ba836 Don't stop PSR-4 service discovery if a parent class is missing. 2018-01-26 21:15:55 +01:00
Christian Flothmann
317da3bdf8 keep the context when validating forms 2018-01-26 18:01:03 +01:00
Fabien Potencier
4f47bb73a0 Revert "bug #24987 [Console] Fix global console flag when used in chain (Simperfit)"
This reverts commit 9107fb0afd, reversing
changes made to abe6e92593.
2018-01-26 16:25:25 +01:00
Fabien Potencier
667b9295f8 Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
This reverts commit ccc93678fd, reversing
changes made to e77545ab8d.
2018-01-26 16:23:25 +01:00
Fabien Potencier
554bc2482e bug #25933 Disable CSP header on exception pages only in debug (ostrolucky)
This PR was merged into the 2.7 branch.

Discussion
----------

Disable CSP header on exception pages only in debug

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

Based on a feedback we received, there are situations on production when it's desired to have CSP header in place even if exception occurred.

This uses now same condition that is used by ExceptionController in TwigBridge to evaluate if styled exception template is going to be shown, minus `showException` request attribute which don't make sense in this context, because it's used by PreviewController only and in such case this listener isn't triggered.

Overriding CSP header via HTML meta tag unfortunately, but not surprisingly, doesn't work.

Commits
-------

b77538c2fe Disable CSP header on exception pages only in debug
2018-01-26 16:01:34 +01:00
Fabien Potencier
0d975ccdba feature #24894 [FrameworkBundle] add a notice when passing a routerInterface without warmupInterface in RouterCacheWarmer (Simperfit)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] add a notice when passing a routerInterface without warmupInterface in RouterCacheWarmer

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

I'm adding a test to RouterCacheWarmer since there were none.

Commits
-------

daa7f02221 [FrameworkBundle] add a notice when passing a routerInterface with warmupInterface in RouterCacheWarmer
2018-01-26 15:21:25 +01:00
Fabien Potencier
ba8fb60bbd bug #25926 [Form] Fixed Button::setParent() when already submitted (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed Button::setParent() when already submitted

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

The `Button` does not respect the [FormInterface](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/FormInterface.php#L28), by extension the `SubmitButton` neither.

Commits
-------

9f0c7bf549 Fixed Button::setParent() when already submitted
2018-01-26 15:13:14 +01:00
Christian Flothmann
0db65b5bbe fix tests 2018-01-26 14:03:24 +01:00
Amrouche Hamza
820186fcac [HttpFoundation] we should not pass size on FileBag 2018-01-26 14:03:23 +01:00
Fabien Potencier
0cd675ca4a bug #25927 [Form] Fixed submitting disabled buttons (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed submitting disabled buttons

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

Commits
-------

804b2a1a47 Fixed submitting disabled buttons
2018-01-26 08:31:44 +01:00
Gabriel Ostrolucký
b77538c2fe Disable CSP header on exception pages only in debug
Same condition is used by default TwigBridge ExceptionController
to evaluate if styled exception page is supposed to be shown.
2018-01-26 02:39:48 +01:00
HeahDude
804b2a1a47 Fixed submitting disabled buttons 2018-01-25 12:52:22 +01:00
Jules Pietri
9f0c7bf549 Fixed Button::setParent() when already submitted 2018-01-25 12:47:49 +01:00
Robin Chalas
05e9682868 bug #25397 [Console] Provide a DX where an array could be passed (Simperfit)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Provide a DX where an array could be passed

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

![img_2941](https://user-images.githubusercontent.com/3451634/33766610-977f77ce-dc1e-11e7-93c1-38dd0038d7f5.jpeg)

I think that this is not fixing the root causes that does not appears in 4.1, so maybe there is something better to do. I did not find the root cause So I think it can bo good to fix the problem too.

Commits
-------

de502f7 [Console] Provide a bugfix where an array could be passed
2018-01-25 10:33:05 +01:00
Morel Sébastien
1497d36cab Add option to the workflow:dump command to allow PlantUML format dump 2018-01-25 00:07:42 -08:00
Gabriel Caruso
3d90a2217d Improve assertions 2018-01-24 15:56:32 -02:00
Fabien Potencier
5f537e4304 minor #25917 Restore RoleInterface import (Soullivaneuh)
This PR was merged into the 3.3 branch.

Discussion
----------

Restore RoleInterface import

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| License       | MIT

The import is use on PHPDoc but was accidentally removed. Maybe because PHPStorm does not match with the import when you use parenthesis.

Not really a bug as it is concerning only PHPDoc, but it make some analysis tools like PHPStan yelling:

```
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   src/AppBundle/Security/Authentication/ApiKeyAuthenticator.php
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  64     Parameter #4 $roles of class Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken constructor expects array<string|Symfony\Component\Security\Core\Authentication\Token\RoleInterface>, array<string|Symfony\Component\Security\Core\Role\Role>
         given.
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   tests/AppBundle/Controller/WebTestCase.php
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  59     Parameter #4 $roles of class Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken constructor expects array<string|Symfony\Component\Security\Core\Authentication\Token\RoleInterface>, array<string|Symfony\Component\Security\Core\Role\Role>
         given.
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
```

Commits
-------

8ecfeb1e31 Restore RoleInterface import
2018-01-24 18:14:12 +01:00
Sullivan SENECHAL
8ecfeb1e31
Restore RoleInterface import 2018-01-24 17:32:05 +01:00
Amrouche Hamza
daa7f02221
[FrameworkBundle] add a notice when passing a routerInterface with warmupInterface in RouterCacheWarmer 2018-01-24 17:07:17 +01:00
Amrouche Hamza
de502f7d6c
[Console] Provide a bugfix where an array could be passed 2018-01-24 16:57:03 +01:00
Christian Flothmann
58cdbd03e1 collect extension information as late as possible 2018-01-24 14:38:52 +01:00
Mathieu Lechat
041c42db6a Allow trans filter to be safe 2018-01-24 13:24:39 +01:00
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