Commit Graph

31645 Commits

Author SHA1 Message Date
ReScO
eb6436ac82 [SecurityBundle] Improve error when argon2i is not available 2018-10-12 18:18:41 +02:00
Fabien Potencier
bad48671a4 bug #27772 [Console] Fixes multiselect choice question defaults in non-interactive mode (veewee)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Fixes multiselect choice question defaults in non-interactive mode

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

[This commit](41ffc69fa0) introduced a warning in multiselect mode:

```
PHP Notice:  Undefined index:  in /tmp/vendor/symfony/console/Helper/QuestionHelper.php on line 52
PHP Stack trace:
PHP   1. {main}() /tmp/vendor/phpro/grumphp/bin/grumphp:0
PHP   2. GrumPHP\Console\Application->run() /tmp/vendor/phpro/grumphp/bin/grumphp:31
PHP   3. GrumPHP\Console\Application->run() /tmp/vendor/phpro/grumphp/src/Console/Application.php:240
PHP   4. GrumPHP\Console\Application->doRun() /tmp/vendor/symfony/console/Application.php:145
PHP   5. GrumPHP\Console\Application->doRunCommand() /tmp/vendor/symfony/console/Application.php:262
PHP   6. GrumPHP\Console\Command\ConfigureCommand->run() /tmp/vendor/symfony/console/Application.php:904
PHP   7. GrumPHP\Console\Command\ConfigureCommand->execute() /tmp/vendor/symfony/console/Command/Command.php:251
PHP   8. GrumPHP\Console\Command\ConfigureCommand->buildConfiguration() /tmp/vendor/phpro/grumphp/src/Console/Command/ConfigureCommand.php:95
PHP   9. Symfony\Component\Console\Helper\QuestionHelper->ask() /tmp/vendor/phpro/grumphp/src/Console/Command/ConfigureCommand.php:156

Notice: Undefined index:  in /tmp/vendor/symfony/console/Helper/QuestionHelper.php on line 52
```

This PR fixes this issue by parsing the default value using the built-in validator if available. (which most likely is ...)

Commits
-------

099e265711 [Console] Fixes multiselect choice question in interactive mode with default values
2018-10-12 09:06:41 -07:00
Fabien Potencier
60aaa808c1 minor #28839 [LDAP] Revamp LDAP options with nested options definition (yceruto)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[LDAP] Revamp LDAP options with nested options definition

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

Next move after https://github.com/symfony/symfony/pull/27291 :)

This will work exactly that before, nothing change regarding behavior, BUT now we've *less code* and *intuitive definition of nested options*.

Commits
-------

a26c284d2d Revamp LDAP options with nested definition
2018-10-12 09:03:12 -07:00
Fabien Potencier
4cd71b406c feature #28833 [Intl] Blacklist invalid languages (ro0NL)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Intl] Blacklist invalid languages

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

see https://en.wikipedia.org/wiki/ISO_639-3#Special_codes

Commits
-------

4f5404bdcb [Intl] Blacklist invalid languages
2018-10-12 09:01:53 -07:00
Yonel Ceruto
a26c284d2d Revamp LDAP options with nested definition 2018-10-12 11:49:15 -04:00
Jakub Zalas
bb573524cb
Add a missing English translation 2018-10-12 16:17:55 +01:00
Toon Verwerft
099e265711 [Console] Fixes multiselect choice question in interactive mode with default values 2018-10-12 16:17:31 +02:00
Jakub Zalas
c1314b315e [Validator] Add a missing Polish translation 2018-10-12 07:07:32 -07:00
Fabien Potencier
f89ef42ba4 bug #28835 [FrameworkBundle] Setting missing default paths under BC layer (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Setting missing default paths under BC layer

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

18ac673dc2 Setting missing default paths under BC layer
2018-10-12 06:57:42 -07:00
Niels Keurentjes
064950a03f Allow integers as default console option value 2018-10-12 06:55:43 -07:00
Yonel Ceruto
18ac673dc2 Setting missing default paths under BC layer 2018-10-12 09:17:24 -04:00
Fabien Potencier
261c0dea91 minor #28830 'yml' is not a format and shouldn't be visible as constant from 'YamlEncoder' (kevin-biig)
This PR was merged into the 4.2-dev branch.

Discussion
----------

'yml' is not a format and shouldn't be visible as constant from 'YamlEncoder'

