Commit Graph

48145 Commits

Author SHA1 Message Date
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
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
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
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
Nicolas Grekas 99bb71b2b2 minor #36040 Fix Travis script (nicolas-grekas)
This PR was merged into the 5.0 branch.

Discussion
----------

Fix Travis script

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

Commits
-------

ffef8fe7ae Fix Travis script
2020-03-12 16:17:34 +01:00
Nicolas Grekas ffef8fe7ae Fix Travis script 2020-03-12 16:01:34 +01:00
Nicolas Grekas 31232cf008 minor #36035 [String] Update wcswidth data (fancyweb)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[String] Update wcswidth data

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

Unicode 13 is out so I reran the script.

Commits
-------

cdb03d3418 [String] Update wcswidth data
2020-03-12 15:50:18 +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
Fabien Potencier ca41e35d39 bug #36017 [HttpKernel] Fix support for single-colon syntax for controllers (nicolas-grekas)
This PR was merged into the 5.0 branch.

Discussion
----------

[HttpKernel] Fix support for single-colon syntax for controllers

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

This reverts commit 6bb6473489, reversing
changes made to 4cce23d9ca.

As spotted by @stof in https://github.com/symfony/symfony/issues/35983#issuecomment-597163526

Commits
-------

fbea81c963 Revert "minor #35559 [FrameworkBundle] remove mention of the old Controller class (nicolas-grekas)"
2020-03-11 08:44:41 +01:00
Fabien Potencier e4eb122e1a bug #36015 [FrameworkBundle][Configuration] Fix translator enabled_locales configuration definition (fancyweb)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle][Configuration] Fix translator enabled_locales configuration definition

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

Commits
-------

35df055871 [FrameworkBundle][Configuration] Fix translator enabled_locales configuration definition
2020-03-11 08:37:19 +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
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
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
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