Commit Graph

34838 Commits

Author SHA1 Message Date
Tobias Schultze
44fa22056f Merge branch '3.4' into 4.2 2019-07-02 15:59:44 +02:00
Javier Eguiluz
0d27af93ea [Ldap] Document the new exceptions thrown by the code 2019-07-02 09:12:04 +02:00
Maxime Steinhausser
26048bc498 minor #32046 [FrameworkBundle] Unconditionally register the DateIntervalNormalizer (ogizanagi)
This PR was merged into the 4.2 branch.

Discussion
----------

[FrameworkBundle] Unconditionally register the DateIntervalNormalizer

| Q             | A
| ------------- | ---
| Branch?       | 4.2 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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

Fwb conflicts with serializer <4.2 37fa45bbd1/src/Symfony/Bundle/FrameworkBundle/composer.json (L74)

so we can remove this obsolete condition from the extension (DateIntervalNormalizer exists since 3.4).

Commits
-------

c7cc780373 [FrameworkBundle] Unconditionally register the DateIntervalNormalizer
2019-07-01 17:04:24 +02:00
Ryan Weaver
c6e18374a2 Fixing validation for messenger transports retry_strategy service key 2019-07-01 10:32:47 -04:00
Alexander M. Turek
58651409b4 Removed unused field. 2019-07-01 14:42:30 +02:00
Amrouche Hamza
c670d5120e
[HttpKernel][DX] Improve the error message when not defining the controller as a service but using contruct parameters 2019-07-01 14:02:11 +02:00
François Pluchino
8544a35e52 Remove @internal annotations for the serilize methods 2019-07-01 10:51:14 +02:00
Grégoire Pineau
f82e28c533 [HttpFoundation] Deprecated ApacheRequest 2019-07-01 10:07:19 +02:00
Jérémy Derussé
c986c86d1c
[Lock] Stores must implement putOffExpiration 2019-07-01 09:24:46 +02:00
Maxime Steinhausser
e113e7f812 [Validator] Add a Length::$allowEmptyString option to reject empty strings
which defaults to `true` in 4.4 but will trigger a deprecation if not set explicitly
in order to make the default `false` in 5.0.
2019-07-01 09:11:48 +02:00
Tobias Schultze
8930335934 fix invalid call to PhpFileLoader::load() in a test 2019-07-01 01:09:42 +02:00
Tobias Schultze
a03b5d8089 fix invalid call to PhpFileLoader::load() in a test 2019-07-01 01:07:21 +02:00
Alex Bowers
6c49a0c758 Add test case 2019-06-30 23:48:04 +01:00
Nicolas Grekas
2d5bcda9e7 [FrameworkBundle] Add autowiring alias for PSR-14 2019-06-30 19:00:07 +02:00
Nicolas Grekas
ad6f6cf900 [Cache] Add argument $prefix to AdapterInterface::clear() 2019-06-30 18:22:11 +02:00
Fabien Potencier
081c601243 minor #32257 [Security] [Guard] Removed useless param annotations (thomasbisignani)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] [Guard] Removed useless param annotations

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

The PR removes useless `@param` annotation, it is linked with the https://github.com/symfony/symfony/pull/32254#issuecomment-506719957

Commits
-------

848e881d5d [Security] [Guard] Removed useless param annotations
2019-06-30 15:25:31 +02:00
Thomas Bisignani
848e881d5d [Security] [Guard] Removed useless param annotations 2019-06-30 11:22:15 +02:00
Alexander M. Turek
28882f52cb Annotated correct return type for getInEdges()/getOutEdges(). 2019-06-29 18:43:59 +02:00
Fabien Potencier
191cb52902 removed @experimental annotations 2019-06-29 18:43:50 +02:00
Christian Flothmann
ba241ce3cc deprecate the framework.templating option 2019-06-29 12:12:19 +02:00
Sebastiaan Stok
6e70d12d3b
[Mime] Added SMimeSigner and Encryptor 2019-06-29 10:53:13 +02:00
Fabien Potencier
ca566a5110 Merge branch '4.3' into 4.4
* 4.3:
  [Workflow] Deprecated DefinitionBuilder::setInitialPlace()
2019-06-29 09:02:53 +02:00
Fabien Potencier
8dd5464c2e feature #32180 [Lock] add an InvalidTTLException to be more accurate (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[Lock] add an InvalidTTLException to be more accurate

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

<!--
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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->

This adds a new exception to be more precise when using wrong ttl.

Commits
-------

