Commit Graph

39135 Commits

Author SHA1 Message Date
Nicolas Grekas
49efe9a5a9 [Uid] remove Uuid::getVariant() 2020-03-13 20:12:33 +01:00
Nicolas Grekas
59044f914b [Uid] add support for Ulid 2020-03-13 15:21:35 +01:00
Nicolas Grekas
cc73b1eafa minor #36058 [Uid] make Uuid::equals method accept any types of argument for more flexibility (hhamon)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Uid] make `Uuid::equals` method accept any types of argument for more flexibility

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

I suggest to weaken the `Uuid:equals` method argument type to accept any types of value to compare against. This makes one able to compare the `Uuid` instance with any values.

Commits
-------

46721c19f9 [Uid] make `Uuid::equals()` accept any types of argument for more flexibility
2020-03-13 15:20:10 +01:00
Hugo Hamon
46721c19f9 [Uid] make Uuid::equals() accept any types of argument for more flexibility 2020-03-13 15:19:40 +01:00
Nicolas Grekas
08bb79b174 minor #36053 [Uid] make Uuid::getTime() return subseconds info (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Uid] make Uuid::getTime() return subseconds info

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

A UUID timestamp contains 60bit of data, but a timestamp barely contains 31bit.
Let's return a float instead.

Commits
-------

5a170b80ed [Uid] make Uuid::getTime() return subseconds info
2020-03-13 14:59:23 +01:00
Christian Flothmann
20971dff82 ignore microseconds submitted by Edge 2020-03-13 14:04:07 +01:00
Nicolas Grekas
d028a503e6 feature #35995 [FrameworkBundle] add --deprecations on debug:container command (Simperfit, noemi-salaun)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle] add --deprecations on debug:container command

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

_I apologize in advance, I am not fluent in English_

Continuity of @Simperfit work from his PR https://github.com/symfony/symfony/pull/32584

I added support for XML, JSON and markdown formats as well as unit tests for all formats.

## XML format

```xml
<?xml version="1.0" encoding="UTF-8"?>
<deprecations remainingCount="5">
  <deprecation count="3">
    <message>Some deprecation message.</message>
    <file>/path/to/some/file.php</file>
    <line>39</line>
  </deprecation>
  <deprecation count="2">
    <message>An other deprecation message.</message>
    <file>/path/to/an/other/file.php</file>
    <line>25</line>
  </deprecation>
</deprecations>
```

## JSON format

```json
{
  "remainingCount": 5,
  "deprecations": [
    {
      "message": "Some deprecation message.",
      "file": "\/path\/to\/some\/file.php",
      "line": 39,
      "count": 3
    },
    {
      "message": "An other deprecation message.",
      "file": "\/path\/to\/an\/other\/file.php",
      "line": 25,
      "count": 2
    }
  ]
}
```

## Markdown format

## Remaining deprecations (5)

- 3x: "Some deprecation message." in /path/to/some/file.php:39
- 2x: "An other deprecation message." in /path/to/an/other/file.php:25

I added a new commit on top of @Simperfit 's one, but I don't know how you would like to have the git history writed.

Commits
-------

ee6391eb29 [FrameworkBundle] add all formats support for debug:container --deprecations command
161f659146 [FrameworkBundle] add --deprecations on debug:container command
2020-03-13 13:34:29 +01:00
Noémi Salaün
ee6391eb29 [FrameworkBundle] add all formats support for debug:container --deprecations command 2020-03-13 13:34:21 +01:00
Nicolas Grekas
66e53fb1b5 [String] fix test 2020-03-13 12:22:22 +01:00
Nicolas Grekas
53b0f63bc3 [String] leverage Stringable from PHP 8 2020-03-13 11:54:27 +01:00
Nicolas Grekas
5428fef8cb Merge branch '5.0'
* 5.0:
  [Security/Core] fix merge
  fix typo
  [Validator] clarify stringable type annotations
  [Security/Core] fix some annotations
2020-03-13 11:40:02 +01:00
Nicolas Grekas
2f9438677c Merge branch '4.4' into 5.0
* 4.4:
  [Security/Core] fix merge
  fix typo
  [Validator] clarify stringable type annotations
  [Security/Core] fix some annotations
2020-03-13 11:39:51 +01:00
Nicolas Grekas
228b59da56 [Security/Core] fix merge 2020-03-13 11:38:56 +01:00
Nicolas Grekas
162758317c Merge branch '3.4' into 4.4
* 3.4:
  fix typo
  [Validator] clarify stringable type annotations
  [Security/Core] fix some annotations
2020-03-13 11:34:17 +01:00
Nicolas Grekas
523f5c04ab fix typo 2020-03-13 11:30:33 +01:00
Nicolas Grekas
0ee97f23a6 [Validator] clarify stringable type annotations 2020-03-13 11:25:23 +01:00
Nicolas Grekas
8e873d0b5b [Security/Core] fix some annotations 2020-03-13 11:19:21 +01:00
Nicolas Grekas
5a170b80ed [Uid] make Uuid::getTime() return subseconds info 2020-03-13 09:25:19 +01:00
Nicolas Grekas
14c95a9d8c Merge branch '5.0'
* 5.0:
  [Config] fix test
  [HttpClient] disable debug log with curl 7.64.0
  [Intl][3.4] Bump ICU 66.1
  fix import from config file using type: glob
  [DoctrineBridge][DoctrineExtractor] Fix wrong guessed type for "json" type
2020-03-13 09:05:42 +01:00
Nicolas Grekas
381c2e8f62 Merge branch '4.4' into 5.0
* 4.4:
  [Config] fix test
  [HttpClient] disable debug log with curl 7.64.0
  [Intl][3.4] Bump ICU 66.1
  fix import from config file using type: glob
  [DoctrineBridge][DoctrineExtractor] Fix wrong guessed type for "json" type
2020-03-13 09:04:52 +01:00
Nicolas Grekas
1893ef9a0f bug #36038 [HttpClient] disable debug log with curl 7.64.0 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] disable debug log with curl 7.64.0

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

Works around https://curl.haxx.se/mail/archive-2019-02/0013.html

Commits
-------

d4cde31940 [HttpClient] disable debug log with curl 7.64.0
2020-03-13 09:02:30 +01:00
Nicolas Grekas
f9b2714efb Merge branch '3.4' into 4.4
* 3.4:
  [Config] fix test
  [Intl][3.4] Bump ICU 66.1
  fix import from config file using type: glob
  [DoctrineBridge][DoctrineExtractor] Fix wrong guessed type for "json" type
2020-03-13 09:01:26 +01:00
Nicolas Grekas
148b13cdf0 bug #36041 fix import from config file using type: glob (Tobion)
This PR was merged into the 3.4 branch.

Discussion
----------

fix import from config file using type: glob

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       |
| License       | MIT
| Doc PR        |

If you try to import configs with glob using
```
imports:
    - { resource: '../dev/*.{php,xml,yaml,yml}', type: 'glob' }
```
it didn't work because the FileLoader resolves the glob pattern but forwards the glob type. This meant the resolver then choses the GlobFilerLoader again for each already resolved file which does not find the files. So in the end the glob was resolved but the files never imported.
The workaround is to remove the `type: glob` from the import above. But the real fix should be to not forward the glob type when it's already resolved.

Commits
-------

6b70511bc6 fix import from config file using type: glob
2020-03-13 08:58:23 +01:00
Nicolas Grekas
f0208767cf bug #35987 [DoctrineBridge][DoctrineExtractor] Fix wrong guessed type for "json" type (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[DoctrineBridge][DoctrineExtractor] Fix wrong guessed type for "json" type

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/35968
| License       | MIT
| Doc PR        | -

After checking the code, it appears that `json` have a different behavior than `json_array`.

> In json_array doctrine was converting null or empty value to array, but json type doesn't do that

@norkunas is right about this. Consequently, we cannot safely guess a built in type for the `json` Doctrine type.

Commits
-------

f9f5f8df3e [DoctrineBridge][DoctrineExtractor] Fix wrong guessed type for "json" type
2020-03-13 08:56:31 +01:00
Nicolas Grekas
c561eb06b7 minor #36045 [Intl][3.4] Bump ICU 66.1 (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl][3.4] Bump ICU 66.1

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", 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/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too.)
 - Features and deprecations must be submitted against branch master.
-->
See https://github.com/unicode-org/icu/releases/tag/release-66-1 (no data changes for us)

Commits
-------

2275689cf8 [Intl][3.4] Bump ICU 66.1
2020-03-13 08:55:06 +01:00
Nicolas Grekas
2d509623b0 [Config] fix test 2020-03-13 08:54:41 +01:00
Nicolas Grekas
d4cde31940 [HttpClient] disable debug log with curl 7.64.0 2020-03-13 08:28:20 +01:00
Gabriel Ostrolucký
8ddaa20b29
[Console] Fallback to default answers when unable to read input 2020-03-12 21:13:20 +01:00
Roland Franssen
2275689cf8 [Intl][3.4] Bump ICU 66.1 2020-03-12 20:58:31 +01:00
Amrouche Hamza
161f659146 [FrameworkBundle] add --deprecations on debug:container command 2020-03-12 18:25:48 +01:00
Nicolas Grekas
7991685e04 [HttpClient] made HttpClient::create() return an AmpHttpClient when amphp/http-client is found but curl is not or too old 2020-03-12 18:24:09 +01:00
Fabien Potencier
d108f7b7ef feature #35940 [UID] Added the component + Added support for UUID (lyrixx)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[UID] Added the component + Added support for UUID

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

---

```php
<?php

require __DIR__.'/vendor/autoload.php';

use Symfony\Component\Uid\Uuid;

$u = Uuid::v1();
dump($u);
dump($u->isNull());
dump($u->getType());
dump($u->getVariant());
dump($u->getTime());
dump($u->getMac());
dump($u->isEqualsTo($u));
dump($u->compare($u));
dump(Uuid::fromBinary($u->toBinary()));
```

Commits
-------

c3f14dd0f4 [UID] Added the component + Added support for UUID
2020-03-12 18:23:22 +01:00
Grégoire Pineau
c3f14dd0f4 [UID] Added the component + Added support for UUID 2020-03-12 18:21:37 +01:00
Nicolas Grekas
49e5d5749c feature #31375 [Form] Add label_html attribute (przemyslaw-bogusz)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Form] Add label_html attribute

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
| Doc PR        | symfony/symfony-docs#13316

I propose to add a new attribute to `BaseType` class so it is easy to include html tags in labels for, both, buttons and other elements that inherit from `FormType` class. This gives you an ability to add, e.g. a glyphicon to a button, or a link to a checkbox, simply inside the `FormBuilder`, which means you can just do
```twig
{{ form(form) }}
```
inside a template.

