Commit Graph

31329 Commits

Author SHA1 Message Date
Nicolas Grekas
d9bade0385 [VarExporter] add Instantiator::instantiate() to create+populate objects without calling their constructor nor any other methods 2018-09-18 17:22:26 +02:00
Nicolas Grekas
1f98703e14 bug #28469 [Form][TwigBridge] fix not displaying labels when value is false (xabbuh)
This PR was merged into the 4.1 branch.

Discussion
----------

[Form][TwigBridge] fix not displaying labels when value is false

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

Commits
-------

c4a6c9fa00 fix not displaying labels when value is false
2018-09-18 14:47:11 +02:00
Nicolas Grekas
02bbeb660f Merge branch '3.4' into 4.1
* 3.4:
  Think positive
  KernelInterface can return null container
  [DI] Detect circular references with ChildDefinition parent
  [VarDumper] Fix global dump function return value for PHP7
  [Ldap] Use shut up operator on connection errors at ldap_start_tls
  Implement startTest rather than startTestSuite
  [OptionsResolver] remove dead code and useless else
  [HttpFoundation] don't override StreamedResponse::setNotModified()
  Added relevent links for parsing to the phpdoc
  Add stricter checking for valid date time string
  Fix symfony/console (optional) dependency for MonologBridge
  [Form] Fix DateTimeType html5 input format
2018-09-18 14:45:12 +02:00
Nicolas Grekas
cdf86bb303 Merge branch '2.8' into 3.4
* 2.8:
  KernelInterface can return null container
  [Ldap] Use shut up operator on connection errors at ldap_start_tls
  [HttpFoundation] don't override StreamedResponse::setNotModified()
  Added relevent links for parsing to the phpdoc
  Add stricter checking for valid date time string
  [Form] Fix DateTimeType html5 input format
2018-09-18 14:35:56 +02:00
Nicolas Grekas
a6a6dc2c1d minor #28470 Fix symfony/console (optional) dependency for MonologBridge (mpdude)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix symfony/console (optional) dependency for MonologBridge

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

Since 278c26f589, `ConsoleHandler` tries to pass a verbosity level into `Output::write()`.

In order to make this work, the change 749fba54f9 is required which was first released in 2.8.0.

When using MonologBridge ^3.3 with a lower version of symfony/console than 2.8, an `InvalidArgumentException` with the message `Unknown output type given` will be thrown.

Not sure how to add a test for this... 🤷‍♂️

Commits
-------

d6f5d6bccd Fix symfony/console (optional) dependency for MonologBridge
2018-09-18 14:28:20 +02:00
Saša Stamenković
0b43738162 Think positive 2018-09-18 14:23:51 +02:00
Mponos George
7cb340a2db KernelInterface can return null container 2018-09-18 12:26:43 +02:00
Nicolas Grekas
e597dba77d bug #28495 [PhpUnitBridge] Implement startTest rather than startTestSuite (greg0ire)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Implement startTest rather than startTestSuite

Passing a TestSuite instance to CoverageListenerTrait::testStart() will
have no effect.

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Closes #28481

Commits
-------

