Commit Graph

49337 Commits

Author SHA1 Message Date
Fabien Potencier
afed5eaefd minor #37199 [FrameworkBundle] Move profiling configuration to PHP (hvt)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle] Move profiling configuration to PHP

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | #37186
| License       | MIT

Moving profiling configuration in framework bundle to PHP.

Commits
-------

20b5d245c7 [FrameworkBundle] Move profiling configuration to PHP
2020-06-11 17:21:00 +02:00
Fabien Potencier
3c5f9d1c8c minor #37207 [Ssi] Move configuration to PHP (50bhan)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[Ssi] Move configuration to PHP

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Ref #37186
| License       | MIT
| Doc PR        | n/a

Commits
-------

5a4d667369 [Ssi] Move configuration to PHP
2020-06-11 16:52:53 +02:00
50bhan
5a4d667369 [Ssi] Move configuration to PHP 2020-06-11 16:52:47 +02:00
Harm van Tilborg
20b5d245c7 [FrameworkBundle] Move profiling configuration to PHP 2020-06-11 16:47:52 +02:00
Fabien Potencier
188a9850df minor #37212 [FrameworkBundle] Move debug configuration to PHP (Benoit Mallo)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle] Move debug configuration to PHP

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Ref #37186
| License       | MIT
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch master.
-->

Commits
-------

a226a52d65 [FrameworkBundle] Move debug configuration to PHP
2020-06-11 16:41:46 +02:00
Benoit Mallo
a226a52d65 [FrameworkBundle] Move debug configuration to PHP 2020-06-11 16:41:38 +02:00
Fabien Potencier
eb4d77740f Fix CS 2020-06-11 16:40:03 +02:00
Fabien Potencier
c48a30e012 minor #37206 [FrameworkBundle] Move security-csrf configuration to PHP (j.schmitt)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle] Move security-csrf configuration to PHP

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Ref #37186
| License       | MIT
Moving security-csrf configuration in framework bundle to PHP.

Commits
-------

a2d6581345 [FrameworkBundle] Move security-csrf configuration to PHP
2020-06-11 16:38:48 +02:00
Fabien Potencier
596cdb04b7 minor #37219 FrameworkBundle fix incorrect nested arrays in php config (GromNaN)
This PR was merged into the 5.2-dev branch.

Discussion
----------

FrameworkBundle fix incorrect nested arrays in php config

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix https://github.com/symfony/symfony/pull/37201#discussion_r438652771
| License       | MIT

Commits
-------

20459884d2 Fix invalid syntax
2020-06-11 16:36:48 +02:00
Jérôme TAMARELLE
20459884d2 Fix invalid syntax 2020-06-11 16:03:44 +02:00
Fabien Potencier
124c139c39 minor #37203 [PropertyInfo] Move configuration to PHP (qneyrat)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[PropertyInfo] Move configuration to PHP

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Ref #37186
| License       | MIT
| Doc PR        | n/a

Commits
-------

5dab6ffc4b [PropertyInfo] Move configuration to PHP
2020-06-11 13:19:48 +02:00
qneyrat
5dab6ffc4b [PropertyInfo] Move configuration to PHP 2020-06-11 13:19:42 +02:00
Fabien Potencier
263d54fc70 minor #37205 [Framework] Convert config/error_renderer.xml to php (benji07)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Framework] Convert config/error_renderer.xml to php

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Ref #37186
| License       | MIT

Commits
-------

213091e8d2 [Framework] Convert config/error_renderer.xml to php
2020-06-11 13:17:38 +02:00
j.schmitt
a2d6581345 [FrameworkBundle] Move security-csrf configuration to PHP 2020-06-11 11:24:10 +02:00
Fabien Potencier
7a9f9e4abb minor #37201 [FrameworkBundle] Convert config/secrets.xml to .php (GromNaN)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle] Convert config/secrets.xml to .php

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Ref #37186
| License       | MIT

Commits
-------

6ec97116a3 Convert config/secrets.xml to .php
2020-06-11 11:14:18 +02:00
Fabien Potencier
6d9e13e5ff Bump min version of DI 2020-06-11 11:12:52 +02:00
Fabien Potencier
88a06c936c feature #37198 [FrameworkBundle] Add support for tagged_iterator/tagged_locator in unused tags util (fabpot)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle] Add support for tagged_iterator/tagged_locator in unused tags util

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

