Commit Graph

38551 Commits

Author SHA1 Message Date
Nicolas Grekas
e5c54053c4 [DI] configure inlined services before injecting them when dumping the container 2018-09-08 14:51:51 +02:00
Nicolas Grekas
721dc8661f Consistently throw exceptions on a single line 2018-09-08 14:44:02 +02:00
Fabien Potencier
e980ce40e2 feature #28399 [Messenger] Add a SenderLocator decoupled from ContainerInterface (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Add a SenderLocator decoupled from ContainerInterface

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

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

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

Commits
-------

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

Discussion
----------

[TwigBundle] Using Twig template name syntax in form_theme example

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

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

Commits
-------

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

Discussion
----------

[Messenger][Profiler] Trace middleware execution

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

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

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

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

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

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

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

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

Commits
-------

e974f67b1f [Messenger][Profiler] Trace middleware execution
2018-09-08 14:24:37 +02:00
Fabien Potencier
9af885cde4 feature #28400 [Messenger] Add a simple serializer (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Add a simple serializer

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

When using the Messenger component without Symfony full stack, it helps to use a simple Serializer configured with the bare minimum (this bare minimum is up to the discussion).

Commits
-------

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

Discussion
----------

[Messenger] Change exceptions to use component's one

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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

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

Discussion
----------

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

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

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

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

Commits
-------

b24e0543e0 [HttpKernel][Profiler] Add arg value resolver category in performances panel
2018-09-08 09:28:50 +02:00
Fabien Potencier
88a2af54c4 feature #25015 [Validator] Deprecate validating DateTimeInterface in Date|Time|DateTime constraints (ro0NL)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Validator] Deprecate validating DateTimeInterface in Date|Time|DateTime constraints

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #11925
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/7583 (old PR but not really needed now)

Easy version of #21905. I think individual naming has value. Also the goal is to move forward to use `Type` really, not to bother with constraint renames.

Commits
-------

5454e6fc1d [Validator] Deprecate validating DateTimeInterface in Date|Time|DateTime constraints
2018-09-08 09:05:36 +02:00
Roland Franssen
5454e6fc1d [Validator] Deprecate validating DateTimeInterface in Date|Time|DateTime constraints 2018-09-08 08:57:33 +02:00
Fabien Potencier
4e0e5e5fdb [Messenger] changed exceptions to use component's one 2018-09-08 08:36:06 +02:00
Fabien Potencier
f2f4cd82c3 feature #28394 [Messenger] Add interfaces to be type-hinted even when not using a Container (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Add interfaces to be type-hinted even when not using a Container

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

This a follow-up to #28271. This adds #28271 to the non-container handler locator.

Commits
-------

963fde9fb1 [Messenger] added interfaces to be type-hinted even when not using a Container
2018-09-08 08:26:01 +02:00
Maxime Steinhausser
e974f67b1f [Messenger][Profiler] Trace middleware execution 2018-09-08 06:30:21 +02:00
Fabien Potencier
963fde9fb1 [Messenger] added interfaces to be type-hinted even when not using a Container 2018-09-07 22:30:04 +02:00
Franz Wilding
253d0a683b [Form] Fix DateTimeType html5 input format 2018-09-07 16:52:44 +03:00
Nicolas Grekas
373dad371a bug #28371 [VarExporter] fix exporting objects that mutate on __sleep() (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

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

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

Commits
-------

36e412fdfc [VarExporter] fix exporting objects that mutate on __sleep()
2018-09-07 14:21:30 +02:00
Nicolas Grekas
150e3e1ad9 bug #28384 [VarDumper] First time dump() method call not working issue (me-shaon)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarDumper] First time dump() method call not working issue

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

Calling the `dump()` method for the first time is not producing any output. That's because, in the [latest change ](46434a6d67), the first call to the `dump` method is not calling the `$handler` at all. It's just setting the `$handler`.
In this PR, I've tried to fix this issue.

Commits
-------

b9681fe83b Fix #28370: First time dump() method call not working issue
2018-09-07 14:07:56 +02:00
Maxime Steinhausser
b24e0543e0 [HttpKernel][Profiler] Add arg value resolver category in performances panel 2018-09-07 12:37:30 +02:00
Fabien Potencier
40fff43ea9 bug #28377 fix fopen flags (SpacePossum)
This PR was merged into the 2.8 branch.

Discussion
----------

fix fopen flags

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

<!--
Fixes the flags/mode used with `fopen`
-->

Commits
-------

6d155ed059 fix fopen calls
2018-09-07 05:20:27 +02:00
SpacePossum
6d155ed059 fix fopen calls 2018-09-06 19:11:15 +02:00
me_shaon
b9681fe83b Fix #28370: First time dump() method call not working issue 2018-09-06 23:01:56 +06:00
Fabien Potencier
ae599089c3 minor #28380 Update .editorconfig (Saphyel)
This PR was submitted for the master branch but it was squashed and merged into the 2.8 branch instead (closes #28380).

Discussion
----------

Update .editorconfig

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

.editorconfig is already in the project and we can add some options to match with the PSR standard

Commits
-------

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

Discussion
----------

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

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

Should help the garbage collector during tests.

Commits
-------

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

Discussion
----------

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

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

According to comments done after merge in #26859.

Commits
-------

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

Discussion
----------

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

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

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

Commits
-------

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

Discussion
----------

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

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

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

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

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

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

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

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

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

Commits
-------

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

Discussion
----------

[DI] leverage Contracts\Service

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

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

Commits
-------

87392ab30d [DI] leverage Contracts\Service
2018-09-05 10:20:06 +02:00
Nicolas Grekas
cba6421b2b Merge branch '3.4' into 4.1
* 3.4:
  [DI] Fix dumping some complex service graphs
  change baseUrl to basePath to fix wrong profiler url
2018-09-05 09:26:50 +02:00
Nicolas Grekas
8851c141d2 bug #28366 [DI] Fix dumping some complex service graphs (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix dumping some complex service graphs

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #28296 (and its duplicates #28355 & #28362 ~+ possibly #28304~)
| License       | MIT
| Doc PR        | -

Commits
-------

769fd4be0e [DI] Fix dumping some complex service graphs
2018-09-05 09:20:12 +02:00
Nicolas Grekas
769fd4be0e [DI] Fix dumping some complex service graphs 2018-09-05 08:48:52 +02:00
Fabien Potencier
90494c20cc Revert "minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)"
This reverts commit 487f8acde5, reversing
changes made to cf359c2e79.
2018-09-05 07:00:57 +02:00
Robin Chalas
c3fd60df2c feature #22225 [Console] Support formatted text cutting (ro0NL)
This PR was squashed before being merged into the 4.2-dev branch (closes #22225).

Discussion
----------

[Console] Support formatted text cutting

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

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

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

Commits
-------

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

Discussion
----------

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

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

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

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

Commits
-------

0edbbd3fea Format file size in validation message according to binaryFormat option
2018-09-04 19:17:48 +02:00