Commit Graph

29446 Commits

Author SHA1 Message Date
Tobias Schultze
5100071caf [Console] add support for iterable in output 2018-04-06 18:29:06 +02:00
Nicolas Grekas
368a0c34b8 [PhpUnitBridge] Fix PHP 5.3 compat 2018-04-06 09:49:42 +02:00
Fabien Potencier
f1a9d7098e Merge branch '4.0'
* 4.0:
  [Form] Fix typo in Upgrade 3.4/4.0
  [EventDispatcher] Dispatcher in stopEventPropagation test now registers correct listener
  Update da translations
  Fix Typo in Guard Factory
2018-04-06 09:35:57 +02:00
Fabien Potencier
5ea5ee2079 Merge branch '3.4' into 4.0
* 3.4:
  [Form] Fix typo in Upgrade 3.4/4.0
  [EventDispatcher] Dispatcher in stopEventPropagation test now registers correct listener
  Update da translations
  Fix Typo in Guard Factory
2018-04-06 09:35:43 +02:00
Fabien Potencier
ee054cd756 Merge branch '2.8' into 3.4
* 2.8:
  [EventDispatcher] Dispatcher in stopEventPropagation test now registers correct listener
  Update da translations
  Fix Typo in Guard Factory
2018-04-06 09:35:25 +02:00
Fabien Potencier
72b238ed3a Merge branch '2.7' into 2.8
* 2.7:
  [EventDispatcher] Dispatcher in stopEventPropagation test now registers correct listener
  Update da translations
2018-04-06 09:35:03 +02:00
Fabien Potencier
dc29b27a83 feature #26660 [SecurityBundle] allow using custom function inside allow_if expressions (dmaicher)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[SecurityBundle] allow using custom function inside allow_if expressions

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | no
| Fixed tickets | https://github.com/symfony/symfony/issues/23208
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/9552

This is a follow-up for https://github.com/symfony/symfony/pull/26263

As discussed there I propose to allow using custom functions as a new feature only and thus targeting `master` here.

If we agree to move forward with this there are some todos:
- [x] fix tests
- [x] add cache warmer for allow_if expressions
- [x] update documentation to mention this new feature
- [x] update UPGRADE files

ping @nicolas-grekas @stof

Commits
-------