/cc @stof :)

Commits
-------

164ca90d89 [FrameworkBundle] Add support for tagged_iterator/tagged_locator in unused tags util
2020-06-11 11:10:19 +02:00
Benjamin Lévêque
213091e8d2 [Framework] Convert config/error_renderer.xml to php 2020-06-11 10:58:19 +02:00
Jérôme TAMARELLE
6ec97116a3 Convert config/secrets.xml to .php 2020-06-11 10:36:15 +02:00
Fabien Potencier
1b086eefb0 minor #37200 [FrameworkBundle] Convert config/mime_type.xml to .php (GromNaN)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle] Convert config/mime_type.xml to .php

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Ref #37186
| License       | MIT

Commits
-------

fa92490fcb Convert config/mime_type.xml into mime_type.php
2020-06-11 10:16:01 +02:00
Jérôme TAMARELLE
fa92490fcb Convert config/mime_type.xml into mime_type.php 2020-06-11 09:59:35 +02:00
Fabien Potencier
8df6380fc7 Fix CHANGELOG 2020-06-11 09:26:22 +02:00
Fabien Potencier
6ab2198fb5 minor #37196 [HttpClient] make DNS resolution lazy with NativeHttpClient (nicolas-grekas)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[HttpClient] make DNS resolution lazy with NativeHttpClient

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

Neither a bug nor a feature but still an improvement. This aligns the behavior of NativeHttpClient with the other adapters.

Commits
-------

d3a450353d [HttpClient] make DNS resolution lazy with NativeHttpClient
2020-06-11 08:10:34 +02:00
Fabien Potencier
131682fe75 minor #37189 [Notifier] Move configuration to PHP (szepczynski)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Notifier] Move configuration to PHP

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | #37186 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT

Move Notifier Component Container configuration to PHP

Commits
-------

9891809d47 [Notifier] Move configuration yo PHP
2020-06-11 08:08:24 +02:00
Fabien Potencier
164ca90d89 [FrameworkBundle] Add support for tagged_iterator/tagged_locator in unused tags util 2020-06-11 08:03:43 +02:00
Nicolas Grekas
d3a450353d [HttpClient] make DNS resolution lazy with NativeHttpClient 2020-06-11 00:12:57 +02:00
Marcin Szepczyński
9891809d47 [Notifier] Move configuration yo PHP 2020-06-10 15:35:51 +02:00
Fabien Potencier
9b08626180 minor #37187 add php loader to FrameworkExtension (szepczynski)
This PR was merged into the 5.2-dev branch.

Discussion
----------

add php loader to FrameworkExtension

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | #37186 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT

Add php loader to migrate configuration from XML to PHP

Commits
-------

e05e811067 add php loader to FrameworkExtension
2020-06-10 14:06:49 +02:00
Marcin Szepczyński
e05e811067 add php loader to FrameworkExtension 2020-06-10 13:43:24 +02:00
Fabien Potencier
d1b014a1cb feature #37165 [Mime] Add DKIM support (fabpot)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Mime] Add DKIM support

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #36014 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | not yet

```php
$dkimSigner = new DkimSigner($pk, 'example.com', 'sf');
$signedEmail = $dkimSigner->sign($email);
```
You can also pass options:

```php
$dkimSigner = new DkimSigner($pk, 'example.com', 'sf');
$signedEmail = $dkimSigner->sign($email, (new DkimOptions())
    ->bodyCanon('relaxed')
    ->headerCanon('relaxed')
    ->headersToIgnore(['Message-ID'])
    ->toArray()
);
```

Commits
-------

6dc533821c [Mime] Add DKIM support
2020-06-10 12:50:38 +02:00
Fabien Potencier
753cac7c62 feature #36778 Use PHP instead of XML as the prefered service/route configuration in core (fabpot)
This PR was merged into the 5.2-dev branch.

Discussion
----------

Use PHP instead of XML as the prefered service/route configuration in core

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes-ish <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

In Symfony 6, I (we?) would want to promote usage of configuration written in PHP instead of YAML. For third-party bundles and core, we should do the same, replacing XML with PHP. Doing so would remove the need for the XML lib for core.

