Commit Graph

50441 Commits

Author SHA1 Message Date
Fabien Potencier
9e7e2a87c9 bug #37837 [Form] Fix custom formats deprecation with HTML5 widgets (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] Fix custom formats deprecation with HTML5 widgets

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

1. The options resolver only show the deprecations for user defined (overidden) options.
2. The default value of the `html5` option is enough to pass the logical condition of the callback.

That means that only setting the `format` option (like in the reproducer) does not trigger the deprecation while it should. I think we need a feature in the options resolver component to handle those kind of cases 🤷‍♂️

Meanwhile, we can fix the issue by "deprecating" all the concerned options of the logical condition of the callback.

Commits
-------

d28182f99b [Form] Fix custom formats deprecation with HTML5 widgets
2020-09-24 12:57:15 +02:00
Thomas Calvet
d28182f99b [Form] Fix custom formats deprecation with HTML5 widgets 2020-09-24 11:52:40 +02:00
Fabien Potencier
8611b0b32f bug #38285 [Contracts][Translation] Optional Intl dependency (ro0NL)
This PR was merged into the 4.4 branch.

Discussion
----------

[Contracts][Translation] Optional Intl dependency

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
same as #38283, and should help streamlining #38230

Commits
-------

d65d39da14 [Contracts][Translation] Optional Intl dependency
2020-09-24 11:41:33 +02:00
Fabien Potencier
d9bcb64fc0 bug #38283 [Translator] Optional Intl dependency (ro0NL)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Translator] Optional Intl dependency

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #38279
| 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.
-->

i decided to cast $locale at construct, given its property is documented to be string

Commits
-------

a2eb263457 [Translator] Optional Intl dependency
2020-09-24 11:40:07 +02:00
Roland Franssen
a2eb263457 [Translator] Optional Intl dependency 2020-09-24 11:40:01 +02:00
Robin Chalas
02be26a39c bug #38271 [ErrorHandler] Escape JSON encoded log context (ro0NL)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] Escape JSON encoded log context

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | eno <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Fixes https://github.com/symfony/symfony/issues/35569#issuecomment-581317792
Fixes https://github.com/symfony/symfony/issues/35569#issuecomment-696767559

The initial issue remains though (the webprofiler showing the logs tab in the exception panel), i'll try to give it another look sometime, but this is a quick win nevertheless.

cc @yceruto

Commits
-------

5572a68ed7 [ErrorHandler] Escape JSON encoded log context
2020-09-24 11:16:22 +02:00
Christian Flothmann
79686c63ef Merge branch '4.4' into 5.1
* 4.4:
  fix compatibility with Doctrine DBAL 3
2020-09-24 09:56:38 +02:00
Christian Flothmann
966dc5814a bug #38284 [Cache][Lock][Messenger] fix compatibility with Doctrine DBAL 3 (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache][Lock][Messenger] fix compatibility with Doctrine DBAL 3

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

Commits
-------

a03885168e fix compatibility with Doctrine DBAL 3
2020-09-24 09:08:24 +02:00
Christian Flothmann
a03885168e fix compatibility with Doctrine DBAL 3 2020-09-24 08:54:33 +02:00
Roland Franssen
d65d39da14
[Contracts][Translation] Optional Intl dependency 2020-09-23 21:16:49 +02:00
Roland Franssen
5572a68ed7
[ErrorHandler] Escape JSON encoded log context 2020-09-22 18:24:16 +02:00
Fabien Potencier
5f94d345e0 minor #38266 update missing translations arabic (zairigimad)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.

Discussion
----------

update missing translations arabic

| Q             | A
| ------------- | ---
| Branch?       | master for features / 3.4, 4.4 or 5.1 for bug fixes <!-- see below -->
| Bug fix?      | yes/no
| New feature?  | yes/no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| 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.
-->

Commits
-------