A little fix of my [previous PR](https://github.com/symfony/symfony/pull/28815)

This PR changes the constant visibility of the `yml` format as private.

Because as @stof [mentionned](https://github.com/symfony/symfony/pull/28815#issuecomment-428941972) `yml` isn't a format, so the constant  shoudn't be public.

Otherwise, this will be confusing while using autocomplete, you see two formats. The user can ask himself if there is a difference between `yaml` / `yml`.

No need of that :)

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

Commits
-------

674b359610 'yml' is not a format and shouldn't be visible as constant from 'YamlEncoder' class
2018-10-12 05:58:47 -07:00
Fabien Potencier
975f58f3a2 fixed typo in class name 2018-10-12 05:57:08 -07:00
Fabien Potencier
dd67a450f7 Merge branch '4.1'
* 4.1:
  Class should be case sensitive
  fixed CS
  [CS] Enable phpdoc_types_order
2018-10-12 05:56:18 -07:00
Fabien Potencier
7e0a369f73 Merge branch '3.4' into 4.1
* 3.4:
  Class should be case sensitive
  fixed CS
  [CS] Enable phpdoc_types_order
2018-10-12 05:56:03 -07:00
Nguyen Xuan Quynh
6a0ab51f1c Class should be case sensitive 2018-10-12 05:54:24 -07:00
Roland Franssen
4f5404bdcb [Intl] Blacklist invalid languages 2018-10-12 12:51:09 +02:00
Kevin Grenier
674b359610 'yml' is not a format and shouldn't be visible as constant from 'YamlEncoder' class 2018-10-12 10:13:44 +02:00
Christian Flothmann
91f6e69334 fix typo 2018-10-12 09:26:31 +02:00
Fabien Potencier
b399527ba1 feature #28815 YamlEncoder handle yml format (kevin-biig)
This PR was merged into the 4.2-dev branch.

Discussion
----------

YamlEncoder handle yml format

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

`Symfony\Component\Serializer\Encoder\YamlEncoder` now handle the `yml` format too

```
use Symfony\Component\Serializer\Serializer;
use Symfony\Component\Serializer\Encoder\YamlEncoder;

$serializer = new Serializer([], [new YamlEncoder()]);
$content = file_get_contents(__DIR__ . '/test.yml');
$data = $serializer->decode($content, YamlEncoder::ALTERNATIVE_FORMAT);
```

Let me know if something is wrong for you

Commits
-------

d8640f965b YamlEncoder handle yml extension
2018-10-11 11:09:58 -07:00
Fabien Potencier
4a4fda5679 feature #27742 [Process] Add feature "wait until callback" to process class (Nek-)
This PR was squashed before being merged into the 4.2-dev branch (closes #27742).

Discussion
----------

[Process] Add feature "wait until callback" to process class

I often see code like the following:

```php
$process->start();
// wait for the process to be ready
sleep(3);
```

Many times in tests, sometimes in other places. There is a problem with this kind of code because if for any reason the process starts slower than the usual... Your code may fail after that. Also if it's faster, you're losing time for waiting.

So here is my proposal:

```php
$process->start();
$process->waitUntil(function($type, $output) {
    // check the output and return true to stop waiting when you got what you wait
});
```

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

Commits
-------

27eaf83b63 [Process] Add feature \"wait until callback\" to process class
2018-10-11 10:22:46 -07:00
Maxime Veber
27eaf83b63 [Process] Add feature \"wait until callback\" to process class 2018-10-11 10:22:38 -07:00
Tobias Nyholm
91e36579b4 Changed "epost-adress" to "e-postadress" 2018-10-11 10:17:16 -07:00
Kevin Grenier
d8640f965b YamlEncoder handle yml extension 2018-10-11 15:09:10 +02:00
Fabien Potencier
80670fc0a7 Merge branch '2.8' into 3.4
* 2.8:
  fixed CS
  [CS] Enable phpdoc_types_order
2018-10-11 06:05:17 -07:00
Fabien Potencier
d48a3776fe fixed CS 2018-10-11 04:32:54 -07:00
Fabien Potencier
7cb823a5b6 minor #28811 Remove usage of sf2 when possible (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Remove usage of sf2 when possible

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

I've not removed all `sf2` occurrences as I've kept the ones that would introduce a BC break.

Commits
-------

8406ee86a9 removed usage of sf2 when possible
2018-10-11 03:53:47 -07:00
Rudolf Ratusiński
428dea6fb1 Fix for race condition in console output stream write 2018-10-11 17:13:12 +08:00
Fabien Potencier
8406ee86a9 removed usage of sf2 when possible 2018-10-10 12:30:04 -07:00
Fabien Potencier
620094a12c feature #28713 [Cache] added support for connecting to Redis clusters via DSN (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Cache] added support for connecting to Redis clusters via DSN

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

Replaces #28300 and #28175

This PR allows configuring a cluster of Redis servers using all available options of either the phpredis extension or the Predis package:
- the `redis_cluster=0/1` boolean option configures whether the client should use the Redis cluster protocol;
- several hosts can be provided using a syntax very similar to #28598, enabling consistent hashing distribution of keys;
- `failover=error/distribute/slaves` can be set to direct reads at slave servers;
- extra options are passed as is to the driver (e.g. `profile=2.8`)
- Predis per-server settings are also possible, using e.g. `host[localhost][alias]=foo` in the query string, or `host[localhost]=alias%3Dfoo` (ie PHP query arrays or urlencoded key/value pairs)

Commits
-------

a42e8774d6 [Cache] added support for connecting to Redis clusters via DSN
2018-10-10 12:22:21 -07:00
Fabien Potencier
b0f863d77e [HttpKernel] added a note about env name restrictions 2018-10-10 09:56:03 -07:00
Christian Flothmann
493c13a9fb Merge branch '4.1'
* 4.1:
  fix merge
2018-10-10 16:58:57 +02:00
Christian Flothmann
61cf143727 fix merge 2018-10-10 16:49:00 +02:00
Nicolas Grekas
8848a1aa30 Merge branch '4.1'
* 4.1: (27 commits)
  Added the Code of Conduct file
  do not override custom access decision configs
  [Security] Do not deauthenticate user when the first refreshed user has changed
  fix a return type hint
  invalidate stale commits for PRs too
  add missing cache prefix seed attribute to XSD
  fix command description
  Fix class documentation
  [Validator] Add a missing translation
  [FrameworkBundle] Fix 3.4 tests
  [DI] fix dumping inline services again
  Rename consumer to receiver
  Register messenger before the profiler
  Fix phpdocs
  [EventDispatcher] Remove template method in test case
  Added LB translation for #27993 (UUID validator message translation)
  Replace deprecated validateValue with validate
  [FWBundle] Automatically enable PropertyInfo when using Flex
  [Process] fix locking of pipe files on Windows
  Correct PHPDoc type for float ttl
  ...
2018-10-10 06:54:27 -07:00
Nicolas Grekas
d9c9e0cf52 Merge branch '3.4' into 4.1
* 3.4: (21 commits)
  Added the Code of Conduct file
  do not override custom access decision configs
  [Security] Do not deauthenticate user when the first refreshed user has changed
  invalidate stale commits for PRs too
  add missing cache prefix seed attribute to XSD
  fix command description
  Fix class documentation
  [Validator] Add a missing translation
  [FrameworkBundle] Fix 3.4 tests
  [DI] fix dumping inline services again
  Fix phpdocs
  [EventDispatcher] Remove template method in test case
  Added LB translation for #27993 (UUID validator message translation)
  Replace deprecated validateValue with validate
  [FWBundle] Automatically enable PropertyInfo when using Flex
  [Process] fix locking of pipe files on Windows
  Correct PHPDoc type for float ttl
  bumped Symfony version to 3.4.18
  updated VERSION for 3.4.17
  updated CHANGELOG for 3.4.17
  ...
2018-10-10 06:52:42 -07:00
Nicolas Grekas
a42e8774d6 [Cache] added support for connecting to Redis clusters via DSN 2018-10-10 06:45:03 -07:00
Nicolas Grekas
68e54f01cc bug #28760 [DI] fix dumping inline services again (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix dumping inline services again

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

The main fix is in `PhpDumper::addInlineService()`
Fixes a few other glitches found meanwhile.

Commits
-------

a854b0a01c [DI] fix dumping inline services again
2018-10-10 06:42:04 -07:00
Nicolas Grekas
af2938eac4 Merge branch '2.8' into 3.4
* 2.8:
  Added the Code of Conduct file
  [Process] fix locking of pipe files on Windows
  fix multi-digit seconds fraction handling
2018-10-10 06:41:17 -07:00
Fabien Potencier
9a37ba4ab1 bug #28805 Revert "feature #27549 [Cache] Unconditionally use PhpFilesAdapter for system pools" (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Revert "feature #27549 [Cache] Unconditionally use PhpFilesAdapter for system pools"

This reverts commit d4f5d46b13, reversing
changes made to 7e3b7b0b50.

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

Reading #28800, I've just realized that #27549 breaks using system caches with read-only filesystem.
Using ApcuAdapter makes system caches compatible with read-only filesystems.
Note that this affects only non-warmed up pools, as the warmed-up ones use a faster `PhpArrayAdapter` in front.

Commits
-------

dbc1230735 Revert "feature #27549 [Cache] Unconditionally use PhpFilesAdapter for system pools (nicolas-grekas)"
2018-10-10 06:31:32 -07:00
Nicolas Grekas
4d70a0b7d4 [Finder] fix reverse sorting custom-ordering functions 2018-10-10 06:30:17 -07:00
Nicolas Grekas
dbc1230735 Revert "feature #27549 [Cache] Unconditionally use PhpFilesAdapter for system pools (nicolas-grekas)"
This reverts commit d4f5d46b13, reversing
changes made to 7e3b7b0b50.
2018-10-10 06:18:46 -07:00
Fabien Potencier
0ea1adf3cc minor #28798 [Routing] simplify PhpMatcherDumper by splitting code logic from route data (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Routing] simplify PhpMatcherDumper by splitting code logic from route data

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

This PR splits all logic that is currently dumped into the matcher in a dedicated trait.
This makes the code easier to maintain and prepares for the next step (making the dumper compile routes as a set of PHP arrays instead of code.)

This diff is huge because affected fixtures are also huge, but it's negative, removing 1200 lines!

Commits
-------

22186c7045 [Routing] simplify PhpMatcherDumper by splitting code logic from route data
2018-10-10 05:51:58 -07:00
Vincent Chalamon
4503ac8e9f
Convert InsufficientAuthenticationException to HttpException 2018-10-10 14:45:47 +02:00
Roland Franssen
8f88753381 Filter logs by level 2018-10-10 05:43:48 -07:00
Fabien Potencier
61d336b4ca feature #24151 Display the log context in the debug pages (javiereguiluz)
This PR was squashed before being merged into the 4.2-dev branch (closes #24151).

Discussion
----------

Display the log context in the debug pages

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

### Before

![before](https://user-images.githubusercontent.com/73419/30269760-564ff2e8-96ea-11e7-98fa-0610d6a0322f.png)

### After

![after](https://user-images.githubusercontent.com/73419/30269764-5830482e-96ea-11e7-946a-a6805c28741a.png)

I'd like to exclude the `event` channel context because it only adds noise:

![event-noise](https://user-images.githubusercontent.com/73419/30269774-67036f52-96ea-11e7-87c0-5ef8328f315a.png)

-----

This change would require to add a hard dependency to the VarDumper component. Do we want to do that? Thanks!

Commits
-------

c59fbde74b Display the log context in the debug pages
2018-10-10 05:31:32 -07:00
Javier Eguiluz
c59fbde74b Display the log context in the debug pages 2018-10-10 05:31:23 -07:00
Fabien Potencier
722c8162c9 feature #26261 [Validator] Improvement: provide file basename for constr. violation messages in FileValidator. (TheCelavi)
This PR was squashed before being merged into the 4.2-dev branch (closes #26261).

Discussion
----------

[Validator] Improvement: provide file basename for constr. violation messages in FileValidator.

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | no
| License       | MIT
| Doc PR        | N/A

`\Symfony\Component\Validator\Constraints\FileValidator` provides absolute path to file on server when user, per example, uploads empty file, too large file, of wrong mime type, etc...

Absolute path to file on server does not have value to the end user, on top of that, exposing it can be a security issue - end user should not be aware of server filesystem.

Basename of file, however, has value (per example: MyAwesomeSheet.xlsx, MyCV.doc, etc..) - if something is wrong with file upload (size, mime, etc...).

If basename is exposed, we can construct messages like: "Your file 'MyCV.doc' is not allowed for upload due to....whatever"...

This PR provides basename of file so end user of `\Symfony\Component\Validator\Constraints\FileValidator` can construct error messages of higher value for end user.

Commits
-------

a77abadf06 [Validator] Improvement: provide file basename for constr. violation messages in FileValidator.
2018-10-10 05:29:04 -07:00
Nikola Svitlica a.k.a. TheCelavi
a77abadf06 [Validator] Improvement: provide file basename for constr. violation messages in FileValidator. 2018-10-10 05:28:53 -07:00
Nicolas Grekas
ce861d1861 [Finder] make reverse sorting a bit more generic 2018-10-10 05:18:16 -07:00
Nicolas Grekas
22186c7045 [Routing] simplify PhpMatcherDumper by splitting code logic from route data 2018-10-10 04:44:04 -07:00
Fabien Potencier
631d718ae8 feature #26324 [Form] allow additional http methods in form configuration (alekitto)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Form] allow additional http methods in form configuration

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

In order to allow HTTP methods other than GET, PUT, POST, DELETE and PATCH, the `allowed_methods` option under `framework.form` configuration has been added.
This configuration option adds the specified methods to the `FormConfigBuilder` whitelist, allowing that methods be used in form configuration via `setMethod` or the `method` option.

The use-case, that has been discussed in #26287, required the usage of custom HTTP method for describing a resource in an API application.

Commits
-------

27d228c3ee [Form] remove restriction on allowed http methods
2018-10-10 04:39:51 -07:00
Frederic Godfrin
27b673cbdd [Filesystem] Fix mirroring a directory with a relative path and a custom iterator 2018-10-10 04:36:40 -07:00
Fabien Potencier
c01359e00e removed unneeded comments 2018-10-10 04:12:11 -07:00
Fabien Potencier
d3fac8600c feature #27291 [OptionsResolver] Added support for nesting options definition (yceruto)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[OptionsResolver] Added support for nesting options definition

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

I'd like to propose an alternative to #27251 and #18134 with a different approach.

It would allow you to create a nested options system with required options, validation (type, value),
normalization and more.

<details>
 <summary><strong>Short documentation</strong></summary>

**To define a nested option, you can pass a closure as the default value of the option with an `OptionsResolver` argument:**
```php
$resolver
    ->defaults([
        'connection' => 'default',
        'database' => function (OptionsResolver $resolver) {
            $resolver
                ->setRequired(['dbname', 'host', ...])
                ->setDefaults([
                    'driver' => 'pdo_sqlite',
                    'port' => function (Options $options) {
                        return 'pdo_mysql' === $options['driver'] ? 3306 : null,
                    },
                    'logging' => true,
                ])
                ->setAllowedValues('driver', ['pdo_sqlite', 'pdo_mysql'])
                ->setAllowedTypes('port', 'int')
                ->setAllowedTypes('logging', 'bool')
                // ...
        },
    ]);

$resolver->resolve(array(
    'database' => array(
        'dbname' => 'demo',
        'host' => 'localhost',
        'driver' => 'pdo_mysql',
    ),
));

// returns: array(
//    'connection' => 'default',
//    'database' => array(
//        'dbname' => 'demo',
//        'host' => 'localhost',
//        'driver' => 'pdo_mysql',
//        'port' => 3306,
//        'logging' => true,
//    ),
//)
```
Based on this instance, you can define the options under ``database`` and its desired default
value.

**If the default value of a child option depend on another option defined in parent level,
adds a second ``Options`` argument to the closure:**
```php
$resolver
    ->defaults([
        'profiling' => false,
        'database' => function (OptionsResolver $resolver, Options $parent) {
            $resolver
                ->setDefault('logging', $parent['profiling'])
                ->setAllowedTypes('logging', 'bool');
        },
    ])
;
```
**Access to nested options from lazy or normalize functions in parent level:**
```php
$resolver
    ->defaults([
        'version' => function (Options $options) {
            return $options['database']['server_version'];
        },
        'database' => function (OptionsResolver $resolver) {
            $resolver
                ->setDefault('server_version', 3.15)
                ->setAllowedTypes('server_version', 'numeric')
                // ...
        },
    ])
;
```
As condition, for nested options you must to pass an array of values to resolve it on runtime, otherwise an exception will be thrown:
```php
$resolver->resolve(); // OK
$resolver->resolve(['database' => []]); // OK
$resolver->resolve(['database' => null); // KO (Exception!)
```
</details>

---

Demo app https://github.com/yceruto/nested-optionsresolver-demo

Commits
-------

d04e40be5a Added support for nested options definition
2018-10-10 04:11:23 -07:00
Fabien Potencier
ea0b8071c9 feature #27261 [VarDumper] Allow to use a light theme out of the box (ogizanagi)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarDumper] Allow to use a light theme out of the box

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

Wouldn't it be nice to provide this light theme out of the box? (the one we use in the profiler)

![capture d ecran 2018-05-14 a 16 50 55](https://user-images.githubusercontent.com/2211145/40004942-23b4138c-5797-11e8-8c57-0b38744ffdc2.png)

Commits
-------

c705b82563 [VarDumper] Allow to use a light theme out of the box
2018-10-10 04:10:26 -07:00
Fabien Potencier
bc816da9f6 feature #27967 [Finder] Added a way to inverse a previous sorting (lyrixx)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Finder] Added a way to inverse a previous sorting

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

---

Sometimes, it's useful to inverse the previous sorting.
For exemple when you want to display the most recent uploaded files

Commits
-------

3cd0dcaaee [Finder] Added a way to inverse a previous sorting
2018-10-10 03:35:59 -07:00
Fabien Potencier
331a24eb1b feature #28061 [Security] add port in access_control (roukmoute)
This PR was squashed before being merged into the 4.2-dev branch (closes #28061).

Discussion
----------

[Security] add port in access_control

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

Add port in access_control

__Please Squash this P.R.__

Commits
-------

6413dcbe75 [Security] add port in access_control
2018-10-10 03:31:58 -07:00
Mathias STRASSER
6413dcbe75 [Security] add port in access_control 2018-10-10 03:31:51 -07:00
Fabien Potencier
dce8f08eac feature #28476 Added different protocols to be allowed as asset base_url (alexander-schranz)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Added different protocols to be allowed as asset base_url

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

In some cases you want to use the `file://` as base_url when you are for example generating pdf and want to avoid network requests to improve the pdf generation performance:

```yaml
framework:
    assets:
        packages:
            pdf:
                base_url: "file://%kernel.project_dir%/public"
```

usage:

```twig
{{ asset('image.jpg', 'pdf' }}
```

Commits
-------

2e21834b71 added different protocols to be allowed as asset base_urls
2018-10-10 03:02:29 -07:00
Fabien Potencier
9fdc64b479 bug #28689 [Process] fix locking of pipe files on Windows (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Process] fix locking of pipe files on Windows

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

Commits
-------

d64bd3b181 [Process] fix locking of pipe files on Windows
2018-10-10 02:50:01 -07:00
Fabien Potencier
bc43155f3f feature #27770 [FrameworkBundle] Moving Cache-related CompilerPass to Cache component (Korbeil)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] Moving Cache-related CompilerPass to Cache component

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

Hi, first PR here 🎉

This is related to #27479 and a first work to move Cache-related CompilerPass out of `FrameworkBundle`, it allows to decouple part of the FrameworkBundle configuration classes.

Since we didn't choosed a fixed directory organization to manage theses, I actually did same as in Bundles and used DependencyInjection folder. If we do choose to follow my [last comment directory organization proposal](https://github.com/symfony/symfony/issues/27479#issuecomment-401307685), I'll move theses CompilerPass to `Framework/DependencyInjection/Compiler` directory (nothing hard here).

Thanks to @DanieleGBX that helped me checking this PR and gave me some good advices !

Here is a list of all CompilerPass I moved, with related component (I also moved related tests when they were present):
- **Cache** - CacheCollectorPass
- **Cache** - CachePoolClearerPass
- **Cache** - CachePoolPass
- **Cache** - CachePoolPrunerPass

Commits
-------

53e7040829 moving Cache-related compiler pass from FrameworkBundle to Cache component
2018-10-10 02:39:24 -07:00
Fabien Potencier
270f496c0c bug #28704 [Form] fix multi-digit seconds fraction handling (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] fix multi-digit seconds fraction handling

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

Commits
-------

7b920c1ec5 fix multi-digit seconds fraction handling
2018-10-10 02:33:33 -07:00
Fabien Potencier
86a9e4a381 Merge branch '2.8' into 3.4
* 2.8:
  Fix class documentation
  [Validator] Add a missing translation
  Fix phpdocs
  [EventDispatcher] Remove template method in test case
  Added LB translation for #27993 (UUID validator message translation)
  Replace deprecated validateValue with validate
2018-10-10 02:28:31 -07:00
Fabien Potencier
003499d17a feature #28738 [OptionsResolver] Passing Options argument to deprecation closure (yceruto)
This PR was squashed before being merged into the 4.2-dev branch (closes #28738).

Discussion
----------

[OptionsResolver] Passing Options argument to deprecation closure

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

As spotted here https://github.com/symfony/symfony/pull/28721, we sometimes need more advanced cases, where the deprecation of the value depends on another option:
```php
$resolver->setDeprecated('date_format', function (Options $options, $dateFormat) {
    if (null !== $options['date_format'] && 'single_text' === $options['widget']) {
         return sprintf('Using the "date_format" option of the %s when the "widget" option is set to "single_text" is deprecated since Symfony 4.2.', self::class);
    }

    return '';
});
```
There is still a decision to make:
> We're in time to change the arguments position (Options $options, $value) to be consistent with other closure signatures.

WDYT?

Commits
-------

29360510db [OptionsResolver] Passing Options argument to deprecation closure
2018-10-10 02:26:31 -07:00
Yonel Ceruto
29360510db [OptionsResolver] Passing Options argument to deprecation closure 2018-10-10 02:26:20 -07:00
Fabien Potencier
60f6e918c7 bug #28793 [SecurityBundle] do not override custom access decision configs (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] do not override custom access decision configs

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

Commits
-------

7743146e55 do not override custom access decision configs
2018-10-10 02:22:49 -07:00
Fabien Potencier
51f39b9999 feature #28718 [Cache] add CacheInterface::delete() + improve CacheTrait (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Cache] add CacheInterface::delete() + improve CacheTrait

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

I've been hesitating a lot on this topic, but I think we should add a `delete()` method to `CacheInterface`.
Deleting is a very common invalidation strategy and invalidating by passing `$beta=INF` to `get()` has the drawback of requiring a fetch+unserialize+save-with-past-expiration. That's complexity that a delete removes.

This PR fixes an issue found meanwhile on `get()`: passing an `ItemInterface` to its callback makes it harder than required to implement on top of PSR-6. Let's pass a `CacheItemInterface`.

Lastly, the early expiration logic can be moved from the component to the trait shipped on contracts.

Here we are for all these steps.

Commits
-------

c6cf690b2f [Cache] add CacheInterface::delete() + improve CacheTrait
2018-10-10 02:20:36 -07:00
Fabien Potencier
52b7239154 feature #24530 [Form] simplify the form type extension registration (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Form] simplify the form type extension registration

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

Commits
-------

6a1d4c5db4 simplify the form type extension registration
2018-10-10 02:19:38 -07:00
Christian Flothmann
7743146e55 do not override custom access decision configs 2018-10-10 11:15:20 +02:00
Fabien Potencier
75eb858331 minor #28728 [EventDispatcher] Remove template method in test case (samnela)
This PR was merged into the 2.8 branch.

Discussion
----------

[EventDispatcher] Remove template method in test case

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

545a8eef05 [EventDispatcher] Remove template method in test case
2018-10-10 02:11:00 -07:00
Fabien Potencier
f9aac64cc1 bug #28783 [FrameworkBundle] add missing cache prefix seed attribute to XSD (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] add missing cache prefix seed attribute to XSD

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

03dbd84f7d add missing cache prefix seed attribute to XSD
2018-10-10 02:09:45 -07:00
Fabien Potencier
c10d2c0df2 feature #28586 [WebServerBundle] Added ability to display the current hostname address if available when binding to 0.0.0.0 (respinoza)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[WebServerBundle] Added ability to display the current hostname address if available when binding to 0.0.0.0

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

Tries to get the local hostname into an ip (if available) using the PHP gethostname* methods.

Commits
-------

dfd2e8b4e6 [WebServerBundle] Added ability to display the current hostname address if available when binding to 0.0.0.0
2018-10-10 02:06:15 -07:00
Fabien Potencier
6a4c8b9f27 minor #28753 [DI] minor optim for dumped container (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[DI] minor optim for dumped container

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

Spotted while reviewing a real-world dumped container.

Commits
-------

c1863e3a7a [DI] minor optim for dumped container
2018-10-10 01:58:35 -07:00
Alessandro Chitolina
27d228c3ee
[Form] remove restriction on allowed http methods 2018-10-10 10:57:08 +02:00
Fabien Potencier
3812aafd90 minor #28778 [WebServerBundle] fix command description (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebServerBundle] fix command description

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

Commits
-------

5094d3e288 fix command description
2018-10-10 01:42:33 -07:00
Robin Chalas
2f0e5d7a83 bug #28072 [Security] Do not deauthenticate user when the first refreshed user has changed (gpekz)
This PR was squashed before being merged into the 3.4 branch (closes #28072).

Discussion
----------

[Security] Do not deauthenticate user when the first refreshed user has changed

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

Currently the token is deauthenticated when the first refreshed user has changed. In theory, a second user provider could find a user that is the same than the user stored in the token.

Also, the deauthentication is currently affected by the order of the user providers in the security.yaml and IMHO it does not make sense.

Commits
-------

95dce67 [Security] Do not deauthenticate user when the first refreshed user has changed
2018-10-10 10:05:32 +02:00
Geoffrey Pécro
95dce67629 [Security] Do not deauthenticate user when the first refreshed user has changed 2018-10-10 10:05:21 +02:00
Christian Flothmann
095b9f3a30 fix a return type hint 2018-10-09 15:30:13 +02:00
Roberto Espinoza
dfd2e8b4e6 [WebServerBundle] Added ability to display the current hostname address if available when binding to 0.0.0.0 2018-10-09 21:01:03 +09:00
Christian Flothmann
03dbd84f7d add missing cache prefix seed attribute to XSD 2018-10-09 10:07:08 +02:00
Nicolas Grekas
eb59771ce4 minor cs fix 2018-10-08 18:23:26 -07:00
Christian Flothmann
5094d3e288 fix command description 2018-10-08 23:49:21 +02:00
Christian Flothmann
6a1d4c5db4 simplify the form type extension registration 2018-10-08 23:29:09 +02:00
Fabien Potencier
df1dcee93d minor #28770 Fix class documentation (luxifer)
This PR was merged into the 2.8 branch.

Discussion
----------

Fix class documentation

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

The phpdoc references the PHP flush function, neither a method of this class nor its parent.

Commits
-------

5a51bb24dc Fix class documentation
2018-10-08 15:39:07 +02:00
Florent Viel
5a51bb24dc
Fix class documentation
The phpdoc references the PHP flush function, neither a method of this class nor its parent.
2018-10-08 15:32:18 +02:00
Jakub Zalas
9d70e22794
[Validator] Add a missing translation 2018-10-08 13:49:05 +01:00
Maxime Steinhausser
c705b82563 [VarDumper] Allow to use a light theme out of the box 2018-10-08 12:50:41 +02:00
Fabien Potencier
8d477988d7 [WebProfilerBundle] extracted server parameters into their own tab 2018-10-08 10:32:04 +02:00
Maxime Steinhausser
3b99a0d823 [FrameworkBundle] Fix 3.4 tests 2018-10-08 10:11:28 +02:00
Fabien Potencier
dd56372fc0 bug #28735 [FWBundle] Automatically enable PropertyInfo when using Flex (dunglas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FWBundle] Automatically enable PropertyInfo when using Flex

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

Automatically enabling PropertyInfo when using Flex and when the component is installed has been forgotten when releasing 3.4.

It makes it very hard to debug why some features of the serializer are sometimes not working properly.

Commits
-------

0683f0ac82 [FWBundle] Automatically enable PropertyInfo when using Flex
2018-10-08 07:55:30 +02:00
Nicolas Grekas
a854b0a01c [DI] fix dumping inline services again 2018-10-08 07:30:32 +02:00
Paul Le Corre
da9030f68a Rename consumer to receiver 2018-10-08 07:06:43 +02:00
Nicolas Grekas
c1863e3a7a [DI] minor optim for dumped container 2018-10-06 20:06:14 +02:00
Samuel ROZE
10537d825b Register messenger before the profiler 2018-10-06 18:49:26 +01:00
Fabien Potencier
cbe2895174 minor #28717 [Messenger] Fix middleware docblocks (pamil)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Fix middleware docblocks

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

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

f06c0c464a [Messenger] Fix middleware docblocks
2018-10-06 19:31:54 +02:00
Fabien Potencier
6dffd450da minor #28708 clarify the cache.pools.provider option (dbu)
This PR was merged into the 4.2-dev branch.

Discussion
----------

clarify the cache.pools.provider option

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

improve the documentation in Configuration.php with things we found out in https://github.com/symfony/symfony-docs/pull/10390

Commits
-------

ad4aaf151a clarify the cache.pools.provider option
2018-10-06 18:33:05 +02:00
Fabien Potencier
23b0787a88 feature #28375 [Translator] Deprecated transChoice and moved it away from contracts (Nyholm, nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Translator] Deprecated transChoice and moved it away from contracts

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

This will address comment made here: https://github.com/symfony/symfony/pull/27399#pullrequestreview-151929117

This PR moves the `transChoice()` method away from Contracts and back to the component. I also reverted changes in the `IdentityTranslator`. I will still use the deprecated `MessageSelector` but this is not fine since `transChoice()` is also deprecated.

Commits
-------

dc5f3bfff7 Make trans + %count% parameter resolve plurals
d870a850bd [Translator] Deprecated transChoice and moved it away from contracts
2018-10-06 18:26:49 +02:00
Nicolas Grekas
dc5f3bfff7 Make trans + %count% parameter resolve plurals 2018-10-06 18:22:22 +02:00
Fabien Potencier
9c555c14ac minor #28742 Added LB translation for #27993 (UUID validator message translation) (mweimerskirch)
This PR was merged into the 2.8 branch.

Discussion
----------

Added LB translation for #27993 (UUID validator message translation)

| Q             | A
| ------------- | ---
| Branch?       | 2.8 (#27993 also targeted 2.8)
| Bug fix?      | n/a
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27993
| License       | MIT

Commits
-------

d3a43e0297 Added LB translation for #27993 (UUID validator message translation)
2018-10-06 16:55:41 +02:00
Nicolas Grekas
c6cf690b2f [Cache] add CacheInterface::delete() + improve CacheTrait 2018-10-06 16:52:09 +02:00
Fabien Potencier
bda0fe8f5d minor #28739 [Validator][minor] Fixed method in phpDoc (vudaltsov)
This PR was merged into the 2.8 branch.

Discussion
----------

[Validator][minor] Fixed method in phpDoc

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

`ValidatorInterface` doesn't have a `validateValue` method, `validate` should be used.

Commits
-------

b0253e58ea Replace deprecated validateValue with validate
2018-10-06 15:13:19 +02:00
Fabien Potencier
e0cb4525b0 feature #28745 [WebServerBundle] Deprecate relying on --env in server:start and server:run (chalasr)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[WebServerBundle] Deprecate relying on --env in server:start and server:run

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

Commits
-------

31b5615b51 [WebServerBundle] Deprecate relying on --env in server:start and server:run
2018-10-06 15:10:02 +02:00
Konstantin Myakshin
fe54a3e379
Remove forgotten experimental annotation in Doctrine bridge 2018-10-06 12:20:40 +03:00
Nyholm
d870a850bd [Translator] Deprecated transChoice and moved it away from contracts 2018-10-06 09:58:31 +02:00
mschop
7196e49f7e Fix phpdocs
See https://github.com/phan/phan/issues/2025 for explaination
2018-10-06 09:38:00 +02:00
Samuel NELA
545a8eef05 [EventDispatcher] Remove template method in test case 2018-10-05 22:19:55 +02:00
Robin Chalas
31b5615b51 [WebServerBundle] Deprecate relying on --env in server:start and server:run 2018-10-05 20:36:54 +02:00
mweimerskirch
d3a43e0297
Added LB translation for #27993 (UUID validator message translation) 2018-10-05 17:41:17 +02:00
Valentin Udaltsov
b0253e58ea
Replace deprecated validateValue with validate 2018-10-05 17:13:57 +03:00
Kévin Dunglas
0683f0ac82
[FWBundle] Automatically enable PropertyInfo when using Flex 2018-10-05 13:29:17 +02:00
Fabien Bourigault
d1d1ceb38e
[Serialized] allow configuring the serialized name of properties through metadata 2018-10-05 09:43:51 +02:00
Nicolas Grekas
d64bd3b181 [Process] fix locking of pipe files on Windows 2018-10-05 09:35:28 +02:00
Christian Flothmann
503239f75e reverse transform RFC 3339 formatted dates
Technically, dates formatted according to the HTML specifications do not
contain any timezone information. But since our DateTimeType used to
contain this information in the passed, users had configure their JS
libraries to accept (and create) dates in that format.

To not break BC we should accept these dates and silently ignore the
additional timezone information.
2018-10-04 12:00:08 +02:00
Sullivan SENECHAL
b662e7eaf2
Correct PHPDoc type for float ttl
It can be null as the Lock instance accepts it.
2018-10-04 10:48:17 +02:00
Kévin Dunglas
5a0cad27ca
feature #28669 [Serializer] Object class resolver (alanpoulain)
This PR was squashed before being merged into the 4.2-dev branch (closes #28669).

Discussion
----------

[Serializer] Object class resolver

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

When normalizing an object, it could be useful to use a custom method to resolve the class name of it instead of using `get_class`.
For instance, Doctrine is using proxy classes for lazy-loading and we usually want the real class and not the proxied one.
That's why we are using this trait in API Platform: https://github.com/api-platform/core/blob/master/src/Util/ClassInfoTrait.php
With this feature, we could solve an issue in API Platform with the JSON-LD normalizer when the eager fetching is disabled.

Commits
-------

18d21439e0 [Serializer] Object class resolver
2018-10-03 22:34:38 +02:00
Alan Poulain
18d21439e0
[Serializer] Object class resolver 2018-10-03 22:34:30 +02:00
Kamil Kokot
f06c0c464a
[Messenger] Fix middleware docblocks 2018-10-03 21:51:11 +02:00
David Buchmann
ad4aaf151a clarify the cache.pools.provider option 2018-10-03 17:35:32 +02:00
Fabien Potencier
0e174c4530 bumped Symfony version to 4.1.7 2018-10-03 15:29:21 +02:00
Fabien Potencier
144bc350b6 updated VERSION for 4.1.6 2018-10-03 14:53:38 +02:00
Fabien Potencier
155fab6e6f bumped Symfony version to 3.4.18 2018-10-03 14:49:59 +02:00
Fabien Potencier
bf23505b92 updated VERSION for 3.4.17 2018-10-03 14:03:34 +02:00
Christian Flothmann
7b920c1ec5 fix multi-digit seconds fraction handling 2018-10-03 13:47:42 +02:00
Nicolas Grekas
0f653d8c68 Merge branch '4.1'
* 4.1:
  [Finder] fixed root directory access for ftp/sftp wrapper
  [Console] Fix clearing sections containing questions
  [FrameworkBundle] dont suggest hidden services in debug:container and debug:autow commands
  [FWBundle] Throw if PropertyInfo is enabled, but the component isn't installed
  Remove redundant path check
2018-10-03 10:52:36 +02:00
Fabien Potencier
7a2a4d94bf Merge branch '3.4' into 4.1
* 3.4:
  Remove redundant path check
2018-10-03 10:48:45 +02:00
Fabien Potencier
ef2f66b28f Merge branch '2.8' into 3.4
* 2.8:
  Remove redundant path check
2018-10-03 10:48:18 +02:00
Fabien Potencier
c48ee0be1e Merge branch '3.4' into 4.1
* 3.4:
  [Finder] fixed root directory access for ftp/sftp wrapper
  [FWBundle] Throw if PropertyInfo is enabled, but the component isn't installed
2018-10-03 10:47:56 +02:00
Fabien Potencier
636eb9e551 bug #28604 [Finder] fixed root directory access for ftp/sftp wrapper (DerDu)
This PR was squashed before being merged into the 3.4 branch (closes #28604).

Discussion
----------

[Finder] fixed root directory access for ftp/sftp wrapper

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

This fixes a flaw introduced in 3.4.7 by #26763

In order to access the root folder with ftp wrapper, there MUST BE a slash present.
- Currently: from 3.4.7 on it just ```rtrim``` all seperators (```/```, ```\```) from directories
- Now: IF the directory is a (s)ftp:// wrapper (```#^s?ftp://#```) this fix just adds a slash (```/```) again

Commits
-------

9630a38d67 [Finder] fixed root directory access for ftp/sftp wrapper
2018-10-03 10:46:53 +02:00
Gerd Christian Kunze
9630a38d67 [Finder] fixed root directory access for ftp/sftp wrapper 2018-10-03 10:46:40 +02:00
Fabien Potencier
64727c1822 feature #28653 [FrameworkBundle] Deprecate the "--env" and "--no-debug" console options (chalasr)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] Deprecate the "--env" and "--no-debug" console options

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

Commits
-------

9f60ff8a4d [FrameworkBundle] Deprecate the "--env" and "--no-debug" options
2018-10-03 10:45:51 +02:00
Fabien Potencier
728ab53d86 bug #28688 [FWBundle] Throw if PropertyInfo is enabled, but the component isn't installed (dunglas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FWBundle] Throw if PropertyInfo is enabled, but the component isn't installed

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

41fd0a881e [FWBundle] Throw if PropertyInfo is enabled, but the component isn't installed
2018-10-03 10:41:12 +02:00
Fabien Potencier
b1f462f3e9 bug #28638 [Console] Fix clearing sections containing questions (chalasr)
This PR was merged into the 4.1 branch.

Discussion
----------

[Console] Fix clearing sections containing questions

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

Given:
```php
$section = $output->section();
$question = "What's your name?";
$name = (new QuestionHelper())->ask($input, $section, new Question($question));
$section->clear();
$section->writeln("$question (<info>$name</info>)");
```

Before:
![](https://i.imgur.com/nJdKXAo.gif)

After:
![](https://i.imgur.com/WdMtKvV.gif)

Commits
-------

81ec57d7ce [Console] Fix clearing sections containing questions
2018-10-03 10:15:46 +02:00
Fabien Potencier
7cc7c716ac feature #28693 [Security] Deprecate simple_preauth and simple_form in favor of Guard (chalasr)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Security] Deprecate simple_preauth and simple_form in favor of Guard

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

Commits
-------

5093b9fb47 [Security] Deprecate simple_preauth and simple_form in favor of Guard
2018-10-03 10:08:33 +02:00
Samuel ROZE
97aab085c3 minor #28697 [Messenger] drop "handler." prefix from ContainerHandlerLocator (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] drop "handler." prefix from ContainerHandlerLocator

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

I fail to understand what this prefix is for. Looks like boilerplate to me, let's drop it, isn't it?
An alternative to #28621

Commits
-------

6c56e82080 [Messenger] drop "handler." prefix from ContainerHandlerLocator
2018-10-03 09:02:23 +01:00
Fabien Potencier
679f8d9c9b feature #28626 [Translation] marked getFallbackLocales() as internal (boscho87)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Translation] marked getFallbackLocales() as internal

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

Added the deprication trigger error function to getFallbackLocales in the Translation component.

(Its my first PR, please tell me if i need to change something)

Commits
-------

9d67a68816 [Translation] marked getFallbackLocales() as internal
2018-10-03 09:51:39 +02:00
Fabien Potencier
5d6473bd94 minor #28683 Remove redundant path check (colinodell)
This PR was merged into the 2.8 branch.

Discussion
----------

Remove redundant path check

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

Commit 0ec852d79f introduced this new method. As you can see, the code I'm removing always evaluates to `true` thanks to the first `if` statement in this method:

![image](https://user-images.githubusercontent.com/202034/46349212-70968a80-c61f-11e8-8360-7d6abc4d7414.png)

(I'm not sure if redundant code technically counts as a "bug", so I've assumed "yes it does" and targeted 2.8.)

Commits
-------

10795cf096 Remove redundant path check
2018-10-03 09:48:08 +02:00
Nicolas Grekas
6c56e82080 [Messenger] drop "handler." prefix from ContainerHandlerLocator 2018-10-03 09:45:32 +02:00
Nicolas Grekas
104e92206c feature #28571 [DependencyInjection] Improve ServiceLocatorTagPass service matching (codedmonkey)
This PR was squashed before being merged into the 4.2-dev branch (closes #28571).

Discussion
----------

[DependencyInjection] Improve ServiceLocatorTagPass service matching

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

Allows omitting of keys for service locator arguments (it will automatically take over the original definition alias).

Commits
-------

1c1210a3e8 [DependencyInjection] Improve ServiceLocatorTagPass service matching
2018-10-03 09:27:24 +02:00
Tim Goudriaan
1c1210a3e8 [DependencyInjection] Improve ServiceLocatorTagPass service matching 2018-10-03 09:27:17 +02:00
Robin Chalas
81ec57d7ce [Console] Fix clearing sections containing questions 2018-10-03 09:17:02 +02:00
Robin Chalas
5093b9fb47 [Security] Deprecate simple_preauth and simple_form in favor of Guard 2018-10-03 09:02:12 +02:00
Simon D. Müller
9d67a68816 [Translation] marked getFallbackLocales() as internal 2018-10-03 08:26:12 +02:00
Nicolas Grekas
3b604ffe94 feature #28644 [Validator] Pre-check constraint validator dependencies (ro0NL)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Validator] Pre-check constraint validator dependencies

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #25865
| 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
-------

0544985934 [Validator] Pre-check constraint validator dependencies
2018-10-03 08:20:15 +02:00
Nicolas Grekas
83f5dfb544 [FrameworkBundle] dont suggest hidden services in debug:container and debug:autow commands 2018-10-02 21:29:19 +02:00
Alessandro Chitolina
239a022cc0 [Cache] add RedisClusterProxy to create lazy connections to Redis clusters 2018-10-02 19:45:17 +02:00
Nicolas Grekas
944b06d7fa Merge branch '4.1'
* 4.1:
  CS fix
  [Debug] fix compat with PHP 7.3
2018-10-02 18:38:08 +02:00
Nicolas Grekas
ed6d9b9d7a Merge branch '3.4' into 4.1
* 3.4:
  CS fix
  [Debug] fix compat with PHP 7.3
2018-10-02 18:36:10 +02:00
Nicolas Grekas
83a5d0c2da Merge branch '2.8' into 3.4
* 2.8:
  CS fix
  [Debug] fix compat with PHP 7.3
2018-10-02 18:33:53 +02:00
Nicolas Grekas
aea4a62e57 CS fix 2018-10-02 18:27:16 +02:00
Nicolas Grekas
4c1f7c5877 [HttpFoundation] fix compat of tests with PHP 7.3 2018-10-02 18:23:27 +02:00
Nicolas Grekas
ab80f290fd [Debug] fix compat with PHP 7.3 2018-10-02 18:22:14 +02:00
Kévin Dunglas
41fd0a881e
[FWBundle] Throw if PropertyInfo is enabled, but the component isn't installed 2018-10-02 17:56:33 +02:00
Nicolas Grekas
c31c40d83e feature #28661 [Serializer] Add an option to skip null values (dunglas)
This PR was squashed before being merged into the 4.2-dev branch (closes #28661).

Discussion
----------

[Serializer] Add an option to skip null values

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

Adds a new option to not serialize `null` values:

```php
$dummy = new class {
    public $foo;
    public $bar = 'notNull';
};

$normalizer = new ObjectNormalizer();
$result = $normalizer->normalize($dummy, 'json', ['skip_null_values' => true]);
// ['bar' => 'notNull']
```

This feature is the only missing part to add [JSON Merge Patch](https://tools.ietf.org/html/rfc7386) support in [API Platform](https://api-platform.com).
It will also help supporting this RFC in all other projects using the Symfony Serializer.

Commits
-------

d3c5055f7b [Serializer] Add an option to skip null values
2018-10-02 17:09:27 +02:00
Kévin Dunglas
d3c5055f7b [Serializer] Add an option to skip null values 2018-10-02 17:09:21 +02:00
Nicolas Grekas
f34fcb66ea fix merge 2018-10-02 15:06:13 +02:00
Nicolas Grekas
a9c90ca77a Merge branch '4.1'
* 4.1: (21 commits)
  [php_cs] disable fopen_flags
  [DI] fix error in dumped container
  [CS] Remove unused variables passed to closures
  [DI] fix dumping setters before their inlined instances
  [CS] Remove empty comment
  [CS] Enforces null type hint on last position in phpDocs
  [CS] Use combined assignment operators when possible
  Fix a typo in error messages
  Don't return early as this bypasses the auto exit feature
  [Console] Add missing null to input values allowed types
  [PHPUnitBridge] Fix microtime() format
  bumped Symfony version to 4.1.6
  updated VERSION for 4.1.5
  updated CHANGELOG for 4.1.5
  bumped Symfony version to 3.4.17
  updated VERSION for 3.4.16
  updated CHANGELOG for 3.4.16
  bumped Symfony version to 2.8.47
  update CONTRIBUTORS for 2.8.46
  updated VERSION for 2.8.46
  ...
2018-10-02 14:43:31 +02:00
Nicolas Grekas
196086c513 Merge branch '3.4' into 4.1
* 3.4:
  [php_cs] disable fopen_flags
  [DI] fix error in dumped container
  [CS] Remove unused variables passed to closures
  [DI] fix dumping setters before their inlined instances
  [CS] Remove empty comment
  [CS] Enforces null type hint on last position in phpDocs
  [CS] Use combined assignment operators when possible
  Fix a typo in error messages
  Don't return early as this bypasses the auto exit feature
  [Console] Add missing null to input values allowed types
  [PHPUnitBridge] Fix microtime() format
  bumped Symfony version to 3.4.17
  updated VERSION for 3.4.16
  updated CHANGELOG for 3.4.16
  bumped Symfony version to 2.8.47
  update CONTRIBUTORS for 2.8.46
  updated VERSION for 2.8.46
  updated CHANGELOG for 2.8.46
2018-10-02 14:40:59 +02:00
Colin O'Dell
10795cf096 Remove redundant path check
The first `if` statement in this method already performs this same
check, so the expression here always evaluated to `true`.
2018-10-02 08:38:36 -04:00
Nicolas Grekas
25055be92e Merge branch '2.8' into 3.4
* 2.8:
  [php_cs] disable fopen_flags
  [CS] Remove unused variables passed to closures
  [CS] Remove empty comment
  [CS] Enforces null type hint on last position in phpDocs
  [CS] Use combined assignment operators when possible
  Fix a typo in error messages
  [Console] Add missing null to input values allowed types
  [PHPUnitBridge] Fix microtime() format
  bumped Symfony version to 2.8.47
  update CONTRIBUTORS for 2.8.46
  updated VERSION for 2.8.46
  updated CHANGELOG for 2.8.46
2018-10-02 14:28:39 +02:00
Nicolas Grekas
28841c4157 bug #28648 [PHPUnitBridge] Fix ClockMock microtime() format (acasademont)
This PR was merged into the 2.8 branch.

Discussion
----------

[PHPUnitBridge] Fix ClockMock microtime() format

| 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? | yes/no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | no    <!-- please add some, will be required by reviewers -->
| Fixed tickets |    <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | <!-- required for new features -->

This is a follow-up PR to #27890 to fix the `microtime` precision, it should be 8 decimals instead of the current 6 (see https://3v4l.org/GYacF)

The problem now is that due to the new tests the whole testsuite will fail if run from the main directory, as hhvm and 5.4 targets are doing, due to phpunit using the wrong `ClockMock` class. Tests for 7.1 and 7.2 pass because they `cd` into the component directory.

Commits
-------

e3732b63c6 [PHPUnitBridge] Fix microtime() format
2018-10-02 14:16:46 +02:00
Nicolas Grekas
47f2aee4a5 minor #28675 [CS] Enforces null type hint on last position in phpDocs (carusogabriel)
This PR was merged into the 2.8 branch.

Discussion
----------

[CS] Enforces null type hint on last position in phpDocs

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| 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 | -   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

As a majority in our codebase, the `null` typehint usually comes in the last position in phpDocs.

Commits
-------

efbba25577 [CS] Enforces null type hint on last position in phpDocs
2018-10-02 14:08:28 +02:00
Nicolas Grekas
73d74c48e4 minor #28673 [CS] Use combined assignment operators when possible (carusogabriel)
This PR was merged into the 2.8 branch.

Discussion
----------

[CS] Use combined assignment operators when possible

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| 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 | -   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

Less opcodes for us 😄

Commits
-------

c561e99394 [CS] Use combined assignment operators when possible
2018-10-02 14:06:39 +02:00
Nicolas Grekas
d33e2458ec minor #28676 [CS] Remove empty comment (carusogabriel)
This PR was merged into the 2.8 branch.

Discussion
----------

[CS] Remove empty comment

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| 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 | -   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

Commits
-------

3bfd877e16 [CS] Remove empty comment
2018-10-02 13:49:30 +02:00
Nicolas Grekas
8e1f3813e8 bug #28678 [DI] fix dumping setters before their inlined instances (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix dumping setters before their inlined instances

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

Commits
-------

d60eb1aa33 [DI] fix dumping setters before their inlined instances
2018-10-02 13:48:40 +02:00
Nicolas Grekas
22aec2490c bug #28672 [DI] fix error in dumped container (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix error in dumped container

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

(test case on its way)

Commits
-------

2d0aba6ff8 [DI] fix error in dumped container
2018-10-02 13:41:39 +02:00
Nicolas Grekas
2d0aba6ff8 [DI] fix error in dumped container 2018-10-02 13:33:39 +02:00
Gabriel Caruso
48a70180da
[CS] Remove unused variables passed to closures 2018-10-02 08:25:20 -03:00
Robin Chalas
9f60ff8a4d [FrameworkBundle] Deprecate the "--env" and "--no-debug" options 2018-10-02 11:07:15 +02:00
Daniel Alejandro Cast
05935d848f Add vscode editor to ide config 2018-10-02 08:29:15 +00:00
Nicolas Grekas
d60eb1aa33 [DI] fix dumping setters before their inlined instances 2018-10-02 09:49:36 +02:00
Gabriel Caruso
3bfd877e16
[CS] Remove empty comment 2018-10-02 00:29:33 -03:00
Gabriel Caruso
efbba25577
[CS] Enforces null type hint on last position in phpDocs 2018-10-02 00:12:00 -03:00
Gabriel Caruso
c561e99394
[CS] Use combined assignment operators when possible 2018-10-01 23:42:26 -03:00
Achilles Kaloeridis
07b67ec2cd Fix a typo in error messages 2018-10-01 21:18:23 +03:00
Craig Duncan
b6c17dfb5e Don't return early as this bypasses the auto exit feature 2018-10-01 15:55:38 +01:00
George Mponos
e54e94c7fe When a CSRF occures on a Form submit add a cause on the FormError object 2018-10-01 10:22:20 +03:00
Robin Chalas
f0bc2a64d7 [Console] Add missing null to input values allowed types 2018-09-30 12:25:15 +02:00
Albert Casdemont
e3732b63c6 [PHPUnitBridge] Fix microtime() format 2018-09-30 12:23:39 +02:00
Roland Franssen
0544985934 [Validator] Pre-check constraint validator dependencies 2018-09-30 11:22:12 +02:00
Fabien Potencier
3cca29e689 bumped Symfony version to 4.1.6 2018-09-30 07:08:20 +02:00
Fabien Potencier
296670ce28 updated VERSION for 4.1.5 2018-09-30 07:05:39 +02:00
Fabien Potencier
00efcd48b5 bumped Symfony version to 3.4.17 2018-09-30 07:04:55 +02:00
Fabien Potencier
1a587f99ed updated VERSION for 3.4.16 2018-09-30 06:53:52 +02:00
Fabien Potencier
d1fd4325ea Merge branch '4.1'
* 4.1:
  fixed tests
2018-09-30 06:37:12 +02:00
Fabien Potencier
9db4b0e948 Merge branch '3.4' into 4.1
* 3.4:
  fixed tests
2018-09-30 06:37:01 +02:00
Fabien Potencier
38ff7489dd fixed tests 2018-09-30 06:36:53 +02:00
Fabien Potencier
cfb1140580 Merge branch '4.1'
* 4.1:
  fixed tests
2018-09-30 06:11:44 +02:00
Fabien Potencier
7aba5edcd0 Merge branch '3.4' into 4.1
* 3.4:
  fixed tests
2018-09-30 06:11:26 +02:00
Fabien Potencier
4ed1d85b1a fixed tests 2018-09-30 06:10:38 +02:00
Fabien Potencier
d1db71aa34 bumped Symfony version to 2.8.47 2018-09-30 06:05:12 +02:00
Fabien Potencier
d506102802 updated VERSION for 2.8.46 2018-09-30 05:51:44 +02:00
Fabien Potencier
ae755d09ea Merge branch '4.1'
* 4.1:
  [HttpFoundation] X-Accel-Mapping does not use HTTP key=value syntax
2018-09-30 05:50:33 +02:00
Fabien Potencier
0997ff5a7c bug #28636 [HttpFoundation] X-Accel-Mapping does not use HTTP key=value syntax (c960657)
This PR was squashed before being merged into the 4.1 branch (closes #28636).

Discussion
----------

[HttpFoundation] X-Accel-Mapping does not use HTTP key=value syntax

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

The `X-Accel-Mapping` header does not use the standard HTTP key=value syntax, so using `HeaderUtils::combine()` breaks paths with upper-case letters.

There is no good reason to use `HeaderUtils::combine()` in this case, so simply skip it.

Commits
-------

09343c27d7 [HttpFoundation] X-Accel-Mapping does not use HTTP key=value syntax
2018-09-30 05:47:35 +02:00
Christian Schmidt
09343c27d7 [HttpFoundation] X-Accel-Mapping does not use HTTP key=value syntax 2018-09-30 05:47:28 +02:00
Fabien Potencier
91add60d47 minor #28606 [Validator] Add BC layer covering BicValidator without Intl (chalasr)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Validator] Add BC layer covering BicValidator without Intl

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

Commits
-------

10b8a5f041 [Validator] Add BC layer covering BicValidator without Intl
2018-09-30 05:46:12 +02:00
Fabien Potencier
deaf53c231 Merge branch '4.1'
* 4.1:
  [Console] simplified code
  removed useless phpdoc
  improve docblocks around group sequences
  [Cache] prevent getting older entries when the version key is evicted
  [WebProfilerBundle] added a note in the README
  [Yaml] Skip parser test with root user
  [Filesystem] Skip tests on readable file when run with root user
  [FWBundle] Fix an error in WebTestCase::createClient's PHPDoc
  [HttpFoundation][Security] forward locale and format to subrequests
  [Console] Send the right exit code to console.terminate listeners
  [HttpFoundation] fix hidding warnings from session handlers
  Caching missed templates on cache warmup
2018-09-30 05:40:00 +02:00
Fabien Potencier
46fff8b4d7 Merge branch '3.4' into 4.1
* 3.4:
  [Console] simplified code
  removed useless phpdoc
  improve docblocks around group sequences
  [Cache] prevent getting older entries when the version key is evicted
  [WebProfilerBundle] added a note in the README
  [Yaml] Skip parser test with root user
  [Filesystem] Skip tests on readable file when run with root user
  [FWBundle] Fix an error in WebTestCase::createClient's PHPDoc
  [HttpFoundation][Security] forward locale and format to subrequests
  [Console] Send the right exit code to console.terminate listeners
  [HttpFoundation] fix hidding warnings from session handlers
  Caching missed templates on cache warmup
2018-09-30 05:38:13 +02:00
Fabien Potencier
8805cfdf8d [Console] simplified code 2018-09-30 05:37:36 +02:00
Fabien Potencier
a69e7569e3 Merge branch '2.8' into 3.4
* 2.8:
  removed useless phpdoc
2018-09-30 05:34:39 +02:00
Fabien Potencier
42c5a91ddf removed useless phpdoc 2018-09-30 05:33:07 +02:00
Fabien Potencier
592bbf3470 Merge branch '2.8' into 3.4
* 2.8:
  improve docblocks around group sequences
  [WebProfilerBundle] added a note in the README
  [Filesystem] Skip tests on readable file when run with root user
  [FWBundle] Fix an error in WebTestCase::createClient's PHPDoc
  [HttpFoundation][Security] forward locale and format to subrequests
  [Console] Send the right exit code to console.terminate listeners
  Caching missed templates on cache warmup
2018-09-30 05:32:28 +02:00
Robin Chalas
10b8a5f041 [Validator] Add BC layer covering BicValidator without Intl 2018-09-30 00:23:16 +02:00
Nicolas Grekas
3359e62866 minor #28591 [Validator] improve docblocks around group sequences (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Validator] improve docblocks around group sequences

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

Commits
-------

179a081ee3 improve docblocks around group sequences
2018-09-29 23:53:35 +02:00
Nicolas Grekas
3afe4e7b84 bug #28592 [BrowserKit] throw exception when request() wasn't called (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[BrowserKit] throw exception when request() wasn't called

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony/pull/27807#issuecomment-420985940

Commits
-------

41cfde19f6 throw exception when request() wasn't called
2018-09-29 23:52:52 +02:00
Marko Kaznovac
dc5bf84f15
third parameter of sprintf missing in AbstractRecursivePass::getExpressionLanguage
runtime exception is referencing service as third parameter in sprintf, but none was given.
2018-09-29 23:11:02 +02:00
Roland Franssen
73c688c967 [Form] Check for Intl availibility 2018-09-29 08:27:53 +02:00
Fabien Potencier
2e85ef5259 bug #28376 [TwigBundle] Fixed caching of templates in src/Resources/<BundleName>/views on cache warmup (yceruto)
This PR was merged into the 2.8 branch.

Discussion
----------

[TwigBundle] Fixed caching of templates in src/Resources/<BundleName>/views on cache warmup

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

Same as https://github.com/symfony/symfony/pull/27764, but in this case the convention is wrong.

Corrected according to:
992a174470/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php (L165)

Commits
-------

83a75f4313 Caching missed templates on cache warmup
2018-09-27 19:44:44 +02:00
Baptiste Leduc
53e7040829
moving Cache-related compiler pass from FrameworkBundle to Cache component 2018-09-26 17:25:42 +02:00
Fabien Potencier
3cd411af3e feature #28588 [Cache] add "setCallbackWrapper()" on adapters implementing CacheInterface for more flexibility (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Cache] add "setCallbackWrapper()" on adapters implementing CacheInterface for more flexibility

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

Preparing my talk at SymfonyLive London, see you all there :)

This allows wrapping the callback passed to `->get($item, $callback, $beta)` in a callable that should at least return `$callback($item)`, but can do something around the call.
The default wrapper is locking the key to provide lock-based stampede protection.
That was already the case before this PR, but in a much dirtier way at the design level.
Fixes a few issues found meanwhile.

Commits
-------

8cf3625b11 [Cache] add "setCallbackWrapper()" on adapters implementing CacheInterface for more flexibility
2018-09-26 09:18:20 +02:00
Fabien Potencier
e6deb092fc feature #28598 [Cache] support configuring multiple Memcached servers in one DSN (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Cache] support configuring multiple Memcached servers in one DSN

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

Useful to reconfigure dynamically an array of memcached servers (eg removing a dead one or adding a new one).
DSN format is e.g. `memcached://localhost?host[foo.bar]=3`.
To ease generating the DSN programmatically, it works also with `memcached:?host[localhost]&host[localhost:12345]&host[/some/memcached.sock:]=3`.

The key of the "host" parameter is a "host:port" pair, the value is the weight of the "host:port" pair.
Sockets need to be specified with the trailing `:` (as shown in the last example).

Commits
-------

8e0605ac18 [Cache] support configuring multiple Memcached servers in one DSN
2018-09-26 07:51:01 +02:00
Fabien Potencier
c9bbc6693e bug #28565 [HttpFoundation][Security] forward locale and format to subrequests (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpFoundation][Security] forward locale and format to subrequests

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

See discussion in linked issue.

Commits
-------

41eb1914f6 [HttpFoundation][Security] forward locale and format to subrequests
2018-09-26 07:47:26 +02:00
Fabien Potencier
60fac5cefa feature #28447 [HttpFoundation] make cookies auto-secure when passing them $secure=null + plan to make it and samesite=lax the defaults in 5.0 (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[HttpFoundation] make cookies auto-secure when passing them $secure=null + plan to make it and samesite=lax the defaults in 5.0

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

By creating Cookie instances using `null` for the `$secure` argument, this PR allows making cookies inherit their "secure" attribute from the request.

This PR also adds a forward to make $secure=null and samesite=lax the defaults in Symfony 5.0:
- either define all constructor's arguments explicitly
- or use the new `Cookie::create()` factory

Commits
-------

9493cfd5f2 [HttpFoundation] make cookies auto-secure when passing them $secure=null + plan to make it and samesite=lax the defaults in 5.0
2018-09-26 07:44:22 +02:00
Fabien Potencier
10df10ce38 feature #28446 [SecurityBundle] make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_* (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[SecurityBundle] make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_*

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

Let's make it easier to have a good default security level, now for the remember-me cookie.

Commits
-------

6ec223bf6f [SecurityBundle] make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_*
2018-09-26 07:38:44 +02:00
Fabien Potencier
b36172c649 feature #28417 [VarExporter] add Instantiator::instantiate() to create+populate objects without calling their constructor nor any other methods (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarExporter] add Instantiator::instantiate() to create+populate objects without calling their constructor nor any other methods

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

A blend of features also provided by https://github.com/doctrine/instantiator and https://github.com/Ocramius/GeneratedHydrator in one simple method. Because it's just a few more lines on top of the existing code infrastructure in the component :)

For example, from the docblock:

```php
// creates an empty instance of Foo
Instantiator::instantiate(Foo::class);

// creates a Foo instance and sets one of its public, protected or private properties
Instantiator::instantiate(Foo::class, ['propertyName' => $propertyValue]);

// creates a Foo instance and sets a private property defined on its parent Bar class
Instantiator::instantiate(Foo::class, [], [
    Bar::class => ['privateBarProperty' => $propertyValue],
]);
```

Instances of ArrayObject, ArrayIterator and SplObjectHash can be created
by using the special `"\0"` property name to define their internal value:

```php
// creates an SplObjectHash where $info1 is attached to $obj1, etc.
Instantiator::instantiate(SplObjectStorage::class, ["\0" => [$obj1, $info1, $obj2, $info2...]]);

// creates an ArrayObject populated with $inputArray
Instantiator::instantiate(ArrayObject::class, ["\0" => [$inputArray, $optionalFlag]]);
```

Misses some tests for now, but reuses the existing code infrastructure used to "unserialize" objects.

Commits
-------

d9bade0385 [VarExporter] add Instantiator::instantiate() to create+populate objects without calling their constructor nor any other methods
2018-09-26 07:34:01 +02:00
Fabien Potencier
2a605c2ed6 bug #28561 [Cache] prevent getting older entries when the version key is evicted (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] prevent getting older entries when the version key is evicted

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

As described in linked issue, using a strategy described in
https://github.com/memcached/memcached/wiki/ProgrammingTricks#deleting-by-namespace

Commits
-------

00855895a8 [Cache] prevent getting older entries when the version key is evicted
2018-09-26 07:27:19 +02:00
Nicolas Grekas
8e0605ac18 [Cache] support configuring multiple Memcached servers in one DSN 2018-09-25 18:08:15 +02:00
Fabien Potencier
9db435ed0c feature #27819 [Serializer] deprecated normalizers and encoders who dont implement the base interfaces (rodnaph)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Serializer] deprecated normalizers and encoders who dont implement the base interfaces

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

Currently the `Serializer` can be constructed with any object regardless of whether or not it implements `NormalizerInterface` or `DenormalizerInterface`. This object will then be ignored when getting a normalizer/denormalizer, so in effect silently ignored for serializer operations.

This change throws an exception on construct if a given normalizer object does not implement one of these interfaces - are there use cases where this would not be true?

Commits
-------

cbc2be8ba8 [Serializer] deprecated normalizers and encoders who dont implement the base interfaces
2018-09-25 11:53:27 +02:00
Christian Flothmann
179a081ee3 improve docblocks around group sequences 2018-09-25 10:06:01 +02:00
Christian Flothmann
41cfde19f6 throw exception when request() wasn't called 2018-09-25 09:51:48 +02:00
Nicolas Grekas
00855895a8 [Cache] prevent getting older entries when the version key is evicted 2018-09-25 09:13:51 +02:00
Nicolas Grekas
8cf3625b11 [Cache] add "setCallbackWrapper()" on adapters implementing CacheInterface for more flexibility 2018-09-24 20:03:00 +02:00
Fabien Potencier
f7f04869a1 minor #28575 [WebProfilerBundle] added a note in the README (fabpot)
This PR was merged into the 2.8 branch.

Discussion
----------

[WebProfilerBundle] added a note in the README

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| 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 |
| License       | MIT
| Doc PR        |

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

310870a497 [WebProfilerBundle] added a note in the README
2018-09-24 13:29:14 +02:00
Fabien Potencier
3d2124e128 feature #28572 Make it clear that the profiler is for dev only (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Make it clear that the profiler is for dev only

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | kinda yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes (permanent one)
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | symfony/symfony-docs#10386

Commits
-------

54fda55fd9 made it clear that the profiler is for dev only
2018-09-24 13:27:51 +02:00
Fabien Potencier
310870a497 [WebProfilerBundle] added a note in the README 2018-09-24 10:42:32 +02:00
Nicolas Grekas
3ad232835d minor #28529 [Yaml] Skip parser test with root user (lbassin)
This PR was squashed before being merged into the 3.4 branch (closes #28529).

Discussion
----------

[Yaml] Skip parser test with root user

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

This PR fix a test failure in YAML Component when running from a php docker container.
By defaut, root user is used to run phpunit. It means permission checking will fail (Root user is always allowed to read files)

Commits
-------

34429797b3 [Yaml] Skip parser test with root user
2018-09-24 10:15:51 +02:00
Laurent Bassin
34429797b3 [Yaml] Skip parser test with root user 2018-09-24 10:15:45 +02:00
Nicolas Grekas
7c87dc9720 minor #28573 [Filesystem] Skip tests on readable file when run with root user (lbassin)
This PR was merged into the 2.8 branch.

Discussion
----------

[Filesystem] Skip tests on readable file when run with root user

| 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 | #28478   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

This PR fix tests failures in Filesystem Component when running from a php docker container.
By defaut, root user is used to run phpunit. It means permission checking will fail (Root user is always allowed to read files)

Linked to #28529

Commits
-------

ad500e74ec [Filesystem] Skip tests on readable file when run with root user
2018-09-24 10:14:14 +02:00
Laurent Bassin
ad500e74ec
[Filesystem] Skip tests on readable file when run with root user 2018-09-24 10:04:37 +02:00
Fabien Potencier
54fda55fd9 made it clear that the profiler is for dev only 2018-09-24 10:00:32 +02:00
Roland Franssen
c762735075 Favor LogicException for missing classes & functions 2018-09-24 09:37:12 +02:00
Fabien Potencier
31f8cb9706 feature #28569 [Form] deprecate precision in IntegerToLocalizedStringTransformer (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Form] deprecate precision in IntegerToLocalizedStringTransformer

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

Commits
-------

65362e0ace deprecate precision in IntegerToLocalizedStringTransformer
2018-09-24 07:57:37 +02:00
Fabien Potencier
792ec82c1a feature #28570 [Form] deprecate the unused scale option (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Form] deprecate the unused scale option

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

Commits
-------

40413aad24 deprecate the unused scale option
2018-09-24 07:52:57 +02:00
Christian Flothmann
65362e0ace deprecate precision in IntegerToLocalizedStringTransformer 2018-09-23 21:23:49 +02:00
Christian Flothmann
40413aad24 deprecate the unused scale option 2018-09-23 21:21:47 +02:00
Kévin Dunglas
3033aaf6fb
[FWBundle] Fix an error in WebTestCase::createClient's PHPDoc 2018-09-23 18:44:35 +02:00
Jan Schädlich
ae76c6824b [VarDumper] add casters for IntlDateFormatter and IntlCalendar 2018-09-23 18:25:21 +02:00
Nicolas Grekas
41eb1914f6 [HttpFoundation][Security] forward locale and format to subrequests 2018-09-23 17:27:53 +02:00
Nicolas Grekas
c53b687f21 feature #28559 [VarDumper] add caster for IntlTimeZone (jschaedl)
This PR was squashed before being merged into the 4.2-dev branch (closes #28559).

Discussion
----------

[VarDumper] add caster for IntlTimeZone

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

Commits
-------

c94217c832 [VarDumper] add caster for IntlTimeZone
2018-09-23 16:56:12 +02:00
Jan Schädlich
c94217c832 [VarDumper] add caster for IntlTimeZone 2018-09-23 16:56:03 +02:00
Fabien Potencier
7c08e43b78 feature #28449 [DependencyInjection] improved message when alias service is not found (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[DependencyInjection] improved message when alias service is not found

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

When using the YAML config format, it can be confusing that you need to
prefix the aliased service id with an `@` character when passing it as
a string, but that you have to omit it when using the `alias` attribute:

```yaml
foo: '@App\Foo'

foo:
    alias: 'App\Foo'
```

This commit will enhance the generated error message in cases where the
aliased service id is prefixed with the `@` character in the `alias`
option like this:

```yaml
foo:
    alias: '@App\Foo'
```

Commits
-------

280ecbc2be improved message when alias service is not found
2018-09-23 14:54:20 +02:00
Robin Chalas
e95ea8132f feature #27434 [Console] Add support for error ouput in the CommandTester (cdekok)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Console] Add support for error ouput in the CommandTester

Move initialization of the streams to the trait so the `capture_stderr_separately` also works in the CommandTester.

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

Make it possible to test seperate stderr output.

```$tester = new CommandTester($command);
$tester->execute(
    array('foo' => 'bar'),
    array('capture_stderr_separately' => true)
);

$this->assertEquals('foo', $tester->getErrorOutput());
````

Commits
-------

cec5317 [Console] Add support for error ouput in the CommandTester
2018-09-23 13:45:23 +02:00
Chris de Kok
cec531707f [Console] Add support for error ouput in the CommandTester 2018-09-23 13:34:50 +02:00
Nicolas Grekas
a43f307224 feature #28555 [VarDumper] add caster for NumberFormatter (jschaedl)
This PR was squashed before being merged into the 4.2-dev branch (closes #28555).

Discussion
----------

[VarDumper] add caster for NumberFormatter

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

Commits
-------

0bd8a0b0bb [VarDumper] add caster for NumberFormatter
2018-09-23 12:41:31 +02:00
Jan Schädlich
0bd8a0b0bb [VarDumper] add caster for NumberFormatter 2018-09-23 12:41:24 +02:00
Robin Chalas
54bd905cb0 bug #28545 [Console] Send the right exit code to console.terminate listeners (mpdude)
This PR was squashed before being merged into the 2.8 branch (closes #28545).

Discussion
----------

[Console] Send the right exit code to console.terminate listeners

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

When a Console command throws an exception without a status code, `Application::run()` takes care of setting the exit code to `1` when the exception does not provide a code itself.

This happens slightly too late, as `console.terminate` event listeners that are called from within `Application::doRunCommand()` are given the plain exeception code, before this conversion.

The result is that `console.*` event listeners that you might be using to log exit code e. g. for cron jobs will see a `0` code instead of the real value used to terminate the script.

***Todo:***

- [x] Make sure we've got tests covering this, i. e. do not mock out `doRunCommand()`.

Commits
-------

b90a3f1 [Console] Send the right exit code to console.terminate listeners
2018-09-23 12:04:26 +02:00
Matthias Pigulla
b90a3f12a1 [Console] Send the right exit code to console.terminate listeners 2018-09-23 12:04:15 +02:00
Christian Flothmann
280ecbc2be improved message when alias service is not found
When using the YAML config format, it can be confusing that you need to
prefix the aliased service id with an `@` character when passing it as
a string, but that you have to omit it when using the `alias` attribute:

```yaml
foo: '@App\Foo'

foo:
    alias: 'App\Foo'
```

This commit will enhance the generated error message in cases where the
aliased service id is prefixed with the `@` character in the `alias`
option like this:

```yaml
foo:
    alias: '@App\Foo'
```
2018-09-23 11:10:46 +02:00
Nicolas Grekas
f405b4d5a0 [HttpFoundation] fix hidding warnings from session handlers 2018-09-23 10:13:20 +02:00
Nicolas Grekas
a26bd3673f Merge branch '4.1'
* 4.1:
  [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"
  [Console] Fixed boxed table style with colspan
  parse numbers terminated with decimal separator
  fail reverse transforming invalid RFC 3339 dates
2018-09-22 22:55:36 +02:00
Nicolas Grekas
0e47775d62 Merge branch '3.4' into 4.1
* 3.4:
  [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"
  [Console] Fixed boxed table style with colspan
  parse numbers terminated with decimal separator
  fail reverse transforming invalid RFC 3339 dates
2018-09-22 21:04:12 +02:00