The biggest advantage is auto-completion with any modern IDE without explicit support for Symfony, and probably one less thing to learn (how to configure things in YAML/XML).

Be warned that it does NOT concern semantic configuration which is much harder.

This PR does the work for the Twig bundle as an example. Once we agreed on the CS, the same should then be done for other core bundles both for service configuration and route configuration.

Embeds #36775 until it is merged.

Commits
-------

0aedd54fc1 [Twig] Move configuration to PHP
2020-06-10 12:49:37 +02:00
Fabien Potencier
6dc533821c [Mime] Add DKIM support 2020-06-10 12:27:43 +02:00
Fabien Potencier
0aedd54fc1 [Twig] Move configuration to PHP 2020-06-10 05:31:24 +02:00
Fabien Potencier
ea956b1956 feature #36802 [Console] Add support for true colors (fabpot)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Console] Add support for true colors

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #26576, Fix #19844 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | -

This PR adds support for true colors in the Console component.

Instead of adding many ways to add more colors than the current "default" ones, I've opted to only add true color support via Hex CSS colors. If you have something else (RGB, HSV, ...), you need to first convert it to a CSS color. I've also decided to not support the ANSI 256 colors as most terminals support true colors nowadays.

If true colors are not supported by the terminal, we fall back to the "nearest" default color.

`<fg=green;bg=blue>` is now equivalent to `<fg=#00ff00;bg=#00f>`.

The `Color` class is usable outside of the Console framework as well:

```php
$color = new Color('black', 'white');
echo $color->apply("foo");
echo "\n";

$color = new Color('red', 'yellow');
echo $color->apply("foo");
echo "\n";

$color = new Color('#000000', '#ffffff');
echo $color->apply("foo");
$color = new Color('#000', '#fff', ['underscore', 'reverse']);
echo $color->apply("bar");
echo "\n";
```

Rainbow time!

```php
function rainbowColor($i) {
    $h = (int) ($i / 43);
    $f = (int) ($i - 43 * $h);
    $t = (int) ($f * 255 / 43);
    $q = 255 - $t;

    if ($h == 0) {
        return new Color('', sprintf('#FF%02x00', $t));
    } elseif ($h == 1) {
        return new Color('', sprintf('#%02xFF00', $q));
    } elseif ($h == 2) {
        return new Color('', sprintf('#00FF%02x', $t));
    } elseif ($h == 3) {
        return new Color('', sprintf('#00%02xFF', $q));
    } elseif ($h == 4) {
        return new Color('', sprintf('#%02x00FF', $t));
    } elseif ($h == 5) {
        return new Color('', sprintf('#FF00%02x', $q));
    }
}

for ($i = 0; $i < 128; $i++) {
    echo rainbowColor($i)->apply(' ');
}
echo "\n";

for ($i = 255; $i >= 128; $i--) {
    echo rainbowColor($i)->apply(' ');
}
echo "\n";
```

