Commit Graph

46391 Commits

Author SHA1 Message Date
Nicolas Grekas b913b860c4 minor #35954 Add test for tagged iterator with numeric index (Denis Yuzhanin)
This PR was submitted for the 5.0 branch but it was merged into the 4.4 branch instead.

Discussion
----------

Add test for tagged iterator with numeric index

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

This is just a new test case for bug in issue #35953

Commits
-------

7aa4e10473 Add test for tagged iterator with numeric index
2020-03-12 18:03:42 +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
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
Nicolas Grekas 9d07aa033d minor #36033 [Validator][Range] Fix typos (przemyslaw-bogusz)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator][Range] Fix typos

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

Commits
-------

a08d5191d2 [Validator][Range] Fix typos
2020-03-12 16:18:57 +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
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
Fabien Potencier 14b825b24f minor #35999 [Mime] remove phpdoc mentioning Utf8AddressEncoder (dmaicher)
This PR was submitted for the 4.3 branch but it was merged into the 4.4 branch instead.

Discussion
----------

[Mime] remove phpdoc mentioning Utf8AddressEncoder

This class does not exist

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

I'm currently migrating from Swiftmailer fo Symfony mailer and stumbled upon this exception:

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Mime/Encoder/IdnAddressEncoder.php#L44

The phpdoc of the class is a bit confusing/wrong. Seems to be a copy&paste leftover from Swiftmailer:

https://github.com/swiftmailer/swiftmailer/blob/master/lib/classes/Swift/AddressEncoder/IdnAddressEncoder.php#L19

Commits
-------

a85fb6c496 [Mime] remove phpdoc mentioning Utf8AddressEncoder
2020-03-09 13:55:10 +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
Fabien Potencier d8d7357895 bug #35993 Remove int return type from FlattenException::getCode (wucdbm)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Remove int return type from FlattenException::getCode

| Q             | A
| ------------- | ---
| Branch?       | 4.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       | - <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

Heya,

So my project died with `Return value of Symfony\Component\ErrorHandler\Exception\FlattenException::getCode() must be of the type int, string returned` symfony error page. Quite unexpected.

Turns out it's a `Doctrine\DBAL\Driver\PDOException` with code `42S02` and message `SQLSTATE[42S02]: Base table or view not found: 1146 Table 'some_db.some_table' doesn't exist`.

This is because I use the `FlattenException` class to serialize errors and store elsewhere, just more convenient to quickly check for any errors. I guess noone has stumbled upon a PDOException /  `FlattenException::getCode` before.

https://www.php.net/manual/en/throwable.getcode.php

`Returns the exception code as integer in Exception but possibly as other type in Exception descendants (for example as string in PDOException).`

Commits
-------

0f22e076c4 Remove int return type from FlattenException::getCode
2020-03-09 13:52:45 +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
Fabien Potencier e44a3f55ad bug #35982 [DI] Fix XmlFileLoader bad error message (przemyslaw-bogusz)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[DI] Fix XmlFileLoader bad error message

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

Commits
-------

be7afc6d85 [DI] Fix XmlFileLoader bad error message
2020-03-06 10:50:45 +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
Fabien Potencier ff30b43770 minor #35980 [Messenger] Add ext-redis min version req to tests (ogizanagi)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Add ext-redis min version req to tests

| Q             | A
| ------------- | ---
| Branch?       | 4.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

Properly skip the test instead of:

```
Testing src/Symfony/Component/Messenger
E                                                                   1 / 1 (100%)

Time: 597 ms, Memory: 16.00 MB

There was 1 error:

1) Symfony\Component\Messenger\Tests\Transport\RedisExt\RedisTransportFactoryTest::testCreateTransport
Symfony\Component\Messenger\Exception\LogicException: The redis transport requires php-redis 4.3.0 or higher.
```

Commits
-------

31f8990194 [Messenger] Add ext-redis min version req to tests
2020-03-05 16:51:29 +01:00
Maxime Steinhausser 31f8990194 [Messenger] Add ext-redis min version req to tests 2020-03-05 16:34:25 +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 1647cbdb83 minor #35962 [DI] fix dumping errored definitions (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] fix dumping errored definitions

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

Best reviewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/35962/files?w=1).

Commits
-------

8179928336 [DI] fix dumping errored definitions
2020-03-05 12:37:43 +01:00
Fabien Potencier f37dfa171a minor #35963 Add new packages on the link script (maxhelias)
This PR was merged into the 4.4 branch.

Discussion
----------

Add new packages on the link script

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

Add the support of the new package on the link script

Commits
-------

2a2bb66ff2 Add new packages on the link script
2020-03-05 12:36:22 +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
Fabien Potencier 600b2b54ec minor #35966 Use some PHP 5.4 constants unconditionally (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

Use some PHP 5.4 constants unconditionally

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

Since we are PHP >= 5.5.9 only, we can use those constants unconditionally.

Commits
-------

0caf947924 Use some PHP 5.4 constants unconditionally
2020-03-05 11:58:12 +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
Maxime Helias 2a2bb66ff2 Add new packages on the link script 2020-03-04 17:45:35 +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
Fabien Potencier 4103a6ebd2 minor #35946 [DI] relax test to ignore changes to error message in master (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] relax test to ignore changes to error message in master

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

Required to make https://github.com/symfony/symfony/pull/35945 green (check https://travis-ci.org/symfony/symfony/jobs/657931002#L4720)

Commits
-------

bf5d25c838 [DI] relax test to ignore changes to error message in master
2020-03-04 10:07:10 +01:00
Nicolas Grekas bf5d25c838 [DI] relax test to ignore changes to error message in master 2020-03-04 08:10:40 +01:00
Fabien Potencier 3a8da96b74 bug #35937 Revert "bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form" (dmaicher)
This PR was merged into the 3.4 branch.

Discussion
----------

Revert "bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form"

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

Reverts https://github.com/symfony/symfony/pull/34059

See https://github.com/symfony/symfony/issues/35923

Commits
-------

af17f5a9ac Revert "bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form"
2020-03-03 14:53:42 +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 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 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