41552cd896 [SecurityBundle] allow using custom function inside allow_if expressions
2018-04-06 08:18:32 +02:00
Fabien Potencier
0f4c0e92b2 feature #26096 [HttpFoundation] Added a migrating session handler (rossmotley)
This PR was squashed before being merged into the 4.1-dev branch (closes #26096).

Discussion
----------

[HttpFoundation] Added a migrating session handler

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/9496

- [x] gather feedback for my changes
- [x] submit changes to the documentation
- [x] update the changelog

When migrating to a new session handler on a live system, it's useful to be able to do it with no loss of session data. This migrating handler allows the sessions to be written to an additional handler to enable a migration workflow like:

* Switch to migrating handler, with your new handler as the 'write only' one. The old handler behaves as usual and sessions get written to the new one.
* After verifying the data in the new handler (and after the session gc period), switch the migrating handler to use your old handler as the 'write only' one instead, so the sessions will now be read from the new handler. This step allows easier rollbacks.
* After verifying everything, switch from the migrating handler to the new handler

Commits
-------

3acd548349 [HttpFoundation] Added a migrating session handler
2018-04-06 07:59:02 +02:00
Ross Motley
3acd548349 [HttpFoundation] Added a migrating session handler 2018-04-06 07:58:54 +02:00
Fabien Potencier
47e2bd31da feature #26528 [Debug] Support any Throwable object in FlattenException (derrabus)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Debug] Support any Throwable object in FlattenException

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

Alternative to #26447 without BC breaks, follows #26028.

This PR removes the need to convert `Throwable` objects into exceptions when working with `FlattenException`.

ping @instabledesign @ostrolucky @nicolas-grekas

Commits
-------

96c1a6fa71 Support any Throwable object in FlattenException.
2018-04-06 07:53:59 +02:00
Fabien Potencier
60e48cb0f5 fixed typo 2018-04-06 07:34:50 +02:00
Fabien Potencier
dbafc11630 bug #26799 [DI][Config] Fix empty env validation (ro0NL)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[DI][Config] Fix empty env validation

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26747
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

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

d40a4f409d [DI][Config] Fix empty env validation
2018-04-06 07:33:43 +02:00
Fabien Potencier
3a37e41bfb bug #26816 [Messenger][FrameworkBundle] Move collector, command into the component & minor tweaks (ogizanagi)
This PR was squashed before being merged into the 4.1-dev branch (closes #26816).

Discussion
----------

[Messenger][FrameworkBundle] Move collector, command into the component & minor tweaks

| Q             | A
| ------------- | ---
| Branch?       | master <!-- 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 | N/A   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Some suggestions more aligned with most of the core practices, mainly:

- Move the command & collector to the component itself. They are not dependent of the Fwb in any way and are useful out of the fwb usage.
- Add an exception in FrameworkExtension if the `framework.messenger` key is enabled, but the component isn't installed.

Commits
-------

6aec62bad3 [FrameworkBundle] Minor messenger component tweaks
f9c9ca0514 [Messenger] Move data collector & command into the component
2018-04-06 07:28:47 +02:00
Alexander M. Turek
96c1a6fa71 Support any Throwable object in FlattenException. 2018-04-05 19:04:06 +02:00
Christian Flothmann
79e898ffe8 remove CSRF Twig extension when class is missing 2018-04-05 18:06:51 +02:00
Maxime Steinhausser
6aec62bad3 [FrameworkBundle] Minor messenger component tweaks 2018-04-05 17:47:14 +02:00
Maxime Steinhausser
f9c9ca0514 [Messenger] Move data collector & command into the component 2018-04-05 17:21:58 +02:00
Peter Orosz
24c460afa6 [EventDispatcher] Dispatcher in stopEventPropagation test now registers correct listener 2018-04-05 16:23:45 +02:00
Nicolas Grekas
f77c1d0d09 [PhpUnitBridge] Fix parse error on PHP 5.3 2018-04-05 13:02:18 +02:00
Nicolas Grekas
c307ff8f96 [PhpUnitBridge] Fix parse error on PHP 5.3 2018-04-05 13:00:58 +02:00
Nicolas Grekas
65b601323f [PhpUnitBridge] Replace global function by closure 2018-04-05 12:56:53 +02:00
Grégoire Pineau
3b1c5820d3 [PhpUnitBridge] Search for other SYMFONY_* env vars in phpunit.xml then phpunit.xml.dist 2018-04-05 11:13:43 +02:00
Maxime Steinhausser
a01b8e420d [Messenger] Fix composer branch-alias 2018-04-04 23:42:37 +02:00
Samuel ROZE
08ca9f5a56 bug #26804 [Messenger] Fix handles tag attribute (ro0NL)
This PR was squashed before being merged into the 4.1-dev branch (closes #26804).

Discussion
----------

[Messenger] Fix handles tag attribute

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

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

92f7e37a27 [Messenger] Fix handles tag attribute
2018-04-04 20:34:11 +01:00
Roland Franssen
92f7e37a27 [Messenger] Fix handles tag attribute 2018-04-04 20:34:01 +01:00
Fabien Potencier
fb172cae86 feature #26800 [PhpUnitBridge] Search for SYMFONY_PHPUNIT_REMOVE env var in phpunit.xml then phpunit.xml.dist (lyrixx)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[PhpUnitBridge] Search for SYMFONY_PHPUNIT_REMOVE env var in phpunit.xml then phpunit.xml.dist

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

---

using the env var could be a bit annoying + not everyone may know this. So adding it to the `phpunit.xml.dist` file make sens IHMO

Commits
-------

5e2d43e322 [PhpUnitBridge] Search for SYMFONY_PHPUNIT_REMOVE env var in phpunit.xml then phpunit.xml.dist
2018-04-04 20:35:20 +02:00
David Maicher
41552cd896 [SecurityBundle] allow using custom function inside allow_if expressions 2018-04-04 20:31:39 +02:00
Fabien Potencier
5b4e1c5b6b Merge branch '4.0'
* 4.0:
  [Security] register custom providers on ExpressionLanguage directly
  [PhpUnitBridge] Catch deprecation error handler
2018-04-04 20:25:14 +02:00
Fabien Potencier
eb7050ab50 Merge branch '3.4' into 4.0
* 3.4:
  [Security] register custom providers on ExpressionLanguage directly
  [PhpUnitBridge] Catch deprecation error handler
2018-04-04 20:24:59 +02:00
Fabien Potencier
572042c4ec feature #26684 [Messenger] Remove the Doctrine middleware configuration from the FrameworkBundle (sroze)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Messenger] Remove the Doctrine middleware configuration from the FrameworkBundle

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

As per @fabpot's request, remove the enabling feature of the DoctrineMiddleware from the FramworkBundle.

/cc @Nyholm

Commits
-------

27a8b1dc96 Remove the Doctrine middleware configuration from the FrameworkBundle
2018-04-04 19:46:16 +02:00
Fabien Potencier
2a4d024bcd feature #21856 [LDAP] Allow adding and removing values to/from multi-valued attributes (jean-gui)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[LDAP] Allow adding and removing values to/from multi-valued attributes

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

`EntryManagerInterface::update(Entry $entry)` is extremely slow in some specific cases such as adding or removing members to or from huge groupOfNames if you also enable the memberOf overlay in OpenLDAP. Disabling memberOf does make things a lot better, but it is still slow compared to inserting/removing only the elements you want.

This PR adds two methods to Symfony\Component\Ldap\Adapter\ExtLdap\EntryManager taking advantage of ldap_mod_add and ldap_mod_del.

I thought about using them directly in the update method, but since you need to know what values to add and remove, it would be necessary to retrieve the old values from LDAP.

I'm also unsure whether these two methods should be in an interface. I think that adding them to EntryManagerInterface would break BC, but I could create another interface, similarly to RenameEntryInterface.

Commits
-------

fa9db29064 Allow adding and removing values to/from multi-valued attributes
2018-04-04 19:33:55 +02:00
jean-gui
fa9db29064 Allow adding and removing values to/from multi-valued attributes 2018-04-04 19:25:31 +02:00
David Maicher
3a55a86609 [Security] register custom providers on ExpressionLanguage directly 2018-04-04 19:20:26 +02:00
Fabien Potencier
fe6aa6414f feature #26767 [Form] ability to set rounding strategy for MoneyType (syastrebov)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Form] ability to set rounding strategy for MoneyType

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | no
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/9543

Added `rounding_mode` to the `MoneyType` to be possible to change rounding strategy for money values. For now it's just `ROUND_HALF_UP` but it's good to have `ROUND_DOWN` as well. E.g. to transform `15.999` to `15.99` instead of `15.1`.

Commits
-------

f3b142420f rounding_mode for money type
2018-04-04 19:12:35 +02:00
Fabien Potencier
a90cd13fa4 minor #26801 Update da translations (c960657)
This PR was merged into the 2.7 branch.

Discussion
----------

Update da translations

| 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 Danish translations have several serious errors. This PR adjusts to official Danish orthography, and updates some texts for internal consistency and to better reflect the original English text.

Commits
-------

d0ea26bd15 Update da translations
2018-04-04 19:11:55 +02:00
Christian Schmidt
d0ea26bd15 Update da translations 2018-04-04 19:02:30 +02:00
Grégoire Pineau
5e2d43e322 [PhpUnitBridge] Search for SYMFONY_PHPUNIT_REMOVE env var in phpunit.xml then phpunit.xml.dist 2018-04-04 18:37:27 +02:00
Roland Franssen
d40a4f409d [DI][Config] Fix empty env validation 2018-04-04 18:31:13 +02:00
Zan Baldwin
c0a051d46d Fix Typo in Guard Factory 2018-04-04 16:36:22 +01:00
Nicolas Grekas
603f3abad9 bug #26794 [PhpUnitBridge] Catch deprecation error handler (cvilleger)
This PR was squashed before being merged into the 3.4 branch (closes #26794).

Discussion
----------

[PhpUnitBridge] Catch deprecation error handler

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

This fix `DeprecationErrorHandler` to catch deprecation triggered by `SymfonyTestListenerTrait`. `$trace[$i]['class']` points to `Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerForV6`, not the aliased version. The condition has been refactored to handle future version `SymfonyTestsListenerForV{x}`

Commits
-------

f40f181 [PhpUnitBridge] Catch deprecation error handler
2018-04-04 17:03:10 +02:00
cvilleger
f40f181167 [PhpUnitBridge] Catch deprecation error handler 2018-04-04 17:02:59 +02:00
Robin Chalas
e973f6f380 [master] fix test 2018-04-04 16:30:04 +02:00
Nicolas Grekas
bd4820b146 Merge branch '4.0'
* 4.0:
  [Routing] Fix throwing NoConfigurationException instead of 405
  [Security] Load the user before pre/post auth checks when needed
  [SecurityBundle] Add test for simple authentication config
  [WebProfilerBundle] fix version check
  [SecurityBundle] Add missing argument to security.authentication.provider.simple
  [Finder] fix tests
2018-04-04 15:53:40 +02:00
Nicolas Grekas
bc23cae7b0 Merge branch '3.4' into 4.0
* 3.4:
  [Routing] Fix throwing NoConfigurationException instead of 405
  [Security] Load the user before pre/post auth checks when needed
  [SecurityBundle] Add test for simple authentication config
  [WebProfilerBundle] fix version check
  [SecurityBundle] Add missing argument to security.authentication.provider.simple
  [Finder] fix tests
2018-04-04 15:50:32 +02:00
Nicolas Grekas
5d189e1018 Merge branch '2.8' into 3.4
* 2.8:
  [Security] Load the user before pre/post auth checks when needed
  [SecurityBundle] Add test for simple authentication config
  [SecurityBundle] Add missing argument to security.authentication.provider.simple
  [Finder] fix tests
2018-04-04 15:49:01 +02:00
Nicolas Grekas
2c7556f311 Merge branch '2.7' into 2.8
* 2.7:
  [Finder] fix tests
2018-04-04 15:38:31 +02:00
Nicolas Grekas
1605684616 bug #26788 [Security] Load the user before pre/post auth checks when needed (chalasr)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security] Load the user before pre/post auth checks when needed

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

Commits
-------

c318306 [Security] Load the user before pre/post auth checks when needed
2018-04-04 15:33:11 +02:00
Nicolas Grekas
73269cfd0e [Routing] Fix throwing NoConfigurationException instead of 405 2018-04-04 15:22:16 +02:00
Robin Chalas
c318306b44 [Security] Load the user before pre/post auth checks when needed 2018-04-04 15:01:49 +02:00
Samuel ROZE
27a8b1dc96 Remove the Doctrine middleware configuration from the FrameworkBundle 2018-04-04 13:52:24 +01:00