![image](https://user-images.githubusercontent.com/47313/81796170-59af5e00-950d-11ea-8203-18c13ae8a07e.png)

Commits
-------

d066514cf1 [Console] Add support for true colors
2020-06-10 05:08:03 +02:00
Fabien Potencier
d066514cf1 [Console] Add support for true colors 2020-06-10 04:55:06 +02:00
Fabien Potencier
4984ce1036 feature #36775 [DependencyInjection] Add abstract_arg() and param() (fabpot)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[DependencyInjection] Add abstract_arg() and param()

| Q             | A
| ------------- | ---
| Branch?       | maste
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | -

Added abstract_arg() and param() to configuration abstract arguments in PHP DSL.

Commits
-------

1fd4e8bb60 [DependencyInjection] Add abstract_arg() and param()
2020-06-10 04:11:49 +02:00
Fabien Potencier
1fd4e8bb60 [DependencyInjection] Add abstract_arg() and param() 2020-06-10 04:11:30 +02:00
Fabien Potencier
bb70cc8c47 minor #37039 [ExpressionLanguage] add details for error messages (mamontovdmitriy)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[ExpressionLanguage] add details for error messages

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36847
| License       | MIT
| Doc PR        |

Hello!

This PR contains a more detail error messages for [ExpressionLanguage], which include info about affected node and attribute.

My English is poor. Please, spell check in error texts.

Commits
-------

5852a8cedd [ExpressionLanguage] add details for error messages
2020-06-10 03:51:12 +02:00
Fabien Potencier
dee6d437b6 feature #37040 [PropertyInfo] Support using the SerializerExtractor with no group check (GuilhemN)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[PropertyInfo] Support using the SerializerExtractor with no group check

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       |  <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        |  <!-- required for new features -->

It seems there is no way currently to leverage the new `@Ignore` annotation metadata without using serializer groups in third party code.
Indeed the only way to access the serializer's metadata is through the PropertyInfo component since metadata are marked as `@internal` in the Serializer component itself. However, the PropertyInfo component doesn't allow accessing them without using a groups constraint.

This PR proposes a fix by interpreting `serializer_groups = null` as no groups constraint.

This feature would be useful in NelmioApiDocBundle, see https://github.com/nelmio/NelmioApiDocBundle/issues/1595.

Commits
-------

4190bfaf48 [PropertyInfo] Support using the SerializerExtractor with no group check
2020-06-10 03:48:12 +02:00
Guilhem Niot
4190bfaf48 [PropertyInfo] Support using the SerializerExtractor with no group check 2020-06-10 03:48:06 +02:00
Fabien Potencier
4972ee08ef minor #37147 [DependencyInjection] Display alternatives when a service is not found in CheckExceptionOnInvalidReferenceBehaviorPass (fancyweb)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[DependencyInjection] Display alternatives when a service is not found in CheckExceptionOnInvalidReferenceBehaviorPass

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

I often see the mistake of using `@my_service` instead of `my_service` in bundles configurations in YAML (on entries that are then turned into references). Since we don't currently display alternatives, the message content is just that the service don't exist which is hard to understand for new users of the framework.

Commits
-------

6b8f181f1a [DependencyInjection] Display alternatives when a service is not found in CheckExceptionOnInvalidReferenceBehaviorPass
2020-06-10 03:37:54 +02:00
Fabien Potencier
c0831f91e8 feature #37175 [Mime] Deprecate Address::fromString() (fabpot)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Mime] Deprecate Address::fromString()

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

Follow-up of #37167

Commits
-------

6e28fdaa57 [Mime] Deprecate Address::fromString()
2020-06-09 18:19:30 +02:00
Fabien Potencier
6e28fdaa57 [Mime] Deprecate Address::fromString() 2020-06-09 17:54:11 +02:00
Fabien Potencier
61d79e19a9 Merge branch '5.1'
* 5.1:
  [Mime] use fromString when creating a new Adress
2020-06-09 17:07:48 +02:00
Fabien Potencier
d08db0f3f5 Merge branch '5.0' into 5.1
* 5.0:
  [Mime] use fromString when creating a new Adress
2020-06-09 17:07:35 +02:00
Fabien Potencier
748854bad1 Merge branch '4.4' into 5.0
* 4.4:
  [Mime] use fromString when creating a new Adress
2020-06-09 17:07:20 +02:00
Fabien Potencier
5b719d1ee4 bug #37167 [Mime] use fromString when creating a new Address (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mime] use fromString when creating a new Address

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

When creating an Address, there are two ways right now in 4.4: `Address::create()` which takes an email or an instance of Address and `Address::fromString()` which takes an email or an email+name.

In 4.4, I propose to make `create` supports everything possible. And in 5.2, I will probably propose to deprecate `fromString()`.

Commits
-------

de68787693 [Mime] use fromString when creating a new Adress
2020-06-09 17:06:27 +02:00
Nicolas Grekas
284f6f2b0f Merge branch '5.1'
* 5.1:
  [Messenger] fix typo
2020-06-09 16:24:57 +02:00
Nicolas Grekas
7da0ffd062 Merge branch '5.0' into 5.1
* 5.0:
  [Messenger] fix typo
2020-06-09 16:24:29 +02:00
Nicolas Grekas
bd4a238fb2 Merge branch '4.4' into 5.0
* 4.4:
  [Messenger] fix typo
2020-06-09 16:23:46 +02:00