**Sidenotes**
1. I have started working on this two days ago and it the meantime @alexander-schranz made a similar proposition in #31358. If necessary, I can close my PR and @alexander-schranz can include my suggestions inside his PR.
1. I have just read in #29861 that @mpiot wanted to include this idea in his PR. With respect to @xabbuh's comments from that PR, I hope that my PR will be at least a good place to discuss, if the proposed feature is a good solution.

Commits
-------

239fe04ff9 [Form] Add label_html attribute
2020-03-12 18:18:29 +01:00
Przemysław Bogusz
239fe04ff9 [Form] Add label_html attribute 2020-03-12 18:18:22 +01:00
Nicolas Grekas
1b5430bc9f Merge branch '5.0'
* 5.0: (36 commits)
  Add test for tagged iterator with numeric index
  Fix container lint command when a synthetic service is used in combination with the expression language
  Fix Travis script
  [Validator][Range] Fix typos
  [SecurityBundle] Minor fix in LDAP config tree builder
  [HttpClient] fix requests to hosts that idn_to_ascii() cannot handle
  Revert "minor #35559 [FrameworkBundle] remove mention of the old Controller class (nicolas-grekas)"
  [FrameworkBundle] remove redundant PHPDoc in console Descriptor and subclass
  [Mime] remove phpdoc mentioning Utf8AddressEncoder
  Add missing phpdoc
  Remove int return type from FlattenException::getCode
  [Yaml] fix dumping strings containing CRs
  [DI] Fix XmlFileLoader bad error message
  [Form] Handle false as empty value on expanded choices
  [Messenger] Add ext-redis min version req to tests
  Tweak message
  improve PlaintextPasswordEncoder docBlock summary
  [Validator] Add two missing translations for the Arabic (ar) locale
  Use some PHP 5.4 constants unconditionally
  Add new packages on the link script
  ...
2020-03-12 18:11:13 +01:00
Nicolas Grekas
ac2c8f2352 Merge branch '4.4' into 5.0
* 4.4: (34 commits)
  Add test for tagged iterator with numeric index
  Fix container lint command when a synthetic service is used in combination with the expression language
  [Validator][Range] Fix typos
  [SecurityBundle] Minor fix in LDAP config tree builder
  [HttpClient] fix requests to hosts that idn_to_ascii() cannot handle
  [FrameworkBundle] remove redundant PHPDoc in console Descriptor and subclass
  [Mime] remove phpdoc mentioning Utf8AddressEncoder
  Add missing phpdoc
  Remove int return type from FlattenException::getCode
  [Yaml] fix dumping strings containing CRs
  [DI] Fix XmlFileLoader bad error message
  [Form] Handle false as empty value on expanded choices
  [Messenger] Add ext-redis min version req to tests
  Tweak message
  improve PlaintextPasswordEncoder docBlock summary
  [Validator] Add two missing translations for the Arabic (ar) locale
  Use some PHP 5.4 constants unconditionally
  Add new packages on the link script
  [DI] fix dumping errored definitions
  [DI] ignore extra tags added by autoconfiguration in PriorityTaggedServiceTrait
  ...
2020-03-12 18:08:07 +01:00
Denis Yuzhanin
7aa4e10473 Add test for tagged iterator with numeric index 2020-03-12 18:03:36 +01:00
Nicolas Grekas
2bf9991dcb bug #35949 [DI] Fix container lint command when a synthetic service is used in an expression (HypeMC)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] Fix container lint command when a synthetic service is used in an expression

Fix container lint command when a synthetic service is used in combination with the expression language.

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

Commits
-------

e7fa73a32b Fix container lint command when a synthetic service is used in combination with the expression language
2020-03-12 17:59:33 +01:00
HypeMC
e7fa73a32b Fix container lint command when a synthetic service is used in combination with the expression language 2020-03-12 17:59:21 +01:00
Nicolas Grekas
26b123de41 bug #36023 [HttpClient] fix requests to hosts that idn_to_ascii() cannot handle (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix requests to hosts that idn_to_ascii() cannot handle

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

Commits
-------

4b45685306 [HttpClient] fix requests to hosts that idn_to_ascii() cannot handle
2020-03-12 17:52:45 +01:00
Nicolas Grekas
c3eb70d621 Merge branch '3.4' into 4.4
* 3.4:
  [FrameworkBundle] remove redundant PHPDoc in console Descriptor and subclass
  [Form] Handle false as empty value on expanded choices
2020-03-12 17:49:27 +01:00
Nicolas Grekas
aaddef3c57 bug #35938 [Form] Handle false as empty value on expanded choices (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Handle false as empty value on expanded choices

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/31572
| License       | MIT
| Doc PR        | -

This is the 3.4 version of https://github.com/symfony/symfony/pull/32747. The tests are the same. The added code has to be removed from master (if accepted).

Commits
-------

1a366bc378 [Form] Handle false as empty value on expanded choices
2020-03-12 17:44:30 +01:00
Tobias Schultze
6b70511bc6 fix import from config file using type: glob 2020-03-12 17:27:02 +01:00
Nicolas Grekas
cd08bf477e minor #36008 [FrameworkBundle] remove redundant PHPDoc in console Descriptor (noemi-salaun)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] remove redundant PHPDoc in console Descriptor

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

The PHPDoc for some `describeXXX` methods in the abstract `Symfony\Bundle\FrameworkBundle\Console\Descriptor\Descriptor` was inaccurate or redundant.

I remove the PHPDoc in the superclass and the `{@inheritdoc}` in the child class as suggested by @chalasr in this PR comment https://github.com/symfony/symfony/pull/35995#discussion_r389846487

I keep the PHPDoc when it adds some explanation about the method or its params.

For exemple :
### inaccurate:
```php
    /**
     * Describes an InputArgument instance.
     */
    abstract protected function describeRouteCollection(RouteCollection $routes, array $options = []);

    /**
     * Describes an InputOption instance.
     */
    abstract protected function describeRoute(Route $route, array $options = []);
```

### redundant
```php
    /**
     * Describes container parameters.
     */
    abstract protected function describeContainerParameters(ParameterBag $parameters, array $options = []);

    /**
     * Describes container tags.
     */
    abstract protected function describeContainerTags(ContainerBuilder $builder, array $options = []);
```

### kept

```php
    /**
     * Describes event dispatcher listeners.
     *
     * Common options are:
     * * name: name of listened event
     */
    abstract protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = []);

    /**
     * Describes a callable.
     *
     * @param mixed $callable
     */
    abstract protected function describeCallable($callable, array $options = []);
```
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too.)
 - Features and deprecations must be submitted against branch master.
-->

Commits
-------

e535e7d2ff [FrameworkBundle] remove redundant PHPDoc in console Descriptor and subclass
2020-03-12 17:06:02 +01:00
Nicolas Grekas
741b24926b bug #36030 [SecurityBundle] Minor fix in LDAP config tree builder (HeahDude)
This PR was merged into the 4.4 branch.

Discussion
----------

[SecurityBundle] Minor fix in LDAP config tree builder

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

Continuation of #35910 for 4.4.

Commits
-------

468a201d34 [SecurityBundle] Minor fix in LDAP config tree builder
2020-03-12 16:55:28 +01:00
Thomas Calvet
cdb03d3418 [String] Update wcswidth data 2020-03-12 09:06:22 +01:00
Przemysław Bogusz
a08d5191d2 [Validator][Range] Fix typos 2020-03-11 21:51:14 +01:00
Jules Pietri
468a201d34
[SecurityBundle] Minor fix in LDAP config tree builder 2020-03-11 18:56:21 +01:00
Nicolas Grekas
d0b74453de Merge branch '3.4' into 4.4
* 3.4:
  [Yaml] fix dumping strings containing CRs
  [DI] Fix XmlFileLoader bad error message
  Tweak message
  improve PlaintextPasswordEncoder docBlock summary
  [Validator] Add two missing translations for the Arabic (ar) locale
  Use some PHP 5.4 constants unconditionally
  Revert "bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form"
  Add Spanish translation
  Fix typo
  [Validator] add Japanese translation
  Fix typo
  Add Polish translation
  [SecurityBundle] Minor fixes in configuration tree builder
  bumped Symfony version to 3.4.39
  updated VERSION for 3.4.38
  update CONTRIBUTORS for 3.4.38
  updated CHANGELOG for 3.4.38
2020-03-11 18:49:34 +01:00
Nicolas Grekas
4b45685306 [HttpClient] fix requests to hosts that idn_to_ascii() cannot handle 2020-03-11 09:29:03 +01:00
Fabien Potencier
a51a0c5bd5 feature #35997 [DX][Testing] Added a loginUser() method to test protected resources (javiereguiluz, wouterj)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[DX][Testing] Added a loginUser() method to test protected resources

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

This finishes https://github.com/symfony/symfony/pull/32850 original description:

> I know this won't work for 100% of our users ... but the goal is to make life easier to *most* of them. Thanks!

