Commit Graph

46285 Commits

Author SHA1 Message Date
Fabien Potencier
72f9e98fea bug #35497 Fail on empty password verification (without warning on any implementation) (Stefan Kruppa)
This PR was submitted for the 4.3 branch but it was merged into the 4.4 branch instead (closes #35497).

Discussion
----------

Fail on empty password verification (without warning on any implementation)

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

When using the sodium extension, an empty $raw string will issue a warning during validation, but the standard `password_verify()` does not. This PR aims to provide identical behavior independent of the underlying implementation. Two assumptions were made (please doublecheck if they are correct):
- Empty password is never valid.
- Empty password is not that severe that anybody needs to be informed using a warning or exception.

Commits
-------

4d920f04d0 Fail on empty password verification (without warning on any implementation)
2020-02-03 17:30:43 +01:00
Stefan Kruppa
4d920f04d0 Fail on empty password verification (without warning on any implementation) 2020-02-03 17:30:37 +01:00
Fabien Potencier
5b1a9cb51a minor #35552 [Translation][Debug] Add installation and minimal example to README (wouterj)
This PR was squashed before being merged into the 3.4 branch (closes #35552).

Discussion
----------

[Translation][Debug] Add installation and minimal example to README

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

At SymfonyCon, we decided to test out removing some component documentation from the official docs. These were duplicating quite some information of the main guides and were confusing people that used the components in the framework.

I think it's good to reintroduced the composer installation command and a very minimal example in the README's of the component. This doesn't require maintenance and can kickstart people to gain knowledge on how to use the component.

For now, we've (re)moved the Debug and Translation component docs, so that's why I've only modified those README's.

cc @symfony/team-symfony-docs

Commits
-------

b52b7b9fd6 [Translation][Debug] Add installation and minimal example to README
2020-02-03 16:10:46 +01:00
Wouter de Jong
b52b7b9fd6 [Translation][Debug] Add installation and minimal example to README 2020-02-03 16:10:40 +01:00
Fabien Potencier
ef4dcdb144 bug #35546 [Validator] check for __get method existence if property is uninitialized (alekitto)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] check for __get method existence if property is uninitialized

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

Resolve bug #35544.

On PHP 7.4, check if object implements `__get` magic method if property is reported as uninitialized before returning null.

Commits
-------

427bc3aa18 [Validator] try to call __get method if property is uninitialized
2020-02-03 12:20:41 +01:00
Nicolas Grekas
ed7bb826fb Merge branch '3.4' into 4.4
* 3.4:
  [Phpunit] Fix running skipped tests expecting only deprecations
  [DependencyInjection] #35505 Fix typo in test name
  [Yaml][Inline] Fail properly on empty object tag and empty const tag
  Check non-null type for numeric type
  Check value isset to avoid PHP notice
  bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form
2020-02-03 11:46:43 +01:00
Alessandro Chitolina
427bc3aa18
[Validator] try to call __get method if property is uninitialized 2020-02-03 11:35:42 +01:00
Nicolas Grekas
af46fd6961 minor #35507 [DependencyInjection] Fix typo in test name (signor-pedro)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] Fix typo in test name

Rename testThrowsExceptionWhenAddServiceOnACompiledContainer to testNoExceptionWhenAddServiceOnACompiledContainer.

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes (technically)
| New feature?  | no
| Deprecations? | no
| Tickets       | #35505
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Commits
-------

9cbfad5853 [DependencyInjection] #35505 Fix typo in test name
2020-02-03 11:21:26 +01:00
Nicolas Grekas
f758eca8b7 bug #35332 [Yaml][Inline] Fail properly on empty object tag and empty const tag (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml][Inline] Fail properly on empty object tag and empty const tag

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

Rework of https://github.com/symfony/symfony/pull/35208 to not end up in `parseScalar` with an empty string or a boolean (and thus, avoid unfriendly error such as `Trying to access array offset on value of type bool`).

Ping @xabbuh

Commits
-------

bdf02c0a7e [Yaml][Inline] Fail properly on empty object tag and empty const tag
2020-02-03 11:17:31 +01:00
Nicolas Grekas
1f053f99e4 bug #35489 [PhpUnitBridge] Fix running skipped tests expecting only deprecations (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Fix running skipped tests expecting only deprecations

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

If a test class has unsatisfied `@requires` and contains test methods expecting deprecation only, you get:

> Fatal error: Uncaught Error: Call to a member function beStrictAboutTestsThatDoNotTestAnything() on null in ./symfony/symfony-dev/vendor/symfony/phpunit-bridge/Legacy/SymfonyTestsListenerTrait.php:229

Spotted in #34925's build.

Commits
-------

6b02362c5b [Phpunit] Fix running skipped tests expecting only deprecations
2020-02-03 11:14:10 +01:00
Robin Chalas
6b02362c5b [Phpunit] Fix running skipped tests expecting only deprecations 2020-02-03 11:13:58 +01:00
Fabien Potencier
51444877d1 bug #35161 [FrameworkBundle] Check non-null type for numeric type (Arman-Hosseini)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Check non-null type for numeric type

$maxAge and $sharedAge can both be zero

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

Commits
-------

2797867ae9 Check non-null type for numeric type
2020-02-03 11:04:11 +01:00
Fabien Potencier
6c96706381 bug #34059 [DomCrawler] Skip disabled fields processing in Form (sbogx)
This PR was merged into the 3.4 branch.

Discussion
----------

[DomCrawler] Skip disabled fields processing in Form

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

Commits
-------

c73b042044 bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form
2020-02-03 11:01:18 +01:00
Fabien Potencier
a536342a96 bug #34114 [Console] SymonfyStyle - Check value isset to avoid PHP notice (leevigraham)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] SymonfyStyle - Check value isset to avoid PHP notice

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

This PR addresses the issue when a default value is not a valid choice. Currently this would throw a notice which outputs to the console.

This fix is a similar implementation to the `QuestionHelper`: https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Console/Helper/QuestionHelper.php#L63

Example console command and output can be found in the issue: #34093

Commits
-------

c9072c70ef Check value isset to avoid PHP notice
2020-02-03 10:58:05 +01:00
Nicolas Grekas
774a16150f Fix merge 2020-02-03 09:39:20 +01:00
Nicolas Grekas
a9b5fd23ef Merge branch '3.4' into 4.4
* 3.4:
  [Config] dont catch instances of Error
2020-02-03 09:22:04 +01:00
Nicolas Grekas
78641e0e88 bug #35557 [Config] dont catch instances of Error (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config] dont catch instances of Error

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

Commits
-------

e94c3fb87d [Config] dont catch instances of Error
2020-02-03 09:12:41 +01:00
Nicolas Grekas
e94c3fb87d [Config] dont catch instances of Error 2020-02-03 09:11:57 +01:00
Nicolas Grekas
a2d6d11085 bug #35562 [HttpClient] fix HttpClientDataCollector when handling canceled responses (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix HttpClientDataCollector when handling canceled responses

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

Commits
-------

303f9e5be5 [HttpClient] fix HttpClientDataCollector when handling canceled responses
2020-02-03 09:07:24 +01:00
Nicolas Grekas
303f9e5be5 [HttpClient] fix HttpClientDataCollector when handling canceled responses 2020-02-02 18:41:51 +01:00
Wouter J
f462285381 Show both missing packages in the same error message 2020-02-01 19:46:42 +01:00
Julien Falque
963d0cce86
Fix HTTP client config handling 2020-02-01 16:41:49 +01:00
Nicolas Grekas
6f29d8d508 Merge branch '3.4' into 4.4
* 3.4:
  Update PR template
2020-02-01 11:01:17 +01:00
Nicolas Grekas
e02e74d036 Update PR template 2020-02-01 11:00:56 +01:00
Fabien Potencier
e3561cc2a3 bumped Symfony version to 4.4.5 2020-01-31 13:48:55 +01:00
Fabien Potencier
488093b6fb
Merge pull request #35540 from fabpot/release-4.4.4
released v4.4.4
2020-01-31 13:45:22 +01:00
Fabien Potencier
eac640a21a updated VERSION for 4.4.4 2020-01-31 13:45:06 +01:00
Fabien Potencier
f7021e4bd4 updated CHANGELOG for 4.4.4 2020-01-31 13:44:59 +01:00
Nicolas Grekas
3a69b8c53d Merge branch '4.3' into 4.4
* 4.3:
  Bump phpunit-bridge cache
2020-01-31 10:56:34 +01:00
Nicolas Grekas
6514fa3cc7 Merge branch '3.4' into 4.3
* 3.4:
  Bump phpunit-bridge cache
2020-01-31 10:56:21 +01:00
Nicolas Grekas
b2339b5e32 Bump phpunit-bridge cache 2020-01-31 10:55:33 +01:00
Nicolas Grekas
103c460e4c [DI] fix CheckTypeDeclarationsPass 2020-01-31 10:49:27 +01:00
Nicolas Grekas
f24320dd10 Merge branch '4.3' into 4.4
* 4.3:
  [Validator] fix access to uninitialized property when getting value
  [HttpClient] Fix regex bearer
  [HttpKernel] Fix stale-if-error behavior, add tests
  Improved error message when no supported user provider is found
  Properly handle phpunit arguments for configuration file
2020-01-31 10:11:17 +01:00
Nicolas Grekas
0f13d5a5fc Merge branch '3.4' into 4.3
* 3.4:
  [Validator] fix access to uninitialized property when getting value
  [HttpKernel] Fix stale-if-error behavior, add tests
  Improved error message when no supported user provider is found
2020-01-31 10:10:37 +01:00
Nicolas Grekas
e39d66eeee bug #35530 [HttpClient] Fix regex bearer (noniagriconomie)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Fix regex bearer

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

Small fix related to https://github.com/symfony/symfony/issues/34919#issuecomment-571145590

Commits
-------

cd0db78ab5 [HttpClient] Fix regex bearer
2020-01-31 10:08:14 +01:00
Fabien Potencier
aeea451433 bug #35532 [Validator] fix access to uninitialized property when getting value (greedyivan)
This PR was squashed before being merged into the 3.4 branch (closes #35532).

Discussion
----------

[Validator] fix access to uninitialized property when getting value

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

In PHP 7.4, the type-hinted property is [uninitialized](https://wiki.php.net/rfc/typed_properties_v2#uninitialized_and_unset_properties) by default. So it needs to be checked before use.

Commits
-------

1edecf77c1 [Validator] fix access to uninitialized property when getting value
2020-01-31 09:56:30 +01:00
Ivan Grigoriev
1edecf77c1 [Validator] fix access to uninitialized property when getting value 2020-01-31 09:56:24 +01:00
noniagriconomie
cd0db78ab5 [HttpClient] Fix regex bearer 2020-01-30 17:47:09 +01:00
Fabien Potencier
55df55e4f6 bug #35486 [Translator] Default value for 'sort' option in translation:update should be 'asc' (versgui)
This PR was squashed before being merged into the 4.4 branch (closes #35486).

Discussion
----------

[Translator] Default value for 'sort' option in translation:update should be 'asc'

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

The value for 'sort' option for `bin/console translation:update --sort` is optional, but no default value is defined. So the list isn't sorted if no value is explicitly defined.
This MR brings a default value "asc" if no value is defined, so the list is correctly sorted.

Commits
-------

fdb13c8ab8 [Translator] Default value for 'sort' option in translation:update should be 'asc'
2020-01-30 17:24:07 +01:00
Guillaume Verstraete
fdb13c8ab8 [Translator] Default value for 'sort' option in translation:update should be 'asc' 2020-01-30 17:24:00 +01:00
Fabien Potencier
e50db1f93f bug #35305 [HttpKernel] Fix stale-if-error behavior, add tests (mpdude)
This PR was squashed before being merged into the 3.4 branch (closes #35305).

Discussion
----------

[HttpKernel] Fix stale-if-error behavior, add tests

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

This PR adds the first tests for `stale-if-error` logic in `HttpCache`.

It also fixes an observation from #24248: For responses that have been cached as `public` with an `ETag` but without a lifetime, in case of an error the stale response will be served forever (= as long as the error persists), even beyond the configured `stale-if-error` grace period.

Furthermore, it tries to improve compliance with RFC 7234: Stale responses must not be sent (under no condition) if one of
* `no-cache`
* `must-revalidate`
* `proxy-revalidate` or
* `s-maxage` (sic) is present.

This can be found in the corresponding chapters of Section 5.2.2 for these directives, but is also summarized in [Section 4.2.4](https://tools.ietf.org/html/rfc7234#section-4.2.4) as

 > A cache MUST NOT generate a stale response if it is prohibited by an explicit in-protocol directive (e.g., by a "no-store" or "no-cache" cache directive, a "must-revalidate" cache-response-directive, or an applicable "s-maxage" or "proxy-revalidate" cache-response-directive; see Section 5.2.2).

Because disabling of `stale-if-error` for `s-maxage` responses probably has a big impact on the usefulness of that feature in practice, it has to be enabled explicitly with a new config setting `strict_smaxage` (defaulting to `false`).

Commits
-------

ad5f427bed [HttpKernel] Fix stale-if-error behavior, add tests
2020-01-30 17:05:58 +01:00
Matthias Pigulla
ad5f427bed [HttpKernel] Fix stale-if-error behavior, add tests 2020-01-30 17:05:53 +01:00
Fabien Potencier
46e8da39e8 bug #34808 [PhpUnitBridge] Properly handle phpunit arguments for configuration file (biozshock)
This PR was merged into the 4.3 branch.

Discussion
----------

[PhpUnitBridge] Properly handle phpunit arguments for configuration file

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

PhpUnitBridge should properly parse cli arguments for configuration file.
After fixing #34300 the PhpUnitBridge stopped recognizing short `-c` option.
Also original PHPUnit allows to pass a directory as configuration parameter and read from either phpunit.xml or phpunit.xml.dist

Commits
-------

a7a5885661 Properly handle phpunit arguments for configuration file
2020-01-30 16:35:02 +01:00
Fabien Potencier
9803f3edf2 bug #35517 [Intl] Provide more locale translations (ro0NL)
This PR was submitted for the 4.3 branch but it was merged into the 4.4 branch instead (closes #35517).

Discussion
----------

[Intl] Provide more locale translations

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix https://github.com/symfony/symfony/issues/35513#issuecomment-579849578
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

This enables more locale translations, available upstream, which are valid. In this case esp. locales with a numeric region code, eg. `es_419`

This should return true in `Locales::exists()`, which is currently not the case. By providing the translation, it implicitly exists as well.

cc @jkobus

Commits
-------

27cc120760 [Intl] Provide more locale translations
2020-01-30 16:14:13 +01:00
Roland Franssen
27cc120760 [Intl] Provide more locale translations 2020-01-30 16:14:06 +01:00
Fabien Potencier
29badef991 minor #35189 [Mailer] add tests for http transports (azjezz)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] add tests for http transports

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

Commits
-------

df30a176ac [Mailer] add tests for http transports
2020-01-30 11:46:32 +01:00
Fabien Potencier
6b0103ec5a bug #35518 [Mailer] Fix STARTTLS support for Postmark and Mandrill (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Fix STARTTLS support for Postmark and Mandrill

| 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       | Fix #34846 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

44b27c6816 [Mailer] Fix STARTTLS support for Postmark and Mandrill
2020-01-30 11:34:36 +01:00
Fabien Potencier
44b27c6816 [Mailer] Fix STARTTLS support for Postmark and Mandrill 2020-01-30 11:31:13 +01:00
Tobias Schultze
737a3e59a7 Merge branch '4.3' into 4.4 2020-01-29 15:35:06 +01:00
Tobias Schultze
14c355548a bug #35480 [Messenger] Check for all serialization exceptions during message dec… (Patrick Berenschot)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] Check for all serialization exceptions during message dec…

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

Makes it so that the Messenger Serializer throws a `MessageDecodingFailedException` for any serializer exception.

Commits
-------

21fffcadd5 [Messenger] Check for all serialization exceptions during message dec…
2020-01-29 15:30:24 +01:00