Commit Graph

38087 Commits

Author SHA1 Message Date
Fabien Potencier
f6f6a600a8 bug #35693 [Finder] Fix unix root dir issue (chr-hertel)
This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead.

Discussion
----------

[Finder] Fix unix root dir issue

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

not quite sure about this one 🤔

Commits
-------

9e431038b2 fix unix root dir issue
2020-02-14 08:34:28 +01:00
Christopher Hertel
9e431038b2 fix unix root dir issue 2020-02-14 08:34:21 +01:00
Fabien Potencier
f20b36e3de minor #35712 [Validator] sync translation files with master (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] sync translation files with master

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

Commits
-------

e171386299 sync validator translation files with master
2020-02-14 08:25:01 +01:00
Christian Flothmann
e171386299 sync validator translation files with master 2020-02-14 07:56:04 +01:00
Fabien Potencier
fb743a545f minor #35705 fix anchor (garak)
This PR was merged into the 3.4 branch.

Discussion
----------

fix anchor

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

This is a continuation of PR #35703 that was merged a bit too early.
It accepts suggestion made there and, moreover, fixes anchor link (that changed from old roadmap page)

Commits
-------

5825e3c58c fix anchor
2020-02-13 18:43:56 +01:00
Massimiliano Arione
5825e3c58c
fix anchor 2020-02-13 16:21:59 +01:00
Fabien Potencier
648d488bb2 bug #35696 [Console] Don't load same-namespace alternatives on exact match (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Don't load same-namespace alternatives on exact match

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35479
| License       | MIT
| Doc PR        | -
<!--
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/roadmap):
 - 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
-------

707c5bade0 [Console] Don't load same-namespace alternatives on exact match found
2020-02-13 16:01:49 +01:00
Fabien Potencier
7f92a165de minor #35703 fix links to releases page (formerly known as "roadmap") (garak)
This PR was merged into the 3.4 branch.

Discussion
----------

fix links to releases page (formerly known as "roadmap")

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

Current releases page is https://symfony.com/releases
Formerly it was https://symfony.com/roadmap and there's a nice redirect to new URL.
Anyway, I think that pointing to the right new URL would be better

Commits
-------

