Commit Graph

38476 Commits

Author SHA1 Message Date
Robin Chalas
5d75f14d7b Merge branch '2.8' into 3.4
* 2.8:
  [Validator] Add Japanese translations
  [Console] Fix input values allowed types
2018-09-16 13:50:16 +02:00
Robin Chalas
76f9bdc471 minor #28474 [FrameworkBundle] Don't register MessengerDataCollector if messenger is not enabled (chalasr)
This PR was merged into the 4.1 branch.

Discussion
----------

[FrameworkBundle] Don't register MessengerDataCollector if messenger is not enabled

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

Will fix `deps=high` SecurityBundle's build once merged up to master which is broken since #28418

Commits
-------

e64ceb5 [FrameworkBundle] Don't register MessengerDataCollector if messenger is not enabled
2018-09-16 13:48:01 +02:00
Fred Cox
e21a1a4df1 Added relevent links for parsing to the phpdoc 2018-09-15 14:33:50 +03:00
Fred Cox
4f06f1524d Add stricter checking for valid date time string 2018-09-15 14:25:16 +03:00
Robin Chalas
e64ceb5c13 [FrameworkBundle] Don't register MessengerDataCollector if messenger is not enabled 2018-09-15 12:55:03 +02:00
Robin Chalas
5b0801998d Merge branch '4.1'
* 4.1:
  [Console] Fix typo in tests
  [Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions
  [Console] fixed corrupt error output for unknown multibyte short option
  [Console] fixed PHPDoc for setArgument/setOption in InputInterface
  Register the messenger data collector only when the profiler is enabled
  [Intl] Blacklist Eurozone and United Nations in Region Data Generator
2018-09-15 12:26:24 +02:00
Robin Chalas
ddde83cdd9 Merge branch '3.4' into 4.1
* 3.4:
  [Console] Fix typo in tests
  [Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions
  [Console] fixed corrupt error output for unknown multibyte short option
  [Console] fixed PHPDoc for setArgument/setOption in InputInterface
  [Intl] Blacklist Eurozone and United Nations in Region Data Generator
2018-09-15 11:59:43 +02:00
Robin Chalas
d4cddac14d Merge branch '2.8' into 3.4
* 2.8:
  [Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions
  [Console] fixed corrupt error output for unknown multibyte short option
  [Console] fixed PHPDoc for setArgument/setOption in InputInterface
  [Intl] Blacklist Eurozone and United Nations in Region Data Generator
2018-09-15 11:59:15 +02:00
Fabien Potencier
e40bb0fa5f minor #28472 [Validator] Add Japanese translations (issei-m)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #28472).

Discussion
----------

[Validator] Add Japanese translations

| 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

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

7d78e3672b [Validator] Add Japanese translations
2018-09-15 07:41:57 +02:00
Issei.M
7d78e3672b [Validator] Add Japanese translations 2018-09-15 07:41:47 +02:00
Matthias Pigulla
d6f5d6bccd
Fix symfony/console (optional) dependency for MonologBridge
Since 278c26f589, `ConsoleHandler` tries to pass a verbosity level into `Output::write()`. 

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

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

Not sure how to add a test for this... 🤷‍♂️ :
2018-09-14 18:15:55 +02:00
Christian Flothmann
c4a6c9fa00 fix not displaying labels when value is false 2018-09-14 15:32:30 +02:00
Christian Flothmann
ee4ce43e91 fail reverse transforming invalid RFC 3339 dates 2018-09-14 13:46:25 +02:00
Christian Flothmann
5318e2eb15 forward the invalid_message option in date types 2018-09-14 09:49:37 +02:00
Fabien Potencier
d5a366faa1 minor #28448 [Console] Fix input values allowed types (chalasr)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Fix input values allowed types

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

Continuation of #28374

Commits
-------

0c16cd9fae [Console] Fix input values allowed types
2018-09-12 07:05:17 +02:00
Fabien Potencier
8ab7077225 minor #28451 [Messenger] Throw an exception when the serializer component is not loaded (sroze)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Throw an exception when the serializer component is not loaded

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

This adds a sensible exception when trying to build the class without the Symfony Serializer component.

Commits
-------

c4415cfd67 Throw an exception when the serializer component is not loaded
2018-09-12 06:58:19 +02:00
Samuel ROZE
c4415cfd67 Throw an exception when the serializer component is not loaded 2018-09-12 00:01:16 +02:00
Robin Chalas
839dc2693a feature #28373 [Console] Support max column width in Table (ro0NL)
This PR was squashed before being merged into the 4.2-dev branch (closes #28373).

Discussion
----------

[Console] Support max column width in Table

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

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

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

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

Given

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

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

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

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

Commits
-------

175f68f [Console] Support max column width in Table
2018-09-11 19:20:18 +02:00
Roland Franssen
175f68fe51 [Console] Support max column width in Table 2018-09-11 19:20:06 +02:00
Robin Chalas
b4bbc254b5 minor #28450 [Console] Fix typo in tests (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix typo in tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Spotted in #28373

cc @chalasr

Commits
-------

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

Discussion
----------

Remove all usages of call_user_func_array()

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

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

Commits
-------

b2718d7666 Remove all usages of call_user_func_array()
2018-09-11 13:53:05 +02:00
Pavel Batanov
761415fc1b Add verbose ext-ldap error if present for easier debugging 2018-09-11 14:24:42 +03:00
Nicolas Grekas
2879baf3bd bug #28437 [VarExporter] fix more edge cases (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarExporter] fix more edge cases

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

As found while preparing #28417

Commits
-------

443bd119b1 [VarExporter] fix more edge cases
2018-09-11 10:47:39 +02:00
Nicolas Grekas
443bd119b1 [VarExporter] fix more edge cases 2018-09-11 10:35:53 +02:00
Nicolas Grekas
b2718d7666 Remove all usages of call_user_func_array() 2018-09-11 09:53:26 +02:00
Robin Chalas
86a5d92ce7 minor #28409 [Console] Document what is validated before and after Command::initialize() (chalasr)
This PR was merged into the 2.8 branch.

Discussion
----------

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

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

Commits
-------

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

Discussion
----------

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

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

Commits
-------

e2e4049721 [Intl] Blacklist Eurozone and United Nations in Region Data Generator
2018-09-10 18:51:10 +02:00
Samuel ROZE
a3e6e8300c bug #28418 [FrameworkBundle] Register the messenger data collector only when the profiler is enabled (pierredup)
This PR was merged into the 4.1 branch.

Discussion
----------

[FrameworkBundle] Register the messenger data collector only when the profiler is enabled

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

The data collector for the messenger is currently unconditionally registered, which causes increased memory usage even in production. Instead, it should only be registered along with the rest of the data collectors only when the profiler is enabled

Commits
-------

bd3a66bc59 Register the messenger data collector only when the profiler is enabled
2018-09-10 12:40:37 +02:00
Nicolas Grekas
deae538245 feature #28422 [VarExporter] throw component-specific exceptions (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarExporter] throw component-specific exceptions

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

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

Commits
-------

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

Discussion
----------

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

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

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

Commits
-------

0f86156 [Console] fixed corrupt error output for unknown multibyte short option
2018-09-10 10:47:57 +02:00
downace
0f861568aa [Console] fixed corrupt error output for unknown multibyte short option 2018-09-10 10:47:50 +02:00
Nicolas Grekas
2c444927bc [VarExporter] throw component-specific exceptions 2018-09-10 10:23:43 +02:00
Fabien Potencier
ed5ddf9c39 feature #28415 [FrameworkBundle] Deprecate ContainerAwareCommand (chalasr)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] Deprecate ContainerAwareCommand

| 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        | https://github.com/symfony/symfony-docs/pull/10307

Follow up of the recent `Controller` deprecation.

I think people are widely used to register their commands as services and use proper dependency injection, we made the move for core commands in 3.4, let's deprecate `ContainerAwareCommand` for 4.2.

Commits
-------

744bf0e7ac [FrameworkBundle] Deprecate ContainerAwareCommand
2018-09-10 10:18:44 +02:00
Robin Chalas
744bf0e7ac [FrameworkBundle] Deprecate ContainerAwareCommand 2018-09-10 10:14:57 +02:00
Fabien Potencier
1c759a1719 minor #28374 [Console] fixed PHPDoc for setArgument/setOption in InputInterface (liarco)
This PR was squashed before being merged into the 2.8 branch (closes #28374).

Discussion
----------

[Console] fixed PHPDoc for setArgument/setOption in InputInterface

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

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

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

Commits
-------

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

Discussion
----------

[Messenger] Change AmqpExt classes constructor signature

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

This pull requests does 2 things:

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

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

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

Commits
-------

2d55ae5212 [Messenger] changed AmqpExt classes constructor signature
2018-09-10 09:51:35 +02:00
Fabien Potencier
05410c5a63 minor #28398 Remove usage of backticks in exception messages (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Remove usage of backticks in exception messages

| 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

Exception messages are not formatted in Markdown, so let's use `"` instead everywhere for more consistency.

Commits
-------

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

Discussion
----------

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

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

Makes the component-based even simpler.

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

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

Commits
-------

5b93f5f45e Uses a messenger serializer, not an individual encoder/decoder
2018-09-10 08:01:02 +02:00
Nicolas Grekas
3b931fe6c9 bug #28414 [VarExporter] fix exporting final serializable classes extending internal ones (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarExporter] fix exporting final serializable classes extending internal ones

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

Another edge case, discovered while reading https://github.com/doctrine/instantiator/issues/39

Commits
-------

a5bf9b0445 [VarExporter] fix exporting final serializable classes extending internal ones
2018-09-09 23:08:05 +02:00
Nicolas Grekas
2c428d130d [FrameworkBundle] bind "ContainerInterface $parameterBag" arguments to the "parameter_bag" service 2018-09-09 21:29:59 +02:00
kevin.nadin
f75fffa997 Trigger deprecation notices when inherited class calls parent method but misses adding new arguments 2018-09-09 20:06:02 +02:00
Nicolas Grekas
a5bf9b0445 [VarExporter] fix exporting final serializable classes extending internal ones 2018-09-09 17:25:49 +02:00