Commit Graph

49871 Commits

Author SHA1 Message Date
Daniel STANCU
68b2490ee2 [Notifier][Slack] Error trown when having more than 10 fields specified #36346 2020-06-25 09:23:57 +02:00
Fabien Potencier
ce7e39b7bd feature #36739 [TwigBundle] Deprecate the public "twig" service to private (fancyweb)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[TwigBundle] Deprecate the public "twig" service to private

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

I think the `twig` service don't need to be public anymore - we never need to access it directly in Symfony's code.

Commits
-------

f64cbada89 [TwigBundle] Deprecate the public "twig" service to private
2020-06-25 09:15:42 +02:00
Fabien Potencier
55b55bbfe1 minor #37410 finalize xml to php service config by renaming variables (Tobion)
This PR was merged into the 5.2-dev branch.

Discussion
----------

finalize xml to php service config by renaming variables

| 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       | Finalize #37186
| License       | MIT
| Doc PR        |

Now that we don't need both loaders we can go back to the original name to reduce diffs.

Commits
-------

c5a3adc731 finalize xml to php service config by renaming variables
2020-06-25 09:03:39 +02:00
Tobias Schultze
c5a3adc731 finalize xml to php service config by renaming variables 2020-06-24 18:47:30 +02:00
Tobias Schultze
18fcb5f956 minor #37235 [SecurityBundle] Move security configuration to PHP (qneyrat, Tobion)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[SecurityBundle] Move security 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
-------

857123f8bf fix xml to php migration for security services
acc705762a [SecurityBundle] Move security configuration to PHP
2020-06-24 18:28:26 +02:00
Tobias Schultze
857123f8bf fix xml to php migration for security services 2020-06-24 18:16:13 +02:00
qneyrat
acc705762a [SecurityBundle] Move security configuration to PHP 2020-06-24 17:27:05 +02:00
Robin Chalas
a184e54cb3 Merge branch '5.1'
* 5.1:
  fix merge
  Fix merge
2020-06-24 17:21:47 +02:00
Robin Chalas
5355172c10 Merge branch '5.0' into 5.1
* 5.0:
  fix merge
  Fix merge
2020-06-24 17:21:02 +02:00
Robin Chalas
2caadf17b4 Merge branch '4.4' into 5.0
* 4.4:
  fix merge
  Fix merge
2020-06-24 17:19:54 +02:00
Robin Chalas
2f23b01b0b fix merge 2020-06-24 17:18:50 +02:00
Thomas Calvet
f64cbada89 [TwigBundle] Deprecate the public "twig" service to private 2020-06-24 16:45:15 +02:00
Tobias Schultze
40890b14e4 minor #37302 [Form] Move configuration to PHP (misekai)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[Form] Move configuration to PHP

| Q             | A
| ------------- | ---
| Branch?       | master for features / 3.4, 4.4, 5.0 or 5.1 for bug fixes <!-- see below -->
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Part of #37186
| License       | MIT
| Doc PR        | -

Commits
-------

9e2e8eeb29 [Form] Move configuration to PHP
2020-06-24 16:38:26 +02:00
Alex Vo
9e2e8eeb29 [Form] Move configuration to PHP 2020-06-24 16:38:17 +02:00
Fabien Potencier
fb123e4fca feature #37272 [HttpFoundation] add HeaderUtils::parseQuery(): it does the same as parse_str() but preserves dots in variable names (nicolas-grekas)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[HttpFoundation] add `HeaderUtils::parseQuery()`: it does the same as `parse_str()` but preserves dots in variable names

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

Inspired by https://github.com/symfony/psr-http-message-bridge/pull/80
/cc @drupol

Related to #9009, #29664, #26220 but also https://github.com/api-platform/core/issues/509 and https://www.drupal.org/project/drupal/issues/2984272
/cc @dunglas @alexpott

Commits
-------