37509192d8 [Lock] add an InvalidTTLException to be more accurate
2019-06-29 08:25:21 +02:00
Christian Flothmann
e217729066 deprecate non-string constraint violation codes 2019-06-28 19:01:10 +02:00
Tobias Schultze
b3e3247557 [FrameworkBundle] better message for disabled sessions 2019-06-28 18:44:52 +02:00
Fabien Potencier
3644b70d42 feature #32241 [PropertyAccess] Deprecate null as allowed value for defaultLifetime argument in createCache method (jschaedl)
This PR was squashed before being merged into the 4.4 branch (closes #32241).

Discussion
----------

[PropertyAccess] Deprecate null as allowed value for defaultLifetime argument in createCache method

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

This PR is related to https://github.com/symfony/symfony/pull/32234#discussion_r298415012

Commits
-------

9aac42698a [PropertyAccess] Deprecate null as allowed value for defaultLifetime argument in createCache method
2019-06-28 17:46:18 +02:00
Jan Schädlich
9aac42698a [PropertyAccess] Deprecate null as allowed value for defaultLifetime argument in createCache method 2019-06-28 17:46:08 +02:00
Amrouche Hamza
37509192d8
[Lock] add an InvalidTTLException to be more accurate 2019-06-28 17:30:17 +02:00
Grégoire Pineau
4d002e8397 [Workflow] Deprecated DefinitionBuilder::setInitialPlace()
Added missing part of #30468
2019-06-28 17:00:47 +02:00
Thomas Calvet
a751629eb1 [Debug] Fix CHANGELOG after ErrorCatcher renaming 2019-06-28 16:44:50 +02:00
Nicolas Grekas
b40f6b5e72 fix merge 2019-06-28 15:25:44 +02:00
Nicolas Grekas
ab1bc87e43 Merge branch '4.3' into 4.4
* 4.3:
  [HttpFoundation] Throw exception when the \"session\" extension is not loaded
  remove invalid test case
  remove invalid test cases
  [Serializer] Fixed PHP of DenormalizableInterface::denormalize
  [Cache] work aroung PHP memory leak
  [Finder] docblock fixes
  pass error code as a string
  Catch JsonException and rethrow in JsonEncode
2019-06-28 15:17:39 +02:00
Nicolas Grekas
a218efebee Merge branch '4.2' into 4.3
* 4.2:
  [HttpFoundation] Throw exception when the \"session\" extension is not loaded
  remove invalid test cases
  [Serializer] Fixed PHP of DenormalizableInterface::denormalize
  [Cache] work aroung PHP memory leak
  [Finder] docblock fixes
  pass error code as a string
  Catch JsonException and rethrow in JsonEncode
2019-06-28 15:16:30 +02:00
Nicolas Grekas
e62e2ddb38 minor #32250 [Validator] remove invalid test case (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Validator] remove invalid test case

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

Spotted while working on #32179 for the Validator component. Using property paths for comparison when validating arrays simply does not work.

Commits
-------

9000c1eab4 remove invalid test case
2019-06-28 14:57:32 +02:00
Nicolas Grekas
b8c4809a49 Merge branch '3.4' into 4.2
* 3.4:
  [HttpFoundation] Throw exception when the \"session\" extension is not loaded
  remove invalid test cases
  [Serializer] Fixed PHP of DenormalizableInterface::denormalize
  [Finder] docblock fixes
  pass error code as a string
  Catch JsonException and rethrow in JsonEncode
2019-06-28 14:55:49 +02:00
Nicolas Grekas
3f165064eb bug #32236 [Cache] work aroung PHP memory leak (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[Cache] work aroung PHP memory leak

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

Works around  https://bugs.php.net/76982, as identified by @goetas in the linked issue.

Commits
-------

5d55b91fae [Cache] work aroung PHP memory leak
2019-06-28 14:49:32 +02:00
Nicolas Grekas
b6e8b17dc4 minor #32215 [HttpFoundation] Throw exception when the "session" extension is not loaded (vudaltsov)
This PR was squashed before being merged into the 3.4 branch (closes #32215).

Discussion
----------

[HttpFoundation] Throw exception when the "session" extension is not loaded

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

Should I target `3.4` or `master` instead? This change does not alter behavior, but makes the failure more clear.

Commits
-------

b0c663071b [HttpFoundation] Throw exception when the \"session\" extension is not loaded
2019-06-28 14:47:57 +02:00
Valentin Udaltsov
b0c663071b [HttpFoundation] Throw exception when the \"session\" extension is not loaded 2019-06-28 14:47:50 +02:00
Nicolas Grekas
9bc8b39709 minor #32249 [Validator] remove invalid test cases (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] remove invalid test cases

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

Spotted while working on #32179 for the Validator component. Using property paths for comparison when validating arrays simply does not work.

Commits
-------

d1261e78a4 remove invalid test cases
2019-06-28 14:46:12 +02:00
Nicolas Grekas
3f53044b42 minor #32244 [Validator] pass error code as a string (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] pass error code as a string

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

Commits
-------

901fe0d7c5 pass error code as a string
2019-06-28 14:40:38 +02:00
Nicolas Grekas
278bfbaea0 minor #32230 [Serializer] Fixed PHP of DenormalizableInterface::denormalize (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Serializer] Fixed PHP of DenormalizableInterface::denormalize

It can return an array of objects

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

Commits
-------

379bbee370 [Serializer] Fixed PHP of DenormalizableInterface::denormalize
2019-06-28 14:36:51 +02:00
Nicolas Grekas
a670098879 minor #32245 [Finder] docblock fixes (smoench)
This PR was merged into the 3.4 branch.

Discussion
----------

[Finder] docblock fixes

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

This PR provides some docblock fixes found in #32243

Commits
-------

02ee4d0b05 [Finder] docblock fixes
2019-06-28 14:36:03 +02:00
Bastien Jaillot
063e880861 [PropertyInfo] add static cache to ContextFactory
ContextFactory::createFromReflector is heavy, and it's called redundanlty
by Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor for each property
and methods. Avoid that by parsing it only once and then use static cache
2019-06-28 14:35:26 +02:00
Christian Flothmann
61d180e7de Merge branch '4.3' into 4.4
* 4.3:
  fix Debug component dependencies
  [travis] not all components have a master branch
  [HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client
2019-06-28 14:32:50 +02:00
Christian Flothmann
a1de01c6ff Merge branch '4.2' into 4.3
* 4.2:
  fix Debug component dependencies
  [travis] not all components have a master branch
2019-06-28 14:12:54 +02:00
Christian Flothmann
5edac837a0 Merge branch '3.4' into 4.2
* 3.4:
  fix Debug component dependencies
  [travis] not all components have a master branch
2019-06-28 14:00:38 +02:00
Nicolas Grekas
2bab37d64f bug #32206 Catch JsonException and rethrow in JsonEncode (phil-davis)
This PR was merged into the 3.4 branch.

Discussion
----------

Catch JsonException and rethrow in JsonEncode

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | adjustment to implementation of previous PRs for issue #31447
| License       | MIT
| Doc PR        | not applicable

PR #31860 provided handling of PHP  7.3 `JSON_THROW_ON_ERROR` behavior in the various `JsonEncode` and related classes/methods.

PR #31869 adjusted that. In particular, it adjusted ` src/Symfony/Component/Serializer/Encoder/JsonDecode.php` so that it catches any `JsonException` and re-throws it as `NotEncodableValueException`. That preserves the previous behavior of `JsonDecode:decode` - it always throws `NotEncodableValueException` when something goes wrong.

IMO `JsonEncode:encode` needs the same logic. At the moment, if a caller specifies `JSON_THROW_ON_ERROR` then the method can throw `JsonException`, but actually the "standard" for `JsonEncode:encode` is that it throws `NotEncodableValueException`

Adjust `JsonEncode:encode` to catch `JsonException` and rethrow it as `NotEncodableValueException`

Commits
-------

9c76790ee8 Catch JsonException and rethrow in JsonEncode
2019-06-28 13:57:22 +02:00
Nicolas Grekas
9c668d9282 minor #32213 [HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client (teohhanhui)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client

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

As the deprecated `Symfony\Component\HttpKernel\Client` does not extend `Symfony\Component\HttpKernel\HttpKernelBrowser`, it has not retained the correct PHPDoc from before.

The order of inheritance was changed in https://github.com/symfony/symfony/pull/31881, but the PHPDoc was never restored.

Commits
-------

332135186a [HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client
2019-06-28 13:56:05 +02:00
Christian Flothmann
9000c1eab4 remove invalid test case 2019-06-28 12:20:30 +02:00
Christian Flothmann
d1261e78a4 remove invalid test cases 2019-06-28 12:15:37 +02:00
Grégoire Pineau
379bbee370 [Serializer] Fixed PHP of DenormalizableInterface::denormalize
It can return an array of objects
2019-06-28 11:46:25 +02:00
Christian Flothmann
87fe077a89 fix Debug component dependencies 2019-06-28 11:18:39 +02:00
Alexander M. Turek
2a88752cd6 [Routing] Deprecate RouteCollection::addPrefix(null). 2019-06-28 10:23:33 +02:00
Nicolas Grekas
5d55b91fae [Cache] work aroung PHP memory leak 2019-06-28 10:22:31 +02:00
smoench
02ee4d0b05
[Finder] docblock fixes 2019-06-28 10:02:59 +02:00
Nicolas Grekas
548f4fd0ea [HttpClient] Add support for NTLM authentication 2019-06-28 09:49:23 +02:00
Christian Flothmann
901fe0d7c5 pass error code as a string 2019-06-28 09:33:32 +02:00
Tobias Schultze
a609f57c03 [ErrorCatcher] some cleanup and better doc 2019-06-27 22:36:35 +02:00
Fabien Potencier
f511bc5ff6 deprecated FlattenException::create() 2019-06-27 19:51:41 +02:00
Fabien Potencier
7dd9dbf28d [ErrorHandler] made IDEs and static analysis tools happy 2019-06-27 19:50:32 +02:00
Fabien Potencier
b6eac3f861 renamed the ErrorHandler component to ErrorCatcher 2019-06-27 19:38:50 +02:00
Fabien Potencier
4d8c473fd3 Merge branch '4.3' into 4.4
* 4.3:
  [Mailer] fixed tests on Windows
  [PhpUnitBridge] fix tests
  [Mailer] fixed error message when connecting to a stream raises an error before connect()
  [Mailer] fixed timeout type hint
  improve error messages in the event dispatcher
  [Security/Core] work around sodium_compat issue
  bumped Symfony version to 4.3.3
  updated VERSION for 4.3.2
  updated CHANGELOG for 4.3.2
  bumped Symfony version to 4.2.11
  updated VERSION for 4.2.10
  updated CHANGELOG for 4.2.10
  bumped Symfony version to 3.4.30
  updated VERSION for 3.4.29
  update CONTRIBUTORS for 3.4.29
  updated CHANGELOG for 3.4.29
  Fixed type annotation.
2019-06-27 18:48:03 +02:00
Fabien Potencier
90f61e9efa [Mailer] fixed tests on Windows 2019-06-27 18:29:52 +02:00
Nicolas Grekas
9b69dc651a [PhpUnitBridge] fix tests 2019-06-27 18:09:32 +02:00
Fabien Potencier
7dd391ed97 made BuferringLogger classes internal and final 2019-06-27 15:21:55 +02:00
Fabien Potencier
13a5e2dd1f feature #31065 Add ErrorHandler component (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

Add ErrorHandler component

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | no
| Fixed tickets | #25905, #26448
| License       | MIT
| Doc PR        | TODO

Mainly for API-based apps that don't require TwigBundle to get the correct exception response according to the request format (aka `_format` attribute).

![exception_response](https://user-images.githubusercontent.com/2028198/55509651-713dc700-562a-11e9-8b98-bef3b0229397.gif)

✔️ [RFC7807](https://tools.ietf.org/html/rfc7807) compliant for JSON and XML formats.

---

This introduce a new `ErrorRenderer` service that render a `FlattenException` into a given format:
```php
use Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRenderer;
use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer;
use Symfony\Component\ErrorHandler\ErrorRenderer\JsonErrorRenderer;

$renderers = [
    new HtmlErrorRenderer(),
    new JsonErrorRenderer(),
    // ...
];
$errorRenderer = new ErrorRenderer($renderers);

return new Response(
    $errorRenderer->render($exception, $request->getRequestFormat()),
    $exception->getStatusCode(),
    $exception->getHeaders()
);
```

The built-in error renderers are:

| Format | Class |
| --- | --- |
| html | HtmlErrorRenderer |
| json | JsonErrorRenderer |
| xml, atom | XmlErrorRenderer |
| txt | TxtErrorRenderer |

And you can add your own error renderer by implementing the `ErrorRendererInterface` and tagging it with `error_handler.renderer` in your service definition.

Creating your own error renderer for a built-in format will end up replacing the related built-in error renderer.

Demo: https://github.com/yceruto/error-handler-app ([add custom error renderer](06fc647841))

Commits
-------

7057244890 Added ErrorHandler component
2019-06-27 14:40:37 +02:00
Teoh Han Hui
332135186a
[HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client 2019-06-27 12:01:44 +02:00
Fabien Potencier
eb15bffa78 [Mailer] fixed error message when connecting to a stream raises an error before connect() 2019-06-27 11:33:25 +02:00
Fabien Potencier
0e7ed9e45c [Mailer] fixed timeout type hint 2019-06-27 10:51:02 +02:00
Fabien Potencier
e55978ada8 bug #32199 [EventDispatcher] improve error messages in the event dispatcher (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[EventDispatcher] improve error messages in the event dispatcher

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

Commits
-------

0b381dbe1d improve error messages in the event dispatcher
2019-06-27 09:31:09 +02:00
Christian Flothmann
0b381dbe1d improve error messages in the event dispatcher 2019-06-27 08:42:14 +02:00
Phil Davis
9c76790ee8 Catch JsonException and rethrow in JsonEncode 2019-06-27 10:07:28 +05:45
Nicolas Grekas
1985a5cc13 Merge branch '4.2' into 4.3
* 4.2:
  [Security/Core] work around sodium_compat issue
  bumped Symfony version to 4.2.11
  updated VERSION for 4.2.10
  updated CHANGELOG for 4.2.10
  bumped Symfony version to 3.4.30
  updated VERSION for 3.4.29
  update CONTRIBUTORS for 3.4.29
  updated CHANGELOG for 3.4.29
2019-06-26 20:29:07 +02:00
Nicolas Grekas
2fdfa1a8eb Merge branch '3.4' into 4.2
* 3.4:
  [Security/Core] work around sodium_compat issue
  bumped Symfony version to 3.4.30
  updated VERSION for 3.4.29
  update CONTRIBUTORS for 3.4.29
  updated CHANGELOG for 3.4.29
2019-06-26 20:27:58 +02:00
Nicolas Grekas
df50685abf [Security/Core] work around sodium_compat issue 2019-06-26 20:07:24 +02:00
Fabien Potencier
2afa71e0d8 bumped Symfony version to 4.3.3 2019-06-26 16:31:16 +02:00
Fabien Potencier
6314d4f9bc updated VERSION for 4.3.2 2019-06-26 16:26:16 +02:00
Fabien Potencier
a84fb88d07 bumped Symfony version to 4.2.11 2019-06-26 16:23:57 +02:00
Fabien Potencier
c8899f3704 updated VERSION for 4.2.10 2019-06-26 16:19:57 +02:00
Fabien Potencier
fe5a4ee999 bumped Symfony version to 3.4.30 2019-06-26 16:17:55 +02:00
Fabien Potencier
5296d2dfa0 updated VERSION for 3.4.29 2019-06-26 15:56:39 +02:00
Fabien Potencier
6dde428e35 Merge branch '4.2' into 4.3
* 4.2:
  Fixed type annotation.
2019-06-26 15:54:39 +02:00
Fabien Potencier
14b0409339 Merge branch '3.4' into 4.2
* 3.4:
  Fixed type annotation.
2019-06-26 15:53:23 +02:00
Nicolas Grekas
80e28a0acd Merge branch '4.3' into 4.4
* 4.3:
  Reject phpunit-bridge v5 for now
  Revert "Revert "bug #31730 [PhpUnitBridge] More accurate grouping (greg0ire)""
2019-06-26 14:22:07 +02:00
Nicolas Grekas
5797e7b2f2 Revert "Revert "bug #31730 [PhpUnitBridge] More accurate grouping (greg0ire)""
This reverts commit 4814fd3a4e.
2019-06-26 14:14:14 +02:00
Nicolas Grekas
204e87a4c8 Merge branch '4.3' into 4.4
* 4.3:
  Revert "bug #31730 [PhpUnitBridge] More accurate grouping (greg0ire)"
2019-06-26 14:06:01 +02:00
Nicolas Grekas
4814fd3a4e Revert "bug #31730 [PhpUnitBridge] More accurate grouping (greg0ire)"
This reverts commit 64b68d4922, reversing
changes made to 3cd795fdde.
2019-06-26 14:05:53 +02:00
Nicolas Grekas
f0a66754b8 Merge branch '4.3' into 4.4
* 4.3:
  [PhpUnitBridge] Fix tests
2019-06-26 13:29:11 +02:00
Nicolas Grekas
bca4761f37 [PhpUnitBridge] Fix tests 2019-06-26 13:29:01 +02:00
Alexander M. Turek
753bf7e0df Fixed type annotation. 2019-06-26 13:14:13 +02:00
Nicolas Grekas
5f60bc9536 Merge branch '4.3' into 4.4
* 4.3:
  Bump phpunit-bridge
2019-06-26 12:04:36 +02:00
Nicolas Grekas
ac3ae812d3 Merge branch '4.2' into 4.3
* 4.2:
  Bump phpunit-bridge
2019-06-26 12:04:29 +02:00
Nicolas Grekas
37118bdcd6 Merge branch '3.4' into 4.2
* 3.4:
  Bump phpunit-bridge
2019-06-26 12:03:39 +02:00
Nicolas Grekas
85ac1a6dd5 Bump phpunit-bridge 2019-06-26 12:03:25 +02:00
Nicolas Grekas
19cfc41690 Fix typo 2019-06-26 11:36:48 +02:00
Nicolas Grekas
55c0b02587 Merge branch '4.3' into 4.4
* 4.3: (34 commits)
  [PhpunitBridge] Read environment variable from superglobals
  [Bridge/PhpUnit] Fix PHP5.5 compat
  [PhpUnitBridge] More accurate grouping
  fixed CS
  Extract unrecoverable exception to interface
  [FrameworkBundle] Fix calling Client::getProfile() before sending a request
  Fix type error
  [Security/Core] require libsodium >= 1.0.14
  [Workflow] re-add workflow.definition tag to workflow services
  [Security/Core] Don't use ParagonIE_Sodium_Compat
  revert #30525 due to performance penalty
  collect called listeners information only once
  [Lock] fix missing inherit docs in RedisStore
  [Messenger] fix retrying handlers using DoctrineTransactionMiddleware
  [Mailgun Mailer] fixed issue when using html body
  [HttpClient] fix timing measurements with NativeHttpClient
  [HttpClient] fix dealing with 1xx informational responses
  add test to avoid regressions
  fix mirroring directory into parent directory
  fix typos
  ...
2019-06-26 11:30:56 +02:00
Nicolas Grekas
2dedf38b55 Merge branch '4.2' into 4.3
* 4.2:
  [Lock] fix missing inherit docs in RedisStore
  fix accessing session bags
  Add missing rendering of form help block.
2019-06-26 11:25:00 +02:00
Nicolas Grekas
dd68ae3962 Merge branch '3.4' into 4.2
* 3.4:
  fix accessing session bags
2019-06-26 11:24:49 +02:00
Nicolas Grekas
4e915bd5a2 bug #31954 [PhpunitBridge] Read environment variable from superglobals (greg0ire)
This PR was merged into the 4.3 branch.

Discussion
----------

[PhpunitBridge] Read environment variable from superglobals

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

The Dotenv component has recently been switched to using superglobals
instead of putenv(). Let us support both and give priority to
superglobals.

Commits
-------

88cfcb536d [PhpunitBridge] Read environment variable from superglobals
2019-06-26 11:24:08 +02:00
Grégoire Paris
88cfcb536d [PhpunitBridge] Read environment variable from superglobals
The Dotenv component has recently been switched to using superglobals
instead of putenv(). Let us support both and give priority to
superglobals.

Closes #31857
2019-06-26 11:18:05 +02:00
Fabien Potencier
f8b0bfd332 bug #32131 [Mailgun Mailer] fixed issue when using html body (alOneh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailgun Mailer] fixed issue when using html body

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

I tested the `symfony/mailgun-mailer` and get an issue when using the `api` scheme with a templated email cause we try to manipulate a stream whereas the `Symfony\Component\Mime\Email::getHtmlBody()` could return also a string (in my case it is one).

The issue :

```
stream_get_meta_data() expects parameter 1 to be resource, string given
```

Commits
-------

afbefe131b [Mailgun Mailer] fixed issue when using html body
2019-06-26 10:48:20 +02:00
Nicolas Grekas
0c9b3c08b7 [Bridge/PhpUnit] Fix PHP5.5 compat 2019-06-26 10:33:58 +02:00
Fabien Potencier
64b68d4922 bug #31730 [PhpUnitBridge] More accurate grouping (greg0ire)
This PR was squashed before being merged into the 4.3 branch (closes #31730).

Discussion
----------

[PhpUnitBridge] More accurate grouping

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

Sometimes, you cannot easily know if code was written by a vendor or
directly in the application, for instance if the code comes from a file
in the cache. In that case, it is better not to classify the deprecation
as direct or indirect.

@jmsche please test this on your application when you can, I think you might be having that issue.

Commits
-------

d9f0ba386a [PhpUnitBridge] More accurate grouping
2019-06-26 10:11:14 +02:00
Grégoire Paris
d9f0ba386a [PhpUnitBridge] More accurate grouping 2019-06-26 10:11:05 +02:00
Fabien Potencier
3cd795fdde fixed CS 2019-06-26 09:55:28 +02:00
Fabien Potencier
bd2356d8e5 bug #31966 [Messenger] Doctrine Connection find and findAll now correctly decode headers (TimoBakx)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] Doctrine Connection find and findAll now correctly decode headers

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

The Doctrine transport `Connection` class methods `find` and `findAll` did not JSON-decode the headers of the envelope after retrieving it from Doctrine. The `get` method, however, did this correctly.

I added two tests to verify the results of `find` and `findAll` and then added the JSON-decoding to the `Connection` class. I moved the JSON-decoding to a separate method to avoid duplicate code.

Commits
-------

3aec2acce5 [Messenger] Doctrine Connection find and findAll now correctly decode headers
2019-06-26 09:44:37 +02:00
Fabien Potencier
6437c5a0fe bug #31972 Add missing rendering of form help block. (alexsegura)
This PR was merged into the 4.2 branch.

Discussion
----------

Add missing rendering of form help block.

| Q             | A
| ------------- | ---
| Branch?       | 4.2 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| 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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->

When using `bootstrap_3_layout.html.twig` form theme, the help blocks are not rendered.

```twig
{% form_theme form 'bootstrap_3_layout.html.twig' %}

{{ form_start(form) }}
  {{ form_row(form.some_field) }} {# <-- no help text is rendered #}
{{ form_end(form) }}
```

Commits
-------

ff5517e554 Add missing rendering of form help block.
2019-06-26 09:37:26 +02:00
Fabien Potencier
bd8ad3f717 feature #32126 [Process] Allow writing portable "prepared" command lines (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[Process] Allow writing portable "prepared" command lines

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

Hey here, it's me, again !

I've talked with @nicolas-grekas and he gave me a new way of writing this feature that will not be a problem for people using things like {{ toto }} since we are using the linux style of using envvar, the replaced arguments is only replaced when using windows.

This should not break anything and work as expected!

see https://github.com/symfony/symfony/pull/24763

This makes `"$FOO"` work seamlessly on Linux and on Windows to reference an env var (that can be provided when calling e.g. the "run" method)

Commits
-------

3f8354f58f [Process] Allow writing portable "prepared" command lines
2019-06-26 09:34:54 +02:00
Fabien Potencier
0219834a2d bug #32141 [HttpClient] fix dealing with 1xx informational responses (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix dealing with 1xx informational responses

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

I never had a look at 1xx status codes until today.
This PR fixes reading them when using curl.

If one wonders:
- `NativeHttpClient` uses `fopen()`, which skips informational parts as allowed by the HTTP spec and doesn't give any way to access their response headers.
- `CurlHttpClient` allows reading informational responses using the progress callback or via the getInfo() method. That's the way if you need to implement e.g. HTTP 103 early hints.

Commits
-------

412411d795 [HttpClient] fix dealing with 1xx informational responses
2019-06-26 09:29:23 +02:00
Fabien Potencier
c245f7c681 bug #32138 [Filesystem] fix mirroring directory into parent directory (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Filesystem] fix mirroring directory into parent directory

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

Commits
-------

b58a806340 fix mirroring directory into parent directory
2019-06-26 09:23:20 +02:00
Fabien Potencier
f15722dd84 minor #32143 use proper return types in ErrorHandler and ArgumentResolver (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

use proper return types in ErrorHandler and ArgumentResolver

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | tiny
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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        |

Found those things while reviewing #31996 which missed some return types due to using `return` instead of `return null`.
It's part of fixing #17201 (due to #10717). See also #30869 that somebody was stumbling over.

Commits
-------

2f9121b74d use proper return types in ErrorHandler and ArgumentResolver
2019-06-26 09:20:55 +02:00
Fabien Potencier
c042b5b6a5 bug #32137 [HttpFoundation] fix accessing session bags (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] fix accessing session bags

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

Commits
-------

7a4570dcac fix accessing session bags
2019-06-26 09:16:02 +02:00
Fabien Potencier
a59082937f bug #32147 [HttpClient] fix timing measurements with NativeHttpClient (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix timing measurements with NativeHttpClient

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

Align to what curl does.

Commits
-------

c5c3332400 [HttpClient] fix timing measurements with NativeHttpClient
2019-06-26 09:10:28 +02:00
Fabien Potencier
6b83861ac3 minor #32161 [Lock] fix missing inherit docs in RedisStore (Simperfit)
This PR was merged into the 4.2 branch.

Discussion
----------

[Lock] fix missing inherit docs in RedisStore

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

<!--
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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->

This is a missing inheritdoc in the RedisStore for the waitAndSave method.

Commits
-------

71eb8cfe99 [Lock] fix missing inherit docs in RedisStore
2019-06-26 09:07:36 +02:00
Fabien Potencier
e8c68d533d bug #32165 revert #30525 due to performance penalty (bendavies)
This PR was merged into the 4.3 branch.

Discussion
----------

revert #30525 due to performance penalty

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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        |

This reverts #30525, because it introduced a large performance penalty.

Here is the effect of that PR when I upgrade my Api Platform project from 4.2.9 to 4.3.1:
https://blackfire.io/profiles/compare/28bfbc61-3649-4896-bd03-7201239134cd/graph?settings%5Bdimension%5D=wt&settings%5Bdisplay%5D=landscape&settings%5BtabPane%5D=nodes&selected=Symfony%5CComponent%5CVarExporter%5CInternal%5CExporter%3A%3Aexport%403&callname=main()

The reverted PR targeted master. This should go in 4.3?

Commits
-------

3d37cc98f6 revert #30525 due to performance penalty
2019-06-26 09:06:13 +02:00
Fabien Potencier
32fd8e0409 Merge branch '4.2' into 4.3
* 4.2:
  [FrameworkBundle] Fix calling Client::getProfile() before sending a request
  Fix type error
  [Security/Core] Don't use ParagonIE_Sodium_Compat
  collect called listeners information only once
  add test to avoid regressions
  fix typos
  Turkish translation added to Form Component
2019-06-26 08:50:02 +02:00
Fabien Potencier
f0acaff850 Merge branch '3.4' into 4.2
* 3.4:
  [FrameworkBundle] Fix calling Client::getProfile() before sending a request
  Fix type error
  [Security/Core] Don't use ParagonIE_Sodium_Compat
  collect called listeners information only once
  add test to avoid regressions
  fix typos
  Turkish translation added to Form Component
2019-06-26 08:46:55 +02:00
Fabien Potencier
c511e46c73 bug #32164 [EventDispatcher] collect called listeners information only once (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[EventDispatcher] collect called listeners information only once

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

2ad32df6e0 collect called listeners information only once
2019-06-26 08:45:17 +02:00
Fabien Potencier
7cc4cabd47 bug #32173 [FrameworkBundle] Fix calling Client::getProfile() before sending a request (dunglas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Fix calling Client::getProfile() before sending a request

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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

Prevent throwing an error when calling getProfile before a request has been sent.

Commits
-------

9e6f4b2122 [FrameworkBundle] Fix calling Client::getProfile() before sending a request
2019-06-26 08:42:52 +02:00
Fabien Potencier
28b20b8a73 bug #32163 [DoctrineBridge] Fix type error (norkunas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DoctrineBridge] Fix type error

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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 -->

See discussion here: https://github.com/doctrine/DoctrineBundle/pull/984

> Having SET sql_mode=(SELECT REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', '')) query and when clicking on explain currently it throws:

> Argument 2 passed to Doctrine\DBAL\Connection::resolveParams() must be of the type array, null given, called in /vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php on line 911

<!--
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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

7b8ee3ece8 Fix type error
2019-06-26 08:19:19 +02:00
Tobias Schultze
b80ce9ad18 [Form] remove comment about to-be-removed method as it is used in master by ButtonBuilder 2019-06-26 00:51:39 +02:00
Tobias Schultze
6a2f4dc67a Extract unrecoverable exception to interface 2019-06-26 00:15:30 +02:00
Kévin Dunglas
9e6f4b2122
[FrameworkBundle] Fix calling Client::getProfile() before sending a request 2019-06-25 17:43:39 +02:00
Tomas
7b8ee3ece8 Fix type error 2019-06-25 17:06:32 +03:00
Fabien Potencier
b68a6b3e16 bug #32154 [Messenger] fix retrying handlers using DoctrineTransactionMiddleware (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] fix retrying handlers using DoctrineTransactionMiddleware

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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        |

The retry logic only executes handlers that didn't fail using the HandledStamp. But in case of using the DoctrineTransactionMiddleware using several handlers, we need to remove the HandledStamp because those handlers got rolled back again.

Commits
-------

66c2e8483a [Messenger] fix retrying handlers using DoctrineTransactionMiddleware
2019-06-25 15:53:13 +02:00
Fabien Potencier
4e6951b1d3 bug #32169 [Security/Core] require libsodium >= 1.0.14 (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Security/Core] require libsodium >= 1.0.14

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

- bump libsodium to >=1.0.14
- Minimum opscost must be 3, as described in https://wiki.php.net/rfc/libsodium and in https://github.com/jedisct1/libsodium/releases/tag/1.0.15
- ParagonIE_Sodium_Compat [explicitly doesn't implement Argon2](https://github.com/paragonie/sodium_compat#features-excluded-from-this-polyfill), so it makes no sense to check for it.

Commits
-------

4fed5d3813 [Security/Core] require libsodium >= 1.0.14
2019-06-25 15:28:12 +02:00
Nicolas Grekas
4fed5d3813 [Security/Core] require libsodium >= 1.0.14 2019-06-25 15:09:11 +02:00
Fabien Potencier
9830c64db0 bug #32156 [Workflow] re-add workflow.definition tag to workflow services (nikossvnk)
This PR was squashed before being merged into the 4.3 branch (closes #32156).

Discussion
----------

[Workflow] re-add workflow.definition tag to workflow services

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

Add again the `workflow.definition` tag in workflow services.

Commits
-------

4df2dc5aaa [Workflow] re-add workflow.definition tag to workflow services
2019-06-25 14:31:05 +02:00
nikos.sotiropoulos
4df2dc5aaa [Workflow] re-add workflow.definition tag to workflow services 2019-06-25 14:30:50 +02:00
Nicolas Grekas
61ea53d57f [Security/Core] Don't use ParagonIE_Sodium_Compat 2019-06-25 14:22:47 +02:00
Ben Davies
3d37cc98f6 revert #30525 due to performance penalty 2019-06-25 10:08:34 +01:00
Christian Flothmann
2ad32df6e0 collect called listeners information only once 2019-06-25 09:45:31 +02:00
Amrouche Hamza
71eb8cfe99
[Lock] fix missing inherit docs in RedisStore 2019-06-25 07:47:15 +02:00
Robin Chalas
efaa154c74 minor #32146 [Security] add return type declaration (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] add return type declaration

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

Commits
-------

9fe532d657 add return type declaration
2019-06-25 03:46:17 +02:00
Tobias Schultze
8124159052 minor #32078 [Messenger] make all stamps final and mark stamp not meant to be sent (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] make all stamps final and mark stamp not meant to be sent

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- please 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        |

Some newer stamps were already final. This makes all of them final. Also marks all stamps that are not meant to be sent using the new `NonSendableStampInterface`. This makes it easier to see which stamps are actually important and required to persist in a queue for certain functionality, like the `BusNameStamp` for the `RoutableMessageBus`

Commits
-------

013904b081 [Messenger] make all stamps final and mark stamp not meant to be sent
2019-06-24 23:33:22 +01:00
Tobias Schultze
67af93f3b0 bug #32053 [Messenger] No need for retry to require SentStamp (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] No need for retry to require SentStamp

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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        |

Fixes 2) in #32049
@weaverryan the SentStamp in the worker seems totally irrelevant. You always want to send messages back to the transport where they came from for retry. The only relevance I can potentially see is for the SyncTransport. Messages received async from worker might be routed to the SyncTransport. Using the SentStamp would redeliver the messages into the SyncTransport instead of the async. But that doesn't seem to have any use-case. I'm running the worker which handles the messages immediately. So basically there is no difference if they go to the Sync or Async transport from within the worker.

Commits
-------

0034dee641 [Messenger] make retry logic work without SentStamp
2019-06-24 23:32:13 +01:00
Tobias Schultze
66c2e8483a [Messenger] fix retrying handlers using DoctrineTransactionMiddleware 2019-06-24 15:34:54 +01:00
Hippolyte Alain
afbefe131b [Mailgun Mailer] fixed issue when using html body 2019-06-24 16:09:08 +02:00
Tobias Schultze
013904b081 [Messenger] make all stamps final and mark stamp not meant to be sent 2019-06-24 14:58:45 +01:00
Nicolas Grekas
c5c3332400 [HttpClient] fix timing measurements with NativeHttpClient 2019-06-24 10:59:29 +02:00
Christian Flothmann
9fe532d657 add return type declaration 2019-06-24 10:10:57 +02:00
Tobias Schultze
2f9121b74d use proper return types in ErrorHandler and ArgumentResolver 2019-06-24 02:04:42 +01:00
Amrouche Hamza
3f8354f58f
[Process] Allow writing portable "prepared" command lines 2019-06-23 21:19:36 +02:00
Nicolas Grekas
412411d795 [HttpClient] fix dealing with 1xx informational responses 2019-06-23 19:42:15 +02:00
Nicolas Grekas
698601140b minor #31993 [Mailer] Catch missing scheme in DSN (derrabus)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer] Catch missing scheme in DSN

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

The `Symfony\Component\Mailer\Transport::createTransport()` method parses and validates a passed DSN. I noticed that we never check if the DSN contains a valid scheme, but we always assume that the scheme is present in then parse result. If someone passes a DSN without a scheme to that method, they would almost certainly run into a PHP notice.

This PR makes sure that a scheme is present in the URL and throws a proper exception otherwise.

Commits
-------

3eba36c088 [Mailer] Catch missing scheme in DSN.
2019-06-23 17:43:40 +02:00
Nicolas Grekas
b56591c92d bug #32083 [HttpClient] fixing passing debug info to progress callback (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fixing passing debug info to progress callback

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

NativeHttpClient already has it.

Commits
-------

dc55cf826a [HttpClient] fixing passing debug info to progress callback
2019-06-23 17:19:50 +02:00
Nicolas Grekas
57d73fcac3 minor #32140 [Filesystem] add test to avoid regressions (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Filesystem] add test to avoid regressions

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

Commits
-------

0d7d1f81bc add test to avoid regressions
2019-06-23 17:08:29 +02:00
Nicolas Grekas
6d02c89c21 bug #32129 [DebugBundle] fix register ReflectionCaster::unsetClosureFileInfo caster in var cloner service (alekitto)
This PR was merged into the 4.3 branch.

Discussion
----------

[DebugBundle] fix register ReflectionCaster::unsetClosureFileInfo caster in var cloner service

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

Non-existent class was checked by `method_exists` in Debug bundle.
This should fix (and correctly register) the caster while loading `DebugExtension` from `DebugBundle`

Commits
-------

860164ee7e [DebugBundle] fix register ReflectionCaster::unsetClosureFileInfo caster in var cloner service
2019-06-23 16:55:14 +02:00
Christian Flothmann
0d7d1f81bc add test to avoid regressions 2019-06-23 11:29:17 +02:00
Gabriel Ostrolucký
83edac321e [Console] Add ProgressBar::preventRedrawFasterThan() and forceRedrawSlowerThan() methods 2019-06-23 11:16:35 +02:00
Christian Flothmann
b58a806340 fix mirroring directory into parent directory 2019-06-23 10:51:25 +02:00
Christian Flothmann
196ee5599d fix typos 2019-06-23 10:10:04 +02:00
Emre Akinci
a030e393c5 Turkish translation added to Form Component 2019-06-23 09:45:21 +02:00
Tobias Schultze
7822b3cbc0 bug #32027 [Messenger] Remove DispatchAfterCurrentBusStamp when message is put on internal queue (Nyholm)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] Remove DispatchAfterCurrentBusStamp when message is put on internal queue

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

This will fix #32009.

Thank you @brpauwels for the report.

I consider it safe to remove the `DispatchAfterCurrentBusStamp` because its meaning disappear after we handled the "current bus".

T0: We add the stamp
T1: We put the envelope on an internal queue in `DispatchAfterCurrentBusMiddleware`
T2: We handle the current bus.
T3: We start processing our internal queue.

At T3 there we are "after current bus", that is why we dont need the stamp any more.

Commits
-------

91f1680b3f [Messenger] Remove DispatchAfterCurrentBusStamp when message is put on internal queue
2019-06-22 23:18:30 +01:00
Christian Flothmann
7a4570dcac fix accessing session bags 2019-06-22 22:10:25 +02:00
Fabien Potencier
3634390a27 Merge branch '4.2' into 4.3
* 4.2:
  Fix link to documentation
  [Validator] Use LogicException for missing Property Access Component in comparison constraints
2019-06-22 10:39:44 +02:00
Fabien Potencier
aa4385dc12 feature #31532 [Ldap] Add users extraFields in ldap component (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[Ldap] Add users extraFields in ldap component

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28873, #19329 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | todo when validated, before merge <!-- required for new features -->

As I'm using ldap too in some personal project, It seems that this feature is a really good nice to have IMHO.

Adding the wanted field in the `user_metadata` array transform them as field -> value in the `metadata` field of the user.

Commits
-------

bcfff04797 [Ldap] Add users extra_fields in ldap component
2019-06-22 10:38:33 +02:00
Amrouche Hamza
bcfff04797
[Ldap] Add users extra_fields in ldap component 2019-06-22 10:34:40 +02:00
Fabien Potencier
115e67b92a feature #32104 Add autowiring for HTTPlug (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Add autowiring for HTTPlug

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

Commits
-------

f76e77d58f Add autowiring for HTTPlug
2019-06-22 10:32:12 +02:00
Fabien Potencier
0dbf4775e2 bug #32125 [Form] accept floats for input="string" in NumberType (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Form] accept floats for input="string" in NumberType

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

Commits
-------

2abf85599d accept floats for input="string" in NumberType
2019-06-22 10:27:15 +02:00
Fabien Potencier
b9ad880792 feature #32130 [Form] deprecate int/float for string input in NumberType (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] deprecate int/float for string input in NumberType

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

Commits
-------

d8c008aa4d deprecate int/float for string input in NumberType
2019-06-22 10:21:37 +02:00
Alex Nostadt
e0d2c58bc2 Fix link to documentation 2019-06-22 10:17:17 +02:00
Fabien Potencier
5471867efc bug #32094 [Validator] Use LogicException for missing Property Access Component in comparison constraints (Lctrs)
This PR was merged into the 4.2 branch.

Discussion
----------

[Validator] Use LogicException for missing Property Access Component in comparison constraints

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

For consistency.

Commits
-------

6ac2316993 [Validator] Use LogicException for missing Property Access Component in comparison constraints
2019-06-22 10:13:40 +02:00
Fabien Potencier
f429986dbb feature #31547 [Ldap] Add exception for mapping ldap errors (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[Ldap] Add exception for mapping ldap errors

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

<!--
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/roadmap):
 - 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 the master branch.
-->

Maybe we could add more exception code since the list has a lot of errors, maybe we could add a class that maps the error to the right exeptions. see https://www.php.net/manual/en/function.ldap-errno.php

Commits
-------

1b29cb1a5f [Ldap] Add exception for mapping ldap errors
2019-06-22 10:08:21 +02:00
Fabien Potencier
04b2f7f3ef bug #32136 [FrameworkBundle] sync require-dev and conflict constraints (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[FrameworkBundle] sync `require-dev` and `conflict` constraints

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

The `conflict` section already prevents the Translation component 4.2 to be installed.

Commits
-------

47f9235568 sync `require-dev` and `conflict` constraints
2019-06-22 10:05:56 +02:00
Christian Flothmann
d8c008aa4d deprecate int/float for string input in NumberType 2019-06-21 23:21:11 +02:00
Christian Flothmann
47f9235568 sync require-dev and conflict constraints 2019-06-21 23:08:55 +02:00
Christian Flothmann
48664445ba fix typo 2019-06-21 22:46:43 +02:00
Amrouche Hamza
905bec4577
[DI] throw an exception when the kernel has been booted twices 2019-06-21 22:24:55 +02:00
Alessandro Chitolina
860164ee7e
[DebugBundle] fix register ReflectionCaster::unsetClosureFileInfo caster in var cloner service 2019-06-21 12:18:42 +02:00
Christian Flothmann
431a769307 Merge branch '4.3' into 4.4
* 4.3:
  fix translation domain
  tag the FileType service as a form type
  don't validate IP addresses from env var placeholders
  [Validator] Fix GroupSequenceProvider annotation
  [Messenger] fix delay exchange recreation after disconnect
  Update ajax security cheat sheet link
  Fix AuthenticationException::getToken typehint
2019-06-21 12:14:40 +02:00
Christian Flothmann
a25c2af559 Merge branch '4.2' into 4.3
* 4.2:
  fix translation domain
  tag the FileType service as a form type
  [Validator] Fix GroupSequenceProvider annotation
  Update ajax security cheat sheet link
  Fix AuthenticationException::getToken typehint
2019-06-21 12:01:08 +02:00
Christian Flothmann
6821850183 Merge branch '3.4' into 4.2
* 3.4:
  fix translation domain
  tag the FileType service as a form type
  [Validator] Fix GroupSequenceProvider annotation
  Update ajax security cheat sheet link
  Fix AuthenticationException::getToken typehint
2019-06-21 11:59:02 +02:00
Christian Flothmann
2abf85599d accept floats for input="string" in NumberType 2019-06-21 11:58:40 +02:00
Christian Flothmann
74387cf21f fix translation domain 2019-06-20 22:29:36 +02:00
Yonel Ceruto
7057244890 Added ErrorHandler component 2019-06-20 11:01:49 -04:00
Christian Flothmann
ea5b1f4d67 tag the FileType service as a form type 2019-06-20 12:19:18 +02:00
Christian Flothmann
f23a7f60cf don't validate IP addresses from env var placeholders 2019-06-20 12:11:09 +02:00
Nicolas Grekas
f76e77d58f Add autowiring for HTTPlug 2019-06-20 09:09:07 +02:00
Fabien Potencier
6fcd319d78 minor #32044 [Validator] Fix GroupSequenceProvider annotation (enumag)
This PR was squashed before being merged into the 3.4 branch (closes #32044).

Discussion
----------

[Validator] Fix GroupSequenceProvider annotation

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

The possibility was added in https://github.com/symfony/symfony/pull/19982, just forgot to fix this annotation back then.

Commits
-------

bf6d2532de [Validator] Fix GroupSequenceProvider annotation
2019-06-20 08:43:36 +02:00
Jáchym Toušek
bf6d2532de [Validator] Fix GroupSequenceProvider annotation 2019-06-20 08:43:29 +02:00
Nicolas Grekas
8a1813a095 Revert "minor #32054 Prepare for PHP 7.4 preload (nicolas-grekas)"
This reverts commit a0aa94114a, reversing
changes made to 8496003634.
2019-06-20 08:42:33 +02:00
Tobias Schultze
c1c3b54a0f [Messenger] fix delay exchange recreation after disconnect 2019-06-20 03:38:05 +01:00
Kévin Dunglas
e0ef35973d
[FrameworkBundle] Use default_locale as default value for translator.fallbacks 2019-06-19 22:36:28 +02:00
Robin Chalas
8ad74a859d minor #32001 [Security] Fix AuthenticationException::getToken typehint (norkunas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Fix AuthenticationException::getToken typehint

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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        | symfony/symfony-docs#... <!-- required for new features -->

The token may be not set when throwing AuthenticationException.

<!--
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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

a9705a0143 Fix AuthenticationException::getToken typehint
2019-06-19 19:38:48 +02:00
Alex Bowers
c266d6c737
Update Request.php 2019-06-19 17:03:11 +01:00
Nicolas Grekas
d31b71677d Merge branch '4.3' into 4.4
* 4.3:
  [FrameworkBundle] minor: fix typo in SessionTest
  [Debug] workaround BC break in PHP 7.3
2019-06-19 17:27:23 +02:00
Nicolas Grekas
2fa52989db Merge branch '4.2' into 4.3
* 4.2:
  [FrameworkBundle] minor: fix typo in SessionTest
  [Debug] workaround BC break in PHP 7.3
2019-06-19 17:27:09 +02:00
Nicolas Grekas
b2eeaea00c Merge branch '3.4' into 4.2
* 3.4:
  [FrameworkBundle] minor: fix typo in SessionTest
  [Debug] workaround BC break in PHP 7.3
2019-06-19 17:26:44 +02:00
Fabien Potencier
df210194e0 minor #32100 Update ajax security cheat sheet link (steef)
This PR was merged into the 3.4 branch.

Discussion
----------

Update ajax security cheat sheet link

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

# Description
After looking in the `JsonResponse` class I found an old OWASP [link](https://www.owasp.org/index.php/AJAX_Security_Cheat_Sheet#Always_return_JSON_with_an_Object_on_the_outside). As the cheat sheet series project is moved to GitHub the link can be updated to the [following](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/AJAX_Security_Cheat_Sheet.md).

## Screenshot
<img width="552" alt="Screenshot 2019-06-19 at 16 52 19" src="https://user-images.githubusercontent.com/34915382/59776184-a7e2bf80-92b2-11e9-8d23-802acfddfb1d.png">

Commits
-------

32d02d6141 Update ajax security cheat sheet link
2019-06-19 17:25:42 +02:00
Stefano Degenkamp
32d02d6141
Update ajax security cheat sheet link
As the cheat sheet series project has been moved to github.
2019-06-19 17:21:12 +02:00
Alex Bowers
23db9be884
Don't assume port 0 for X-Forwarded-Port 2019-06-19 12:46:55 +01:00
Fabien Potencier
eb4026b3f4 bug #32090 [Debug] workaround BC break in PHP 7.3 (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] workaround BC break in PHP 7.3

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony-standard/issues/1138 https://github.com/symfony/website-skeleton/issues/231
| License       | MIT
| Doc PR        | -

A new warning has been added in PHP 7.3 that is breaking BC with Symfony, since we turn warnings into exceptions.
This PR turns the new warning into a deprecation, so that we will be able to remove the added "if" in 5.0.

I noticed a few other similar BC breaks in 7.1 and 7.2, but *unless someone reports that they block them*, I don't think we need to care.
- 7.1 A non well formed numeric value encountered E_NOTICE
- 7.1 A non-numeric value encountered E_WARNING
- 7.2 count() now raises a warning when an invalid parameter is passed.

See https://github.com/php/php-src/blob/PHP-7.1/UPGRADING + same in upper branches.

Commits
-------

d8d43e6195 [Debug] workaround BC break in PHP 7.3
2019-06-19 12:21:41 +02:00
Amrouche Hamza
494281465d [FrameworkBundle] minor: fix typo in SessionTest 2019-06-19 10:53:48 +02:00
Lctrs
6ac2316993 [Validator] Use LogicException for missing Property Access Component in comparison constraints 2019-06-19 10:51:43 +02:00
Nicolas Grekas
d8d43e6195 [Debug] workaround BC break in PHP 7.3 2019-06-18 23:26:03 +02:00
Nicolas Grekas
dc55cf826a [HttpClient] fixing passing debug info to progress callback 2019-06-18 14:13:04 +02:00
Anderson Müller
d04a3b3ff9
[CACHE] Correct required file added in #32054 2019-06-18 13:39:39 +02:00
Fabien Potencier
411ad9752a feature #31764 [FrameworkBundle] add attribute stamps (walidboughdiri)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] add attribute stamps

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | yes<!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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 <!-- required for new features -->

<!--
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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

8a09579d35 remove bc break code
2019-06-18 06:47:21 +02:00
walidboughdiri
8a09579d35 remove bc break code 2019-06-18 02:21:11 +02:00
Nicolas Grekas
561ad17d16 minor #32074 Add BC layer for updated constructor types (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Add BC layer for updated constructor types

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

Reverts some CS changes done in #32066 + replaces its BC breaks by a BC layer.
Our CI is too good, it bites us hard when we break our own rules :)

Commits
-------

c34fcd91d1 Add BC layer for updated constructor types
2019-06-17 21:43:44 +02:00
Nicolas Grekas
67f99ce226 Merge branch '4.3' into 4.4
* 4.3:
  Fix PDO prune not called
  Fix Expiring lock in PDO and ZooKeeper
  [Lock] fix bad merge
2019-06-17 21:43:06 +02:00
Nicolas Grekas
5af1e9e1a5 minor #32075 [Lock] Fix expired lock not cleaned in ZooKeeper (jderusse)
This PR was merged into the 4.3 branch.

Discussion
----------

[Lock] Fix expired lock not cleaned in ZooKeeper

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | ,p
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #31426
| License       | MIT
| Doc PR        | NA

Following #32071 for 4.3 branch

context:
When a lock is acquired BUT not as fast as expected, a LockExpiredException is thrown.
Issue is, that the lock is not removed which avoid other process to acquire that lock.

This PR clean state of store when a LockExpiredException is triggered in PDO and ZooKeepeer.

Commits
-------

4f808ef4f4 Fix Expiring lock in PDO and ZooKeeper
2019-06-17 21:42:39 +02:00
Nicolas Grekas
15652e3373 Merge branch '4.2' into 4.3
* 4.2:
  Fix PDO prune not called
2019-06-17 21:41:54 +02:00
Jérémy Derussé
fc2dc14924
Fix PDO prune not called 2019-06-17 21:38:43 +02:00
Jérémy Derussé
4f808ef4f4
Fix Expiring lock in PDO and ZooKeeper 2019-06-17 21:08:41 +02:00
Nicolas Grekas
c34fcd91d1 Add BC layer for updated constructor types 2019-06-17 20:49:26 +02:00
Nicolas Grekas
1337dbff81 Merge branch '4.2' into 4.3
* 4.2:
  [Lock] fix bad merge
2019-06-17 20:45:40 +02:00
Nicolas Grekas
432c21f83c [Lock] fix bad merge 2019-06-17 20:45:27 +02:00
Nicolas Grekas
651de173df Merge branch '4.3' into 4.4
* 4.3:
  [Cache] replace getNsSeparator by NS_SEPARATOR on AbstractTrait
  [Cache] fix versioning with SimpleCacheAdapter
  [Messenger] fix AMQP delay queue to be per exchange
  Fix expired lock not cleaned
  [HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error
  [HttpFoundation] Fix SA/phpdoc JsonResponse
  [DI] Show the right class autowired when providing a non-existing class in constructor
  SimpleCacheAdapter fails to cache any item if a namespace is used
  validate composite constraints in all groups
  [Serializer] Handle true and false appropriately in CSV encoder
  [Messenger] improve logs
  [Messenger] fix delay delivery for non-fanout exchanges
  Parameterize Mailgun's region
  Fix binary operation `+`, `-` or `*` on string
  [VarDumper] fix dumping objects that implement __debugInfo()
  [HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set
  Add statement to fileLink to ignore href code when no fileLink.
  [Routing] fix absolute url generation when scheme is not known
2019-06-17 19:38:10 +02:00
Nicolas Grekas
953ac3e77f Merge branch '4.2' into 4.3
* 4.2:
  [Cache] replace getNsSeparator by NS_SEPARATOR on AbstractTrait
  [Cache] fix versioning with SimpleCacheAdapter
  Fix expired lock not cleaned
  [HttpFoundation] Fix SA/phpdoc JsonResponse
  SimpleCacheAdapter fails to cache any item if a namespace is used
  validate composite constraints in all groups
  [Serializer] Handle true and false appropriately in CSV encoder
  Fix binary operation `+`, `-` or `*` on string
  [VarDumper] fix dumping objects that implement __debugInfo()
  [Routing] fix absolute url generation when scheme is not known
2019-06-17 19:37:00 +02:00
Nicolas Grekas
6b61439fb9 Merge branch '3.4' into 4.2
* 3.4:
  [Cache] replace getNsSeparator by NS_SEPARATOR on AbstractTrait
  [Cache] fix versioning with SimpleCacheAdapter
2019-06-17 19:31:01 +02:00
Nicolas Grekas
2bf5da51da [Cache] replace getNsSeparator by NS_SEPARATOR on AbstractTrait 2019-06-17 19:26:15 +02:00
Nicolas Grekas
02a6f248b5 [Cache] fix versioning with SimpleCacheAdapter 2019-06-17 19:18:24 +02:00
Nicolas Grekas
06c17cdaa9 Merge branch '3.4' into 4.2
* 3.4:
  Fix expired lock not cleaned
  [HttpFoundation] Fix SA/phpdoc JsonResponse
  SimpleCacheAdapter fails to cache any item if a namespace is used
  validate composite constraints in all groups
  [Serializer] Handle true and false appropriately in CSV encoder
  Fix binary operation `+`, `-` or `*` on string
  [VarDumper] fix dumping objects that implement __debugInfo()
  [Routing] fix absolute url generation when scheme is not known
2019-06-17 19:15:38 +02:00
Fabien Potencier
12b852f7ab bug #32052 [Messenger] fix AMQP delay queue to be per exchange (Tobion)
This PR was squashed before being merged into the 4.3 branch (closes #32052).

Discussion
----------

[Messenger] fix AMQP delay queue to be per exchange

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

this makes the delay/retry work when having several exchanges or renaming your exchange.

also the delay setup did not declare the target exchange. so if you only do delayed messages for a connection, auto-setup forgot to actually create the target exchange.

Commits
-------

5bc3364167 [Messenger] fix AMQP delay queue to be per exchange
2019-06-17 18:44:05 +02:00
Tobias Schultze
5bc3364167 [Messenger] fix AMQP delay queue to be per exchange 2019-06-17 18:43:56 +02:00
Fabien Potencier
6ee3efac79 minor #32066 Fine tune constructor types (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

Fine tune constructor types

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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        | symfony/symfony-docs#... <!-- required for new features -->

Fine tunes some constructor types that have been added in #24722

Form names as integer was only a workaround as forms names are used as array keys which get transformed to int. So it was added as a workaround in https://github.com/symfony/symfony/pull/6355#discussion_r2422205
With typehints added in #24722 those were mostly auto-cast anyway, e.g. in FormBuilder. There are only a few integer form names remaining documented, in the main entry points of the Form component (`\Symfony\Component\Form\FormInterface::add`). Internally it's always a string now. So I could remove some int docs which also fixes #30032 what @xabbuh tried to do.

Some of these changes we're just not done before because of broken tests. It's mainly a missing explicit mock for `TranslationInterface::trans` which returned null. If we had return types hints in interfaces, this wouldn't happen.

Commits
-------

507794a575 Fine tune constructor types
2019-06-17 18:40:55 +02:00
Fabien Potencier
99c44a3836 bug #32065 [HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error

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

As spotted in the linked issue, we are missing this type of exception. It's a bug at the contracts level.

Commits
-------

3f167417fb [HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error
2019-06-17 18:35:34 +02:00
Jérémy Derussé
9f960f34e7
Fix expired lock not cleaned 2019-06-17 16:13:35 +02:00
Nicolas Grekas
a0aa94114a minor #32054 Prepare for PHP 7.4 preload (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Prepare for PHP 7.4 preload

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

PHP 7.4 preloading is not compatible with declaring the same class twice in if/else blocks.
Let's split the ones we have in several files.

Commits
-------

7cf3fb4a21 Prepare for PHP 7.4 preload
2019-06-17 13:50:38 +02:00
Tobias Schultze
507794a575 Fine tune constructor types 2019-06-17 02:42:58 +01:00
Nicolas Grekas
3f167417fb [HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error 2019-06-16 20:17:37 +02:00
Roland Franssen
270f10cc81 [HttpFoundation] Fix SA/phpdoc JsonResponse 2019-06-16 13:18:06 +02:00
Roland Franssen
5491d5347c [PhpUnitBridge] Bump PHPUnit 7+8 2019-06-16 13:16:20 +02:00
Fabien Potencier
db1543514e bug #32040 [DI] Show the right class autowired when providing a non-existing class (Simperfit)
This PR was merged into the 4.3 branch.

Discussion
----------

[DI] Show the right class autowired when providing a non-existing class

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

<!--
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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->

This gets the last current id before the error and pass it to the callback in order to get the right error message.

Commits
-------

fbda90af6e [DI] Show the right class autowired when providing a non-existing class in constructor
2019-06-16 13:15:10 +02:00
Amrouche Hamza
fbda90af6e
[DI] Show the right class autowired when providing a non-existing class in constructor 2019-06-15 06:08:07 +02:00
Nicolas Grekas
7cf3fb4a21 Prepare for PHP 7.4 preload 2019-06-15 00:30:02 +02:00
Tobias Schultze
0034dee641 [Messenger] make retry logic work without SentStamp 2019-06-14 23:41:22 +02:00
Tobias Schultze
a9bcdcc936 bug #32035 [Messenger] fix delay delivery for non-fanout exchanges (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] fix delay delivery for non-fanout exchanges

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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        | symfony/symfony-docs#... <!-- required for new features -->

Fixes two bugs and outdated phpdoc:
1. When your exchange is not of type fanout, but direct for example, then delivery of delayed (retrying) messages does not work. This is because the delay logics adds a routing key to message. It was fixed if you have a custom routing key in #31355. But if you have no routing key, it still changed the routing key which means the message will not be delivery from your direct exchange to your queue anymore after being in the delay exchange. For fanout, which is the default, it does not matter because the routing key is ignored.
2. also fix dsn parsing of plain `amqp://` which is a valid URI that parse_url cannot handle when you want to pass all parameters as options

Commits
-------

0f15306d61 [Messenger] fix delay delivery for non-fanout exchanges
2019-06-14 19:11:46 +02:00
Christian Flothmann
ecded5ed03 prevent double deprecation message 2019-06-14 16:37:07 +02:00
Maxime Steinhausser
c7cc780373 [FrameworkBundle] Unconditionally register the DateIntervalNormalizer 2019-06-14 15:17:07 +02:00
Fabien Potencier
cfbb5b50b1 bug #32025 SimpleCacheAdapter fails to cache any item if a namespace is used (moufmouf)
This PR was squashed before being merged into the 3.4 branch (closes #32025).

Discussion
----------

SimpleCacheAdapter fails to cache any item if a namespace is used

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

This is a backport of #32019

The SimpleCacheAdapter extends AdapterTestCase.
When adding a namespace, the AdapterTestCase adds ":" after the namespace:

https://github.com/symfony/symfony/blob/v4.3.1/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php#L37

The namespace is prepended to the cache key.
But in PSR-16, the ":" is a forbidden character.

As a result, the cache key is invalid and cache is not persisted. If you use Psr16Adapter + a namespace, the cache simply does not work.

As per @nicolas-grekas advices, a NS_SEPARATOR const is added to change the namespace separator for the `SimpleCacheAdapter` to "_" (that is compatible with PSR-16).

The first commit of this PR starts with an additional test and no fix (to showcase the problem).

Commits
-------

ffd3469ddf SimpleCacheAdapter fails to cache any item if a namespace is used
2019-06-14 13:16:09 +02:00
David Négrier
ffd3469ddf SimpleCacheAdapter fails to cache any item if a namespace is used 2019-06-14 13:16:02 +02:00
Maxime Steinhausser
0c0978cd47 [Validator] Deprecate unused arg in ExpressionValidator 2019-06-14 10:40:37 +02:00
Fabien Potencier
6b50c89d76 bug #32022 [HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set

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

On Windows, curl has no cabundle configured by default.

Commits
-------

a2960a3318 [HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set
2019-06-14 10:02:21 +02:00
Fabien Potencier
50c62d7704 feature #31287 [Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation (jschaedl)
This PR was squashed before being merged into the 4.4 branch (closes #31287).

Discussion
----------

[Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| 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 | #27534   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | tbd.

### Description

This PR introduces a new `find(string $nodePath)`method in the `ArrayNodeDefinition` class, which helps you finding the right node to prepend configuration to ease configuration tree manipulation.

### How to use it
```php
class Configuration implements ConfigurationInterface
{
    public function getConfigTreeBuilder()
    {
        ...

        $rootNode
            ->children()
                ->arrayNode('social_media_channels')
                    ->children()
                        ->booleanNode('enable')->end()
                        ->arrayNode('twitter')->end()
                        ->arrayNode('facebook')->end()
                        ->arrayNode('instagram')->end()
                    ->end()
                ->end()
            ->end()
        ;

        $this->changeSocialMediaChannelConfiguration($rootNode->find('social_media_channels.enable'));
        $this->addTwitterConfiguration($rootNode->find('social_media_channels.twitter'));
        $this->addFacebookConfiguration($rootNode->find('social_media_channels.facebook'));
        $this->addInstagramConfiguration($rootNode->find('social_media_channels.instagram'));

        return $treeBuilder;
    }

    private function changeSocialMediaChannelConfiguration(NodeDefinition $node)
    {
        $node
            ->defaultTrue()
        ;
    }

    private function addTwitterConfiguration(NodeDefinition $node)
    {
        $node
            ->children()
                ->integerNode('client_id')->end()
                ->scalarNode('client_secret')->end()
            ->end()
        ;
    }

    private function addFacebookConfiguration(NodeDefinition $node)
    {
        $node
            ->children()
                ->integerNode('client_id')->end()
                ->scalarNode('client_secret')->end()
            ->end()
        ;
    }

    private function addInstagramConfiguration(NodeDefinition $node)
    {
        $node
            ->children()
                ->integerNode('client_id')->end()
                ->scalarNode('client_secret')->end()
            ->end()
        ;
    }
}

```

Commits
-------

e3b248aee0 [Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation
2019-06-14 09:59:19 +02:00
Jan Schädlich
e3b248aee0 [Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation 2019-06-14 09:59:12 +02:00
Christian Flothmann
94ded00216 validate composite constraints in all groups 2019-06-14 09:34:46 +02:00
Fabien Potencier
b8978bd9ff bug #32007 [Serializer] Handle true and false appropriately in CSV encoder (battye)
This PR was squashed before being merged into the 3.4 branch (closes #32007).

Discussion
----------

[Serializer] Handle true and false appropriately in CSV encoder

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

Previously, if `true` was passed in as a value to the CSV encoder then `fputcsv()` would correctly treat it as 1. However, if `false` was passed in, it would be treated as a blank value. `null` would also be treated as a blank value.

This fix makes it consistent so that true and false will map to 1 and 0, while null maps to an empty string.

Commits
-------

89cba00c68 [Serializer] Handle true and false appropriately in CSV encoder
2019-06-14 07:50:06 +02:00
battye
89cba00c68 [Serializer] Handle true and false appropriately in CSV encoder 2019-06-14 07:49:57 +02:00
Fabien Potencier
f06a35b974 feature #31959 [DomCrawler][Feature][DX] Add Form::getName() method (JustBlackBird)
This PR was squashed before being merged into the 4.4 branch (closes #31959).

Discussion
----------

[DomCrawler][Feature][DX] Add Form::getName() method

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | None
| License       | MIT
| Doc PR        | symfony/symfony-docs#11705

The PR adds `Symfony\Component\DomCrawler\Form::getName` method.

The method is actually a syntax sugar but can improve DX when dealing with tests. For example, in the snippet

```php
$client = static::createClient();
$crawler = $client->request('GET', '/post/hello-world');
$form = $crawler->selectButton('submit')->form();

$form['my_form[name]'] = 'Fabien';
$form['my_form[subject]'] = 'Symfony rocks!';
```
the prefix in field name (`my_form`) is form name, which is generated by Symfony automatically. The method, added in the PR helps to get that name in a most obvious way.

Commits
-------

ff53cb462a [DomCrawler][Feature][DX] Add Form::getName() method
2019-06-14 07:15:47 +02:00
Dmitry Simushev
ff53cb462a [DomCrawler][Feature][DX] Add Form::getName() method 2019-06-14 07:15:39 +02:00
Fabien Potencier
e02da2ab35 bug #32036 [Messenger] improve logs (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] improve logs

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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        |

The logs are currently very confusing and duplicated:

- When handled sync the uncaught error it logged and displayed by the console / http error handler anyway. Currently it the warning is duplicated and useless:

```
14:26:11 WARNING   [messenger] An exception occurred while handling message "{class}": OUCH, THAT HURTS! GO TO MOM!
14:26:11 ERROR     [console] Error thrown while running command "{class}". Message: "OUCH, THAT HURTS! GO TO MOM!"

In HandleMessageMiddleware.php line 82:

  [Symfony\Component\Messenger\Exception\HandlerFailedException]
  OUCH, THAT HURTS! GO TO MOM!
```

- When handling async is was even confusing because the actual error was logged as warning and the retry (which is a good thing) was the error.

```
13:48:15 WARNING   [messenger] An exception occurred while handling message "{class}": OUCH, THAT HURTS! GO TO MOM!
13:48:15 ERROR     [messenger] Retrying {class} - retry #1.
```

Now it's must clearer and adds even context like the delay:

```
16:20:11 ERROR     [messenger] Error thrown while handling message {class}. Dispatching for retry #3 using 4000 ms delay. Error: "OUCH, THAT HURTS! GO TO MOM!"
...
16:20:15 CRITICAL  [messenger] Error thrown while handling message {class}. Removing from transport after 3 retries. Error: "OUCH, THAT HURTS! GO TO MOM!"
```

Commits
-------

2ac7027b71 [Messenger] improve logs
2019-06-14 07:10:33 +02:00
Tobias Schultze
2ac7027b71 [Messenger] improve logs 2019-06-14 05:35:37 +02:00
Tobias Schultze
0f15306d61 [Messenger] fix delay delivery for non-fanout exchanges
also fix dsn parsing of plain amqp:// uri
2019-06-14 02:31:20 +02:00
Jérémy Derussé
7439c8de55
Parameterize Mailgun's region 2019-06-13 19:53:12 +02:00
Fabien Potencier
bd9d0a4793 bug #32000 [Routing] fix absolute url generation when scheme is not known (Tobion)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] fix absolute url generation when scheme is not known

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

This fixes two edge cases in the url generator:
1. when the context scheme is not known (empty) generating an absolute url would return an invalid url starting with `://host/path`. #25491 handled the case when the host is unknown which makes sense. but the way it was done, created this new problem.
2. non-http(s) urls do not require a host. e.g. typical `file:///path` urls. url generator is fixed to be in line with rfc3986

Commits
-------

8e04222976 [Routing] fix absolute url generation when scheme is not known
2019-06-13 18:44:13 +02:00
Fabien Potencier
9865988ac2 bug #32012 Add statement to fileLink to ignore href code when no fileLink. (bmxmale)
This PR was merged into the 4.3 branch.

Discussion
----------

Add statement to fileLink to ignore href code when no fileLink.

| Q             | A
| ------------- | ---
| Branch?       | 4.3 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? |no <!-- please 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        | symfony/symfony-docs#... <!-- required for new features -->

<!--
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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->
This fix add statement to `\Symfony\Bundle\FrameworkBundle\Console\Descriptor\TextDescriptor::formatControllerLink` to fix display bug.

**Before**

![image](https://user-images.githubusercontent.com/23213308/59355771-ed8a1000-8d27-11e9-998f-fa2fc34edd62.png)

**After**

![image](https://user-images.githubusercontent.com/23213308/59355785-f2e75a80-8d27-11e9-953b-7523e0c9ad35.png)

Commits
-------

b9eab42823 Add statement to fileLink to ignore href code when no fileLink.
2019-06-13 18:41:02 +02:00
Fabien Potencier
bad18dc4ac feature #32026 [VarDumper] caster for HttpClient's response dumps all info (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] caster for HttpClient's response dumps all info

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

No need to dump the internal structure for responses IMHO, here is a caster that dumps the info instead:

![image](https://user-images.githubusercontent.com/243674/59434490-efb5a280-8deb-11e9-8714-5f1ccbc208b1.png)

Commits
-------

2b268379f5 [VarDumper] caster for HttpClient's response dumps all info
2019-06-13 18:38:05 +02:00