1c8fbe1cf9 fix links to releases page (formerly known as "roadmap")
2020-02-13 16:01:15 +01:00
Massimiliano Arione
1c8fbe1cf9
fix links to releases page (formerly known as "roadmap") 2020-02-13 15:46:26 +01:00
Robin Chalas
707c5bade0 [Console] Don't load same-namespace alternatives on exact match found 2020-02-13 01:35:20 +01:00
Fabien Potencier
9e0a39ee05 minor #35657 [Security] Fix exception name in doc comments (chalasr)
This PR was squashed before being merged into the 3.4 branch (closes #35657).

Discussion
----------

[Security] Fix exception name in doc comments

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

Commits
-------

f10098e9f1 [Security] Fix exception name in doc comments
2020-02-10 09:04:06 +01:00
Robin Chalas
f10098e9f1 [Security] Fix exception name in doc comments 2020-02-10 09:03:59 +01:00
Fabien Potencier
3ebe15e0be minor #35646 [Validator] Added the missing Mongolian translations (erheme318)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Added the missing Mongolian translations

https://github.com/symfony/symfony/issues/30175

Added the missing translations for the Mongolian ("mn") locale.

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

Commits
-------

365f4d76bd [Validator] Added the missing Mongolian translations
2020-02-08 11:44:41 +01:00
Erkhembayar Gantulga
365f4d76bd [Validator] Added the missing Mongolian translations
https://github.com/symfony/symfony/issues/30175

Added the missing translations for the Mongolian ("mn") locale.
2020-02-08 18:24:04 +08:00
Nicolas Grekas
47f467a4cc [FrameworkBundle] fix fix fix deps=low 2020-02-07 10:13:59 +01:00
Nicolas Grekas
16dd360511 [FrameworkBundle] fix fix deps=low 2020-02-07 10:12:20 +01:00
Nicolas Grekas
02e5d73116 [FrameworkBundle] fix deps=low 2020-02-07 10:11:45 +01:00
Nicolas Grekas
abac71b0a4 [FrameworkBundle] fix "samesite" in XSD 2020-02-07 09:43:36 +01:00
Fabien Potencier
f350f532b7 bug #35605 [HttpFoundation][FrameworkBundle] fix support for samesite in session cookies (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation][FrameworkBundle] fix support for samesite in session cookies

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

This PR cherry-picks #28168 on 3.4, with a rationale given by @ConneXNL in https://github.com/symfony/symfony/issues/35520#issuecomment-582296847:

> I hope I am wrong but I see the impact of not making any changes to Symfony 3.4 will have a tons of sites break if we cannot set the cookie's samesite setting (in the framework session and remember me) before Chrome pushes this update.
>
> Very soon all existing cookies are no longer going to work with cross-domains if you do not specify 'None' for the cookie_samesite. All external APIs that use cookies and are running SF 3.4 will break and devs will have no quick solution to fix their auth process.
>
> If you are using PHP 7.4, yes you can most likely use ini_set to workaround this issue.
>
> However, ini_set('cookie_samesite') does not work in PHP Version <= 7.2.
I am not even sure PHP 7.3 supports the value 'None' as php.watch/articles/PHP-Samesite-cookies says it has support for 'Lax' and 'Scrict'.
>
> This effectively means SF 3.4 on PHP 7.2 (or PHP 7.3) is no longer supported for cross domain APIs with cookies. People would have to either update PHP to 7.4 (if they even can?) or go to Symfony 4 (with a dead live site is going to be a complete disaster).
>
> Since the impact of the change that chrome is about to roll out is so fundamentally changing our way to set cookies, I consider configuring samesite configuration in the framework an absolute requirement, not a feature, especially since SF 3.4 is still supported.
>
> What am i missing?
>
> Note: SF3 HTTPFoundation already supports the new cookie settings, it's just the framework that doesn't support it.

Our BC policy embeds the promise that one should be able to keep the same app on a newest infrastructure (eg that's why supporting a PHP version is a bug fix). I think we can consider this for browsers here also. WDYT?

Commits
-------

f46e6cb8a0 [HttpFoundation][FrameworkBundle] fix support for samesite in session cookies
2020-02-07 08:56:52 +01:00
Fabien Potencier
e41a31236a bug #35609 [DoctrineBridge] Fixed submitting ids with query limit or offset (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[DoctrineBridge] Fixed submitting ids with query limit or offset

| 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       | Fix https://github.com/symfony/symfony/pull/34900#discussion_r375246113 <!-- prefix each issue number with "Fix #", if any -->
| 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/roadmap):
 - 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
-------

9bb194098f [DoctrineBridge] Fixed submitting ids with query limit or offset
2020-02-07 08:54:38 +01:00
Fabien Potencier
36ffca37e3 minor #35628 [Security] Improve info UserPasswordEncoderCommand (wimme002)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #35628).

Discussion
----------

[Security] Improve info UserPasswordEncoderCommand

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

`php bin/console security:encode-password [password] App\Entity\User`
will result in
`No encoder has been configured for account "AppEntityUser".  `

If a full class path is used, it either has to be passed in as a string or has to be escaped by double slashes.

Commits
-------

3604bb7018 Update UserPasswordEncoderCommand.php
2020-02-07 08:50:00 +01:00
Wim Molenberghs
3604bb7018 Update UserPasswordEncoderCommand.php 2020-02-07 08:49:54 +01:00
Fabien Potencier
f46e6cb8a0 [HttpFoundation][FrameworkBundle] fix support for samesite in session cookies 2020-02-06 09:18:51 +01:00
Jules Pietri
9bb194098f [DoctrineBridge] Fixed submitting ids with query limit or offset 2020-02-05 19:57:26 +01:00
Nicolas Grekas
adacae6f54 minor #35606 [Security] Replace 403 with 401 in onAuthenticationFailure method (alanpoulain)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Replace 403 with 401 in `onAuthenticationFailure` method

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

This comment in `onAuthenticationFailure` was misleading since a 401 status code should probably be returned instead of a 403.

Commits
-------

73bc793be2 Replace 403 with 401 in onAuthenticationFailure method
2020-02-05 19:10:08 +01:00
Alan Poulain
73bc793be2
Replace 403 with 401 in onAuthenticationFailure method 2020-02-05 17:32:02 +01:00
Nicolas Grekas
c2e0aab7be cs fix 2020-02-04 10:59:34 +01:00
Fabien Potencier
2e27353a19 minor #35584 Fix CS (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix CS

| 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

Commits
-------

a3e49f30c7 Fix CS
2020-02-04 09:15:25 +01:00
Fabien Potencier
a3e49f30c7 Fix CS 2020-02-04 09:04:52 +01:00
Fabien Potencier
ce29631cd8 [Translation] Add missing use statement 2020-02-04 08:22:30 +01:00
Fabien Potencier
28eedb8cef bug #34123 [Form] Fix handling of empty_data's \Closure value in Date/Time form types (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Fix handling of empty_data's \Closure value in Date/Time form types

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

Basically this would solve the posibility to pass a `\Closure` to the `empty_data` option for Date/Time form types.

> https://symfony.com/doc/current/reference/forms/types/form.html#empty-data
> If a form is compound, you can set empty_data as an array, object or **closure**. See the [How to Configure empty Data](https://symfony.com/doc/current/form/use_empty_data.html) for a Form Class article for more details about these options.

Also related to https://github.com/symfony/symfony/pull/29182

Commits
-------

4939f0e323 Fix handling of empty_data's \Closure value in Date/Time form types
2020-02-03 18:31:42 +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
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
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
e02e74d036 Update PR template 2020-02-01 11:00:56 +01:00
Nicolas Grekas
b2339b5e32 Bump phpunit-bridge cache 2020-01-31 10:55:33 +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
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