dd81e32ec1 [HttpFoundation] add `HeaderUtils::parseQuery()`: it does the same as `parse_str()` but preserves dots in variable names
2020-06-24 15:46:31 +02:00
Fabien Potencier
550ab6fd8c Fix merge 2020-06-24 15:38:36 +02:00
Fabien Potencier
809b4d6748 Merge branch '5.1'
* 5.1:
  [HttpClient] Support for cURL handler objects.
  [HttpClient] unset activity list when creating CurlResponse
  Fixed typo in test name
  [DI] Fix call to sprintf in ServicesConfigurator::stack()
  add .body wrapper element
  [HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3"
  [VarDumper] Support for cURL handler objects.
  Check whether path is file in DataPart::fromPath()
  [DI][FrameworkBundle] Remove whitelist occurrences
  Avoid accessibility errors on debug toolbar
  Resolve event bubbling logic in a compiler pass
  update cookie test
2020-06-24 15:36:31 +02:00
Fabien Potencier
01872c7fe3 Merge branch '5.0' into 5.1
* 5.0:
  [HttpClient] Support for cURL handler objects.
  [HttpClient] unset activity list when creating CurlResponse
  Fixed typo in test name
  add .body wrapper element
  [HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3"
  [VarDumper] Support for cURL handler objects.
  Check whether path is file in DataPart::fromPath()
  [DI][FrameworkBundle] Remove whitelist occurrences
  Avoid accessibility errors on debug toolbar
  update cookie test
2020-06-24 15:36:18 +02:00
Fabien Potencier
d1c1973bb4 Merge branch '4.4' into 5.0
* 4.4:
  [HttpClient] Support for cURL handler objects.
  [HttpClient] unset activity list when creating CurlResponse
  Fixed typo in test name
  add .body wrapper element
  [HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3"
  [VarDumper] Support for cURL handler objects.
  Check whether path is file in DataPart::fromPath()
  [DI][FrameworkBundle] Remove whitelist occurrences
  Avoid accessibility errors on debug toolbar
2020-06-24 15:36:01 +02:00
Fabien Potencier
378894d64d Merge branch '3.4' into 4.4
* 3.4:
  Fixed typo in test name
  [HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3"
  [VarDumper] Support for cURL handler objects.
  [DI][FrameworkBundle] Remove whitelist occurrences
  Avoid accessibility errors on debug toolbar
2020-06-24 15:34:53 +02:00
Fabien Potencier
40152c37ce bug #37389 [HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3" (YaFou)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3"

| Q             | A
| ------------- | ---
| Branch?       | 3.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       | Fix #36068 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | no
<!--
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.
-->

`.mp3` files are more common than `.mpga` files.

Commits
-------

76a744ad91 [HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3"
2020-06-24 15:26:36 +02:00
Fabien Potencier
de0563d8cd minor #37242 [BrowserKit] update cookie test for cookie values with double quotes (gabrielsolomon)
This PR was merged into the 5.0 branch.

Discussion
----------

[BrowserKit] update cookie test for cookie values with double quotes

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | no
| New feature?  | noâ
| Deprecations? | no
| Tickets       | Fix #37161
| License       | MIT
| Doc PR        | symfony/symfony-docs#

Provide a test for cookie values with double quotes

Commits
-------

a50c660823 update cookie test
2020-06-24 11:01:43 +02:00
Fabien Potencier
3308b25fe4 feature #37403 [Notifier] Return SentMessage from the Notifier message handler (fabpot)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Notifier] Return SentMessage from the Notifier message handler

| 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       | see https://github.com/symfony/symfony/pull/36611#issuecomment-648448026 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        |

Commits
-------

5855d112b7 [Notifier] Return SentMessage from the Notifier message handler
2020-06-24 10:47:24 +02:00
Fabien Potencier
08f47a11f5 minor #37404 [FrameworkBundle] use dashes instead of underscores for XML attributes (xabbuh)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle] use dashes instead of underscores for XML attributes

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

Commits
-------

bfe1631edd use dashes instead of underscores for XML attributes
2020-06-24 10:44:29 +02:00
Fabien Potencier
b3adba83fd bug #37379 [HttpClient] Support for cURL handler objects (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] Support for cURL handler objects

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37378
| License       | MIT
| Doc PR        | N/A

Commits
-------

7ccc2e1f28 [HttpClient] Support for cURL handler objects.
2020-06-24 10:43:43 +02:00
Alexander M. Turek
7ccc2e1f28 [HttpClient] Support for cURL handler objects. 2020-06-24 10:43:17 +02:00
Fabien Potencier
19668b2a75 bug #37383 [VarDumper] Support for cURL handler objects (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] Support for cURL handler objects

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #37378
| License       | MIT
| Doc PR        | N/A

Commits
-------

39c1a6373b [VarDumper] Support for cURL handler objects.
2020-06-24 10:40:29 +02:00
Fabien Potencier
aeb0946df0 bug #37395 add .body wrapper element (Nemo64)
This PR was merged into the 4.4 branch.

Discussion
----------

add .body wrapper element

This change makes the notification email responsive.

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | none
| License       | MIT

There was a wrapper missing from the foundation template.
This wrapper applies all `table.body table.container` styles from the foundation stylesheet
including font's and the responsive rules that were missing.

Commits
-------

5b74bbd288 add .body wrapper element
2020-06-24 10:39:13 +02:00
Fabien Potencier
98acf1cbbd bug #37400 [HttpClient] unset activity list when creating CurlResponse (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] unset activity list when creating CurlResponse

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

This might fix an error that looks like a race condition.
I've seen it, and @Toflar too, but we're unable to reproduce.

> Argument 2 passed to Symfony\Component\HttpClient\Chunk\DataChunk::__construct() must be of the type string, null given

This patch tentatively empties activity lists. If the issue is related to the PHP engine reusing resource ids, this will fix it. Otherwise, we'll know we'll have to look elsewhere.

> looking at https://github.com/symfony/http-client/blob/4.4/Response/ResponseTrait.php#L363 I don’t really see how this can happen other than inflate_add() returning null

> $response->inflate is true before becoming a resource; there must be a race condition in the curl client that ends up listing a data chunk before a FirstChunk in the activity list, which would explain why inflate_add is given a non-resource (`true`).

Commits
-------

b249f00519 [HttpClient] unset activity list when creating CurlResponse
2020-06-24 10:38:05 +02:00
Christian Flothmann
bfe1631edd use dashes instead of underscores for XML attributes 2020-06-24 10:36:02 +02:00
Fabien Potencier
5855d112b7 [Notifier] Return SentMessage from the Notifier message handler 2020-06-24 08:23:54 +02:00
Nicolas Grekas
b249f00519 [HttpClient] unset activity list when creating CurlResponse 2020-06-23 20:33:34 +02:00
Robin Chalas
968bd0ffec Fixed typo in test name 2020-06-23 14:31:34 +02:00
Nicolas Grekas
dd81e32ec1 [HttpFoundation] add HeaderUtils::parseQuery(): it does the same as parse_str() but preserves dots in variable names 2020-06-23 13:46:20 +02:00
Fabien Potencier
51a1820dee bug #37396 [DI] Fix call to sprintf in ServicesConfigurator::stack() (dunglas)
This PR was merged into the 5.1 branch.

Discussion
----------

[DI] Fix call to sprintf in ServicesConfigurator::stack()

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| 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
| License       | MIT
| Doc PR        | n/a

This PR fixes a faulty call to `sprintf()` and prevents the following error:

```
Warning: sprintf(): Too few arguments in /Users/dunglas/workspace/activity-pub/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php on line 154

Fatal error: Uncaught Error: Wrong parameters for Symfony\Component\DependencyInjection\Exception\InvalidArgumentException([string $message [, long $code [, Throwable $previous = NULL]]]) in /Users/dunglas/workspace/activity-pub/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php:154 Stack trace: #0 /Users/dunglas/workspace/activity-pub/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php(154): Exception->__construct('', 1, 'api_platform.js...') #1 /Users/dunglas/workspace/activity-pub/src/Bundle/Resources/config/services.php(12): Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator->stack('api_platform.js...', Array) #2 /Users/dunglas/workspace/activity-pub/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php(50): Symfony\Component\DependencyInjection\Loader\ProtectedPhpFileLoader::Symfony\Component\DependencyInjection\Loader\Configurator\{closure}(Object(Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurat in /Users/dunglas/workspace/activity-pub/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php on line 154
```

Commits
-------

11da9d3c29 [DI] Fix call to sprintf in ServicesConfigurator::stack()
2020-06-23 13:42:51 +02:00
Kévin Dunglas
11da9d3c29
[DI] Fix call to sprintf in ServicesConfigurator::stack() 2020-06-23 12:20:00 +02:00
Marco Pfeiffer
5b74bbd288
add .body wrapper element
This change makes the notification email responsive.
2020-06-23 11:57:07 +02:00
Fabien Potencier
ce8f8a5f18 feature #36611 Add Notifier SentMessage (jeremyFreeAgent)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

Add Notifier SentMessage

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/13624

Like Mailer, Notifier returns now a SentMessage that contains the messageId (returned by the provider in the response). It contains also the body of the response as array to have more info about price, number of sms sent, status and so on.

- [x] apply to bridges

Commits
-------

5a6f0537ec Add Notifier SentMessage
2020-06-23 09:04:53 +02:00
Jérémy Romey
5a6f0537ec Add Notifier SentMessage 2020-06-23 09:04:45 +02:00
YaFou
76a744ad91
[HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3" 2020-06-23 08:52:36 +02:00
Fabien Potencier
a3900af2f0 feature #37357 [FrameworkBundle] allow configuring trusted proxies using semantic configuration (nicolas-grekas)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle] allow configuring trusted proxies using semantic configuration

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

On top of the improved DX this should provide, this PR (and #37351) will allow [removing the corresponding lines](https://github.com/symfony/recipes/pull/790) from `index.php` & recipes.

Using values:
```yaml
framework:
    trusted_proxies: '127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16'
#or
    trusted_proxies: '%env(TRUSTED_PROXIES)%'
```

`trusted_headers` is similar but is an array of headers to trust.
```yaml
framework:
    # that's the defaults already
    trusted_headers: ['x-forwarded-all', '!x-forwarded-host', '!x-forwarded-prefix']
```

Commits
-------

af9dd52752 [FrameworkBundle] allow configuring trusted proxies using semantic configuration
2020-06-23 06:59:37 +02:00
Fabien Potencier
b83d250c53 bug #37368 [Security] Resolve event bubbling of logout + new events in a compiler pass (wouterj)
This PR was merged into the 5.1 branch.

Discussion
----------

[Security] Resolve event bubbling of logout + new events in a compiler pass

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37292
| License       | MIT
| Doc PR        | -

This PR proposes to create a compiler pass that registers listeners on the main `event_dispatcher` on the firewall-specific event dispatcher during compile time. This allows to still specify listener priorities while listening on a bubbled-up event (instead of a fix moment where the event bubbling occurs). It probably also improves performance, as it doesn't use duplicated event dispatching logic to provide event bubbling.

Nothing changes on the user side. I proposed this as a bugfix, as it fixes the bug mentioned in #37292 (not being able to use listener priorities). I did remove a class, which was introduced in 5.1 and is very internal. I think it's safe, but we can also keep it and remove in master.

Commits
-------

f962c26061 Resolve event bubbling logic in a compiler pass
2020-06-23 06:57:21 +02:00
Fabien Potencier
24dde11557 minor #37380 [FrameworkBundle] changed configuration file for workflow from XML to PHP (lyrixx)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle] changed configuration file for workflow from XML to PHP

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

Commits
-------

2f1b72d7d0 [FrameworkBundle] changed configuration file for workflow from XML to PHP
2020-06-22 17:01:31 +02:00
Alexander M. Turek
39c1a6373b [VarDumper] Support for cURL handler objects. 2020-06-22 16:59:03 +02:00
Fabien Potencier
030b10ca0d bug #36304 Check whether path is file in DataPart::fromPath() (freiondrej)
This PR was submitted for the 5.0 branch but it was squashed and merged into the 4.4 branch instead.

Discussion
----------

Check whether path is file in DataPart::fromPath()

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no

Method `getBody()` uses stream_get_contents() to retrieve the body, however it fails to do so when the stream is a directory.

Commits
-------

9e3670e140 Check whether path is file in DataPart::fromPath()
2020-06-22 16:55:16 +02:00
Ondřej Frei
9e3670e140 Check whether path is file in DataPart::fromPath() 2020-06-22 16:55:08 +02:00
Grégoire Pineau
2f1b72d7d0 [FrameworkBundle] changed configuration file for workflow from XML to PHP 2020-06-22 16:26:03 +02:00
Fabien Potencier
b3a313cd35 feature #37373 [DI] deprecate Definition/Alias::setPrivate() (nicolas-grekas)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[DI] deprecate Definition/Alias::setPrivate()

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

Right now, there is a very subtle difference between `setPublic()` and `setPrivate()` that dates back to the FC/BC layer we created to turn services private by default.

We kept this difference to help third party bundles provide support for a wide range of versions of Symfony, but since 5.2 will be released at the same time as 3.4 will enter EOM, we should remove this behavior and deprecate `setPrivate()` to signal the change.

This is what this PR does.

Commits
-------

1bea690f4d [DI] deprecate Definition/Alias::setPrivate()
2020-06-22 14:41:31 +02:00
Nicolas Grekas
af9dd52752 [FrameworkBundle] allow configuring trusted proxies using semantic configuration 2020-06-22 14:34:19 +02:00
Fabien Potencier
33c6766117 minor #37376 [DI][FrameworkBundle] Remove "whitelist" occurrences (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI][FrameworkBundle] Remove "whitelist" occurrences

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

Commits
-------

12ab96ec9b [DI][FrameworkBundle] Remove whitelist occurrences
2020-06-22 13:34:12 +02:00