76a47b38e2 update missing translations arabic
2020-09-22 10:57:06 +02:00
Zairig Imad
76a47b38e2 update missing translations arabic 2020-09-22 10:56:57 +02:00
Christian Flothmann
941647f88f minor #38244 [SecurityBundle] fix class name (xabbuh)
This PR was merged into the 5.1 branch.

Discussion
----------

[SecurityBundle] fix class name

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

see https://travis-ci.org/github/symfony/symfony/jobs/728702294#L3552

Commits
-------

6e40ca3183 fix class name
2020-09-20 09:44:02 +02:00
Christian Flothmann
6e40ca3183 fix class name 2020-09-20 09:33:50 +02:00
Christian Flothmann
2a76d51da5 minor #38238 [Validator] stop using the deprecated at() PHPUnit matcher (xabbuh)
This PR was merged into the 5.1 branch.

Discussion
----------

[Validator] stop using the deprecated at() PHPUnit matcher

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

Commits
-------

0d0f92b7c6 stop using the deprecated at() PHPUnit matcher
2020-09-18 20:37:45 +02:00
Christian Flothmann
0d0f92b7c6 stop using the deprecated at() PHPUnit matcher 2020-09-18 20:24:55 +02:00
Christian Flothmann
f88caa81da minor #38237 [HttpClient] fix lowest allowed version of the HTTP client contracts (xabbuh)
This PR was merged into the 5.1 branch.

Discussion
----------

[HttpClient] fix lowest allowed version of the HTTP client contracts

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

fixes `deps=low` builds for the HttpClient component by making sure that the installed version of the HTTP client contracts package contains the changes from #37831

Commits
-------

edca581889 fix lowest allowed version of the HTTP client contracts
2020-09-18 19:14:44 +02:00
Christian Flothmann
edca581889 fix lowest allowed version of the HTTP client contracts 2020-09-18 18:31:55 +02:00
Christian Flothmann
87e0f591ef minor #38236 [Validator] fix lowest allowed version for the PHPUnit bridge (xabbuh)
This PR was merged into the 5.1 branch.

Discussion
----------

[Validator] fix lowest allowed version for the PHPUnit bridge

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

Fixes the `deps=low` build for the Validator component by only allowing versions of the PHPUnit bridge that contain #37153.

Commits
-------

fb7ee79dba fix lowest allowed version for the PHPUnit bridge
2020-09-18 18:31:22 +02:00
Christian Flothmann
7043487f74 minor #38235 [Yaml] simplify the test (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] simplify the test

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

Commits
-------

bb64fc9c3b [Yaml] simplify the test
2020-09-18 18:15:03 +02:00
Christian Flothmann
fb7ee79dba fix lowest allowed version for the PHPUnit bridge 2020-09-18 18:07:05 +02:00
Christian Flothmann
bb64fc9c3b [Yaml] simplify the test 2020-09-18 17:58:55 +02:00
Christian Flothmann
9610daf1bc fix merge 2020-09-18 17:39:40 +02:00
Christian Flothmann
4ee591bec6 Merge branch '4.4' into 5.1
* 4.4:
  fix merge
  drop logger mock in favor of using the BufferingLogger
  catch ValueError thrown on PHP 8
  [Yaml Parser] Fix edge cases when parsing multiple documents
  fix parsing comments not prefixed by a space
  [Translator] Make sure a null locale is handled properly
  deal with errors being thrown on PHP 8
  [Cache] Allow cache tags to be objects implementing __toString()
  [HttpKernel] Do not override max_redirects option in HttpClientKernel
  remove superfluous cast
  [HttpClient] Support for CURLOPT_LOCALPORT.
  Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3).
  Fixed exception message formatting
  [FrameworkBundle] Fix error in xsd which prevent to register more than one metadata
  [Console] work around disabled putenv()
  [PhpUnitBridge] Fix error with ReflectionClass
  [HttpClient][HttpClientTrait] don't calculate alternatives if option is auth_ntlm
  Change 'cache_key' to AbstractRendererEngine::CACHE_KEY_VAR
  Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3).