A custom `ConcreteToken` test-object is created as suggested by @linaori, to not bind this token to any specific implementation (as other implementations aren't fully compatible with eachother).

Commits
-------

2980a680d4 Added special test token and implemented 'real' functional tests
f516829d99 [DX][Testing] Added a loginUser() method to test protected resources
2020-03-11 08:47:25 +01:00
Nicolas Grekas
fbea81c963 Revert "minor #35559 [FrameworkBundle] remove mention of the old Controller class (nicolas-grekas)"
This reverts commit 6bb6473489, reversing
changes made to 4cce23d9ca.
2020-03-10 17:09:48 +01:00
Thomas Calvet
35df055871 [FrameworkBundle][Configuration] Fix translator enabled_locales configuration definition 2020-03-10 15:13:44 +01:00
Noémi Salaün
e535e7d2ff [FrameworkBundle] remove redundant PHPDoc in console Descriptor and subclass
The PHPDoc for some describeXXX methods in the abstract Descriptor was inacurate or redundant.
2020-03-09 19:12:25 +01:00
David Maicher
a85fb6c496 [Mime] remove phpdoc mentioning Utf8AddressEncoder
that class does not exist.
2020-03-09 13:55:04 +01:00
Fabien Potencier
c1ed1007cd Add missing phpdoc 2020-03-09 13:54:19 +01:00
Martin Kirilov
0f22e076c4 Remove int return type from FlattenException::getCode 2020-03-09 13:52:39 +01:00
Fabien Potencier
bdd66aafc0 bug #36004 [Yaml] fix dumping strings containing CRs (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] fix dumping strings containing CRs

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

Commits
-------

da7870433f [Yaml] fix dumping strings containing CRs
2020-03-09 11:53:35 +01:00
Christian Flothmann
da7870433f [Yaml] fix dumping strings containing CRs 2020-03-09 10:15:29 +01:00
Wouter de Jong
2980a680d4 Added special test token and implemented 'real' functional tests 2020-03-08 12:55:54 +01:00
Jan Schädlich
022c1707e2 [Notifier] Add tests for AbstractChannel and ChannelPolicy 2020-03-08 10:15:54 +01:00
Javier Eguiluz
f516829d99 [DX][Testing] Added a loginUser() method to test protected resources 2020-03-07 18:11:03 +01:00
Fabien Potencier
dbe37de820 feature #35978 [Messenger] Show message & handler(s) class description in debug:messenger (ogizanagi)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Messenger] Show message & handler(s) class description in debug:messenger

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

Similar to the `debug:autowiring` command, add the messages & handlers class description to the `debug:messenger` command.

Messenger is a central piece in CQRS applications. Exposing the messages & handlers descriptions in this command is a great way to have a global vision of the covered use-cases (especially if there is a newcomer to the project).

Commits
-------

079efdff08 [Messenger] Show message & handler(s) class description in debug:messenger
2020-03-06 10:57:54 +01:00
Przemysław Bogusz
be7afc6d85 [DI] Fix XmlFileLoader bad error message 2020-03-06 10:50:39 +01:00
Thomas Calvet
1a366bc378 [Form] Handle false as empty value on expanded choices 2020-03-06 10:46:24 +01:00
Thomas Calvet
f9f5f8df3e [DoctrineBridge][DoctrineExtractor] Fix wrong guessed type for "json" type 2020-03-06 09:58:06 +01:00
Fabien Potencier
b470af1d1b minor #35970 [VarDumper] DumpServer: log whenever a payload is received (ogizanagi)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[VarDumper] DumpServer: log whenever a payload is received

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

Small improvement so you can get a feedback in the console when a dump was received by using `-vv`:

![Capture d’écran 2020-03-05 à 12 02 34](https://user-images.githubusercontent.com/2211145/75975709-4d899d80-5ed9-11ea-942f-e76a62d82218.png)

Commits
-------

7cfc3ced9d [VarDumper] DumpServer: log whenever a payload is received
2020-03-05 16:36:45 +01:00
Maxime Steinhausser
31f8990194 [Messenger] Add ext-redis min version req to tests 2020-03-05 16:34:25 +01:00
Maxime Steinhausser
079efdff08 [Messenger] Show message & handler(s) class description in debug:messenger 2020-03-05 16:02:15 +01:00
Guillaume Pédelagrabe
e2425b9ece [Security/Http] Hash Persistent RememberMe token 2020-03-05 15:13:42 +01:00
Nicolas Grekas
3801ddce5c bug #35957 [DI] ignore extra tags added by autoconfiguration in PriorityTaggedServiceTrait (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] ignore extra tags added by autoconfiguration in PriorityTaggedServiceTrait

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35916, Fix #35953
| License       | MIT
| Doc PR        | -

Commits
-------

09770aa930 [DI] ignore extra tags added by autoconfiguration in PriorityTaggedServiceTrait
2020-03-05 14:50:44 +01:00
Fabien Potencier
bd0bf5240f minor #35958 improve PlaintextPasswordEncoder docBlock summary (jrushlow)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

improve PlaintextPasswordEncoder docBlock summary

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

Updates class summary as suggested in tkt #35927 & pr #35929 to suggest the encoder is for test usage.

Commits
-------

622facfe94 Tweak message
a56d262639 improve PlaintextPasswordEncoder docBlock summary
2020-03-05 12:34:40 +01:00
Fabien Potencier
622facfe94 Tweak message 2020-03-05 12:34:29 +01:00
Jesse Rushlow
a56d262639 improve PlaintextPasswordEncoder docBlock summary 2020-03-05 12:33:58 +01:00
Fabien Potencier
0ad2fdf6c5 minor #35969 [Validator] Add two missing arabe translations (Reda DAOUDI)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add two missing arabe translations

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       |
| License       | MIT
| Doc PR        |

Add two arabe translations for Validator's constraint violation messages

Commits
-------

9cc8d39c39 [Validator] Add two missing translations for the Arabic (ar) locale
2020-03-05 12:25:50 +01:00
Maxime Steinhausser
7cfc3ced9d [VarDumper] DumpServer: log whenever a payload is received 2020-03-05 11:59:11 +01:00
Reda DAOUDI
9cc8d39c39 [Validator] Add two missing translations for the Arabic (ar) locale 2020-03-05 11:31:37 +01:00
Thomas Calvet
0caf947924 Use some PHP 5.4 constants unconditionally 2020-03-05 10:39:55 +01:00
Nicolas Grekas
8179928336 [DI] fix dumping errored definitions 2020-03-04 16:44:30 +01:00
Nicolas Grekas
09770aa930 [DI] ignore extra tags added by autoconfiguration in PriorityTaggedServiceTrait 2020-03-04 15:14:33 +01:00
Nicolas Grekas
bf5d25c838 [DI] relax test to ignore changes to error message in master 2020-03-04 08:10:40 +01:00
Nicolas Grekas
aea80edc78 [String] move symfony/translation-contracts to require-dev 2020-03-03 22:05:19 +01:00
David Maicher
af17f5a9ac Revert "bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form"
This reverts commit c73b042044.
2020-03-03 14:44:39 +01:00
Nicolas Grekas
de79ae7f35 [String] Add AbstractString::containsAny() 2020-03-03 14:08:48 +01:00
Nicolas Grekas
0a2f7b2ceb [String] fix failing test on PHP 8 2020-03-03 11:04:25 +01:00
Nicolas Grekas
d246e941ab minor #35926 [Routing] Fix some wrong localized routes tests (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Routing] Fix some wrong localized routes tests

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

~~Since https://github.com/symfony/symfony/pull/35855, the `_locale` path param is directly substituted so those tests are not valid cases anymore. Instead, the path directly contain the right locale.~~ Actually, the compilation is done after, so instead we need to set the new requirement in all tests to reflect the "reality".

https://github.com/symfony/symfony/pull/35855 also causes a BC break on one case:
```php
$compiledUrlGenerator->generate('foo.fr', ['_locale' => 'en']))
```

Previously, the generated route would be the `/en/fourchette`. Now that the locale is hardcoded in the route path, it will always be `/fr/fourchette`. I changed `foo` to relevant words because it is easier to understand like that.

Commits
-------

99ae55ff1a [Routing] Fix some wrong localized routes tests
2020-03-02 18:19:11 +01:00
Nicolas Grekas
afdd507225 bug #35928 [Routing] Prevent localized routes _locale default & requirement from being overridden (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Routing] Prevent localized routes _locale default & requirement from being overridden

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/35915
| License       | MIT
| Doc PR        | -

When we have configured a localized route, its default _locale and _locale requirement should not be modified to ensure it works as expected.

Commits
-------

096dc0aeef [Routing] Prevent localized routes _locale default & requirement from being overridden
2020-03-02 18:17:59 +01:00
Thomas Calvet
99ae55ff1a [Routing] Fix some wrong localized routes tests 2020-03-02 17:31:03 +01:00
Thomas Calvet
096dc0aeef [Routing] Prevent localized routes _locale default & requirement from being overridden 2020-03-02 17:08:48 +01:00
Fabien Potencier
f632b76824 feature #35115 [HttpClient] Add portable HTTP/2 implementation based on Amp's HTTP client (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[HttpClient] Add portable HTTP/2 implementation based on Amp's HTTP client

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

This PR provides an `AmpHttpClient`, which is an adapter between [`amphp/http-client`](https://github.com/amphp/http-client) and `symfony/http-client-contracts`.

~This is an early experiment for now, but it works already on the happy path:~ I have a local h2-intensive script, and while it's slower than CurlHttpClient, this performs quite well!

This could provide a portable implementation of HTTP/2 \o/

/cc @kelunik FYI

Todo:
- [x] async request/response
- [x] streaming and multiplexing
- [x] handle all ssl options
- [x] timers info
- [x] upload/download progress info
- [x] upload/download progress callback
- [x] HTTP proxy support
- [x] streamed upload
- [x] public-key pinning
- [x] peer certificate capturing
- [x] stream casting with `$response->toStream()`
- [x] ~https://github.com/amphp/http-client/pull/241~
- [x] extensive debug info
- [x] HTTP/2 PUSH support
- [x] https://github.com/amphp/http-client/issues/243
- [x] https://github.com/amphp/http-client/issues/242
- [x] https://github.com/amphp/http-client/pull/250
- [x] https://github.com/amphp/http-client/pull/239
- [x] ~https://github.com/kelunik/certificate/pull/2~
- [x] https://github.com/amphp/socket/pull/71
- [x] https://github.com/amphp/http-client/issues/252

Commits
-------

ef113feeb3 [HttpClient] Add portable HTTP/2 implementation based on Amp's HTTP client
2020-03-02 15:21:41 +01:00
Christian Flothmann
24322cffdb register only existing transport factories 2020-03-02 14:23:01 +01:00
Nicolas Grekas
ef113feeb3 [HttpClient] Add portable HTTP/2 implementation based on Amp's HTTP client 2020-03-02 14:21:45 +01:00
Fabien Potencier
645ccc8eac Merge branch '5.0'
* 5.0:
  register only existing transport factories
  prevent deprecation being triggered from assertion
  bumped Symfony version to 5.0.6
  updated VERSION for 5.0.5
  updated CHANGELOG for 5.0.5
  bumped Symfony version to 4.4.6
  updated VERSION for 4.4.5
  updated CHANGELOG for 4.4.5
2020-03-02 13:36:47 +01:00
Fabien Potencier
8c778cbaa3 Merge branch '4.4' into 5.0
* 4.4:
  register only existing transport factories
  prevent deprecation being triggered from assertion
  bumped Symfony version to 4.4.6
  updated VERSION for 4.4.5
  updated CHANGELOG for 4.4.5
2020-03-02 13:33:16 +01:00
Fabien Potencier
4ab87747ad bug #35912 [FrameworkBundle] register only existing transport factories (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] register only existing transport factories

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

The parts from #35907 that also apply to the `4.4` branch.

Commits
-------

650c9f3f4b register only existing transport factories
2020-03-02 13:31:21 +01:00
Christian Flothmann
650c9f3f4b register only existing transport factories 2020-03-02 13:28:23 +01:00
Fabien Potencier
0936a4e75f bug #35899 [DomCrawler] prevent deprecation being triggered from assertion (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[DomCrawler] prevent deprecation being triggered from assertion

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

Commits
-------

b01a10c760 prevent deprecation being triggered from assertion
2020-03-02 13:08:26 +01:00
Victor Garcia
b4c90f08f1 [LDAP] Add error code in exceptions generated by ldap 2020-03-02 11:50:09 +01:00
Robin Chalas
dcf3da84f7 bug #35910 [SecurityBundle] Minor fixes in configuration tree builder (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] Minor fixes in configuration tree builder

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

Commits
-------

1bd779d7c8 [SecurityBundle] Minor fixes in configuration tree builder
2020-03-02 10:49:24 +01:00
Nicolas Grekas
e0d1e34ec7 minor #35918 Add Spanish translation (przemyslaw-bogusz)
This PR was merged into the 3.4 branch.

Discussion
----------

Add Spanish translation

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

@javiereguiluz I know it's not very significant, but in order to make distinction between `must be` and `should be`, shouldn't translation no. 94 be changed to `Este valor debería estar entre...`?

Commits
-------

9e67b57baa Add Spanish translation
2020-03-02 10:37:48 +01:00
Przemysław Bogusz
9e67b57baa Add Spanish translation 2020-03-02 10:37:39 +01:00
Fabien Potencier
6cb49b5e0c Fix typo 2020-03-02 09:43:43 +01:00
arai
af738c0c8f [Validator] add Japanese translation 2020-03-02 09:43:23 +01:00
Fabien Potencier
44ba43d673 Fix typo 2020-03-02 09:42:21 +01:00
Przemysław Bogusz
8c498ee487 Add Polish translation 2020-03-01 22:11:17 +01:00
Christian Flothmann
b01a10c760 prevent deprecation being triggered from assertion 2020-03-01 20:15:08 +01:00
Jules Pietri
1bd779d7c8
[SecurityBundle] Minor fixes in configuration tree builder 2020-02-29 22:44:21 +01:00
Fabien Potencier
b04484c3cf bumped Symfony version to 5.0.6 2020-02-29 13:30:49 +01:00
Fabien Potencier
9e1fab60f5 updated VERSION for 5.0.5 2020-02-29 11:41:30 +01:00
Fabien Potencier
2bd76fa32c bumped Symfony version to 4.4.6 2020-02-29 11:35:30 +01:00
Fabien Potencier
6c52d481e7 updated VERSION for 4.4.5 2020-02-29 11:31:38 +01:00
Fabien Potencier
8d2990e636 bumped Symfony version to 3.4.39 2020-02-29 11:30:13 +01:00
Fabien Potencier
dfc775c590 updated VERSION for 3.4.38 2020-02-29 11:16:41 +01:00
Fabien Potencier
6429999e91 Merge branch '5.0'
* 5.0:
  [Dotenv] Documentation improvement
  [DI] Clarified deprecation for TypedReference in 4.4
  [Validator] Add missing vietnamese translations
  add German translation
  add missing Messenger options to XML schema definition
  [5.0] Remove some unused variables
  [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc
  [DomCrawler][Form] Fix PHPDoc on get & offsetGet
  [ErrorHandler] fix parsing static return type on interface method annotation (fix #35836)
  prevent method calls on null values
  Return int if scale = 0
2020-02-29 11:07:16 +01:00
Fabien Potencier
65d06cbd41 Merge branch '4.4' into 5.0
* 4.4:
  [Dotenv] Documentation improvement
  [DI] Clarified deprecation for TypedReference in 4.4
  [Validator] Add missing vietnamese translations
  add German translation
  add missing Messenger options to XML schema definition
  [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc
  [DomCrawler][Form] Fix PHPDoc on get & offsetGet
  [ErrorHandler] fix parsing static return type on interface method annotation (fix #35836)
  prevent method calls on null values
  Return int if scale = 0
2020-02-29 11:07:09 +01:00
Fabien Potencier
8f7b8aa41d Merge branch '3.4' into 4.4
* 3.4:
  [Validator] Add missing vietnamese translations
  add German translation
  [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc
  [DomCrawler][Form] Fix PHPDoc on get & offsetGet
  prevent method calls on null values
  Return int if scale = 0
2020-02-29 11:05:28 +01:00
jonmldr
4f61247ccc [Dotenv] Documentation improvement 2020-02-29 11:04:02 +01:00
Fabien Potencier
0888ff6dbd minor #35894 [ExpressionLanguage] Fixed exception message (atailouloute)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[ExpressionLanguage] Fixed exception message

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

Commits
-------

4d695b380d [ExpressionLanguage] Fixed exception message
2020-02-29 11:02:13 +01:00
Fabien Potencier
34c2e96b08 bug #35781 [Form] NumberToLocalizedStringTransformer return int if scale = 0 (VincentLanglet)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] NumberToLocalizedStringTransformer return int if scale = 0

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

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too.)
 - Features and deprecations must be submitted against branch master.
-->

Commits
-------

2993fc9fc5 Return int if scale = 0
2020-02-29 10:59:06 +01:00
Fabien Potencier
146945ad8e feature #35782 [Routing] Add stateless route attribute (mtarld)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Routing] Add stateless route attribute

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Ticket		| https://github.com/orgs/symfony/projects/1#card-30506005
| License       | MIT
| Doc PR        | TODO

On top of https://github.com/symfony/symfony/pull/35732

Add a stateless attribute for:
Routes in annotations
```
@Route(stateless=true)
```
Yaml
```yml
route:
  stateless: true
```
Xml
```xml
<route stateless="true" />
```
PHP configurator
```php
$route->stateless(true);
```

That stateless attribute is a shortcut for setting `_stateless` default attribute in route.

Commits
-------

2da68bae8f [Routing] Add stateless route attribute
2020-02-29 10:56:15 +01:00
Fabien Potencier
7295d25f32 bug #35846 [Serializer] prevent method calls on null values (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Serializer] prevent method calls on null values

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

Commits
-------

847d6dc8f3 prevent method calls on null values
2020-02-29 10:53:07 +01:00
Fabien Potencier
dc9a0b586f bug #35897 [FrameworkBundle] add missing Messenger options to XML schema definition (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] add missing Messenger options to XML schema definition

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix symfony/symfony-docs#13010
| License       | MIT
| Doc PR        | symfony/symfony-docs#13277

Commits
-------

45a033d67b add missing Messenger options to XML schema definition
2020-02-29 10:50:54 +01:00
Fabien Potencier
8ed2e66de4 minor #35898 [DI] Clarified deprecation for TypedReference in 4.4 (linaori)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[DI] Clarified deprecation for TypedReference in 4.4

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

Changes the deprecation message to indicate the argument has been removed and how to fix it.

Commits
-------

1c70048e9c [DI] Clarified deprecation for TypedReference in 4.4
2020-02-29 10:50:10 +01:00
Lynn
1c70048e9c [DI] Clarified deprecation for TypedReference in 4.4 2020-02-29 10:50:04 +01:00
Fabien Potencier
6c042661e2 minor #35901 [Validator] add German translation (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] add German translation

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

Commits
-------

9d837ecb34 add German translation
2020-02-29 10:08:42 +01:00
Jan Schädlich
c16d153522 [Validator] Add missing vietnamese translations 2020-02-29 09:57:15 +01:00
arai
90104a919d [Validator] add Japanese translation 2020-02-29 09:37:39 +09:00
Christian Flothmann
9d837ecb34 add German translation 2020-02-28 15:30:03 +01:00
Christian Flothmann
45a033d67b add missing Messenger options to XML schema definition 2020-02-28 14:15:16 +01:00
Ahmed TAILOULOUTE
4d695b380d [ExpressionLanguage] Fixed exception message 2020-02-28 11:19:56 +01:00
Nicolas Grekas
5ffb96452f minor #35861 [DomCrawler][Form] Fix PHPDoc on get & offsetGet (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[DomCrawler][Form] Fix PHPDoc on get & offsetGet

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

`FormFieldRegistry::get()` returns mixed. For example, it can return an array when the field is a collection.

Commits
-------

f8735cc47b [DomCrawler][Form] Fix PHPDoc on get & offsetGet
2020-02-27 11:19:42 +01:00
Jérémy Derussé
03b7743ff5
Optimize HttpClient when body is iterable 2020-02-27 00:20:25 +01:00
Thomas Calvet
1f953e42f2 [5.0] Remove some unused variables 2020-02-26 23:30:10 +01:00
Thomas Calvet
491fc5c24d [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc 2020-02-26 21:34:36 +01:00
Thomas Calvet
f8735cc47b [DomCrawler][Form] Fix PHPDoc on get & offsetGet 2020-02-26 18:12:32 +01:00
Mathias Arlaud
2da68bae8f [Routing] Add stateless route attribute 2020-02-26 15:20:07 +01:00
Alessandro Chitolina
55734a297f
[ErrorHandler] fix parsing static return type on interface method annotation (fix #35836) 2020-02-26 12:45:31 +01:00
Fabien Potencier
7995fed10b feature #35732 [FrameworkBundle][HttpKernel] Add session usage reporting in stateless mode (mtarld)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle][HttpKernel] Add session usage reporting in stateless mode

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

https://github.com/orgs/symfony/projects/1#card-30506005

Provide a `@Stateless` annotation that forbid session usage for annotated controllers (or classes).

## Implementations
**v1**
- ~~New session proxy that allows session to be marked as disabled~~
- ~~New default route attribute: `_stateless` (automatically set by `@Stateless`)~~
- ~~On kernel controller event, if `_stateless` is `true`, session is marked as disabled~~
- ~~Session listener is able to check if the session is disabled and prevent its creation~~

**v2**
- New default route attribute: `_stateless` (automatically set by `@Stateless`)
- On kernel response, check the session usage and if session was used when `_stateless` attribute is set to `true`: Either throw an exception (debug enabled) or log a warning (debug disabled)

Commits
-------

bc48db2424 [FrameworkBundle][HttpFoundation] Add `_stateless`
2020-02-26 11:40:28 +01:00
Robin Chalas
dca77c42ec Merge branch '5.0'
* 5.0:
  [Security] Allow switching to another user when already switched
2020-02-26 11:32:20 +01:00
Robin Chalas
4206b4dc4a Merge branch '4.4' into 5.0
* 4.4:
  [Security] Allow switching to another user when already switched
2020-02-26 11:31:10 +01:00
Robin Chalas
3057c68b93 Merge branch '3.4' into 4.4
* 3.4:
  [Security] Allow switching to another user when already switched
2020-02-26 11:27:30 +01:00
Mathias Arlaud
bc48db2424 [FrameworkBundle][HttpFoundation] Add _stateless 2020-02-26 11:16:11 +01:00
Robin Chalas
0353077083 [Security] Allow switching to another user when already switched 2020-02-26 04:23:24 +01:00
Nicolas Grekas
d0e5593b1f Merge branch '5.0'
* 5.0:
  [FrameworkBundle] Fix test
2020-02-25 15:44:02 +01:00
Nicolas Grekas
cd355dff07 Merge branch '4.4' into 5.0
* 4.4:
  [FrameworkBundle] Fix test
2020-02-25 15:39:06 +01:00
Nicolas Grekas
1b377a86db Merge branch '3.4' into 4.4
* 3.4:
  [FrameworkBundle] Fix test
2020-02-25 15:33:04 +01:00
Nicolas Grekas
159ef1bf1d [FrameworkBundle] Fix test 2020-02-25 15:31:47 +01:00
Nicolas Grekas
c56cf2da5d Merge branch '5.0'
* 5.0:
  minor #35833 [FrameworkBundle] Add missing items in the unused tag pass whitelist (fabpot)
  [HttpClient][DX] Add URL context to JsonException messages
  [Routing] Improve localized routes performances
  [4.4][DoctrineBridge] Use new Types::* constants and support new json type
  [Validator] Add missing translations
  [Notifier] Dispatch message event in null transport
  [Messenger] Use Doctrine DBAL new Types::* constants
2020-02-25 15:29:12 +01:00
Nicolas Grekas
11097a5aa6 Merge branch '4.4' into 5.0
* 4.4:
  minor #35833 [FrameworkBundle] Add missing items in the unused tag pass whitelist (fabpot)
  [HttpClient][DX] Add URL context to JsonException messages
  [Routing] Improve localized routes performances
  [4.4][DoctrineBridge] Use new Types::* constants and support new json type
  [Validator] Add missing translations
  [Messenger] Use Doctrine DBAL new Types::* constants
2020-02-25 15:24:11 +01:00
Nicolas Grekas
1107548146 Merge branch '3.4' into 4.4
* 3.4:
  minor #35833 [FrameworkBundle] Add missing items in the unused tag pass whitelist (fabpot)
  [Validator] Add missing translations
2020-02-25 15:19:32 +01:00
Nicolas Grekas
b515bc9a97 minor #35833 [FrameworkBundle] Add missing items in the unused tag pass whitelist (fabpot)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle] Add missing items in the unused tag pass whitelist

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

We have some missing tags in the whitelist. I've added a script that adds the missing ones, and added a test to avoid forgetting about updating the whitelist.

Commits
-------

d1bcc0fc5e [FrameworkBundle] Add a script that checks for missing items in the unused tag whitelist
2020-02-25 15:18:39 +01:00
Nicolas Grekas
cad3f10cdb minor #35822 [HttpClient][DX] Add URL context to JsonException messages (GromNaN)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[HttpClient][DX] Add URL context to JsonException messages

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/pull/35762#issuecomment-589770016
| License       | MIT
| Doc PR        | N/A

In order to help when debugging incorrect JSON responses, this PR adds the requested URL to the error message.

Before: `Syntax Error`
After: `JSON error: Syntax error, from "https://example.com/file.json".`
See the 2nd commit for full diff in new unit tests

Commits
-------

06539173e7 [HttpClient][DX] Add URL context to JsonException messages
2020-02-25 14:55:46 +01:00
Jérôme TAMARELLE
06539173e7 [HttpClient][DX] Add URL context to JsonException messages 2020-02-25 14:55:11 +01:00
Nicolas Grekas
7b89d1b004 feature #35815 [Validator] Allow Sequentially constraints on classes + target guards (ogizanagi)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Validator] Allow Sequentially constraints on classes + target guards

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | N/A <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | todo in https://github.com/symfony/symfony-docs/pull/13206 if not merged yet

There is no reason to limit this constraint to properties, so let's add classes as targets.

Additionally, let's ensure embedded constraints matches allowed targets too.

Commits
-------

1e02a96286 [Validator] Allow Sequentially constraints on classes
2020-02-25 14:41:21 +01:00
Nicolas Grekas
d297231c56 minor #35833 [FrameworkBundle] Add missing items in the unused tag pass whitelist (fabpot)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle] Add missing items in the unused tag pass whitelist

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

We have some missing tags in the whitelist. I've added a script that adds the missing ones, and added a test to avoid forgetting about updating the whitelist.

Commits
-------

d1bcc0fc5e [FrameworkBundle] Add a script that checks for missing items in the unused tag whitelist
2020-02-25 14:09:27 +01:00
Fabien Potencier
d1bcc0fc5e [FrameworkBundle] Add a script that checks for missing items in the unused tag whitelist 2020-02-25 14:08:07 +01:00
Fabien Potencier
8a678f6679 minor #35819 [Messenger] Use Doctrine DBAL new Types::* constants (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Use Doctrine DBAL new Types::* constants

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

Commits
-------

f1fb1597ff [Messenger] Use Doctrine DBAL new Types::* constants
2020-02-25 14:05:06 +01:00
Ahmed TAILOULOUTE
b5744601bf [Routing][FrameworkBundle] Allow using env() in route conditions 2020-02-25 14:01:02 +01:00
Fabien Potencier
8867f57a44 feature #35857 [Routing] deprecate RouteCompiler::REGEX_DELIMITER (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Routing] deprecate RouteCompiler::REGEX_DELIMITER

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

This should be mostly internal cleanup.

Commits
-------

21b8a64446 [Routing] deprecate RouteCompiler::REGEX_DELIMITER
2020-02-25 13:53:07 +01:00
Fabien Potencier
28a249f2e5 feature #35804 [HttpFoundation] Added MarshallingSessionHandler (atailouloute)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[HttpFoundation] Added MarshallingSessionHandler

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

Added `MarshallingSessionHandler`, a decorator for session handlers which uses the cache marshaller in order to encrypt session data.

(This is an alternative solution to #35643)

To use it, we can simply decorate the session marshaller, after that all session data will be encrypted

```yaml
Symfony\Component\Cache\Marshaller\SodiumMarshaller:
    decorates: 'session.marshaller'
    arguments:
        - ['%env(file:resolve:SODIUM_DECRYPTION_FILE)%']
        - '@Symfony\Component\Cache\Marshaller\SodiumMarshaller.inner'
```

TODO:
- [x] unit tests

Commits
-------

155d980aea [HttpFoundation][Cache] Added MarshallingSessionHandler
2020-02-25 13:51:34 +01:00
Fabien Potencier
82db995908 feature #35858 [Security] Deprecated ROLE_PREVIOUS_ADMIN (wouterj)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Security] Deprecated ROLE_PREVIOUS_ADMIN

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

`ROLE_PREVIOUS_ADMIN` is added to the token roles if the session is an impersonation. Since https://github.com/symfony/symfony/pull/31189 we have the `IS_IMPERSONATOR` attribute which can be used for the same reason. I propose to deprecate the `ROLE_PREVIOUS_ADMIN`:

* This is not what roles are for ([resulting in hacking this exception in `AbstractToken`](https://github.com/symfony/symfony/blob/5.0/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php#L275-L277))
* The role isn't very descriptive
* I don't like having 2 ways of doing exactly the same thing
* While every application with impersonation enabled probably needs to be updated, the update is as simple as replacing `ROLE_PREVIOUS_ADMIN` with `IS_IMPERSONATOR`: `find ./ -type f -exec sed -i 's/ROLE_PREVIOUS_ADMIN/IS_IMPERSONATOR/g' {} +`

---

I'm a bit unsure on how to deprecate this role, but I think having it in `RoleVoter` is probably the safest (`isGranted()` and variants + `AccessDecisionManager#decide()` all use this voter to check if the token has this role).

Commits
-------

dce55f352a Deprecated ROLE_PREVIOUS_ADMIN
2020-02-25 13:48:58 +01:00
Nicolas Grekas
ef95f2ecbc minor #35855 [Routing] Improve localized routes performances (mtarld)
This PR was merged into the 4.4 branch.

Discussion
----------

[Routing] Improve localized routes performances

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| License       | MIT

Implementation of the following idea: https://github.com/symfony/symfony/pull/35735#pullrequestreview-360525593

Improve route matching performances by turning dynamic routes with fixed `_locale` to actual static routes.

Commits
-------

8e9eafe18b [Routing] Improve localized routes performances
2020-02-25 13:47:10 +01:00
Mathias Arlaud
8e9eafe18b [Routing] Improve localized routes performances 2020-02-25 13:41:09 +01:00
Wouter de Jong
dce55f352a Deprecated ROLE_PREVIOUS_ADMIN 2020-02-25 13:38:33 +01:00
Wouter J
3f0c599289 Use new IS_* attributes in the expression language functions 2020-02-25 12:47:18 +01:00
Nicolas Grekas
21b8a64446 [Routing] deprecate RouteCompiler::REGEX_DELIMITER 2020-02-25 11:55:47 +01:00
Thomas Calvet
ddf33535d0 [4.4][DoctrineBridge] Use new Types::* constants and support new json type 2020-02-24 18:16:47 +01:00
Fabien Potencier
d7250ef620 [Validator] Add missing translations 2020-02-24 18:16:32 +01:00
Fabien Potencier
8b819ba442 bug #35841 [Notifier] Dispatch message event in null transport (jschaedl)
This PR was squashed before being merged into the 5.0 branch.

Discussion
----------

[Notifier] Dispatch message event in null transport

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

I think we should be able to log notifications via the `NotificationLoggerListener` even if they were sent to a null transport. The mailer component does it the same way.

Commits
-------

a0d99ce398 [Notifier] Dispatch message event in null transport
2020-02-24 18:03:22 +01:00
Jan Schädlich
a0d99ce398 [Notifier] Dispatch message event in null transport 2020-02-24 18:03:13 +01:00
Fabien Potencier
b5e6582398 feature #35848 [Validator] add alpha3 option to Language constraint (xabbuh)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Validator] add alpha3 option to Language constraint

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix https://github.com/symfony/symfony/pull/35116#issuecomment-570038901
| License       | MIT
| Doc PR        |

Commits
-------

ce73b98e2c add alpha3 option to Language constraint
2020-02-24 17:28:00 +01:00
Fabien Potencier
6178c63148 feature #31189 [Security] Add IS_IMPERSONATOR, IS_ANONYMOUS and IS_REMEMBERED (HeahDude)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Security] Add IS_IMPERSONATOR, IS_ANONYMOUS and IS_REMEMBERED

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

This continues work of @HeahDude and finally finishes one of the code PRs I've been working on during the ️ EUFOSSA Hackathon.

Changes
---

The PRs modifies some of the attributes used by the `AuthenticatedVoter`:

* New `IS_IMPERSONATOR`, `IS_ANONYMOUS` and `IS_REMEMBERED` attributes are introduced to indicate the user either impersonated, anonymous or rembered.
* <s>`IS_AUTHENTICATED_ANONYMOUSLY` actually meant "is authenticated, either anonymous or fully". As this is confusing, it is replaced by `IS_AUTHENTICATED`.</s>
* <s>All `is_*()` functions in expressions are deprecated in favor of `is_granted('IS_*')`. It's not worth duplicating the `AuthenticatedVoter` logic in two places now we have shorter `IS_*` attributes</s>

**Before**

```php
if ($authorizationChecker->isGranted('ROLE_PREVIOUS_ADMIN')) {
    // ...
}
```
<s>

```yaml
security:
  # ...

  access_control:
    - { path: ^/protected, roles: 'IS_AUTHENTICATED_ANONYMOUSLY' }
```
</s>

**After**

```php
if ($authorizationChecker->isGranted('IS_IMPERSONATOR')) {
    // ...
}
```
<s>

```yaml
security:
  # ...

  access_control:
    - { path: ^/protected, roles: 'IS_AUTHENTICATED' }
```
</s>

<s>Discussion
---

The only thing I'm wondering is how we combine this with the `is_authenticated()` expression function:

98929dc292/src/Symfony/Component/Security/Core/Authorization/ExpressionLanguageProvider.php (L33-L37)

As you can see, the `IS_AUTHENTICATED` attribute and `is_authenticated()` expression function do not have the same meaning. Should we somehow deprecate the current behavior of `is_authenticated()` or should we find another name for `IS_AUTHENTICATED` (that would be a shame imo).</s>

Commits
-------

6c522a7d98 Added IS_ANONYMOUS, IS_REMEMBERED, IS_IMPERSONATOR
2020-02-24 17:01:02 +01:00
Nicolas Grekas
c231214e59 Merge branch '5.0'
* 5.0: (28 commits)
  [DoctrineBridge] Use new Types::* constants and support new json type
  Fix bad merge in README of Nexmo Notifier bridge
  [Debug][ErrorHandler] improved deprecation notices for methods new args and return type
  [BrowserKit] Nested file array prevents uploading file
  [ExpressionLanguage] Fixed collisions of character operators with object properties
  remove usage of already deleted Symfony\Component\EventDispatcher\Event
  [Notifier] Add correct tags for NullTransportFactory
  [Validator] Remove specific check for Valid targets
  [PhpUnitBridge] Use trait instead of extending deprecated class
  Fix versioned namespace clears
  fix remember me
  Use strict assertion in asset tests
  [DoctrineBridge][DoctrineExtractor] Fix indexBy with custom and some core types
  Do not rely on the current locale when dumping a Graphviz object
  fix typo
  [Ldap] force default network timeout
  [Config] don't throw on missing excluded paths
  Docs: Typo, grammar
  [Validator] Add the missing translations for the Polish ("pl") locale
  [PhpUnitBridge] Add compatibility to PHPUnit 9 #35662
  ...
2020-02-24 16:14:17 +01:00
Nicolas Grekas
08a233bc6d Merge branch '4.4' into 5.0
* 4.4: (25 commits)
  [DoctrineBridge] Use new Types::* constants and support new json type
  [Debug][ErrorHandler] improved deprecation notices for methods new args and return type
  [BrowserKit] Nested file array prevents uploading file
  [ExpressionLanguage] Fixed collisions of character operators with object properties
  [Validator] Remove specific check for Valid targets
  [PhpUnitBridge] Use trait instead of extending deprecated class
  Fix versioned namespace clears
  fix remember me
  Use strict assertion in asset tests
  [DoctrineBridge][DoctrineExtractor] Fix indexBy with custom and some core types
  Do not rely on the current locale when dumping a Graphviz object
  fix typo
  [Ldap] force default network timeout
  [Config] don't throw on missing excluded paths
  Docs: Typo, grammar
  [Validator] Add the missing translations for the Polish ("pl") locale
  [PhpUnitBridge] Add compatibility to PHPUnit 9 #35662
  [Routing] Add locale requirement for localized routes
  [Console] Inline exact-match handling with 4.4
  Set previous exception when rethrown from controller resolver
  ...
2020-02-24 16:05:31 +01:00
Nicolas Grekas
1024f5fc10 bug #35716 [PhpUnitBridge] Fix compatibility to PHPUnit 9 (Benjamin)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Fix compatibility to PHPUnit 9

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

Adding the possibility to use PHPUnit 9.

Commits
-------

771c642a43 [PhpUnitBridge] Add compatibility to PHPUnit 9 #35662
2020-02-24 15:58:55 +01:00
Nicolas Grekas
c0caef1708 bug #35803 [Cache] Fix versioned namespace atomic clears (trvrnrth)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Fix versioned namespace atomic clears

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

When using namespace versioning to achieve atomic cache clears, only delete cache keys matching the old/current version.

This resolves tag inconsistency issues whereby the process running the clear would delete keys set against the new version by more recently spawned concurrent processes. Most seriously this could result in newly set data keys remaining, but with empty associated tag sets meaning the invalidation via tags was no longer possible.

Clearing specific prefixes is not supported when using versioned namespaces as it is desirable to clear all old keys as they will no longer be used and would otherwise eventually fill cache memory.

Commits
-------

971b177d27 Fix versioned namespace clears
2020-02-24 15:49:35 +01:00
Christian Flothmann
ce73b98e2c add alpha3 option to Language constraint 2020-02-24 15:47:52 +01:00
Christian Flothmann
847d6dc8f3 prevent method calls on null values 2020-02-24 15:33:45 +01:00
Nicolas Grekas
2d53ff64c9 Merge branch '3.4' into 4.4
* 3.4:
  [DoctrineBridge] Use new Types::* constants and support new json type
2020-02-24 15:14:40 +01:00
Nicolas Grekas
9819814a8a bug #35817 [3.4][DoctrineBridge] Use new Types::* constants and support new json type (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[3.4][DoctrineBridge] Use new Types::* constants and support new json type

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

All `Type::*` constants were moved and deprecated. This PR makes sure we use the good ones when they exist so we are prepared for their removal. It allows to be deprecation free. If deprecated constants could be detected, we would have failing tests 😄

Also, `json_array` was deprecated and renamed to `json`, so I added support for this new type.

Some new components also use these constants on upper branches, so I will submit PRs there.

Commits
-------

3e35fa59ea [DoctrineBridge] Use new Types::* constants and support new json type
2020-02-24 14:39:45 +01:00
Fabien Potencier
f4332cb109 Merge branch '5.0'
* 5.0:
  [FrameworkBundle] Skip notifiers tags in UnusedTagsPass
  [Notifier] Remove not needed argument $bus in BrowserChannel::notify()
2020-02-24 14:39:20 +01:00
Thomas Calvet
f1fb1597ff [Messenger] Use Doctrine DBAL new Types::* constants 2020-02-24 14:12:43 +01:00
Thomas Calvet
3e35fa59ea [DoctrineBridge] Use new Types::* constants and support new json type 2020-02-24 14:11:05 +01:00
Fabien Potencier
a67abe1fb6 Merge branch '3.4' into 4.4
* 3.4:
  [ExpressionLanguage] Fixed collisions of character operators with object properties
  [Validator] Remove specific check for Valid targets
  [PhpUnitBridge] Use trait instead of extending deprecated class
  fix remember me
  Use strict assertion in asset tests
  [DoctrineBridge][DoctrineExtractor] Fix indexBy with custom and some core types
  Do not rely on the current locale when dumping a Graphviz object
  fix typo
  [Ldap] force default network timeout
  [Config] don't throw on missing excluded paths
  Docs: Typo, grammar
  [Validator] Add the missing translations for the Polish ("pl") locale
  [Console] Inline exact-match handling with 4.4
  Set previous exception when rethrown from controller resolver
  [VarDumper] fixed DateCaster not displaying additional fields
  [HttpKernel] fix registering DebugHandlersListener regardless of the PHP_SAPI
2020-02-24 14:10:00 +01:00
Nicolas Grekas
da28445ea4 bug #35832 [Debug][ErrorHandler] improved deprecation notices for methods new args and return type (HeahDude)
This PR was merged into the 4.4 branch.

Discussion
----------

[Debug][ErrorHandler] improved deprecation notices for methods new args and return type

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

~I don't know if this should be considered a bug fix or a feature.~

Commits
-------

83d4aa7683 [Debug][ErrorHandler] improved deprecation notices for methods new args and return type
2020-02-24 10:54:50 +01:00
Nicolas Grekas
d29865ed79 minor #35835 Fix bad merge in README of Nexmo Notifier bridge (eXtreme)
This PR was merged into the 5.0 branch.

Discussion
----------

Fix bad merge in README of Nexmo Notifier bridge

| Q             | A
| ------------- | ---
| Branch?       |  5.0
| License       | MIT

[Bad merge](85f793bec6 (diff-ba05e8af79b613430b91ba4d4ccbea0d)) made b52b7b9fd6 end up in Nexmo README :)

Commits
-------

a8d0c5b1d7 Fix bad merge in README of Nexmo Notifier bridge
2020-02-24 10:52:43 +01:00
Ahmed TAILOULOUTE
155d980aea [HttpFoundation][Cache] Added MarshallingSessionHandler 2020-02-23 23:33:06 +01:00
Nicolas Grekas
f75be008bc minor #35816 [Validator] Remove specific check for Valid targets (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Remove specific check for Valid targets

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

As covered by `ClassMetadataTest::testAddConstraintDoesNotAcceptValid`, this check is useless, as `Valid` already accepts only properties as targets.

This check is a [leftover of a time](9b07b0c672) `Valid` was extending `Traverse` which was allowing classes & properties.
The `Valid` targets are properly checked by the lines above, the same way as other constraints.

Commits
-------

0086562c77 [Validator] Remove specific check for Valid targets
2020-02-23 22:17:02 +01:00
Nicolas Grekas
de15900c38 minor #35829 Remove usage of already deleted Symfony\Component\EventDispatcher\Event (W0rma)
This PR was merged into the 5.0 branch.

Discussion
----------

Remove usage of already deleted Symfony\Component\EventDispatcher\Event

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

Remove usage of already deleted class `Symfony\Component\EventDispatcher\Event`

Commits
-------

dedbc4d814 remove usage of already deleted Symfony\Component\EventDispatcher\Event
2020-02-23 22:15:05 +01:00
Jacek Jędrzejewski
a8d0c5b1d7
Fix bad merge in README of Nexmo Notifier bridge 2020-02-23 20:22:26 +01:00
Jules Pietri
83d4aa7683
[Debug][ErrorHandler] improved deprecation notices for methods new args and return type 2020-02-23 15:41:43 +01:00
Anna Filina
e15f05e03f [BrowserKit] Nested file array prevents uploading file 2020-02-23 11:00:59 +01:00
Nicolas Grekas
03f525ad52 bug #35826 [Notifier] Add correct tags for NullTransportFactory (jschaedl)
This PR was merged into the 5.0 branch.

Discussion
----------

[Notifier] Add correct tags for NullTransportFactory

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

I tried to disable the delivery of notifications in `dev` environment with the following configuration:

```
framework:
    notifier:
        chatter_transports:
            slack: 'null://null'
        texter_transports:
            twilio: 'null://null'
        channel_policy:
            urgent: ['chat/slack', 'sms/twilio']
            high: ['email']
            medium: ['email']
            low: ['email']
```

While sending the notification like this:

```
$notification = (new Notification())
            ->subject('Test subject')
            ->importance(Notification::IMPORTANCE_URGENT)
            ->content('Test content')
;

$this->notifier->send($notification);
```

I got an `UnsupportedSchemeException`: The "null" scheme is not supported.

After some digging I figured out that this Exception occurred because the `NullTransportFactory` was not tagged with the `chatter.transport_factory` and `texter.transport_factory` tags. Which is the reason the `NullTransportFactory` was not injected in the `Transport` class and so the `NullTransport` couldn't be used.

This PR should fix this Bug.

Commits
-------

1ff5e3c83f [Notifier] Add correct tags for NullTransportFactory
2020-02-23 10:40:24 +01:00
Nicolas Grekas
b3b368b800 minor #35808 [HttpFoundation] Fixed Mime dependency missing error (HeahDude)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[HttpFoundation] Fixed Mime dependency missing error

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

Follows #35642, by adding a missing exception and a note in the UPGRADE file (CHANGELOG in HttpFoundation was already up to date).
Reported in symfony/symfony-docs#1307

Commits
-------

fef0de3eb6 [HttpFoundation] Fixed Mimes dependency missing error
2020-02-23 10:28:35 +01:00
Fabien Potencier
1676e3a317 bug #35707 [ExpressionLanguage] Fixed collisions of character operators with object properties (Andrej-in-ua)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[ExpressionLanguage] Fixed collisions of character operators with object properties

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

Expression `foo.not in [bar]` compiles to invalid php code:

```
$foo->not in[$bar]
```

Added check for absence of a dot before of the character operators.

PS. I apologize for not starting the issue before create PR. I considered this bug is minor, but obvious.

Commits
-------

4b83ae7547 [ExpressionLanguage] Fixed collisions of character operators with object properties
2020-02-23 09:43:32 +01:00
Andrey Sevastianov
4b83ae7547 [ExpressionLanguage] Fixed collisions of character operators with object properties 2020-02-23 09:43:25 +01:00
Robin Chalas
24cfb7f095 [FrameworkBundle] Skip notifiers tags in UnusedTagsPass 2020-02-23 06:45:13 +01:00
Dieter
dedbc4d814 remove usage of already deleted Symfony\Component\EventDispatcher\Event 2020-02-22 21:09:08 +01:00
Jules Pietri
6c522a7d98 Added IS_ANONYMOUS, IS_REMEMBERED, IS_IMPERSONATOR 2020-02-22 18:11:06 +01:00
Vincent Langlet
2993fc9fc5 Return int if scale = 0 2020-02-22 14:29:03 +01:00
Jan Schädlich
1ff5e3c83f [Notifier] Add correct tags for NullTransportFactory 2020-02-22 13:45:28 +01:00
Maxime Steinhausser
0086562c77 [Validator] Remove specific check for Valid targets 2020-02-21 16:29:16 +01:00
Maxime Steinhausser
1e02a96286 [Validator] Allow Sequentially constraints on classes 2020-02-21 15:09:54 +01:00
Fabien Potencier
643f34ff59 bug #35794 [DoctrineBridge][DoctrineExtractor] Fix indexBy with custom and some core types (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[DoctrineBridge][DoctrineExtractor] Fix indexBy with custom and some core types

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/35542 and https://github.com/symfony/symfony/issues/35604
| License       | MIT
| Doc PR        | -

For https://github.com/symfony/symfony/issues/35604:
To guess the collection key type, the `getPhpType()` method is called. But it does not handle most objects and arrays core types. This is why an indexBy datetime does not work.

For https://github.com/symfony/symfony/issues/35542:
When the php type cannot be guessed, null is returned. In this case, we cannot pass a valid builtin type to PropertyInfo Type, so we should return null.

Commits
-------

018ec1ae5c [DoctrineBridge][DoctrineExtractor] Fix indexBy with custom and some core types
2020-02-21 09:07:04 +01:00
Fabien Potencier
8197d9a69e bug #35787 [PhpUnitBridge] Use trait instead of extending deprecated class (marcello-moenkemeyer)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Use trait instead of extending deprecated class

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

Use `TestListenerDefaultImplementation` instead of deprecated `BaseTestListener` for `CoverageListenerForV6`

As this is my very first pull request for this project, I'd be very glad for hints and suggestions in case I missed something.

Commits
-------

034e1de6e6 [PhpUnitBridge] Use trait instead of extending deprecated class
2020-02-21 09:01:59 +01:00
Marcello Mönkemeyer
034e1de6e6 [PhpUnitBridge] Use trait instead of extending deprecated class 2020-02-21 09:01:47 +01:00
Fabien Potencier
269c4a2e15 feature #30994 [Form] Added support for caching choice lists based on options (HeahDude)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Form] Added support for caching choice lists based on options

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

Currently, the `CachingFactoryDecorator` is responsible for unnecessary memory usage, anytime a choice option is set with a callback option defined as an anonymous function or a loader, then a new hash is generated for the choice list, while we may expect the list to be reused once "finally" configured in a form type or choice type extension.

A simple case is when using one of the core intl choice types in a collection:
```php
// ...
class SomeFormType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('some_choices', ChoiceType::class, [
                // before: cached choice list (unnecessary overhead)
                // after: no cache (better perf)
                'choices' => $someObjects,
                'choice_value' => function (?object $choice) { /* return some string */ },
            ])

            // see below the nested effects
            ->add('nested_fields', CollectionType::class, [
                'entry_type' => NestedFormType::class,
            ])
    // ...
}

// ...
class NestedFormType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            // ...
            ->add('some_other_choices', ChoiceType::class, [
                // before: cached choice list for every entry because we define a new closure instance for each field
                // after: no cache, a bit better for the same result, but much better if it were not nested in a collection
                'choices' => $someOtherObjects,
                'choice_value' => function (?object $otherChoice) { /* return some string */ },
            ])

            ->add('some_loaded_choices', ChoiceType::class, [
                // before: cached but for every entry since every field will have its
                //         own instance of loader, generating a new hash
                // after: no cache, same pro/cons as above
                'choice_loader' => new CallbackChoiceLoader(function() { /* return some choices */}),
                // or
                'choice_loader' => new SomeLoader(),
            ])

            ->add('person', EntityType::class, [
                // before: cached but for every entry, because we define extra `choice_*` option
                // after: no cache, same pro/cons as above
                'class' => SomeEntity::class,
                'choice_label' => function (?SomeEntity $choice) { /* return some label */},
            ])

            // before: cached for every entry, because the type define some "choice_*" option
            // after: cached only once, better perf since the same loader is used for every entry
            ->add('country', CountryType::class)

            // before: cached for every entry, because the type define some "choice_*" option
            // after: no cache, same pro/cons as above
            ->add('locale', LocaleType::class, [
                'preferred_choices' => [ /* some preferred locales */ ],
                'group_by' => function (?string $locale, $label) { /* return some group */ },
            ])
// ...
```

In such cases, we would expect every entries to use the same cached intl choice list, but not, as many list and views as entries will be kept in cache. This is even worse if some callback options like `choice_label`, `choice_value`, `choice_attr`, `choice_name`, `preferred_choices` or `group_by` are used.
This PR helps making cache explicit when needed and ~deprecate~ drop unexpected implicit caching of choice list for most simple cases responsible of unnecessary overhead.

The result is better performance just by upgrading to 5.1 \o/.
But to solve the cases above when cache is needed per options, one should now use the new `ChoiceList` static methods to wrap option values, which is already done internally in this PR.

```php
use Symfony\Component\Form\ChoiceList\ChoiceList;
// ...
class NestedFormType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            // explicitly shared cached choice lists between entries

            ->add('some_other_choices', ChoiceType::class, [
                'choices' => $someOtherObjects,
                'choice_value' => ChoiceList::value($this, function (?object $otherChoice) {
                    /* return some string */
                }),
            ]),

            ->add('some_loaded_choices', ChoiceType::class, [
                'choice_loader' => ChoiceList::lazy($this, function() {
                    /* return some choices */
                })),
                // or
                'choice_loader' => ChoiceList::loader($this, new SomeLoader()),
            ]),

            ->add('person', EntityType::class, [
                'class' => SomeEntity::class,
                'choice_label' => ChoiceList::label($this, function (?SomeEntity $choice) {
                    /* return some label */
                },
            ])

            // nothing to do :)
            ->add('country', CountryType::class)

            ->add('locale', LocaleType::class, [
                'preferred_choices' => ChoiceList::preferred($this, [ /* some preferred locales */ ]),
                'group_by' => ChoiceList::groupBy($this, function (?string $locale, $label) {
                    /* return some group */
                }),
            ])
// ...
```

I've done some nice profiling with Blackfire and the simple example above in a fresh website skeleton and only two empty entries as initial data, then submitting an empty form. That gives the following results:

 * Rendering the form - Before vs After

  <img width="714" alt="Screenshot 2020-02-16 at 9 24 58 PM" src="https://user-images.githubusercontent.com/10107633/74612132-de533180-5102-11ea-9cc4-296a16949d90.png">

 * Rendering the form - Before vs After with `ChoiceList` helpers

  <img width="670" alt="Screenshot 2020-02-16 at 9 26 51 PM" src="https://user-images.githubusercontent.com/10107633/74612155-122e5700-5103-11ea-9c16-5d80a7541f4b.png">

 * Submitting the form - Before vs After

  <img width="670" alt="Screenshot 2020-02-16 at 9 28 01 PM" src="https://user-images.githubusercontent.com/10107633/74612172-3be77e00-5103-11ea-9a18-4294e05402d2.png">

 * Submitting the form - Before vs After with `ChoiceList` helpers

  <img width="670" alt="Screenshot 2020-02-16 at 9 29 10 PM" src="https://user-images.githubusercontent.com/10107633/74612193-689b9580-5103-11ea-86b9-5b4906200021.png">

_________

TODO:
- [x] Docs
- [x] More profiling
- [x] Add some tests

#EUFOSSA

Commits
-------

b25973cc2e [Form] Added support for caching choice lists based on options
2020-02-21 08:55:09 +01:00
Fabien Potencier
f01bbc789c feature #35783 [Validator] Add the divisibleBy option to the Count constraint (fancyweb)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Validator] Add the divisibleBy option to the Count constraint

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

From my experience, it is sometimes useful to assert that the number of elements in a collection is a multiple of X.

Commits
-------

8dfb7b2ad1 [Validator] Add the divisibleBy option to the Count constraint
2020-02-21 08:45:55 +01:00
Fabien Potencier
d33a483575 feature #35649 [String] Allow to keep the last word when truncating a text (franmomu)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[String] Allow to keep the last word when truncating a text

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

The [truncate filter from twig/extensions](https://github.com/twigphp/Twig-extensions/blob/master/src/TextExtension.php#L36) has a `preserve` parameter to preserve whole words.

Since `twig/extensions` is deprecated and its alternative for `truncate` filter is the use of `u` filter, this PR adds preverse word functionality.

Commits
-------

1cfaeec378 [String] Allow to keep the last word when truncating a text
2020-02-21 08:43:56 +01:00
Jules Pietri
fef0de3eb6
[HttpFoundation] Fixed Mimes dependency missing error 2020-02-20 20:55:19 +01:00
Trevor North
971b177d27 Fix versioned namespace clears
When using namespace versioning to achieve atomic cache clears, only
delete cache keys matching the old/current version.

This resolves tag inconsistency issues whereby the process running the
clear would delete keys set against the new version by more recently
spawned concurreny processes. Most seriously this could result in newly
set data keys remaining, but with empty associated tag sets meaning the
invalidation via tags was no longer possible.

Clearing specific prefixes is not supported when using versioned
namespaces as it is desirable to clear all old keys as they will no
longer be used and would otherwise eventually fill cache memory.
2020-02-20 16:31:44 +00:00
Nicolas Grekas
7b1e4ea5e0 minor #35793 Use strict assertSame instead of assertEquals in Asset component tests (GromNaN)
This PR was merged into the 3.4 branch.

Discussion
----------

Use strict assertSame instead of assertEquals in Asset component tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/pull/35762#discussion_r381400521
| License       | MIT
| Doc PR        | N/A

Using `assertSame` instead of `assertEquals` is recommended when possible (see https://github.com/sebastianbergmann/phpunit-documentation-english/issues/3). It is stricter and must be more efficient ([`===`](https://github.com/sebastianbergmann/phpunit/blob/8.5.2/src/Framework/Constraint/IsIdentical.php#L63) vs a [comparator class](https://github.com/sebastianbergmann/phpunit/blob/8.5.2/src/Framework/Constraint/IsEqual.php#L79)).

~~Also, removing useless string cast.~~

Commits
-------

e8f3e84959 Use strict assertion in asset tests
2020-02-20 14:39:53 +01:00
Nicolas PHILIPPE
3515793cb3 fix remember me 2020-02-20 11:24:12 +01:00
Jérôme TAMARELLE
e8f3e84959 Use strict assertion in asset tests 2020-02-20 09:19:58 +01:00
Thomas Calvet
018ec1ae5c [DoctrineBridge][DoctrineExtractor] Fix indexBy with custom and some core types 2020-02-19 23:15:50 +01:00
Nicolas Grekas
212841b3e6 bug #35772 [Config] don't throw on missing excluded paths (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config] don't throw on missing excluded paths

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

Commits
-------

2f65a7a255 [Config] don't throw on missing excluded paths
2020-02-19 18:19:43 +01:00
Thomas Calvet
8dfb7b2ad1 [Validator] Add the divisibleBy option to the Count constraint 2020-02-19 17:59:38 +01:00
Nicolas Grekas
a81cbc99c7 bug #35774 [Ldap] force default network timeout (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Ldap] force default network timeout

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

The default network timeout is infinite, which makes no sense and can block workers.

Note that LDAP supports also "timelimit" options, but those are max-durations for LDAP queries. We cannot limit them by default.

Commits
-------

63f9e013a1 [Ldap] force default network timeout
2020-02-19 17:02:56 +01:00
Grégoire Pineau
094e4bbbc2 Do not rely on the current locale when dumping a Graphviz object
Funny bug !

With `de_DE.UTF-8` as locale:
```
php > echo sprintf('%s', 0.5);
0,5
php > echo sprintf('%d', 0.5);
0
php > echo sprintf('%f', 0.5);
0,500000
php > echo (string) 0.5;
0,5
```

So now we force `'0.5'`
2020-02-19 15:50:10 +01:00
Robin Chalas
1c24ccc635 fix typo 2020-02-18 22:48:57 +01:00
Fran Moreno
1cfaeec378 [String] Allow to keep the last word when truncating a text 2020-02-18 21:59:15 +01:00
Nicolas Grekas
63f9e013a1 [Ldap] force default network timeout 2020-02-18 14:07:02 +01:00
Jan Schädlich
ab4123ce68 [Notifier] Remove not needed argument $bus in BrowserChannel::notify() 2020-02-18 13:11:08 +01:00
Nicolas Grekas
2f65a7a255 [Config] don't throw on missing excluded paths 2020-02-18 12:18:14 +01:00
Fabien Potencier
5867c7e090 minor #35760 [Validator] Add the missing translations for the Polish ("pl") locale (przemyslaw-bogusz)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add the missing translations for the Polish ("pl") locale

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

Fabbot indicates a typo, but there is no typo. The English word `address` is `adres` in Polish (with a single d and a single s).

Commits
-------

8c4de564a8 [Validator] Add the missing translations for the Polish ("pl") locale
2020-02-18 09:09:42 +01:00
Bogdan
7042ff86ec [Messenger] Add missing return in AmazonSqsReceiver::getMessageCount 2020-02-18 02:58:50 +02:00
Michael Käfer
dc11c8d1b8 Docs: Typo, grammar 2020-02-17 20:21:37 +01:00
Przemysław Bogusz
8c4de564a8 [Validator] Add the missing translations for the Polish ("pl") locale 2020-02-17 20:16:57 +01:00
Iliya Miroslavov Iliev
db6d360be8 [Notifier] added Sinch texter transport 2020-02-17 17:10:29 +01:00
Benjamin
771c642a43 [PhpUnitBridge] Add compatibility to PHPUnit 9 #35662 2020-02-17 09:30:34 +01:00
Jules Pietri
b25973cc2e
[Form] Added support for caching choice lists based on options 2020-02-16 16:50:19 +01:00
Mathias Arlaud
50d744589e [Routing] Add locale requirement for localized routes 2020-02-15 15:51:21 +01:00
Robin Chalas
e13470c823 [Console] Inline exact-match handling with 4.4 2020-02-15 14:27:16 +01:00
Nicolas Grekas
9acb06041c minor #35731 [Routing] marked configurators traits as internal (HeahDude)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Routing] marked configurators traits as internal

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix https://github.com/symfony/symfony/pull/30501#discussion_r376806342 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | not needed
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too.)
 - Features and deprecations must be submitted against branch master.
-->

Commits
-------

52efec76ad [Routing] marked configurators traits as internal
2020-02-15 11:42:33 +01:00
Nicolas Grekas
b92168c110 bug #35702 [VarDumper] fixed DateCaster not displaying additional fields (Makdessi Alex)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] fixed DateCaster not displaying additional fields

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

----

Here's the result with [Holiday](https://github.com/azuyalabs/yasumi/blob/develop/src/Yasumi/Holiday.php) class

| before  | after
| ------- | -----
| ![before](https://user-images.githubusercontent.com/4425529/74445818-48f03d00-4e77-11ea-97e1-58d88ac52cba.png) | ![after](https://user-images.githubusercontent.com/4425529/74445825-4c83c400-4e77-11ea-8e8e-1fbbb1040438.png)

Commits
-------

f965971919 [VarDumper] fixed DateCaster not displaying additional fields
2020-02-15 11:39:34 +01:00
Nicolas Grekas
fcb833f26d minor #35717 time ( void ) : int (cbastienbaron)
This PR was merged into the 5.1-dev branch.

Discussion
----------

time ( void ) : int

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

no need to cast - micro improvement

Commits
-------

9f31581fd8 time ( void ) : int
2020-02-15 11:25:47 +01:00
bastien
9f31581fd8 time ( void ) : int
no need to cast
2020-02-15 11:25:26 +01:00
Jules Pietri
52efec76ad
[Routing] marked configurators traits as internal 2020-02-15 11:12:27 +01:00
Daniel Gorgan
87d51c1e4b Set previous exception when rethrown from controller resolver 2020-02-15 08:21:39 +01:00
Fabien Potencier
12f1c7c4a3 minor #35713 Fixes typo in error message. (dbrumann)
This PR was merged into the 4.4 branch.

Discussion
----------

Fixes typo in error message.

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

Fixes a minor typo where the error message refers to the wrong argument.

Commits
-------

8f2fbf6e2c Fixes typo in error message.
2020-02-15 08:19:38 +01:00
Fabien Potencier
f4e9293734 bug #35714 [HttpClient] Correctly remove trace level options for HttpCache (aschempp)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] Correctly remove trace level options for HttpCache

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

The `HttpCache` component allows to [configure a trace level](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php#L46). Due to the behavior of `CachingHttpClient`, options that are meant for the `HttpCache` must be unset before preparing the request. Currently these options can't be set, because `HttpClient` errors with invalid configuration options.

Commits
-------

618cd80b0d Correctly remove trace level options for HttpCache
2020-02-15 08:18:49 +01:00
Grégoire Paris
94b5dbde5a
Add missing autoload calls
Until either php 7.4 or doctrine/persistence 2 is required, these will
be needed to make sure php recognises signatures using the old names as
compatible with signatures using the new names.
This is necessary for types defined outside Symfony that extend types
from Symfony and still use the old names in signatures of methods they
override.

More details at https://dev.to/greg0ire/how-to-deprecate-a-type-in-php-48cf

Fixes https://github.com/doctrine/DoctrineMongoDBBundle/issues/616
2020-02-14 19:45:19 +01:00
Nicolas Grekas
f46ab58bcf feature #35673 [Process] Add getter for process starttime (dompie)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Process] Add getter for process starttime

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | issue #35531
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Add a getter for process start time.

Commits
-------

3b9ed3e378 [Process] Add getter for process starttime
2020-02-14 14:09:35 +01:00
Dominik Piekarski
3b9ed3e378 [Process] Add getter for process starttime 2020-02-14 14:09:17 +01:00
Makdessi Alex
f965971919 [VarDumper] fixed DateCaster not displaying additional fields 2020-02-14 13:39:29 +01:00
Nicolas Grekas
3f995ac602 [HttpKernel] fix registering DebugHandlersListener regardless of the PHP_SAPI 2020-02-14 11:01:23 +01:00
Nicolas Grekas
0f46aa602a [Contracts] Add changelog entry for "symfony/deprecation-contracts" 2020-02-14 10:07:39 +01:00
Nicolas Grekas
9181c3ad61 [Contracts] add missing changelog entries 2020-02-14 10:04:22 +01:00
Denis Brumann
8f2fbf6e2c
Fixes typo in error message. 2020-02-14 09:28:51 +01:00