63671d1633 Implement startTest rather than startTestSuite
2018-09-18 12:00:20 +02:00
Sébastien ALFAIATE
2a59c8e3e6 [DI] Detect circular references with ChildDefinition parent 2018-09-18 11:39:25 +02:00
Nicolas Grekas
7a19350fa8 bug #28497 [VarDumper] Fix global dump function return value for PHP7 (patrickcarlohickman)
This PR was squashed before being merged into the 3.4 branch (closes #28497).

Discussion
----------

[VarDumper] Fix global dump function return value for PHP7

Retarget of PR #28491. Reposting description below, with relevant updates.

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

In 3.4, the global `dump()` helper function in the VarDumper component was updated to return the arguments passed in to it. However, due to reusing the argument variable in the function, this introduces a bug in PHP7 in the return value of the function.

The variable used in the `foreach` loop overwrites the value passed in by the first argument. In PHP5, this is okay. In PHP7, even though the argument is passed by value, the value returned by `func_get_args()` is affected by changes to the arguments inside the function. This is a change from PHP5.

From the documentation for [`func_get_args()`](http://php.net/manual/en/function.func-get-args.php):

> If the arguments are passed by reference, any changes to the arguments will be reflected in the values returned by this function. As of PHP 7 the current values will also be returned if the arguments are passed by value.

This PR simply changes the name of the variable used in the `foreach` loop. It also adds a test file to test the return value of the global `dump()` function.

This is my first contribution to Symfony, so please let me know if the issue should be resolved in a different manner, or if the test should be modified in any way.

Thanks,
Patrick

Commits
-------

0def211b9b [VarDumper] Fix global dump function return value for PHP7
2018-09-18 10:06:14 +02:00
Patrick Carlo-Hickman
0def211b9b [VarDumper] Fix global dump function return value for PHP7 2018-09-18 10:05:59 +02:00
Andras Debreczeni
af54189dfc [Ldap] Use shut up operator on connection errors at ldap_start_tls 2018-09-18 09:27:02 +02:00
Fabien Potencier
a9004b3208 minor #28483 [HttpFoundation] don't override StreamedResponse::setNotModified() (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpFoundation] don't override StreamedResponse::setNotModified()

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

Alternative implementation to #27937, because `Response::setNotModified()` has been made final in 4.0 so we shouldn't override it.

Commits
-------

9ef7f7038d [HttpFoundation] don't override StreamedResponse::setNotModified()
2018-09-18 06:45:48 +02:00
Grégoire Paris
63671d1633
Implement startTest rather than startTestSuite
Passing a TestSuite instance to CoverageListenerTrait::testStart() will
have no effect.
2018-09-17 22:28:24 +02:00
Nicolas Grekas
440944f3c2 feature #28316 Trigger deprecation notices when inherited class calls parent method but misses adding new arguments (kevinjhappy)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Trigger deprecation notices when inherited class calls parent method but misses adding new arguments

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

This Pull Request concern severals components, the purpose here is to notify in dev mode that in a case of inherit class, a function will have a new or severals arguments in Symfony 5.0, therefore not implement it is deprecated since Symfony 4.2

The function is made by these conditions :
1- ```(func_num_args() < $x)``` where [x] is the number of arguments we will have in Symfony 5.0
  this check allow to verify that the arguments are missing
2- ```(__CLASS__ !== \get_class($this))```
  this check allow to verify that the name of the class is different than the base class, therefore that we are in the child class
3- ```(__CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName())```
  this check allow to verify that the class of the current function is different than the base class, therefore the function has been rewrote into the child class

Code exemple :
```
public function method(/* void $myNewArgument = null */)
{
	if ((func_num_args() < 1) && (__CLASS__ !== \get_class($this)) && (__CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName())){
            @trigger_error(sprintf('The "%s()" method will have one `void $myNewArgument = null` argument in version 5.0 and higher.Not defining it is deprecated since Symfony 4.2.', __METHOD__ ), E_USER_DEPRECATED);
    }
    // do something
}
```

The unit test are made by creating a child Class using for the tested function ```return parent::function()``` and by calling this child class and catching the expected depreciation message

Commits
-------

f75fffa997 Trigger deprecation notices when inherited class calls parent method but misses adding new arguments
2018-09-17 20:15:16 +02:00
Nicolas Grekas
8d90df7ff7 bug #28372 [Form] Fix DateTimeType html5 input format (franzwilding, mcfedr)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Fix DateTimeType html5 input format

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

Fix DateTimeType' HTML input format according to HTML specs. Currently `DateTimeType` produces html with format `yyyy-MM-dd'T'HH:mm:ssZ` but the HTML5 spec expects `yyyy-MM-dd'T'HH:mm:ss` (i.e. no `Z`). Chrome presents an empty date picker meaning edits or having a default date are broken.

Also the reverseTransform was expect to have a timezone attached, which it does not - and incorrectly marks it as being a UTC time in this case, instead of using the Transformers output TZ.

This is same as @franzwilding https://github.com/symfony/symfony/pull/27254 but with change to just straight use of `DateTime::format` and handling TZ in reverseTransform

Commits
-------

e21a1a4df1 Added relevent links for parsing to the phpdoc
4f06f1524d Add stricter checking for valid date time string
253d0a683b [Form] Fix DateTimeType html5 input format
2018-09-17 20:11:48 +02:00
Nicolas Grekas
48038fdeba bug #28456 [Cache][Contracts] We must save the item or the trait does not have any effect (Nyholm)
This PR was squashed before being merged into the 4.2-dev branch (closes #28456).

Discussion
----------

[Cache][Contracts] We must save the item or the trait does not have any effect

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

Using the trait must result in that items gets saved.

We could use `saveDeferred` instead, it might be a performance improvement but you also may have side-effects. Say you are using two cache pool objects for the same storage.

Example use of the trait:

```php
use Psr\Cache\CacheItemInterface;
use Psr\Cache\CacheItemPoolInterface;
use Symfony\Contracts\Cache\CacheInterface;
use Symfony\Contracts\Cache\GetForCacheItemPoolTrait;

class AcmeCache implements CacheInterface
{
    use GetForCacheItemPoolTrait;
    private $cache;

    public function __construct(CacheItemPoolInterface $cache)
    {
        $this->cache = $cache;
    }

    public function getItem(string $key): CacheItemInterface
    {
       return $this->cache->getItem($key);
    }

    public function save(CacheItemInterface $item): bool
    {
       return $this->cache->save($item);
    }
}

```

Commits
-------

06cd8dca8f [Cache][Contracts] We must save the item or the trait does not have any effect
2018-09-17 20:09:45 +02:00
Nyholm
06cd8dca8f [Cache][Contracts] We must save the item or the trait does not have any effect 2018-09-17 20:09:31 +02:00
Rudy Onfroy
0c1484b849 [OptionsResolver] remove dead code and useless else 2018-09-17 19:29:18 +02:00
Nicolas Grekas
2fb11fce28 [PhpUnitBridge] enable DebugClassLoader by default 2018-09-16 21:51:20 +02:00
Nicolas Grekas
9ef7f7038d [HttpFoundation] don't override StreamedResponse::setNotModified() 2018-09-16 21:50:20 +02:00
Nicolas Grekas
57c76a405b bug #28444 [VarDumper] fix dumping signature of callables (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarDumper] fix dumping signature of callables

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

Adds missing visual hint when returning by reference + makes exclude-verbose mode display only the signature.

E.g. using psysh, before:
![image](https://user-images.githubusercontent.com/243674/45360788-ebe0bf80-b5d0-11e8-8e43-62f954e926af.png)

after:
![image](https://user-images.githubusercontent.com/243674/45360760-d9668600-b5d0-11e8-820a-98cc174ba2ca.png)

(`dump -a` shows the details as usual.)

Commits
-------

16f2bd58d9 [VarDumper] fix dumping signature of callables
2018-09-16 21:17:45 +02:00
Robin Chalas
68c869ba8e Merge branch '4.1'
* 4.1:
  [FrameworkBundle] Don't register MessengerDataCollector if messenger is not enabled
  [Validator] Add Japanese translations
  [Console] Fix input values allowed types
2018-09-16 13:51:03 +02:00
Robin Chalas
3f1951af45 Merge branch '3.4' into 4.1
* 3.4:
  [Validator] Add Japanese translations
  [Console] Fix input values allowed types
2018-09-16 13:50:43 +02:00
Robin Chalas
5d75f14d7b Merge branch '2.8' into 3.4
* 2.8:
  [Validator] Add Japanese translations
  [Console] Fix input values allowed types
2018-09-16 13:50:16 +02:00
Fred Cox
e21a1a4df1 Added relevent links for parsing to the phpdoc 2018-09-15 14:33:50 +03:00
Fred Cox
4f06f1524d Add stricter checking for valid date time string 2018-09-15 14:25:16 +03:00
Robin Chalas
e64ceb5c13 [FrameworkBundle] Don't register MessengerDataCollector if messenger is not enabled 2018-09-15 12:55:03 +02:00
Robin Chalas
5b0801998d Merge branch '4.1'
* 4.1:
  [Console] Fix typo in tests
  [Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions
  [Console] fixed corrupt error output for unknown multibyte short option
  [Console] fixed PHPDoc for setArgument/setOption in InputInterface
  Register the messenger data collector only when the profiler is enabled
  [Intl] Blacklist Eurozone and United Nations in Region Data Generator
2018-09-15 12:26:24 +02:00
Robin Chalas
ddde83cdd9 Merge branch '3.4' into 4.1
* 3.4:
  [Console] Fix typo in tests
  [Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions
  [Console] fixed corrupt error output for unknown multibyte short option
  [Console] fixed PHPDoc for setArgument/setOption in InputInterface
  [Intl] Blacklist Eurozone and United Nations in Region Data Generator
2018-09-15 11:59:43 +02:00
Robin Chalas
d4cddac14d Merge branch '2.8' into 3.4
* 2.8:
  [Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions
  [Console] fixed corrupt error output for unknown multibyte short option
  [Console] fixed PHPDoc for setArgument/setOption in InputInterface
  [Intl] Blacklist Eurozone and United Nations in Region Data Generator
2018-09-15 11:59:15 +02:00
Issei.M
7d78e3672b [Validator] Add Japanese translations 2018-09-15 07:41:47 +02:00
Matthias Pigulla
d6f5d6bccd
Fix symfony/console (optional) dependency for MonologBridge
Since 278c26f589, `ConsoleHandler` tries to pass a verbosity level into `Output::write()`. 

In order to make this work, the change 749fba54f9 is required which was first released in 2.8.0.

When using MonologBridge ^3.3 with a lower version of symfony/console than 2.8, an `InvalidArgumentException` with the message `Unknown output type given` will be thrown.

Not sure how to add a test for this... 🤷‍♂️ :
2018-09-14 18:15:55 +02:00
Christian Flothmann
c4a6c9fa00 fix not displaying labels when value is false 2018-09-14 15:32:30 +02:00
Christian Flothmann
ee4ce43e91 fail reverse transforming invalid RFC 3339 dates 2018-09-14 13:46:25 +02:00
Christian Flothmann
5318e2eb15 forward the invalid_message option in date types 2018-09-14 09:49:37 +02:00
Samuel ROZE
c4415cfd67 Throw an exception when the serializer component is not loaded 2018-09-12 00:01:16 +02:00
Robin Chalas
839dc2693a feature #28373 [Console] Support max column width in Table (ro0NL)
This PR was squashed before being merged into the 4.2-dev branch (closes #28373).

Discussion
----------

[Console] Support max column width in Table

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

Continuation of #22225 to better preserve spaces (which preserves background colors), using `wordwrap` it caused some issues.

Also the wrapping was plain wrong by not taking the current line length into account.

While at it, it comes with `Table` integration :)

Given

```php
$table = new Table($output);
$table->setColumnMaxWidth(0, 2);
$table->setRow(0, ['pre <error>foo bar baz</error> post']);
$table->render();

$table = new Table($output);
$table->setColumnMaxWidth(0, 3);
$table->setRow(0, ['pre <error>foo bar baz</error> post']);
$table->render();

$table = new Table($output);
$table->setColumnMaxWidth(0, 4);
$table->setRow(0, ['pre <error>foo bar baz</error> post']);
$table->render();
```

![image](https://user-images.githubusercontent.com/1047696/45101516-f19b5880-b12b-11e8-825f-6a1d84f68f47.png)

Commits
-------

175f68f [Console] Support max column width in Table
2018-09-11 19:20:18 +02:00
Roland Franssen
175f68fe51 [Console] Support max column width in Table 2018-09-11 19:20:06 +02:00
Roland Franssen
01e491ec86
[Console] Fix typo in tests 2018-09-11 19:16:23 +02:00
Robin Chalas
0c16cd9fae [Console] Fix input values allowed types 2018-09-11 18:38:57 +02:00
Nicolas Grekas
16f2bd58d9 [VarDumper] fix dumping signature of callables 2018-09-11 14:57:52 +02:00
Nicolas Grekas
eb71aaf630 minor #28436 Remove all usages of call_user_func_array() (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Remove all usages of call_user_func_array()

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

Because it's cleaner :) (and it saves creating one extra dummy array)

Commits
-------

b2718d7666 Remove all usages of call_user_func_array()
2018-09-11 13:53:05 +02:00
Pavel Batanov
761415fc1b Add verbose ext-ldap error if present for easier debugging 2018-09-11 14:24:42 +03:00
Nicolas Grekas
443bd119b1 [VarExporter] fix more edge cases 2018-09-11 10:35:53 +02:00
Nicolas Grekas
b2718d7666 Remove all usages of call_user_func_array() 2018-09-11 09:53:26 +02:00
Robin Chalas
86a5d92ce7 minor #28409 [Console] Document what is validated before and after Command::initialize() (chalasr)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Document what is validated before and after Command::initialize()

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

Commits
-------

b1aff99 [Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions
2018-09-10 19:22:51 +02:00
Nicolas Grekas
444e7b9886 bug #28396 [Intl] Blacklist Eurozone and United Nations in Region Data Generator (gregurco)
This PR was merged into the 2.8 branch.

Discussion
----------

[Intl] Blacklist Eurozone and United Nations in Region Data Generator

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

Commits
-------

e2e4049721 [Intl] Blacklist Eurozone and United Nations in Region Data Generator
2018-09-10 18:51:10 +02:00
Nicolas Grekas
deae538245 feature #28422 [VarExporter] throw component-specific exceptions (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarExporter] throw component-specific exceptions

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

This makes "serializing/unserializing" with the component diverge a bit from native serialize/unserialize (wich can throw plain "Exception" instances), but I think we should still do it.

Commits
-------

2c444927bc [VarExporter] throw component-specific exceptions
2018-09-10 11:27:28 +02:00
Robin Chalas
b1aff9993c [Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions 2018-09-10 11:03:26 +02:00
Robin Chalas
0417d6caad bug #28393 [Console] fixed corrupt error output for unknown multibyte short option (downace)
This PR was squashed before being merged into the 2.8 branch (closes #28393).

Discussion
----------

[Console] fixed corrupt error output for unknown multibyte short option

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

[Console] Fixed #28320 by using mb_substr instead of index access
<!--
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
-------

0f86156 [Console] fixed corrupt error output for unknown multibyte short option
2018-09-10 10:47:57 +02:00
downace
0f861568aa [Console] fixed corrupt error output for unknown multibyte short option 2018-09-10 10:47:50 +02:00
Nicolas Grekas
2c444927bc [VarExporter] throw component-specific exceptions 2018-09-10 10:23:43 +02:00
Robin Chalas
744bf0e7ac [FrameworkBundle] Deprecate ContainerAwareCommand 2018-09-10 10:14:57 +02:00
Fabien Potencier
1c759a1719 minor #28374 [Console] fixed PHPDoc for setArgument/setOption in InputInterface (liarco)
This PR was squashed before being merged into the 2.8 branch (closes #28374).

Discussion
----------

[Console] fixed PHPDoc for setArgument/setOption in InputInterface

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

Methods now accept a value of any type except objects not implementing __toString().

**Example use case:** when using array arguments/options I can't set them programmatically without getting errors about type mismatch (from the IDE). With this patch it now works as expected.

Commits
-------

61529f3cd7 [Console] fixed PHPDoc for setArgument/setOption in InputInterface
2018-09-10 10:11:29 +02:00
Marco Lipparini
61529f3cd7 [Console] fixed PHPDoc for setArgument/setOption in InputInterface 2018-09-10 10:11:22 +02:00
Fabien Potencier
766a82bddf feature #28419 [Messenger] Change AmqpExt classes constructor signature (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Change AmqpExt classes constructor signature

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes
| 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
| License       | MIT
| Doc PR        | n/a

This pull requests does 2 things:

 * It makes `Connection` a first argument of AmqpExt classes. I think it makes sense as this is the most important argument for those classes.

 * As the `Serializer` is now a second argument, I propose to make it optional and use the default serializer that we've added recently if `null` (`Serializer::create()`)

It makes the component even more user friendly when not using Symfony full stack (and provide good defaults).

Commits
-------

2d55ae5212 [Messenger] changed AmqpExt classes constructor signature
2018-09-10 09:51:35 +02:00
Fabien Potencier
e5bb5e24bd removed usage of backticks in exception messages 2018-09-10 09:26:34 +02:00
Fabien Potencier
2d55ae5212 [Messenger] changed AmqpExt classes constructor signature 2018-09-10 08:21:34 +02:00
Pierre du Plessis
bd3a66bc59
Register the messenger data collector only when the profiler is enabled 2018-09-10 08:11:11 +02:00
Fabien Potencier
0cd1da66d7 feature #28405 [Messenger] Uses a messenger serializer, not an individual encoder/decoder (sroze)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Uses a messenger serializer, not an individual encoder/decoder

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

Makes the component-based even simpler.

**Before**
```php
        $encoderDecoder = Serializer::create();
        $middleware = [new SendMessageMiddleware(new SenderLocator([
            Message::class => new AmqpTransport($encoderDecoder, $encoderDecoder, $connection),
        ]))];
```

**After**
```php
       $middleware = [new SendMessageMiddleware(new SenderLocator([
            Message::class => new AmqpTransport(Serializer::create(), $connection),
        ]))];
```

Commits
-------

5b93f5f45e Uses a messenger serializer, not an individual encoder/decoder
2018-09-10 08:01:02 +02:00
Nicolas Grekas
2c428d130d [FrameworkBundle] bind "ContainerInterface $parameterBag" arguments to the "parameter_bag" service 2018-09-09 21:29:59 +02:00
kevin.nadin
f75fffa997 Trigger deprecation notices when inherited class calls parent method but misses adding new arguments 2018-09-09 20:06:02 +02:00
Nicolas Grekas
a5bf9b0445 [VarExporter] fix exporting final serializable classes extending internal ones 2018-09-09 17:25:49 +02:00
Vlad Gregurco
e2e4049721 [Intl] Blacklist Eurozone and United Nations in Region Data Generator 2018-09-09 13:16:33 +02:00
Samuel ROZE
5b93f5f45e Uses a messenger serializer, not an individual encoder/decoder 2018-09-09 11:28:13 +01:00
Nicolas Grekas
1a46605746 feature #28298 [WebServerBundle] Add support for Xdebug's Profiler (maidmaid)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[WebServerBundle] Add support for Xdebug's Profiler

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

> Xdebug's Profiler is a powerful tool that gives you the ability to analyze your PHP code and determine bottlenecks or generally see which parts of your code are slow and could use a speed boost.

https://xdebug.org/docs/profiler

When we run/start the web server, it would be useful to enable the trigger for the Xdebug's Profiler. That means we could easily trigger the creation of a Xdebug profile and analysing it [thanks to PhpStorm](https://www.jetbrains.com/help/phpstorm/analyzing-xdebug-profiling-data.html) which provides an **Execution Statistics** panel (examine the summary information about execution metrics of every called function) and a **Call Tree** panel (explore the execution paths of all called functions). You can see these two panels in action [here](https://youtu.be/_ua_O01IICg?t=1m22s) for a better understanding.

Commits
-------

0f4c0a6eaf Add support for Xdebug Profiler
2018-09-09 11:51:19 +02:00
Dany Maillard
0f4c0a6eaf Add support for Xdebug Profiler 2018-09-09 11:48:27 +02:00
Nicolas Grekas
d4e1cd9869 Merge branch '4.1'
* 4.1:
  [Debug] fix detecting overriden final/internal methods implemented using traits
  [Controller][ServiceValueResolver] Making method access case insensitive
2018-09-09 11:23:23 +02:00
Nicolas Grekas
92a22b02d3 Merge branch '3.4' into 4.1
* 3.4:
  [Debug] fix detecting overriden final/internal methods implemented using traits
  [Controller][ServiceValueResolver] Making method access case insensitive
2018-09-09 11:23:09 +02:00
Nicolas Grekas
90e79450d3 bug #28411 [Debug] fix detecting overriden final/internal methods implemented using traits (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] fix detecting overriden final/internal methods implemented using traits

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

Commits
-------

d638237f09 [Debug] fix detecting overriden final/internal methods implemented using traits
2018-09-09 11:20:33 +02:00
Nicolas Grekas
be05bbf4b7 bug #28404 [Controller][ServiceValueResolver] Making method access case insensitive (nicoweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Controller][ServiceValueResolver] Making method access case insensitive

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

Fix #28254 by making the method access insensitive in `ServiceValueResolver`.

Commits
-------

cc6f82769b [Controller][ServiceValueResolver] Making method access case insensitive
2018-09-09 11:18:43 +02:00
Nicolas Grekas
d638237f09 [Debug] fix detecting overriden final/internal methods implemented using traits 2018-09-09 11:07:24 +02:00
Robin Chalas
344b8cee42 Merge branch '4.1'
* 4.1:
  [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default
2018-09-08 21:04:21 +02:00
Robin Chalas
492eb5fe24 Merge branch '3.4' into 4.1
* 3.4:
  [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default
2018-09-08 21:04:07 +02:00
Robin Chalas
49992c5dfb Merge branch '2.8' into 3.4
* 2.8:
  [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default
2018-09-08 21:02:09 +02:00
Robin Chalas
d32d7685c2 bug #28401 [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default (chalasr)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default

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

There is an inconsistency between `SymfonyStyle::askQuestion(new ChoiceQuestion(...))` and `SymfonyStyle::choice(...)`, the former does not support to have a choice value as default instead of a choice key while the latter handles both.
This is causing an `undefined index` notice breaking interactive command testing, fixed here.

Commits
-------

c51dda0 [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default
2018-09-08 20:52:26 +02:00
Nicolas Grekas
4cf1ae4e07 [VarExporter] minor CS tweak 2018-09-08 20:19:57 +02:00
Nicolas Grekas
4a16b6ca65 [VarExporter] fix exporting instances of final classes that extend internal ones 2018-09-08 19:59:25 +02:00
nicoweb
cc6f82769b [Controller][ServiceValueResolver] Making method access case insensitive 2018-09-08 16:49:17 +02:00
Nicolas Grekas
004c315b0c Merge branch '4.1'
* 4.1:
  [DI] configure inlined services before injecting them when dumping the container
  Consistently throw exceptions on a single line
  fix fopen calls
  Update .editorconfig
2018-09-08 15:42:43 +02:00
Nicolas Grekas
6fec32c0d0 Merge branch '3.4' into 4.1
* 3.4:
  [DI] configure inlined services before injecting them when dumping the container
  Consistently throw exceptions on a single line
  fix fopen calls
  Update .editorconfig
2018-09-08 15:24:10 +02:00
Nicolas Grekas
8bc014c211 Merge branch '2.8' into 3.4
* 2.8:
  Consistently throw exceptions on a single line
  fix fopen calls
  Update .editorconfig
2018-09-08 15:15:14 +02:00
Samuel ROZE
d16277b560 Remove the experimental annotations 2018-09-08 14:04:14 +01:00
Nicolas Grekas
e5c54053c4 [DI] configure inlined services before injecting them when dumping the container 2018-09-08 14:51:51 +02:00
Nicolas Grekas
721dc8661f Consistently throw exceptions on a single line 2018-09-08 14:44:02 +02:00
Fabien Potencier
e980ce40e2 feature #28399 [Messenger] Add a SenderLocator decoupled from ContainerInterface (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Add a SenderLocator decoupled from ContainerInterface

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

For handler locators, we have a generic `HandlerLocator` class that takes a simple mapping instead of a service locator. The same did not exist for sender locators. So, this PR adds this possibility as well. That allows for something like this:

```php
new MessageBus([
    new SendMessageMiddleware(new SenderLocator([
        Message::class => new AmqpTransport($encoderDecoder, $encoderDecoder, $connection),
    ])),
    new HandleMessageMiddleware(new HandlerLocator([
        Message::class => new MessageHandler(),
    ])),
]);
```

Commits
-------

e658e155aa [Messenger] added a SenderLocator decoupled from ContainerInterface
2018-09-08 14:31:58 +02:00
Fabien Potencier
7bbe78bc72 minor #28402 [TwigBundle] Using Twig template name syntax in form_theme example (yceruto)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[TwigBundle] Using Twig template name syntax in form_theme example

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

Minor tweak to remove the `symfony/templating` syntax.

Commits
-------

ce653f274b Using Twig template name syntax in form_theme example
2018-09-08 14:27:18 +02:00
Fabien Potencier
e658e155aa [Messenger] added a SenderLocator decoupled from ContainerInterface 2018-09-08 14:26:08 +02:00
Fabien Potencier
cd39b51189 feature #27321 [Messenger][Profiler] Trace middleware execution (ogizanagi)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger][Profiler] Trace middleware execution

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- 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 | part of #27262   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

This is a start for #27262 with:
- traceable Messenger middlewares
- ~~a dedicated category for http kernel controller args resolvers~~ => See #28387

<img width="1071" alt="screenshot 2018-05-20 a 12 23 55" src="https://user-images.githubusercontent.com/2211145/40278071-98c04924-5c2a-11e8-9770-d78ac62d2c16.PNG">

Messenger middleware are traced, with bus info (if not shared accros buses):

<img width="1069" alt="screenshot 2018-05-20 a 12 28 15" src="https://user-images.githubusercontent.com/2211145/40278073-9e6979f4-5c2a-11e8-9657-ee3aa057a5be.PNG">

Another possibility is to use the middleware id instead of the class (with or without extra bus info?):

<img width="1074" alt="screenshot 2018-05-20 a 12 32 24" src="https://user-images.githubusercontent.com/2211145/40278074-9e85f43a-5c2a-11e8-9f13-ad41de342079.PNG">

(_of course, collected times are faked here using `usleep` in the traceable middleware_)

Commits
-------

e974f67b1f [Messenger][Profiler] Trace middleware execution
2018-09-08 14:24:37 +02:00
Fabien Potencier
f27c15a493 [Messenger] added a simple serializer 2018-09-08 14:14:59 +02:00
Yonel Ceruto
ce653f274b Using Twig template name syntax in form_theme example 2018-09-08 08:05:32 -04:00
Fabien Potencier
a480dc6a85 feature #28397 [Messenger] Change exceptions to use component's one (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Change exceptions to use component's one

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

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

4e0e5e5fdb [Messenger] changed exceptions to use component's one
2018-09-08 13:58:28 +02:00
Yonel Ceruto
83a75f4313 Caching missed templates on cache warmup 2018-09-08 07:39:36 -04:00
Robin Chalas
c51dda0fe1 [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default 2018-09-08 13:31:39 +02:00
Fabien Potencier
f6b4dc94d1 feature #28387 [HttpKernel][Profiler] Add arg value resolver category in performances panel (ogizanagi)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[HttpKernel][Profiler] Add arg value resolver category in performances panel

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- 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 | part of #27262   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Extracted from https://github.com/symfony/symfony/pull/27321

<img width="1071" alt="screenshot 2018-05-20 a 12 23 55" src="https://user-images.githubusercontent.com/2211145/40278071-98c04924-5c2a-11e8-9770-d78ac62d2c16.PNG">

Commits
-------

b24e0543e0 [HttpKernel][Profiler] Add arg value resolver category in performances panel
2018-09-08 09:28:50 +02:00
Roland Franssen
5454e6fc1d [Validator] Deprecate validating DateTimeInterface in Date|Time|DateTime constraints 2018-09-08 08:57:33 +02:00
Fabien Potencier
4e0e5e5fdb [Messenger] changed exceptions to use component's one 2018-09-08 08:36:06 +02:00
Maxime Steinhausser
e974f67b1f [Messenger][Profiler] Trace middleware execution 2018-09-08 06:30:21 +02:00
Fabien Potencier
963fde9fb1 [Messenger] added interfaces to be type-hinted even when not using a Container 2018-09-07 22:30:04 +02:00
Franz Wilding
253d0a683b [Form] Fix DateTimeType html5 input format 2018-09-07 16:52:44 +03:00
Nicolas Grekas
373dad371a bug #28371 [VarExporter] fix exporting objects that mutate on __sleep() (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarExporter] fix exporting objects that mutate on __sleep()

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

Commits
-------

36e412fdfc [VarExporter] fix exporting objects that mutate on __sleep()
2018-09-07 14:21:30 +02:00
Maxime Steinhausser
b24e0543e0 [HttpKernel][Profiler] Add arg value resolver category in performances panel 2018-09-07 12:37:30 +02:00
SpacePossum
6d155ed059 fix fopen calls 2018-09-06 19:11:15 +02:00
me_shaon
b9681fe83b Fix #28370: First time dump() method call not working issue 2018-09-06 23:01:56 +06:00
Nicolas Grekas
55def78682 [Finder] fix merge 2018-09-05 19:51:25 +02:00
Nicolas Grekas
36e412fdfc [VarExporter] fix exporting objects that mutate on __sleep() 2018-09-05 15:34:16 +02:00
Nicolas Grekas
e4d7c74845 Merge branch '4.1'
* 4.1:
  [appveyor] fix
  [DI] Fix dumping some complex service graphs
  Revert "minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)"
  Fixed caching of templates in default path on cache warmup
  added missing LICENSE file
  remove cache warmers when Twig cache is disabled
  [Workflow] Make sure we do not run the next transition on an updated state
  change baseUrl to basePath to fix wrong profiler url
  [HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients
  chore: rename Appveyor filename
  Fixed the interface description of the url generator interface
  Format file size in validation message according to binaryFormat option
2018-09-05 14:00:05 +02:00
Nicolas Grekas
432487f577 Merge branch '3.4' into 4.1
* 3.4:
  [appveyor] fix
  Revert "minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)"
  Fixed caching of templates in default path on cache warmup
  remove cache warmers when Twig cache is disabled
  [HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients
  chore: rename Appveyor filename
  Fixed the interface description of the url generator interface
  Format file size in validation message according to binaryFormat option
2018-09-05 13:58:22 +02:00
Nicolas Grekas
5632dc7c7a Merge branch '2.8' into 3.4
* 2.8:
  [appveyor] fix
  Revert "minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)"
  remove cache warmers when Twig cache is disabled
  [HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients
  chore: rename Appveyor filename
  Fixed the interface description of the url generator interface
  Format file size in validation message according to binaryFormat option
2018-09-05 13:56:21 +02:00
Nicolas Grekas
545c360453 [FrameworkBundle] fix test when intl is disabled 2018-09-05 11:38:07 +02:00
Nicolas Grekas
5557e38e2d [PropertyInfo] fix BC break in PropertyInfoPass 2018-09-05 11:02:25 +02:00
Fabien Potencier
0bd1f7538e minor #28367 [DI] Forward Container::reset() to services implementing ResetInterface (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[DI] Forward Container::reset() to services implementing ResetInterface

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

Should help the garbage collector during tests.

Commits
-------

5d26ba1fd6 [DI] Forward Container::reset() to services implementing ResetInterface
2018-09-05 10:58:51 +02:00
Fabien Potencier
14fa58e215 minor #28359 [Dotenv] use array instead of variadic in Dotenv::doLoad() (fmata)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Dotenv] use array instead of variadic in Dotenv::doLoad()

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

According to comments done after merge in #26859.

Commits
-------

f3af2421f4 [Dotenv] use array instead of variadic in Dotenv::doLoad()
2018-09-05 10:57:29 +02:00
Nicolas Grekas
5d26ba1fd6 [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
Fabien Potencier
eaeb124093 bug #27764 [TwigBundle] Fixed caching of templates in default path on cache warmup (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBundle] Fixed caching of templates in default path on cache warmup

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

**Reproducer**
```bash
$ git clone https://github.com/symfony/demo && cd demo
$ bin/console cache:clear
$ find var/cache/dev/twig -printf "%y\n" | awk '/f/{f++}/d/{d++}END{printf "%d directories, %d files\n", d, f}'
...
```
**Before:**
```bash
...
131 directories, 167 files
```
Twig `paths` config:
44ce4dd625/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php (L104)
`%kernel.root_dir%/Resources/views`:
2b01d59481/src/Symfony/Bundle/TwigBundle/TemplateIterator.php (L50)
**After:**
```bash
...
141 directories, 193 files
```
Adding `%twig.default_path%`.

Commits
-------

245c860ab4 Fixed caching of templates in default path on cache warmup
2018-09-05 10:48:23 +02:00
Fabien Potencier
e54dd4e600 feature #27981 [TwigBridge] Added template "name" argument to debug:twig command to find their paths (yceruto)
This PR was squashed before being merged into the 4.2-dev branch (closes #27981).

Discussion
----------

[TwigBridge] Added template "name" argument to debug:twig command to find their paths

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

Find the template file (to load by Twig) from a given template name (useful to know which file will be loaded exactly and which ones don't):
![debug-twig-loader-overridden](https://user-images.githubusercontent.com/2028198/42849959-81a8c49a-89f3-11e8-8d93-21581fe606a9.png)
This will also show the overridden files if they exist and the paths corresponding to their namespace.

In addition, the command suggests alternatives if you made a typo (this way you can check your template name quickly):

| namespace typo | template name typo |
| --- | --- |
| ![debug-twig-loader-ns-typo-alt](https://user-images.githubusercontent.com/2028198/42850624-81803e3c-89f6-11e8-8a92-11f09c99d13c.png) | ![debug-twig-loader-typo-alt](https://user-images.githubusercontent.com/2028198/42850644-99571238-89f6-11e8-9cf7-ed9b880f3d81.png) |

<details>
<summary><strong>Other outputs</strong></summary>

Discovering more alternatives:
![debug-twig-loader-not-found-many-alt](https://user-images.githubusercontent.com/2028198/42850815-82a30eb0-89f7-11e8-8d23-530f8ff325bc.png)

Unknown template name:
![debug-twig-loader-not-found](https://user-images.githubusercontent.com/2028198/42850882-d647aad0-89f7-11e8-9735-94149895437f.png)
</details>

## Update
The feature was introduced into `debug:twig` command and the `filter` argument was converted to `--filter` option. The `name` argument is now the first one of the command.

Commits
-------

7ef3d39a4c [TwigBridge] Added template \"name\" argument to debug:twig command to find their paths
2018-09-05 10:33:33 +02:00
Yonel Ceruto
7ef3d39a4c [TwigBridge] Added template \"name\" argument to debug:twig command to find their paths 2018-09-05 10:33:27 +02:00
Fabien Potencier
4ad01a95af feature #28207 [DI] leverage Contracts\Service (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[DI] leverage Contracts\Service

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

Embedding #28206 for now.
This deprecates some generic interfaces from the DI component in favor of the similar ones proposed for `Contracts\Service`.

Commits
-------

87392ab30d [DI] leverage Contracts\Service
2018-09-05 10:20:06 +02:00
Nicolas Grekas
cba6421b2b Merge branch '3.4' into 4.1
* 3.4:
  [DI] Fix dumping some complex service graphs
  change baseUrl to basePath to fix wrong profiler url
2018-09-05 09:26:50 +02:00
Nicolas Grekas
769fd4be0e [DI] Fix dumping some complex service graphs 2018-09-05 08:48:52 +02:00
Fabien Potencier
90494c20cc Revert "minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)"
This reverts commit 487f8acde5, reversing
changes made to cf359c2e79.
2018-09-05 07:00:57 +02:00
Robin Chalas
c3fd60df2c feature #22225 [Console] Support formatted text cutting (ro0NL)
This PR was squashed before being merged into the 4.2-dev branch (closes #22225).

Discussion
----------

[Console] Support formatted text cutting

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| 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-->

allows cutting a formatted text to a certain width. Actually needed if we want to support max. column widths in tables (see #22156)

```php
$text = 'pre <error>foo bar baz</error> post';
dump('BEFORE');
$output->writeln(wordwrap($output->getFormatter()->format($text), 3, "\n", true), OutputInterface::OUTPUT_RAW);
dump('AFTER');
$output->writeln($output->getFormatter()->format($text, 3), OutputInterface::OUTPUT_RAW);
```
![image](https://cloud.githubusercontent.com/assets/1047696/24519346/19c9b0ca-1585-11e7-8437-0bcfb6fab63e.png)

Commits
-------

09f8ad9 [Console] Support formatted text cutting
2018-09-04 22:10:18 +02:00
Roland Franssen
09f8ad935d [Console] Support formatted text cutting 2018-09-04 22:10:01 +02:00
Fabien Potencier
a159638233 bug #27970 [FileValidator] Format file size in validation message according to binaryFormat option (jfredon)
This PR was merged into the 2.8 branch.

Discussion
----------

[FileValidator] Format file size in validation message according to binaryFormat option

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

The binaryFormat option of the constraint is not taken into account if the maxsize limit is defined by the php configuration files.
This patch correct this inconsistent behavior.

If the binaryOption is not set, the unit of measurement used remains in binary because it’s the unit used in php configuration files.

Commits
-------

0edbbd3fea Format file size in validation message according to binaryFormat option
2018-09-04 19:17:48 +02:00
Nicolas Grekas
87392ab30d [DI] leverage Contracts\Service 2018-09-04 19:12:10 +02:00
Fabien Potencier
25ca59d5e7 feature #28206 [Contracts] Add traits+interfaces from the DI component (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Contracts] Add traits+interfaces from the DI component

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

  * added `Service\ServiceSubscriberInterface` to declare the dependencies of a class that consumes a service locator
 * added `Service\ServiceSubscriberTrait` to implement `Service\ServiceSubscriberInterface` using methods' return types
 * added `Service\ServiceLocatorTrait` to help implement PSR-11 service locators

Commits
-------

675abdcfee [Contracts] Add traits+interfaces from the DI component
2018-09-04 19:05:44 +02:00
Fabien Potencier
7c394e3daa minor #28307 Mark ExceptionInterfaces throwable #2 (ostrolucky)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Mark ExceptionInterfaces throwable #2

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

This has been reverted in beta of 4.1 because of lack of support in prophecy, which has been fixed since then (incl. release). Can be merged again.

References:
https://github.com/symfony/symfony/pull/26702
https://github.com/symfony/symfony/pull/27420
https://github.com/symfony/symfony/issues/27419
https://github.com/phpspec/prophecy/pull/412

ping @dunglas @ciaranmcnulty @dkarlovi @Wirone @teohhanhui @stof @nicolas-grekas @ondrejmirtes

Commits
-------

17c3675226 Mark ExceptionInterfaces throwable
2018-09-04 18:55:13 +02:00
Fabien Potencier
b5d4eafa54 fixed CS 2018-09-04 18:54:09 +02:00
Fabien Potencier
78ecaf381d feature #27456 [LOCK] Add a PdoStore (jderusse)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[LOCK] Add a PdoStore

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

This is an alternative to #25578

Commits
-------

46fe1b0712 Add a PdoStore in lock
2018-09-04 18:52:43 +02:00
Yonel Ceruto
245c860ab4 Fixed caching of templates in default path on cache warmup 2018-09-04 12:49:36 -04:00
Ilija Tovilo
524bc4b039 Feature/doctrine type guesser simple json array support 2018-09-04 18:48:51 +02:00
Florent Mata
f3af2421f4 [Dotenv] use array instead of variadic in Dotenv::doLoad() 2018-09-04 17:52:49 +02:00
Fabien Potencier
8f5229f768 feature #26859 [Dotenv] add a flag to allow env vars override (fmata)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Dotenv] add a flag to allow env vars override

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

I choose to use a new parameter in the constructor instead of `populate()` to not add boilerplate code to them who want allow overriding in their current setup. It's just a parameter to add in `Dotenv` creation instead of change or customize the loading of different .env files.

I targeted 4.1 despite the feature freeze because it's a small change but if you don't agree I can change to 4.2.

~~If you accept this PR I will do the doc PR then.~~
doc ready

Commits
-------

228b220495 [Dotenv] add Dotenv::overload() to allow env vars override
2018-09-04 17:26:33 +02:00
Fabien Potencier
4401f2f63b feature #26997 [PropertyInfo] Add an extractor to guess if a property is initializable (dunglas)
This PR was squashed before being merged into the 4.2-dev branch (closes #26997).

Discussion
----------

[PropertyInfo] Add an extractor to guess if a property is initializable

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| 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        | todo

When dealing with value objects, being able to detect if a property can be initialized using the constructor is a very valuable information. It's mandatory to add a proper value object support in API Platform and in the Serializer component.

See api-platform/core#1749 and api-platform/core#1843 for the related discussions, extended use cases and proof of concepts.

This PR adds a new interface to guess if a property can be initialized through the constructor, and an implementation using the reflection (in `ReflectionExtractor`).

Commits
-------

9d2ab9e348 [PropertyInfo] Add an extractor to guess if a property is initializable
2018-09-04 17:17:59 +02:00
Kévin Dunglas
9d2ab9e348 [PropertyInfo] Add an extractor to guess if a property is initializable 2018-09-04 17:17:49 +02:00
Fabien Potencier
bc419fa4c8 feature #27667 [Form][OptionsResolver] Show deprecated options definition on debug:form command (yceruto)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Form][OptionsResolver] Show deprecated options definition on debug:form command

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

Next move after https://github.com/symfony/symfony/pull/27277.

It will look like this:

Use `--show-deprecated` option to show form types with deprecated options (example):
![debug_types_with_deprecated_options](https://user-images.githubusercontent.com/2028198/41823977-970c7c98-77d6-11e8-9e97-30dcedc316ac.png)

Use `--show-deprecated` option to show deprecated options of the given form type (example):
![debug_deprecated_options_from_type](https://user-images.githubusercontent.com/2028198/41823980-a4d6bd8e-77d6-11e8-95ed-39926ffd6235.png)

Deprecated option (example):
![debug_deprecated_option_text](https://user-images.githubusercontent.com/2028198/41689091-04e6b7dc-74bd-11e8-87d0-90729eac4bb3.png)

![debug_deprecated_option_json](https://user-images.githubusercontent.com/2028198/41689105-142b5c5c-74bd-11e8-9232-1f30237bcf69.png)

Commits
-------

87c209d741 Show deprecated options definition on debug:form command
2018-09-04 17:16:00 +02:00
Yonel Ceruto
87c209d741 Show deprecated options definition on debug:form command 2018-09-04 09:37:57 -04:00
Kévin Dunglas
57fe0178c4 [Serializer] Allow to access extra infos in name converters 2018-09-04 15:36:54 +02:00
Christophe Coevoet
150bd841a3 minor #28356 Add missing LICENSE file (fabpot)
This PR was merged into the 4.1 branch.

Discussion
----------

Add missing LICENSE file

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| 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 | #28353
| 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
-------

6484ef8258 added missing LICENSE file
2018-09-04 15:15:54 +02:00
Fabien Potencier
6484ef8258 added missing LICENSE file 2018-09-04 15:11:50 +02:00
Fabien Potencier
9ad492f312 feature #26923 [FrameworkBundle] Allow user to specify folder for flock (MaksSlesarenko)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] Allow user to specify folder for flock

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

In case multiple applications running on same server allow user to specify folder for flock
example:
```

framework:
   lock:` 'flock://var/flock' # var/flock will be provided as path to flock constructor
   lock: 'flock:///var/flock' # /var/flock will be provided as path to flock constructor
   lock: flock # works as usual, null is provided to constructor and system temp folder is used

```

Commits
-------

244d762400 added ability to specify folder for flock
2018-09-04 12:23:36 +02:00
Fabien Potencier
a37bca4417 feature #25125 [VarDumper] New env var to select the dump format (dunglas)
This PR was squashed before being merged into the 4.2-dev branch (closes #25125).

Discussion
----------

[VarDumper] New env var to select the dump format

| 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 | n/a
| License       | MIT
| Doc PR        | todo

This PR introduces a new environment variable that can be used to force `dump()` to generate HTML even in CLI, or CLI even in a web context.
It allows to dump large objects when debugging a command, to open the resulting HTML in a browser, and to benefit of the nice JS UI (folded by default, search engine...).

Example usage:

    VAR_DUMPER_FORMAT=html vendor/bin/behat > tmp.html; open -a firefox tmp.html
    VAR_DUMPER_FORMAT=cli vendor/bin/behat > tmp.txt

Commits
-------

536125ac3c [VarDumper] New env var to select the dump format
2018-09-04 11:14:51 +02:00
Kévin Dunglas
536125ac3c [VarDumper] New env var to select the dump format 2018-09-04 11:11:07 +02:00
Christian Flothmann
ef1f7ff0bb remove cache warmers when Twig cache is disabled 2018-09-04 10:49:33 +02:00
Fabien Potencier
617c56bf27 fixed CS 2018-09-04 10:45:51 +02:00
Fabien Potencier
8cf28e65b2 feature #28117 [FrameworkBundle] add class description to debug:container command (gimler)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] add class description to debug:container command

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

Our developer finds it useful when the `console debug:container <service>` command print out the class description.

![bildschirmfoto vom 2018-08-02 14-22-17](https://user-images.githubusercontent.com/200904/43583449-d4bf74e4-965f-11e8-8e88-0db8017c5a90.png)

* [x] json
* [x] txt
* [x] xml
* [x] md

Commits
-------

5fc6155225 [FrameworkBundle] add class description to debug:container command
2018-09-04 10:44:47 +02:00
Fabien Potencier
5a63f19bad feature #28270 [Messenger] Uses Symfony Serializer by default for envelope items (sroze)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Uses Symfony Serializer by default for envelope items

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

The original approach was to use `serialize`/`unserialize` for envelope items. It turns out it has limitations (see #28247) and reduces the compatibility with 3rd party systems (see #28164). This pull-request changes the existing mechanism by using Symfony Serializer by default.

It keeps the `serialize`/`unserialize` mechanism to allow users of the experimental component to keep using it in 4.2 and allow to have a non-disruptive upgrade to 4.2.

Commits
-------

9b575ab263 Uses Symfony Serializer by default for envelope items
2018-09-04 10:43:45 +02:00
Fabien Potencier
b91effa619 feature #27935 [FrameworkBundle] [Command] TranslationUpdate change default output to xlf (Alexis BOYER)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] [Command] TranslationUpdate change default output to xlf

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

Simple modification on the default output for the translation: update command to XLIFF (xlf)
It's to be in agreement with the documentation

![image](https://user-images.githubusercontent.com/2004449/42637935-a91dcabc-85ec-11e8-86db-9c8bea5e710b.png)

Link to the documentation :
https://symfony.com/doc/master/translation.html#translation-resource-file-names-and-locations

Commits
-------

137593ec80 [FrameworkBundle] Cmd TranslationUpdate change default output to xlf
2018-09-04 10:41:38 +02:00
Fabien Potencier
a27288a598 fixed CS 2018-09-04 10:29:18 +02:00
Fabien Potencier
7be3bb2d8f feature #28168 Add SameSite cookies to FrameWorkBundle (rpkamp)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Add SameSite cookies to FrameWorkBundle

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes, and added to changelog https://github.com/symfony/symfony/pull/28168/files#diff-276f5b13978c2ce3f555b9603f44801aR21
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27631
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/10202

Uses `session.cookie_samesite` for PHP >= 7.3. For PHP < 7.3 it first
does a session_start(), find the emitted header, changes it, and emits
it again with the value for SameSite added.

I also tried it in a minimal Symfony 4.1 app, and works there too:

![screenshot from 2018-08-08 21-39-10](https://user-images.githubusercontent.com/1059790/43864708-b7437978-9b60-11e8-81dd-b41f1a5afb52.png)

Commits
-------

4091feb693 Add SameSite cookies to FrameWorkBundle
2018-09-04 10:27:39 +02:00
Samuel ROZE
9b575ab263 Uses Symfony Serializer by default for envelope items 2018-09-04 09:24:55 +01:00
Fabien Potencier
2738d00e32 feature #28303 [Process] Add relative path support for PHP_BINARY env var of PhpExecutableFinder (maidmaid)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Process] Add relative path support for PHP_BINARY env var of PhpExecutableFinder

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

At the moment, only the absolute path for PHP_BINARY env var works, for instance :

```
$ PHP_BINARY=/usr/bin/php7.2 php bin/console server:run
[OK] Server listening on http://127.0.0.1:8000

$ PHP_BINARY=php7.2 php bin/console server:run
[ERROR] Unable to find the PHP binary.
```

This PR makes possible the second command.

Commits
-------

52ed9889af Add relative path support for PHP_BINARY env var of PhpExecutableFinder
2018-09-04 10:22:54 +02:00
Fabien Potencier
824dbbdd8f bug #28322 [Workflow] Make sure we do not run the next transition on an updated state (Nyholm)
This PR was squashed before being merged into the 4.1 branch (closes #28322).

Discussion
----------

[Workflow] Make sure we do not run the next transition on an updated state

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

When you have a workflow like this, where all transitions are named the same.

![php](https://user-images.githubusercontent.com/1275206/44908106-87914680-ad1a-11e8-9c6f-e58de4b255e8.png)

The current behavior on `$stateMachine->apply($object, 'next')` is that it will go to "done".

It will do this because it checks the current "froms" at each iteration in the loop in `apply()`. It should check the valid transition before it actually apply them.

Commits
-------

d9dda76d8a [Workflow] Make sure we do not run the next transition on an updated state
2018-09-04 10:20:17 +02:00
Nyholm
d9dda76d8a [Workflow] Make sure we do not run the next transition on an updated state 2018-09-04 10:20:06 +02:00
Nicolas Grekas
675abdcfee [Contracts] Add traits+interfaces from the DI component 2018-09-04 10:20:02 +02:00
Fabien Potencier
487f8acde5 minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)
This PR was merged into the 2.8 branch.

Discussion
----------

[Routing] Fixed the interface description of the url generator interface

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

The `UrlGenerator` has always been able to return `null`. Many tests assert this for many years but the interface actually always only allowed a `string` return.

Examples for tests:

- https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php#L206
- https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php#L217
- https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php#L471

So I think I would not consider this change as a BC break but rather a doc fix because it seems like `null` has always been an accepted return value.

Commits
-------

d2e9e0bcf3 Fixed the interface description of the url generator interface
2018-09-04 10:17:45 +02:00
Fabien Potencier
cf359c2e79 bug #28344 [HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients

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

Commits
-------

255455430a [HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients
2018-09-04 10:15:22 +02:00
Nicolas Grekas
0a1220fd96 [Cache] leverage Contracts\Cache 2018-09-04 09:24:06 +02:00
Fabien Potencier
09786044c4 feature #28096 [Contracts] Add Cache contract to extend PSR-6 with tag invalidation, callback-based computation and stampede protection (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Contracts] Add Cache contract to extend PSR-6 with tag invalidation, callback-based computation and stampede protection

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

Let's separate the useful interfaces of the Cache component in Contracts.
This does not include `PruneableInterface`, `MarshallerInterface` nor `*AdapterInterface` because they are too specific to the component.

But `CacheInterface`, `TawAwareCacheInterface` and `ItemInterface` form a nice consistent set of features on top of PSR-6.

Updating the Cache component to use these interfaces will be done in a separate PR so that we can focus on the contract itself here.

Commits
-------

ca6478bbbb [Contracts] Add Cache contract to extend PSR-6 with tag invalidation, callback-based computation and stampede protection
2018-09-04 09:22:33 +02:00
Smaine Milianni
897615ee0d change baseUrl to basePath to fix wrong profiler url 2018-09-04 09:18:01 +02:00
Nicolas Grekas
ca6478bbbb [Contracts] Add Cache contract to extend PSR-6 with tag invalidation, callback-based computation and stampede protection 2018-09-04 09:16:03 +02:00
Fabien Potencier
baad3321f4 feature #27399 [Translation] Added intl message formatter. (aitboudad, Nyholm)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Translation] Added intl message formatter.

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

This PR will replace #20007 and continue the work from the original author.

I've have tried to address all comments made in the original PR.

Commits
-------

2a90931e52 cs
fb30c77659 Be more specific with what exception we catch
b1aa0047fd Only use the default translator if intl extension is loaded
f88153fa22 Updates according to feedback
597a15d7f7 Use FallbackFormatter instead of support for multiple formatters
2aa7181e15 Fixes according to feedback
a325a443ed Allow config for different domain specific formatters
b43fe21997 Add support for multiple formatters
c2b3dc0a90 [Translation] Added intl message formatter.
19e8e69979 use error
940d440e87 Make it a warning
2018-09-04 09:03:37 +02:00
Tobias Nyholm
2a90931e52
cs 2018-09-04 08:58:25 +02:00
Tobias Nyholm
fb30c77659
Be more specific with what exception we catch 2018-09-04 08:42:35 +02:00
Fabien Potencier
68a910f528 feature #28315 [DI] Trigger exception when using '@id' name in parent option (Seb33300)
This PR was squashed before being merged into the 4.2-dev branch (closes #28315).

Discussion
----------

[DI] Trigger exception when using '@id' name in parent option

Same exception [already triggered](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php#L505) on the `decorates` option.

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

Note sure if I should submit this change for master or previous branches...

Commits
-------

1f67db626e [DI] Trigger exception when using '@id' name in parent option
2018-09-04 08:40:05 +02:00
Sébastien ALFAIATE
1f67db626e [DI] Trigger exception when using '@id' name in parent option 2018-09-04 08:39:56 +02:00
Nicolas Grekas
255455430a [HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients 2018-09-04 08:39:37 +02:00
Fabien Potencier
cabbf51af4 minor #28295 [VarExporter] optimize dumped code in time and space (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarExporter] optimize dumped code in time and space

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

Let's squeeze some more µs when running exported code.
On a simple case run 100k times with a few objects, I go from 1.8s to 1.5s.
The generated exports are also a bit smaller if it matters.

This works by:
- using local variables instead of manually dealing with a stack
- creating more optimized object hydrators for internal classes

This PR also fixes handling of hard references that are bound to external variables.

Commits
-------

07e90d71d8 [VarExporter] optimize dumped code in time and space
2018-09-04 08:34:59 +02:00
Fabien Potencier
a82b2a78c6 Merge branch '4.1'
* 4.1:
  fixed usage of setUp in tests
  fixed usage of setUp in tests
  fixed usage of setUp in tests
  [travis] minor fix (quater)
2018-09-04 08:30:07 +02:00
Fabien Potencier
1c3d3db496 minor #28349 Fix usage of setUp in tests (4.1) (fabpot)
This PR was merged into the 4.1 branch.

Discussion
----------

Fix usage of setUp in tests (4.1)

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| 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 -->
| License       | MIT

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

d8ba2cd703 fixed usage of setUp in tests
2018-09-04 08:29:30 +02:00
Fabien Potencier
525c98b224 Merge branch '3.4' into 4.1
* 3.4:
  fixed usage of setUp in tests
  fixed usage of setUp in tests
  [travis] minor fix (quater)
2018-09-04 08:28:44 +02:00
Fabien Potencier
9a97ea819a minor #28348 Fix usage of setUp in tests (3.4) (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix usage of setUp in tests (3.4)

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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 -->
| License       | MIT

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

298782841c fixed usage of setUp in tests
2018-09-04 08:28:11 +02:00
Fabien Potencier
fcc31cb6dd Merge branch '2.8' into 3.4
* 2.8:
  fixed usage of setUp in tests
  [travis] minor fix (quater)
2018-09-04 08:27:33 +02:00
Fabien Potencier
d8ba2cd703 fixed usage of setUp in tests 2018-09-04 08:24:48 +02:00
Fabien Potencier
298782841c fixed usage of setUp in tests 2018-09-04 08:21:44 +02:00
Nyholm
b1aa0047fd Only use the default translator if intl extension is loaded 2018-09-04 07:44:12 +02:00
Fabien Potencier
62e620843e fixed usage of setUp in tests 2018-09-04 07:42:16 +02:00
Nyholm
f88153fa22 Updates according to feedback 2018-09-04 07:36:39 +02:00
Nyholm
597a15d7f7 Use FallbackFormatter instead of support for multiple formatters 2018-09-04 00:13:52 +02:00
Nyholm
2aa7181e15 Fixes according to feedback 2018-09-04 00:13:51 +02:00
Nyholm
a325a443ed Allow config for different domain specific formatters 2018-09-04 00:13:51 +02:00
Nyholm
b43fe21997 Add support for multiple formatters 2018-09-03 23:02:48 +02:00
Abdellatif Ait boudad
c2b3dc0a90 [Translation] Added intl message formatter. 2018-09-03 23:02:14 +02:00
Nyholm
19e8e69979 use error 2018-09-03 23:02:14 +02:00
Nyholm
940d440e87 Make it a warning 2018-09-03 23:02:14 +02:00
Fabien Potencier
59fad59886 feature #28210 [Contracts] Add Translation\TranslatorInterface + decouple symfony/validator from symfony/translation (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Contracts] Add Translation\TranslatorInterface + decouple symfony/validator from symfony/translation

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

Let's decouple Validator from Translation component \o/!

TODO:
- [x] add `TranslatorInterface`, deprecate it from Translation
- [x] add `TranslatorTrait`, deprecating `MessageSelector`, `Internal` and `PluralizationRules`
- [x] deprecate `ValidatorBuilderInterface(LegacyTranslatorInterface)`
- [x] inject a new `identity_translator` into `translator.formatter.default`, deprecate `translator.selector`
- [x] copy tests in the Contracts namespace to ensure the `TranslatorTrait` behaves properly
- [x] figure out a way to keep throwing `InvalidArgumentException` from the component
- [x] update UPGRADING and CHANGELOG files
- [x] polish the deprecation layer (ensure all needed runtime deprecations are here)

Reviews welcome already.

Commits
-------

064e369e06 [Contracts] Add Translation\TranslatorInterface + decouple symfony/validator from symfony/translation
2018-09-03 22:20:47 +02:00
Fabien Potencier
19e5218c0b feature #28331 [FrameworkBundle] Don't populate fallback cache on warmup (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] Don't populate fallback cache on warmup

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

Since we populate the front PhpArrayCache, there is no need to also populate its fallback pool, since it will never be hit for the warmed up values.
This saves creating a myriad of small cache files and some MB.

Commits
-------

c857ba5ded [FrameworkBundle] Don't populate fallback cache on warmup
2018-09-03 22:16:15 +02:00
Nicolas Grekas
064e369e06 [Contracts] Add Translation\TranslatorInterface + decouple symfony/validator from symfony/translation 2018-09-03 15:19:33 +02:00
Nicolas Grekas
07e90d71d8 [VarExporter] optimize dumped code in time and space 2018-09-03 11:21:37 +02:00
Nicolas Grekas
428c25f73b Merge branch '4.1'
* 4.1:
  Fix appveyor
2018-09-03 10:43:47 +02:00
Nicolas Grekas
95e6052074 Merge branch '3.4' into 4.1
* 3.4:
  Fix appveyor
2018-09-03 10:41:44 +02:00
Nicolas Grekas
7a4d7b5f10 Merge branch '2.8' into 3.4
* 2.8:
  Fix appveyor
2018-09-03 10:40:31 +02:00
Nicolas Grekas
599de83b33 Fix appveyor 2018-09-03 10:32:25 +02:00
Samuel ROZE
6b8e6ce73a Merge branch '4.1'
* 4.1:
  Use the real image URL for the filesystem tests
  [Finder] Update PHPdoc append()
  [DI] Fix phpdoc
  Fix code examples in PHPDoc
  [HttpKernel] Fix inheritdocs
  bumped Symfony version to 3.4.16
  updated VERSION for 3.4.15
  updated CHANGELOG for 3.4.15
2018-09-02 18:48:09 +01:00
Samuel ROZE
e2107d24e2 Merge branch '3.4' into 4.1
* 3.4:
  Use the real image URL for the filesystem tests
  [Finder] Update PHPdoc append()
  [DI] Fix phpdoc
  Fix code examples in PHPDoc
  [HttpKernel] Fix inheritdocs
  bumped Symfony version to 3.4.16
  updated VERSION for 3.4.15
  updated CHANGELOG for 3.4.15
2018-09-02 18:33:37 +01:00
Nicolas Grekas
aa13bfdde0 Merge branch '2.8' into 3.4
* 2.8:
  Use the real image URL for the filesystem tests
  [Finder] Update PHPdoc append()
  [DI] Fix phpdoc
  Fix code examples in PHPDoc
  [HttpKernel] Fix inheritdocs
2018-09-02 19:11:59 +02:00
Samuel ROZE
886f7390b8 Use the real image URL for the filesystem tests 2018-09-02 18:03:13 +01:00
Samuel ROZE
ba6248546a Ensure the tests and implementation matches the merged #28190 PR 2018-09-02 17:36:27 +01:00
Samuel ROZE
1ba2d57bf5 Merge branch '4.1'
* 4.1:
  FrameworkBundle 4.1 == Messenger 4.1
  Revert "Move commands-specifics to a compiler pass in FWB"
2018-09-02 17:22:25 +01:00
Samuel ROZE
aaada7bf55 FrameworkBundle 4.1 == Messenger 4.1 2018-09-02 16:47:21 +01:00
Samuel ROZE
fb3f729d64 Revert "Move commands-specifics to a compiler pass in FWB"
This reverts commit b5415ead46.
2018-09-02 16:06:12 +01:00
Florent Mata
228b220495 [Dotenv] add Dotenv::overload() to allow env vars override 2018-09-02 11:15:13 +02:00
Nicolas Grekas
c5904be45d [ProxyManager] fix tests 2018-09-02 06:58:46 +02:00
Samuel ROZE
604c68999e Fix typo in the method name 2018-09-01 19:21:31 +01:00
Samuel ROZE
08be233ca5 Remove the consume command tweaks as they are now done by the compiler pass in FWB 2018-09-01 19:17:50 +01:00
Samuel ROZE
37920e1499 Change the moved pass to match the expected arguments 2018-09-01 18:54:58 +01:00
Samuel ROZE
3833f8816d Merge branch '4.1'
* 4.1:
  Move commands-specifics to a compiler pass in FWB
  bumped Symfony version to 4.1.5
  updated VERSION for 4.1.4
  updated CHANGELOG for 4.1.4
  [travis] disable symfony/flex during phpunit install
2018-09-01 18:54:47 +01:00
Samuel ROZE
b5415ead46 Move commands-specifics to a compiler pass in FWB 2018-09-01 18:39:06 +01:00
Nicolas Grekas
3d5629a6cf [ProxyManager] fix tests 2018-09-01 19:22:02 +02:00
Nicolas Grekas
29b81f6e68 [VarDumper] fix CS 2018-09-01 18:47:25 +02:00
Nicolas Grekas
c857ba5ded [FrameworkBundle] Don't populate fallback cache on warmup 2018-09-01 18:33:14 +02:00
Nicolas Grekas
bc45a0ed82 feature #28264 [VarDumper] make RedisCaster handle RedisCluster and dump all options on all drivers (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarDumper] make RedisCaster handle RedisCluster and dump all options on all drivers

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

e.g.

<img src="https://user-images.githubusercontent.com/243674/44622234-0e769700-a8b5-11e8-8235-f42dadcd2092.png" width="300"/>

Commits
-------

466d1ab328 [VarDumper] make RedisCaster handle RedisCluster and dump all options on all drivers
2018-08-31 13:04:13 +02:00
Nicolas Grekas
c3ec061fd0 minor #28269 [Cache] improve perf when using RedisCluster by reducing roundtrips to the servers (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Cache] improve perf when using RedisCluster by reducing roundtrips to the servers

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

Improves perf when using RedisCluster by:
- disabling versioning and replacing by per-master clear/flush
- grouping multiple "get" in one "mget"
- enabling pipelining in PredisCluster mode

~Might need adjustment depending on the answer to https://github.com/nrk/predis/issues/520~

Commits
-------

5155f48029 [Cache] improve perf when using RedisCluster by reducing roundtrips to the servers
2018-08-31 10:58:45 +02:00
Yanick Witschi
d2e9e0bcf3 Fixed the interface description of the url generator interface 2018-08-31 10:56:24 +02:00
Nicolas Grekas
5155f48029 [Cache] improve perf when using RedisCluster by reducing roundtrips to the servers 2018-08-31 10:53:30 +02:00
Fabien Potencier
501212b934 feature #28289 [Serializer] Add support for ignoring comments while XML encoding (maidmaid)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Serializer] Add support for ignoring comments while XML encoding

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

In addition to https://github.com/symfony/symfony/pull/27926 which allowed to ignore XML processing instructions, this PR allows to ignore the XML comments while encoding.

Commits
-------

8f8230ac3a Add support for ignoring comments while XML encoding
2018-08-30 18:33:29 +02:00
Fabien Potencier
fb9ccc0fec minor #28301 Fix code examples in PHPDoc (maidmaid)
This PR was merged into the 2.8 branch.

Discussion
----------

Fix code examples in PHPDoc

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

This PR properly indents the code examples in PHPDoc for a clean render.

Commits
-------

1afb043dc5 Fix code examples in PHPDoc
2018-08-30 18:22:36 +02:00
Nicolas Grekas
592c4afd22 minor #28310 [Finder] Update PHPdoc append() (ro0NL)
This PR was squashed before being merged into the 2.8 branch (closes #28310).

Discussion
----------

[Finder] Update PHPdoc append()

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| 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
-------

111d9bc6f5 [Finder] Update PHPdoc append()
2018-08-30 17:33:00 +02:00
Roland Franssen
111d9bc6f5 [Finder] Update PHPdoc append() 2018-08-30 17:32:53 +02:00
Martin Hasoň
f1d594b732
[DI] Fix phpdoc 2018-08-30 11:30:49 +02:00
Gabriel Ostrolucký
17c3675226 Mark ExceptionInterfaces throwable 2018-08-29 17:58:00 +02:00
Dany Maillard
52ed9889af Add relative path support for PHP_BINARY env var of PhpExecutableFinder 2018-08-29 15:53:54 +02:00
Dany Maillard
1afb043dc5 Fix code examples in PHPDoc 2018-08-29 15:11:53 +02:00
Fabien Potencier
8651758fc1 feature #28294 [Messenger] Remove the "obscure" message subscriber configuration (sroze)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Remove the "obscure" message subscriber configuration

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

As described in #28275, all of the configuration can be done using yield and that we could remove the support for other ways (especially the obscure return `[['method', -10]]` syntax) as I believe this would clarify the configuration a lot.

Commits
-------

cf2ad861f5 Remove the "obscure" message subscriber configuration
2018-08-29 15:11:20 +02:00
Roland Franssen
b04ef43d22 [HttpKernel] Fix inheritdocs 2018-08-29 14:45:36 +02:00
Fabien Potencier
7504535464 feature #28271 [Messenger] Allow interfaces to be type-hinted as well (sroze)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Allow interfaces to be type-hinted as well

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

Interfaces can be type-hinted as well for the message handlers.

Commits
-------

2dbbfbda4e Allow interfaces to be type-hinted as well
2018-08-29 11:11:23 +02:00
Fabien Potencier
6c539e1408 feature #28190 [Messenger] Add a --bus option to the messenger:consume-messages command (chalasr, sroze)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Add a --bus option to the messenger:consume-messages command

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

Making it compatible with the multi-bus feature.

Commits
-------

e3f1eecbc1 Bus argument is a required option when multiple buses are defined
539cb62ffe [Messenger] Add a --bus option to the messenger:consume-messages command
2018-08-29 11:09:36 +02:00
Remon van de Kamp
4091feb693
Add SameSite cookies to FrameWorkBundle
Uses `session.cookie_samesite` for PHP >= 7.3. For PHP < 7.3 it first
does a session_start(), find the emitted header, changes it, and emits
it again with the value for SameSite added.
2018-08-28 20:18:28 +02:00
Samuel ROZE
cf2ad861f5 Remove the "obscure" message subscriber configuration 2018-08-28 13:58:44 +01:00
Samuel ROZE
bedd7aa19a feature #28275 [Messenger] Only subscribe to a given bus from the MessageSubscriber (sroze)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Only subscribe to a given bus from the MessageSubscriber

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | ø

#27275 introduced the ability to listen to only a few buses from the handler tag. This adds that ability directly from the message subscriber.

It has also highlighted to me that most of the configuration can be done using `yield` (like the example I've added in this PR's tests) and that we could remove the support for other ways (especially the obscure `return [['method', -10]]` syntax) but I believe this should be done **in another pull-request** (that I'm happy to do after this one).

Commits
-------

f60e409011 Only subscribe to a given bus from the MessageSubscriber
2018-08-28 13:42:55 +01:00
Samuel ROZE
e3f1eecbc1 Bus argument is a required option when multiple buses are defined 2018-08-28 11:10:33 +02:00
Robin Chalas
539cb62ffe [Messenger] Add a --bus option to the messenger:consume-messages command 2018-08-28 11:09:59 +02:00
Fabien Potencier
4edbd60bbb feature #28243 [FrameworkBundle] Deprecate Symfony\Bundle\FrameworkBundle\Controller\Controller (sroze)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] Deprecate `Symfony\Bundle\FrameworkBundle\Controller\Controller`

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

Time to deprecate `Controller`, youpi !! 🎉

Commits
-------

a7e319d9e1 Deprecate `Symfony\Bundle\FrameworkBundle\Controller\Controller`
2018-08-28 08:35:15 +02:00
Fabien Potencier
9cc80ecd75 feature #28070 [Translator] Use ICU parent locales as fallback locales (thewilkybarkid)
This PR was squashed before being merged into the 4.2-dev branch (closes #28070).

Discussion
----------

[Translator] Use ICU parent locales as fallback locales

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

Currently the `Translator` fall backs based on the locale separator (eg `es_AR` to `es`), but the ICU data contains parent locales (eg `es_AR` is a child of `es_419`, as is `es_BO`, `es_EC` etc).

This makes use of the ICU data to add add in these fallbacks. This means the specific locales can be used, but the translations can stored in these groupings (eg `es_419` for Latin American Spanish), as well as adding other sensible fallbacks (eg Cape Verdean Portuguese to `pt_PT`).

Commits
-------

e0f402fc29 [Translator] Use ICU parent locales as fallback locales
2018-08-28 08:30:53 +02:00
Chris Wilkinson
e0f402fc29 [Translator] Use ICU parent locales as fallback locales 2018-08-28 08:30:46 +02:00
Fabien Potencier
30de3b8ef2 bumped Symfony version to 4.1.5 2018-08-28 08:19:34 +02:00
Fabien Potencier
f1f6062a64 updated VERSION for 4.1.4 2018-08-28 08:17:42 +02:00
Fabien Potencier
b61480f10b bumped Symfony version to 3.4.16 2018-08-28 08:16:34 +02:00
Fabien Potencier
1735abb8a0 updated VERSION for 3.4.15 2018-08-28 08:06:12 +02:00
Dany Maillard
8f8230ac3a Add support for ignoring comments while XML encoding 2018-08-28 00:11:30 +02:00
Gordon Franke
5fc6155225 [FrameworkBundle] add class description to debug:container command 2018-08-27 21:17:33 +02:00
Samuel ROZE
a7e319d9e1 Deprecate Symfony\Bundle\FrameworkBundle\Controller\Controller 2018-08-27 19:13:10 +01:00
Fabien Potencier
a1aee05bc1 Merge branch '4.1'
* 4.1:
  bumped Symfony version to 2.8.46
  updated VERSION for 2.8.45
  update CONTRIBUTORS for 2.8.45
  updated CHANGELOG for 2.8.45
  [PhpUnitBridge] keep compat with composer 1.0
  Instantiate $offset and $maxlen at definition
  [Cache] minor code update to leverage PHP 7.1
2018-08-27 19:47:18 +02:00
Fabien Potencier
2c3c5c23b1 Merge branch '3.4' into 4.1
* 3.4:
  bumped Symfony version to 2.8.46
  updated VERSION for 2.8.45
  update CONTRIBUTORS for 2.8.45
  updated CHANGELOG for 2.8.45
  [PhpUnitBridge] keep compat with composer 1.0
  Instantiate $offset and $maxlen at definition
2018-08-27 19:47:02 +02:00
Fabien Potencier
05dccf88d0 Merge branch '2.8' into 3.4
* 2.8:
  bumped Symfony version to 2.8.46
  updated VERSION for 2.8.45
  update CONTRIBUTORS for 2.8.45
  updated CHANGELOG for 2.8.45
  Instantiate $offset and $maxlen at definition
2018-08-27 19:45:33 +02:00
Fabien Potencier
a8b16054e7 bumped Symfony version to 2.8.46 2018-08-27 19:44:28 +02:00
Fabien Potencier
7e0a16cf2f updated VERSION for 2.8.45 2018-08-27 19:33:38 +02:00
Fabien Potencier
da0ef24744 feature #28231 [VarExporter] a new component to serialize values to plain PHP code (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarExporter] a new component to serialize values to plain PHP code

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

This PR proposes moving what is currently the `PhpMarshaller` class in the Cache component to a separate component.

This component would provide only one public static method:
`VarExporter::export($value, bool &$isStaticValue = null): string`.

This method returns `$value` serialized as plain PHP code. Running this code creates the same exact data structure that `$value` contained. This is exactly like `serialize()` and `unserialize()`, from which all semantics are preserved (`__sleep`, `__wakeup` and `Serializable`).

The reason to use this method *vs* `serialize()` or even igbinary is performance: thanks to OPcache, the resulting code is significantly faster and more memory efficient than using `unserialize()` or `igbinary_unserialize()`.

Unlike `var_export()`, this works on any serializable PHP value.

It also provides a few improvements over `var_export()`/`serialize()`:
- the output is PSR-2 compatible
- the output can be re-indented without messing up with any `\r` or `\n` in the data
- missing classes throw a `ReflectionException` instead of being unserialized to a `PHP_Incomplete_Class` object
- references involving `SplObjectStorage`, `ArrayObject` or `ArrayIterator` instances are preserved
- `Reflection*`, `IteratorIterator` and `RecursiveIteratorIterator` classes throw an exception when being serialized (their unserialized version is broken anyway, see  https://bugs.php.net/76737.)

Commits
-------

7831ad75e5 [VarExporter] a new component to serialize values to plain PHP code
2018-08-27 18:42:24 +02:00
Nicolas Grekas
7831ad75e5 [VarExporter] a new component to serialize values to plain PHP code 2018-08-27 18:34:07 +02:00