2020-09-18 16:27:32 +02:00
Christian Flothmann
7fa12576ef minor #38234 [Intl] fix test by letting mock throw the actual expected exception (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] fix test by letting mock throw the actual expected exception

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

This fixes a mistake I made when rewriting the tests in #37808.

Commits
-------

f6f162dcdd fix test by letting mock throw the actual expected exception
2020-09-18 16:09:04 +02:00
Christian Flothmann
50f37f0ccc fix merge 2020-09-18 16:07:46 +02:00
Christian Flothmann
d1353c0602 Merge branch '3.4' into 4.4
* 3.4:
  drop logger mock in favor of using the BufferingLogger
  [Yaml Parser] Fix edge cases when parsing multiple documents
  fix parsing comments not prefixed by a space
2020-09-18 15:54:02 +02:00
Christian Flothmann
f6f162dcdd fix test by letting mock throw the actual expected exception 2020-09-18 15:46:38 +02:00
Fabien Potencier
da644e6ee3 minor #38233 [EventDispatcher] drop logger mock in favor of using the BufferingLogger (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[EventDispatcher] drop logger mock in favor of using the BufferingLogger

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

Commits
-------

86a7e3289b drop logger mock in favor of using the BufferingLogger
2020-09-18 14:34:39 +02:00
Christian Flothmann
86a7e3289b drop logger mock in favor of using the BufferingLogger 2020-09-18 14:06:50 +02:00
Christian Flothmann
e299544639 minor #38231 [Validator] catch ValueError thrown on PHP 8 (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] catch ValueError thrown on PHP 8

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

see php/php-src@95f4ee38bb

Commits
-------

fb0d7beaaf catch ValueError thrown on PHP 8
2020-09-18 12:06:31 +02:00
Fabien Potencier
2eeb75dd6f bug #38228 [Yaml Parser] Fix edge cases when parsing multiple documents (digilist)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml Parser] Fix edge cases when parsing multiple documents

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

I identified some edge cases when parsing multiple YAML documents with the same parser instance, because the totalNumberOfLines was not reset and so any subsequent parsing considered the number of lines of the first document.

Consider this document:
```yaml
a:
    b: |
        row
        row2
c: d
```

