Commit Graph

30890 Commits

Author SHA1 Message Date
Maxime Steinhausser
8ea38b56e0 Fix minor typo in the main README.md 2017-04-27 20:23:38 +02:00
Maxime Steinhausser
b0c414f2c8 [Serializer] Add missing normalizer options constants 2017-04-27 17:51:26 +02:00
Nicolas Grekas
9d9f628d92 minor #22531 Throwing an exception if the class is not found (weaverryan)
This PR was squashed before being merged into the 3.3-dev branch (closes #22531).

Discussion
----------

Throwing an exception if the class is not found

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

We now throw an exception if the user makes a mistake with their PSR-4 prefix and namespace. For example:

```yml
AppBundle\Controller\:
    resource: '../../src/AppBundle/{Controller}'
    public: true
```

I should not have the `\Controller` at the end of the key. Previously, it would silently not import any services from the directory. Now it throws:

> Expected to find class "AppBundle\Controller\Controller\Admin\BlogController" in file "/path/to/project/src/AppBundle/Controller/Admin/BlogController.php" while importing services from resource "../../src/AppBundle/{Controller}", but it was not found! Check the namespace prefix used with the resource.

The only "downside" is that this prevents someone from importing files from a resource that has a file with no class in it (`functions.php`). @nicolas-grekas and I decided today that we can throw an exception now to be safe, and see if anyone has that valid use-case.

Cheers!

Commits
-------

e85bcc9 Throwing an exception if the class is not found
2017-04-27 10:37:41 -04:00
Ryan Weaver
e85bcc9e8d Throwing an exception if the class is not found 2017-04-27 10:37:33 -04:00
insekticid
b2b4faa3c0 Allow Upper Case property names in ObjectNormalizer
| Q                | A
| ---------------- | -----
| Bug report?      | yes
| Feature request? | no
| BC Break report? | yes
| RFC?             | no
| Symfony version  | 2.8.19

Same problem that has been fixed here https://github.com/symfony/symfony/pull/22265
and here https://github.com/api-platform/core/pull/1037

ObjectNormalizer returns $id instead of $Id. It is bad naming convention, but is possible

```php
class Entity {
    protected $Id;

    public function getId()
    {
        return $this->Id;
    }
}
```
2017-04-27 14:34:21 +02:00
Fabien Potencier
8974b52ec8 bug #22546 [FrameworkBundle] Remove deprecated session listener from class compiliation (ro0NL)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Remove deprecated session listener from class compiliation

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22533
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Continuation of #22535 :)

cc @chalasr

Commits
-------

dc375794a5 [FrameworkBundle] Remove deprecated session listener from class compilation
2017-04-27 07:26:45 -04:00
Roland Franssen
dc375794a5 [FrameworkBundle] Remove deprecated session listener from class compilation 2017-04-27 12:05:49 +02:00
Christophe Coevoet
af4703f6f2 minor #22544 Fix misprint. (Aliance)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Fix misprint.

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

Copied from https://github.com/symfony/dotenv/pull/2

Commits
-------

2fa1628743 Fix misprint.
2017-04-27 10:31:53 +02:00
Lesnykh Ilia
2fa1628743
Fix misprint. 2017-04-27 10:47:28 +03:00
Fabien Potencier
b11822640a bug #22481 [FrameworkBundle] Restore 3.2-like behavior for FormPass, to help BC with Sonata (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Restore 3.2-like behavior for FormPass, to help BC with Sonata

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

I tried updating a Sonata project to 3.3, and found it broken.
The issue is that Sonata uses the constructor arguments of the `form.extension` to create its own `form.extension` service - but borrows its first args from the Symfony one.

Here is the form pass doing that:
https://github.com/sonata-project/SonataCoreBundle/blob/3.x/DependencyInjection/Compiler/FormFactoryCompilerPass.php
And the implementation of the form extension:
https://github.com/sonata-project/SonataCoreBundle/blob/3.x/DependencyInjection/SonataCoreExtension.php

Question: is this covered by the BC policy? It shouldn't to me, because that would prevent *any* service reconfiguration.

Thus, I'm proposing the attached patch, which basically reverts the deprecated `FormPass` in FrameworkBundle to its 3.2 state.

I added a check to the new `FormPass` in the Form component so that it doesn't overwrite such compatibility configurations.

See for corresponding fix on https://github.com/sonata-project/SonataCoreBundle/pull/399

Commits
-------

c97b08e6c0 [FrameworkBundle] Restore 3.2-like behavior for FormPass, to help BC with Sonata
2017-04-26 13:20:29 -04:00
Fabien Potencier
0257013308 minor #22475 [SecurityBundle] Enhance FirewallContext::getListeners() (ro0NL)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[SecurityBundle] Enhance FirewallContext::getListeners()

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20417#discussion_r91704023, https://github.com/symfony/symfony/pull/20417#discussion_r91704145
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

I think @stof is right.. and the fact we can do this on master currently without the hassle.

cc @chalasr

Commits
-------

ba650783f5 [SecurityBundle] Enhance FirewallContext::getListeners()
2017-04-26 13:18:04 -04:00
Fabien Potencier
e9e4c79894 bug #22541 [EventDispatcher] fix: unwrap listeners for correct info (dmaicher)
This PR was merged into the 2.8 branch.

Discussion
----------

[EventDispatcher] fix: unwrap listeners for correct info

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | related to https://github.com/symfony/symfony/issues/22520
| License       | MIT
| Doc PR        | -

Fixes problem where listeners were displayed as `Symfony\Component\EventDispatcher\Debug\WrappedListener::__invoke() ` in the profiler. It now shows the correct callable.

Commits
-------

d8c5869b7c [EventDispatcher] fix: unwrap listeners for correct info
2017-04-26 13:16:31 -04:00
David Maicher
d8c5869b7c [EventDispatcher] fix: unwrap listeners for correct info 2017-04-26 18:56:54 +02:00
Nicolas Grekas
0085a07acb Merge branch '3.2'
* 3.2:
  [Asset] Fix invalid assets.xml
  Preventing the base path or absolute URL from being prefixed incorrectly on an absolute URL
2017-04-26 10:23:43 -04:00
Nicolas Grekas
eb1e27737e Merge branch '2.8' into 3.2
* 2.8:
  [Asset] Fix invalid assets.xml
  Preventing the base path or absolute URL from being prefixed incorrectly on an absolute URL
2017-04-26 10:23:18 -04:00
Nicolas Grekas
1bee0adef1 Merge branch '2.7' into 2.8
* 2.7:
  Preventing the base path or absolute URL from being prefixed incorrectly on an absolute URL
2017-04-26 10:23:06 -04:00
Fabien Potencier
13e97da2cf bug #22535 [FrameworkBundle] Do not extend @final SessionListener internally (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Do not extend @final SessionListener internally

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

Revert the deprecated SessionListener class body instead of extending the new one which is `@final`, avoiding the following deprecations from the debug class loader:

> User Deprecated: The Symfony\Bundle\FrameworkBundle\EventListener\SessionListener class is deprecated since version 3.3 and will be removed in 4.0. Use Symfony\Component\HttpKernel\EventListener\SessionListener instead.

> User Deprecated: The Symfony\Component\HttpKernel\EventListener\SessionListener class is considered final since version 3.3. It may change without further notice as of its next major version. You should not extend it from Symfony\Bundle\FrameworkBundle\EventListener\SessionListener.

spotted in #22533

Commits
-------

cf6110225f Do not extend @final SessionListener internally
2017-04-26 10:10:12 -04:00
Maxime Steinhausser
10a76aac15 [Serializer] Allow to pass csv encoder options in context 2017-04-26 16:04:52 +02:00
Fabien Potencier
345b8c287a minor #22529 [Asset] Fix invalid assets.xml (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Asset] Fix invalid assets.xml

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

Fixes invalid xml definitions.

Commits
-------

de1b20ac58 [Asset] Fix invalid assets.xml
2017-04-26 08:53:26 -04:00
Fabien Potencier
fc1fe8decf bug #22526 [Asset] Preventing the base path or absolute URL from being prefixed incorrectly (weaverryan)
This PR was merged into the 2.7 branch.

Discussion
----------

[Asset] Preventing the base path or absolute URL from being prefixed incorrectly

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

Fixes an edge case (which I need) where the version strategy returns an absolute URL. Currently, if this happens, the baseUrl or basePath is prefixed - giving `https://baseurl.com/https://pathreturnedfromversioning.com` or `/basePath/https://pathreturnedfromversioning.com`.

I don't see any reason to prevent an absolute URL from being returned by the version strategy. And it's not a BC break, because the previous paths that were returned were nonsense.

Cheers!

Commits
-------

746c91eea4 Preventing the base path or absolute URL from being prefixed incorrectly on an absolute URL
2017-04-26 08:47:35 -04:00
Robin Chalas
cf6110225f Do not extend @final SessionListener internally 2017-04-26 14:32:32 +02:00
Nicolas Grekas
de1b20ac58 [Asset] Fix invalid assets.xml 2017-04-25 21:58:43 -04:00
Nicolas Grekas
8701cae777 Merge branch '3.2'
* 3.2:
  Fixed the flickering when loading complex profiler panels
  [Console] Fix bar width with multilines ProgressBar's format
  [DI] Add missing check in PhpDumper
  [Serializer] XmlEncoder: fix negative int and large numbers handling
  [Console] Fix dispatching throwables from ConsoleEvents::COMMAND
2017-04-25 21:46:15 -04:00
Nicolas Grekas
8a8d92d793 Merge branch '2.8' into 3.2
* 2.8:
  Fixed the flickering when loading complex profiler panels
  [DI] Add missing check in PhpDumper
  [Serializer] XmlEncoder: fix negative int and large numbers handling
  [Console] Fix dispatching throwables from ConsoleEvents::COMMAND
2017-04-25 21:39:17 -04:00
Nicolas Grekas
3adff11d72 Merge branch '2.7' into 2.8
* 2.7:
  [DI] Add missing check in PhpDumper
  [Serializer] XmlEncoder: fix negative int and large numbers handling
  [Console] Fix dispatching throwables from ConsoleEvents::COMMAND
2017-04-25 21:38:53 -04:00
Fabien Potencier
00a33dd360 feature #22441 [Console] Review console.ERROR related behavior (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Console] Review console.ERROR related behavior

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

This PR is a follow up of #18140 that I wanted to do since a few weeks.
It enhances this work with fixes and behavior changes.
It embeds #22435 and resolves issues like the one described in #20808.

- makes ConsoleErrorEvent *not* extend the deprecated ConsoleExceptionEvent
- replace ConsoleErrorEvent::markErrorAsHandled by ConsoleErrorEvent::setExitCode
- triggers the deprecation in a more appropriate moment
- renames ExceptionListener to ErrorListener
- tweaks the behavior in relation to  #22435

Commits
-------

a7c67c9ab2 [Console] Review console.ERROR related behavior
2017-04-25 21:33:28 -04:00
Ryan Weaver
746c91eea4 Preventing the base path or absolute URL from being prefixed incorrectly on an absolute URL
If the version strategy returns an absolute URL, that should be the final URL.
2017-04-25 21:08:25 -04:00
Fabien Potencier
76dd7b0ed6 bug #22523 [WebProfilerBundle] Fixed the flickering when loading complex profiler panels (javiereguiluz)
This PR was merged into the 2.8 branch.

Discussion
----------

[WebProfilerBundle] Fixed the flickering when loading complex profiler panels

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

When profiler panels are complex (usually, when they contain a lot of VarDumper calls) they take some time to load and this results in a ugly flickering of the sidebar. This PR fixes this problem adding some minor CSS changes and reordering some HTML elements in the layout.

These changes shouldn't affect the design in any way but please, test it in your own browsers. Thanks!

| Before | After
| --- | ---
| ![profiler-before](https://cloud.githubusercontent.com/assets/73419/25390425/c7ebb16e-29d3-11e7-9d3f-722d5b24b95a.gif) | ![profiler-after](https://cloud.githubusercontent.com/assets/73419/25390426/c80994ea-29d3-11e7-910c-7a2564b17ffa.gif)

Commits
-------

e9132b3445 Fixed the flickering when loading complex profiler panels
2017-04-25 13:47:11 -04:00
Nicolas Grekas
d696b391a1 bug #22465 [Cache] Keep only hit/miss (not values) in TraceableAdapter/Cache (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Cache] Keep only hit/miss (not values) in TraceableAdapter/Cache

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

Right now, TraceableAdapter and TraceableCache both keep all fetched values.
This exhaustive reporting is too much data gathering to me.
Here is a PR that keeps only true/false for each hit/miss + all corresponding keys.
That can still be a lot of data (one item per fetched key) - but a bit better.
Should we go further in stats-only gathering? Or should we *not* do this and keep collecting *all* the values?
The PR also fixes "Traversable" handling.

ping @Nyholm

The profiler panel still works (although breaking lines in the middle of words is strange, but this is the profiler's CSS, nothing special to this specific case).

![capture du 2017-04-19 11-40-13](https://cloud.githubusercontent.com/assets/243674/25173586/f9615dd6-24f4-11e7-8d6f-36fb2437c3b6.png)

Commits
-------

0c73c5d [Cache] Keep only hit/miss (not values) in TraceableAdapter/Cache
2017-04-25 13:35:31 -04:00
Nicolas Grekas
97747808b2 minor #22498 [DI] Add missing check in PhpDumper (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Add missing check in PhpDumper

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

5cabf88 [DI] Add missing check in PhpDumper
2017-04-25 11:08:04 -04:00
Javier Eguiluz
e9132b3445 Fixed the flickering when loading complex profiler panels 2017-04-25 16:22:01 +02:00
Nicolas Grekas
a7c67c9ab2 [Console] Review console.ERROR related behavior 2017-04-25 10:16:45 -04:00
Fabien Potencier
2145f56920 bug #21958 [Console] Fix bar width with multilines ProgressBar's format (maidmaid)
This PR was squashed before being merged into the 3.2 branch (closes #21958).

Discussion
----------

[Console] Fix bar width with multilines ProgressBar's format

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

The bar width is badly recalculated when we use multilines (``\n``) and bar placeholer (``%bar%``) in ProgressBar's format. The bar width is reduced because multilines is considered as a big oneline. This PR fixes this.

Commits
-------

3d58ab5bad [Console] Fix bar width with multilines ProgressBar's format
2017-04-25 10:15:10 -04:00
Dany Maillard
3d58ab5bad [Console] Fix bar width with multilines ProgressBar's format 2017-04-25 10:15:09 -04:00
Fabien Potencier
81f48b80f3 bug #22435 [Console] Fix dispatching throwables from ConsoleEvents::COMMAND (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix dispatching throwables from ConsoleEvents::COMMAND

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

Exceptions thrown by `ConsoleEvents::COMMAND` listeners should be trigger `ConsoleEvents::EXCEPTION` events.
(best reviewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/22435/files?w=1))

Commits
-------

6d6b04ae97 [Console] Fix dispatching throwables from ConsoleEvents::COMMAND
2017-04-25 10:03:21 -04:00
Fabien Potencier
b9ee33fd03 bug #22457 [DI] Allow service subscribers to leverage autowiring to know where their locator should be injected (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Allow service subscribers to leverage autowiring to know where their locator should be injected

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

Commits
-------

e407b3d42e [DI] Allow service subscribers to leverage autowiring to know where the locator should be injected
2017-04-25 09:50:48 -04:00
Fabien Potencier
63dca040e6 bug #22487 [Process] Fix BC break: "exec" should remain an internal "detail" (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Process] Fix BC break: "exec" should remain an internal "detail"

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

Commits
-------

eedcece20b [Process] Fix BC break: "exec" should remain an internal "detail"
2017-04-25 09:44:56 -04:00
Nicolas Grekas
60c51d9775 minor #22507 Fix Framework UPGRADE notice about trusted proxies (sstok)
This PR was squashed before being merged into the 3.3-dev branch (closes #22507).

Discussion
----------

Fix Framework UPGRADE notice about trusted proxies

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

The `framework.trusted_proxies` configuration is not really removed (it gives an error) but that's only to help with the upgrade process. So I think mentioning it's removed is enough.

Commits
-------

ae94d01 Fix Framework UPGRADE notice about trusted proxies
2017-04-25 09:36:18 -04:00
Sebastiaan Stok
ae94d019c1 Fix Framework UPGRADE notice about trusted proxies 2017-04-25 09:36:16 -04:00
Fabien Potencier
11ac234bb7 bug #22500 [DotEnv] Don't override existing $_SERVER vars (Pierstoval, javiereguiluz)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DotEnv] Don't override existing $_SERVER vars

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

As of #22493 I decided to make a PR in order to add a specific test just for this behavior and make sure we never touch `$_SERVER` predefined variables.

Commits
-------

e5758317b1 Update a test value for consistency
0a95d89ed7 Minor changes to make tests more readable
3bf7e490b0 [DotEnv] Don't override existing $_SERVER vars
2017-04-25 09:21:28 -04:00
Alex Rock Ancelet
e5758317b1
Update a test value for consistency 2017-04-24 12:32:00 +02:00
Javier Eguiluz
0a95d89ed7
Minor changes to make tests more readable 2017-04-24 12:31:34 +02:00
Alex Rock Ancelet
3bf7e490b0
[DotEnv] Don't override existing $_SERVER vars 2017-04-24 12:31:34 +02:00
Lukas Kahwe Smith
045a36b303
add Request type json check in json_login 2017-04-24 08:23:15 +02:00
Fabien Potencier
3471b58318 bug #22496 [DI] Fix inlining conflict by restricting IteratorArgument to Reference[] (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Fix inlining conflict by restricting IteratorArgument to Reference[]

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

`Reference` found in `ArgumentInterface::getValue()` are currently not inlined.
While trying to do so (hint: I failed), I noticed that the current code is broken for `IteratorArgument` which can contain anonymous `Definition` for now, which are then not inlined correctly.

This PR restricts `IteratorArgument` to arrays of `Reference`, and improves a few related things found while doing it.

(fabbot failure is false positive)

Commits
-------

4d3dce1c0f [DI] Fix inlining conflict by restricting IteratorArgument to Reference[]
2017-04-23 15:36:34 -07:00
Fabien Potencier
93b7530f20 bug #22478 [Serializer] XmlEncoder: fix negative int and large numbers handling (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] XmlEncoder: fix negative int and large numbers handling

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see comment below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #22329, #22333 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

Alternative to #22333.

* Negative integers are now handled
* Float are now handled
* Large numbers are converted to float (as the `JsonEncoder` and native PHP functions like `ceil` do)

@vlastv, I've adapted your test. Can you check if it fixes your problem?

Commits
-------

1eeadb0c98 [Serializer] XmlEncoder: fix negative int and large numbers handling
2017-04-23 15:32:35 -07:00
Fabien Potencier
3d4b212a09 bug #22494 [Security] Fix json_login default success/failure handling (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Security] Fix json_login default success/failure handling

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

This makes the `json_login` listener default configuration stateless oriented by:

- Not using the default (redirect based) failure handler, it returns a 401 (json) response containing the failure reason instead
- Not using the default (redirect based) success handler, just let the original request continue instead (reaching the targeted resource without being redirected).
- Setting `require_previous_session` to `false` by default (I have to set it on `form-login` each time I want it to be stateless)
- Removing the options related to redirections (`default_target_path`, `login_path`, ...) from the listener factory, if one wants redirections then one has to write its own handlers, not the inverse

Commits
-------

9749618ff5 Fix json_login default success/failure handling
2017-04-23 15:21:45 -07:00
Fabien Potencier
dc924363fe bug #22491 Fixed the rendering of exceptions inside the profiler (javiereguiluz)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Fixed the rendering of exceptions inside the profiler

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

In #22448 we tried to reuse the same CSS styles as the new exception pages. But that's not enough because it doesn't look good:

![before](https://cloud.githubusercontent.com/assets/73419/25250100/a287b4bc-2614-11e7-88e7-e0ef89eac1ff.png)

---

This PR goes a bit further and tweaks the exception styles slightly to better integrate them. Same page as before:

![after_1](https://cloud.githubusercontent.com/assets/73419/25250131/b8d16cf4-2614-11e7-93b4-187248849103.png)

It should also work reasonably well when the exception message is very long:

![after_2](https://cloud.githubusercontent.com/assets/73419/25250144/c25eab38-2614-11e7-99e2-843548d12810.png)

Commits
-------

73d81de6d2 Fixed the rendering of exceptions inside the profiler
2017-04-21 18:44:26 -06:00
Nicolas Grekas
4d3dce1c0f [DI] Fix inlining conflict by restricting IteratorArgument to Reference[] 2017-04-21 14:38:43 +02:00
Nicolas Grekas
5cabf880d6 [DI] Add missing check in PhpDumper 2017-04-21 13:48:46 +02:00