Commit Graph

35594 Commits

Author SHA1 Message Date
Nicolas Grekas
716adf8641 [HttpKernel] Fix BC of the test suite 2018-02-22 11:30:42 +01:00
Nicolas Grekas
76aa86d773 CS fix 2018-02-22 11:06:54 +01:00
Nicolas Grekas
c9092d639c minor #26264 [HttpKernel] fix EventDispatcher component dependency (xabbuh)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[HttpKernel] fix EventDispatcher component dependency

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

Commits
-------

5af9ff1 fix EventDispatcher component dependency
2018-02-22 11:03:46 +01:00
Christian Flothmann
5af9ff1ec6 fix EventDispatcher component dependency 2018-02-22 09:57:41 +01:00
Nicolas Grekas
70c122b29d [Routing] Fix host vars extraction 2018-02-22 09:38:25 +01:00
Nicolas Grekas
8e207cda80 [Routing] Prevent some double match of hosts 2018-02-22 09:25:11 +01:00
Fabien Potencier
7b8934baba feature #25732 [Console] Add option to automatically run suggested command if there is only 1 alternative (pierredup)
This PR was squashed before being merged into the 4.1-dev branch (closes #25732).

Discussion
----------

[Console] Add option to automatically run suggested command if there is only 1 alternative

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

When mistyping a console command, you get an error giving suggested commands.
If there is only 1 alternative suggestion, this PR will give you the option to run that command instead. This makes it easier to run the correct command without having to re-type/copy-paste/update the previous run command

![console](https://user-images.githubusercontent.com/144858/34724377-4b46c726-f556-11e7-94a3-a9d7c9d75e74.gif)

Commits
-------

83d52f02f9 [Console] Add option to automatically run suggested command if there is only 1 alternative
2018-02-22 07:25:56 +01:00
Pierre du Plessis
83d52f02f9 [Console] Add option to automatically run suggested command if there is only 1 alternative 2018-02-22 07:25:54 +01:00
Fabien Potencier
cf045c05d2 bug #26253 [Routing] Fix suffix aggregation (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Routing] Fix suffix aggregation

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

Commits
-------

1466597bed [Routing] Fix suffix aggregation
2018-02-21 18:58:33 +01:00
Nicolas Grekas
1466597bed [Routing] Fix suffix aggregation 2018-02-21 18:15:56 +01:00
Fabien Potencier
6651087a98 feature #26085 Deprecate bundle:controller:action and service:method notation (Tobion)
This PR was squashed before being merged into the 4.1-dev branch (closes #26085).

Discussion
----------

Deprecate bundle:controller:action and service:method notation

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

The `a::b` notation had some awkward limitations. It supported `MyControllerClass::method` where `MyControllerClass` is either plain class or a service with the same name but the class must exists. This meant it did NOT support `my_service_controller_id::method` because the `class_exists` check would fail at the wrong point in time. But it did support services where class name == id, i.e. the new auto registration based psr naming. This made it very confusing.

I enhanced the `a::b` notation to be very straight forward:
- if `a` exists as a service then use `a` as a service
- otherwise try to use `a` as a class, i.e. `new $a()`
- otherwise check if a::b is a static method (only relevant when the class is abstract or has private contructor). this was potentially supported when using array controller syntax. it now works the same when using the `::` string syntax, like in php itself. since it only happens when nothing else works, it does not have any performance impact.

The old `a:b` syntax is deprecated and just forwards to `a::b` now internally, just as bundle:controller:action.
In general I was able to refactor the logic quite a bit because it always goes through `instantiateController` now.
Spotting deprecated usages is very easy as all outdated routing configs will trigger a deprecation with the DelegatingLoader and it will be normalized in the dumped routes. So you don't get a deprecation again in the ControllerResolver. But if the controller does not come from routing, e.g. twigs render controller function, then it will still be triggered there.

- [x] deprecate `a🅱️c`
- [x] deprecate `a:b`
- [x] update existing references to `a::b`
- [x] fix tests
- [x] fix/add support for static controllers
- [x] add support for closures as controllers
- [x] update Symfony\Component\Routing\Loader\ObjectRouteLoader
- [x] deprecate \Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser but we still need to use it in several places for BC.
- [x] add changelog/upgrade
- [x] update controller.service_arguments logic for double colon controller syntax

Commits
-------

f8a609cdbd Deprecate bundle:controller:action and service:method notation
2018-02-21 06:14:06 +01:00
Tobias Schultze
f8a609cdbd Deprecate bundle:controller:action and service:method notation 2018-02-21 06:14:04 +01:00
Fabien Potencier
2711d144b1 feature #26175 [Security] Add configuration for Argon2i encryption (CoalaJoe)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Security] Add configuration for Argon2i encryption

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

Feedback?

Current situation: Configuration only applies if argon2i is natively supported.

Commits
-------

1300fece5f [Security] Add configuration for Argon2i encryption
2018-02-20 21:36:26 +01:00
Fabien Potencier
a347f4646f feature #26075 [Validator] Deprecate use of Locale validation constraint without setting "canonicalize" option to true (phansys)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Validator] Deprecate use of `Locale` validation constraint without setting "canonicalize" option to `true`

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

See https://github.com/symfony/symfony/pull/22353#issuecomment-363671089.

Commits
-------

1572540a3a Deprecate use of `Locale` validation constraint without setting "canonicalize" option to `true`
2018-02-20 20:48:12 +01:00
Javier Spagnoletti
1572540a3a Deprecate use of Locale validation constraint without setting "canonicalize" option to true 2018-02-20 11:33:43 -03:00
Fabien Potencier
dac7357ba9 feature #26218 [MonologBridge] Allow to change level format in ConsoleFormatter (ostrolucky)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[MonologBridge] Allow to change level format in ConsoleFormatter

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

I want to use this format `%datetime% <comment>[%level_name%]</comment> %start_tag%%message%%end_tag%`, but ConsoleFormatter formats in a way message looks like this:

![screenshot from 2018-02-19 01-54-21](https://user-images.githubusercontent.com/496233/36359102-d6c20e4c-1517-11e8-9988-8a49efc4cacb.png)

As you see, unnecessary padding looks like anomaly here and there is currently no way to remove it without making own formatter.

This option allows me to replace default padding format with `%s`.

Commits
-------

fbd257c25d [MonologBridge] Allow to change level format
2018-02-20 13:39:01 +01:00
Ashura
1300fece5f [Security] Add configuration for Argon2i encryption 2018-02-20 13:01:36 +01:00
Fabien Potencier
e0bdc0c35e feature #26232 [Lock] Add a TTL to refresh lock (jderusse)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Lock] Add a TTL to refresh lock

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

Using remote locks in long processes needs to defines a fined grain refresh TTL. For instance, when looping over a long list of jobs we can extends the live of the lock by few seconds before processing each item.
But when the the jobs is splitted and each part to take the same time, we can not define the best TTL

Exemple
```
$lock->acquire();

$this->2minutesJob();

$lock->refresh();
$this->5minutesJob();

$lock->refresh();
$this->1minutesJob();
```

The purpose of this PR is to be able to override the default TTL

```
$lock->acquire();

$lock->refresh(120);
$this->2minutesJob();

$lock->refresh(300);
$this->5minutesJob();

$lock->refresh(60);
$this->1minutesJob();
```

Commits
-------

3b1f3286d8 Add a TTL to refresh lock
2018-02-19 21:30:42 +01:00
Fabien Potencier
3cb5619216 feature #26108 [Serializer] Add a MaxDepth handler (dunglas)
This PR was squashed before being merged into the 4.1-dev branch (closes #26108).

Discussion
----------

[Serializer] Add a MaxDepth handler

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- 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 | api-platform/core#1130, api-platform/core#1528, api-platform/core#1528 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | todo <!--highly recommended for new features-->

Sometimes, instead of just stopping the serialization process when the configured max depth is reached, it can be interesting to let the user return something (like returning the identifier of the entity to stop manually the serialization process).

This PR also makes the max depth handling more similar to circular references handling (that already has the possibility to set a handler).

Commits
-------

ed975c764b [Serializer] Add a MaxDepth handler
2018-02-19 21:26:23 +01:00
Kévin Dunglas
ed975c764b [Serializer] Add a MaxDepth handler 2018-02-19 21:26:22 +01:00
Fabien Potencier
43f8081d60 minor #26225 Make deprecation notices less verbose (fabpot)
This PR was merged into the 4.1-dev branch.

Discussion
----------

Make deprecation notices less verbose

| 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

I think there is no need to say that deprecated features will be removed in the next major version. That makes messages more verbose for no real reasons.

Commits
-------

0c6ec3fec0 made deprecation notices less verbose
2018-02-19 21:13:12 +01:00
Fabien Potencier
17d1054165 feature #24778 [BrowserKit] add a way to switch to ajax for one request (Simperfit)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[BrowserKit] add a way to switch to ajax for one request

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

Follow the work on #20306.

/cc @fabpot is it the right implementation ?

Commits
-------

a10eae7d9e [BrowserKit] add a way to switch to ajax for one request
2018-02-19 21:10:04 +01:00
Kévin Dunglas
74cea1d842
feature #25605 [PropertyInfo] Added support for extracting type from constructor (lyrixx)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[PropertyInfo] Added support for extracting type from constructor

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

Commits
-------

adcb25ec01 [PropertyInfo] Added support for extracting type from constructor
2018-02-19 20:25:10 +01:00
Grégoire Pineau
adcb25ec01 [PropertyInfo] Added support for extracting type from constructor 2018-02-19 18:05:30 +01:00
Nicolas Grekas
49759e3138 Merge branch '4.0'
* 4.0:
  [Bridge/Twig] fix composer.json
  bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider
  [WebProfilerBundle] Fix anchor CSS
  [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation
  [WebProfilerBundle] Tweak default route name
  updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7fb6a
  Retro-fit proxy code to make it deterministic for older proxy manager implementations
  [Serializer] remove unneeded php doc line
  Yaml parser regression with comments and non-strings
  Fixed broken tests
  [TwigBridge] Apply some changes to support Bootstrap4-stable
2018-02-19 17:51:42 +01:00
Nicolas Grekas
2871a96fa7 Merge branch '3.4' into 4.0
* 3.4:
  [Bridge/Twig] fix composer.json
  bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider
  [WebProfilerBundle] Fix anchor CSS
  [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation
  [WebProfilerBundle] Tweak default route name
  updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7fb6a
  Retro-fit proxy code to make it deterministic for older proxy manager implementations
  Yaml parser regression with comments and non-strings
  Fix undiscoverablility of SymfonyTestsListenerForV7
  Fixed broken tests
  [TwigBridge] Apply some changes to support Bootstrap4-stable
2018-02-19 17:50:22 +01:00
Nicolas Grekas
b9c071015b [Bridge/Twig] fix composer.json 2018-02-19 17:46:01 +01:00
Nicolas Grekas
0aedb03af6 bug #26088 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider (Laizerox)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider

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

The compilation pass of AddAnnotationsCachedReaderPass relies on already removed definition `annotations.cached_reader` due to an alias to `annotation_reader`.

Since the definition is being removed because of alias, configured annotation cache provider is not injected and will default back to ArrayCache.

This PR replaces the use of `annotations.cached_reader` to `annotation_reader` to complete the injection of configured cache provider.

Commits
-------

dfd93da bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider
2018-02-19 17:40:19 +01:00
Dmitri Petmanson
dfd93da236 bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider 2018-02-19 17:36:43 +01:00
Nicolas Grekas
b3c7ba715a bug #26157 [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation (rpkamp)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation

When we call `\Symfony\Component\HttpFoundation\Session\Session::invalidate` the session will be emptied and given a new ID, however, since it is empty this `AbstractTestSessionListener` will not send a new cookie to the user, so the user is not caught up to the latest session ID and will re-generate a session with the old session ID on a new visit.
Thus, we the sessionID has changed during a request we must always send a new cookie with the new sessionID, even though the session is empty.

This behaviour is also what is shown in production (non-test) mode.

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

Commits
-------

98f5d53 [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation
2018-02-19 17:33:13 +01:00
Nicolas Grekas
3ab3b44720 minor #26206 [Stopwatch] updated phpdoc due to the addition of optional float precision (lsmith77)
This PR was merged into the 3.4 branch.

Discussion
----------

[Stopwatch] updated phpdoc due to the addition of optional float precision

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

Commits
-------

8278a47 updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7fb6a
2018-02-19 17:28:57 +01:00
Nicolas Grekas
ba8a68f055 bug #26230 [WebProfilerBundle] Fix anchor CSS (ro0NL)
This PR was squashed before being merged into the 3.4 branch (closes #26230).

Discussion
----------

[WebProfilerBundle] Fix anchor CSS

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Empty source lines overlap in `/_profiler/open?file=x`. AFAIK it's a regression after #23296, but it's the first time i noticed so maybe it's related to a chrome change in between. No real CSS expert.. but this seems to fix it.

Before:
![image](https://user-images.githubusercontent.com/1047696/36377240-ba3f897a-1576-11e8-8660-8b04a6f7bd76.png)

After:
![image](https://user-images.githubusercontent.com/1047696/36377574-f99bd73a-1577-11e8-913c-d4287d5115a2.png)

I can confirm both chrome and firefox render as shown in the after screenshot. Firefox worked before as well, chrome not.

cc @ogizanagi

Commits
-------

ee45992 [WebProfilerBundle] Fix anchor CSS
2018-02-19 17:27:38 +01:00
Roland Franssen
ee4599284f [WebProfilerBundle] Fix anchor CSS 2018-02-19 17:27:36 +01:00
Amrouche Hamza
a10eae7d9e
[BrowserKit] add a way to switch to ajax for one request 2018-02-19 15:52:00 +01:00
Kévin Dunglas
136408937b
feature #24763 [Process] Allow writing portable "prepared" command lines (Simperfit)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Process] Allow writing portable "prepared" command lines

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #23778
| License       | MIT
| Doc PR        | symfony/symfony-docs#9295

This give the opportunity to create process commands that allow to changes only the values instead of changing the code.

Commits
-------

d1e4f489d1 [Process] Allow writing portable "prepared" command lines
2018-02-19 15:07:44 +01:00
Kévin Dunglas
e043478ba5
feature #25218 [Serializer] add a constructor arguement to return csv always as collection (Simperfit)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Serializer] add a constructor arguement to return csv always as collection

| Q             | A
| ------------- | ---
| Branch?       |  4.1
| 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 | #21616
| License       | MIT
| Doc PR        | TODO create a doc PR for the 3 ways of getting csv collection, or a single

Coding in the train again ;).
![img_9980](https://user-images.githubusercontent.com/3451634/33417042-f13063e4-d59f-11e7-8f30-143da768b1d7.JPG)

This is to be able to add a new behaviour to the csv encoder when passing the alwaysAsCollection context key, this will return a collection even if there is only one element.

Commits
-------

d19d05dc5d [Serializer] add a context key to return csv always as collection
2018-02-19 15:04:52 +01:00
Amrouche Hamza
d19d05dc5d
[Serializer] add a context key to return csv always as collection 2018-02-19 14:53:53 +01:00
Kévin Dunglas
81e19e8392
feature #25369 [Serializer] add a context key to return always as collection for XmlEncoder (Simperfit)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Serializer] add a context key to return always as collection for XmlEncoder

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

This PR add a new `as_collection` context key in order to return always as a collection instead of returning a single elements when there are only one array.

there are only one PR for the CsvEncoder don't wanted to have only One PR containing the two changes. It feel better to have two PR that fix the behaviour on two different things. it's easy to review and to revert if it break something (which should not since we are testing the behaviour).

Commits
-------

adb428d314 [Serializer] add a context key to return always as collection for XmlEncoder
2018-02-19 14:49:10 +01:00
Jérémy Derussé
3b1f3286d8
Add a TTL to refresh lock 2018-02-19 14:37:52 +01:00
Fabien Potencier
3303355dbf bug #26140 [Serializer] deserialize as a null when inner object cannot be created and type hint allows null (kbkk)
This PR was squashed before being merged into the 4.1-dev branch (closes #26140).

Discussion
----------

[Serializer] deserialize as a null when inner object cannot be created and type hint allows null

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

```php
class ObjectConstructorDummy
{
    protected $foo;
    public $bar;
    private $baz;

    public function __construct($foo, $bar, $baz)
    {
        $this->foo = $foo;
        $this->bar = $bar;
        $this->baz = $baz;
    }
}

class DummyWithNullableConstructorObject
{
    private $id;
    private $inner;

    public function __construct($id, ?ObjectConstructorDummy $inner)
    {
        $this->id = $id;
        $this->inner = $inner;
    }

    public function getId()
    {
        return $this->id;
    }

    public function getInner()
    {
        return $this->inner;
    }
}
```

Trying to deserialize to `DummyWithNullableConstructorObject` with the following data currently fails:
```php
[
    'id' => 10,
    'inner' => null
]
```

With this PR `DummyWithNullableConstructorObject ` would be constructed with `null` passed as `$inner` because of the type hint.

Commits
-------

2fe9eb1aba [Serializer] deserialize as a null when inner object cannot be created and type hint allows null
2018-02-19 13:37:48 +01:00
Jakub Kisielewski
2fe9eb1aba [Serializer] deserialize as a null when inner object cannot be created and type hint allows null 2018-02-19 13:37:46 +01:00
Fabien Potencier
0c6ec3fec0 made deprecation notices less verbose 2018-02-19 13:10:10 +01:00
Remon van de Kamp
98f5d5354e [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation 2018-02-19 11:31:59 +01:00
Amrouche Hamza
d1e4f489d1 [Process] Allow writing portable "prepared" command lines 2018-02-19 09:33:01 +01:00
Fabien Potencier
fcca141059 minor #26212 [WebProfilerBundle] Tweak default route name (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] Tweak default route name

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes-ish
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Use `n/a` instead of `NONE` which is consistent and less loud.

![image](https://user-images.githubusercontent.com/1047696/36351462-ae2da6ca-14aa-11e8-860c-6c583d721f3a.png)

Commits
-------

5c4566ca73 [WebProfilerBundle] Tweak default route name
2018-02-19 08:06:32 +01:00
Fabien Potencier
3aa59b6e51 feature #26213 [FrameworkBundle] Add support to 307/308 HTTP status codes in RedirectController (ZipoKing)
This PR was squashed before being merged into the 4.1-dev branch (closes #26213).

Discussion
----------

[FrameworkBundle] Add support to 307/308 HTTP status codes in RedirectController

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

With this PR `RedirectController` will allow to create redirections with use of 307/308 HTTP status codes together with 301/302. Related RFC documents:
* https://tools.ietf.org/html/rfc7231
* https://tools.ietf.org/html/rfc7538

Commits
-------

64fb5a5663 [FrameworkBundle] Add support to 307/308 HTTP status codes in RedirectController
2018-02-19 08:01:55 +01:00
Pawel Smolinski
64fb5a5663 [FrameworkBundle] Add support to 307/308 HTTP status codes in RedirectController 2018-02-19 08:01:54 +01:00
Fabien Potencier
b1f45b3909 bug #26208 [Routing] Fix same-prefix aggregation (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Routing] Fix same-prefix aggregation

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

The blog post on http://symfony.com/blog/new-in-symfony-4-1-fastest-php-router made me review the aggregation logic, and discover issues.

So now, instead of this:
```
        .'|/(en|fr)/admin/post/?(*:82)'
        .'|/(en|fr)/admin/post/new(*:166)'
        .'|/(en|fr)/admin/post/(\\d+)(*:253)'
        .'|/(en|fr)/admin/post/(\\d+)/edit(*:345)'
        .'|/(en|fr)/admin/post/(\\d+)/delete(*:442)'
        .'|/(en|fr)/blog/?(*:519)'
        .'|/(en|fr)/blog/rss\\.xml(*:603)'
        .'|/(en|fr)/blog/page/([^/]++)(*:694)'
        .'|/(en|fr)/blog/posts/([^/]++)(*:784)'
        .'|/(en|fr)/blog/comment/(\d+)/new(*:880)'
        .'|/(en|fr)/blog/search(*:962)'
        .'|/(en|fr)/login(*:1038)'
        .'|/(en|fr)/logout(*:1116)'
        .'|/(en|fr)?(*:1188)'
```

we generate this:
```
        .'|/(en|fr)(?'
            .'|/admin/post(?'
                .'|/?(*:34)'
                .'|/new(*:45)'
                .'|/(\\d+)(?'
                    .'|(*:61)'
                    .'|/edit(*:73)'
                    .'|/delete(*:87)'
                .')'
            .')'
            .'|/blog(?'
                .'|/?(*:106)'
                .'|/rss\\.xml(*:123)'
                .'|/p(?'
                    .'|age/([^/]++)(*:148)'
                    .'|osts/([^/]++)(*:169)'
                .')'
                .'|/comments/(\\d+)/new(*:197)'
                .'|/search(*:212)'
            .')'
            .'|/log(?'
                .'|in(*:230)'
                .'|out(*:241)'
            .')'
        .')'
        .'|/(en|fr)?(*:260)'
```

This is not only another perf fix, but a real bug fix, as I found ordering issues.

Commits
-------

d514f819dc [Routing] Fix same-prefix aggregation
2018-02-19 07:31:28 +01:00
Gabriel Ostrolucký
fbd257c25d
[MonologBridge] Allow to change level format
This is needed to allow to remove fixed padding of level name
2018-02-19 01:51:42 +01:00
Nicolas Grekas
838fefa2de minor #26195 [Serializer] remove unneeded php doc line (Simperfit)
This PR was merged into the 4.0 branch.

Discussion
----------

[Serializer] remove unneeded php doc line

| Q             | A
| ------------- | ---
| Branch?       | 4.0
| 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?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | not needed

This is just a little cleaning of the uneeded doc blocks.

Commits
-------

bbcaaef [Serializer] remove unneeded php doc line
2018-02-18 18:10:33 +01:00