Normally, `a.b` would be parsed as `row\nrow2\n`. But if the parser parsed a shorter document before, the `\n` after row2 was missing, as the parser considered it as the end of the file (that's why the `c: d` at the end is important).

So this fix resets the `totalNumberOfLines` in the YAML parser to `null` so that any subsequent parsing will initialize the value for the new document and does not use the file length of the first parsed document.

I stumbled upon this because of a flickering unit test that was using the translation component. Sometimes the translated string contained a trailing `\n` and sometimes not. In the end it was based on this bug, as the translation files were not loaded in the same order every time (not really sure why. It's somehow related to the cache state, but even with a warm cache it was not totally deterministic).

Commits
-------

012ee4fa59 [Yaml Parser] Fix edge cases when parsing multiple documents
2020-09-18 12:04:33 +02:00
Fabien Potencier
2384f0812f bug #38226 [FrameworkBundle] loadRoutes shoud receive RoutingPhpFileLoader (grachevko)
This PR was merged into the 5.1 branch.

Discussion
----------

[FrameworkBundle] loadRoutes shoud receive RoutingPhpFileLoader

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| 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.
-->

In case when `sensio_framework_extra.router.annotations` options is set to `true` or not defined will throw this error

> In RoutingConfigurator.php line 28:
>
>  Argument 2 passed to Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator::__construct() must be an instance of Symfony\Component\Routing\Loader\PhpFileLoader, instance of Symfony\Component\Routing\Loader\AnnotationFileLoader given, called in /opt/app/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php on line 176

Commits
-------

25a1131e47 loadRoutes shoud receive RoutingPhpFileLoader
2020-09-18 12:02:31 +02:00
Christian Flothmann
fb0d7beaaf catch ValueError thrown on PHP 8 2020-09-18 11:45:13 +02:00
Christian Flothmann
74f41f3313 bug #38229 [Yaml] fix parsing comments not prefixed by a space (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] fix parsing comments not prefixed by a space

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

Commits
-------

35b223aaa4 fix parsing comments not prefixed by a space
2020-09-18 11:29:40 +02:00
Markus Fasselt
012ee4fa59 [Yaml Parser] Fix edge cases when parsing multiple documents 2020-09-18 11:21:31 +02:00
Christian Flothmann
35b223aaa4 fix parsing comments not prefixed by a space 2020-09-18 11:15:17 +02:00
Fabien Potencier
785a06653c bug #38127 [Translator] Make sure a null locale is handled properly (jschaedl)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Translator] Make sure a null locale is handled properly

| Q             | A
| ------------- | ---
| Branch?       | 4.4<!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #38124  <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/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
-------

080ea5a0f7 [Translator] Make sure a null locale is handled properly
2020-09-18 10:46:54 +02:00
Jan Schädlich
080ea5a0f7 [Translator] Make sure a null locale is handled properly 2020-09-18 10:46:47 +02:00
Christian Flothmann
948e107a1b Merge branch '3.4' into 4.4
* 3.4:
  deal with errors being thrown on PHP 8
2020-09-18 10:35:10 +02:00
Christian Flothmann
ba6575752a minor #38227 [VarDumper] deal with errors being thrown on PHP 8 (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] deal with errors being thrown on PHP 8

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

Commits
-------

6175d528e8 deal with errors being thrown on PHP 8
2020-09-18 10:32:31 +02:00
Christian Flothmann
6175d528e8 deal with errors being thrown on PHP 8 2020-09-18 10:10:16 +02:00
Konstantin Grachev
25a1131e47 loadRoutes shoud receive RoutingPhpFileLoader 2020-09-17 23:43:39 +03:00
Fabien Potencier
791761277d bug #38221 [Cache] Allow cache tags to be objects implementing __toString() (lstrojny)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Cache] Allow cache tags to be objects implementing __toString()

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

`\Symfony\Contracts\Cache\CacheInterface::get(string $key, …)` implicitly converts objects with `__toString` while `CacheItem::tag()` will throw an exception. That’s a bit of a sharp edge.

Commits
-------

c2c03e050f [Cache] Allow cache tags to be objects implementing __toString()
2020-09-17 12:06:33 +02:00
Lars Strojny
c2c03e050f [Cache] Allow cache tags to be objects implementing __toString() 2020-09-17 12:06:27 +02:00
Fabien Potencier
2f67bf3a37 bug #38212 [HttpKernel] Do not override max_redirects option in HttpClientKernel (dmolineus)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[HttpKernel] Do not override max_redirects option in HttpClientKernel

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

As [proposed](https://github.com/symfony/symfony/issues/38207#issuecomment-693382336) by @nicolas-grekas this pull request removes the `max_redirects` setting in the `\Symfony\Component\HttpKernel\HttpClientKernel::handle` method.

It solves the issue that requests made by the `\Symfony\Component\HttpClient\CachingHttpClient` wouldn't follow redirects as described in the linked issue.

Commits
-------

981a11beed [HttpKernel] Do not override max_redirects option in HttpClientKernel
2020-09-17 12:05:06 +02:00
David Molineus
981a11beed [HttpKernel] Do not override max_redirects option in HttpClientKernel 2020-09-17 12:05:00 +02:00
Fabien Potencier
4d1a5222b3 minor #38220 [Security] Log notice when no entry point is configured (wouterj)
This PR was merged into the 5.1 branch.

Discussion
----------

[Security] Log notice when no entry point is configured

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

In the new security system, authenticators are not necessarily authentication entry points. This can cause unexpected behavior if no entry point is configured. It's not really an error, that's why I choose the "notice" level: "Normal but significant events".

Commits
-------

68f891ff65 Log notice when no entry point is configured
2020-09-17 12:03:51 +02:00
Wouter de Jong
68f891ff65 Log notice when no entry point is configured 2020-09-17 11:39:20 +02:00