Commit Graph

38161 Commits

Author SHA1 Message Date
Nicolas Grekas
7b1e4ea5e0 minor #35793 Use strict assertSame instead of assertEquals in Asset component tests (GromNaN)
This PR was merged into the 3.4 branch.

Discussion
----------

Use strict assertSame instead of assertEquals in Asset component tests

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

Using `assertSame` instead of `assertEquals` is recommended when possible (see https://github.com/sebastianbergmann/phpunit-documentation-english/issues/3). It is stricter and must be more efficient ([`===`](https://github.com/sebastianbergmann/phpunit/blob/8.5.2/src/Framework/Constraint/IsIdentical.php#L63) vs a [comparator class](https://github.com/sebastianbergmann/phpunit/blob/8.5.2/src/Framework/Constraint/IsEqual.php#L79)).

~~Also, removing useless string cast.~~

Commits
-------

e8f3e84959 Use strict assertion in asset tests
2020-02-20 14:39:53 +01:00
Robin Chalas
aa3637db6f bug #35792 [Security] Prevent TypeError in case RememberMetoken has no attached user (nikophil)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Prevent TypeError in case RememberMetoken has no attached user

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

Commits
-------

3515793cb3 fix remember me
2020-02-20 13:14:22 +01:00
Nicolas PHILIPPE
3515793cb3 fix remember me 2020-02-20 11:24:12 +01:00
Jérôme TAMARELLE
e8f3e84959 Use strict assertion in asset tests 2020-02-20 09:19:58 +01:00
Thomas Calvet
018ec1ae5c [DoctrineBridge][DoctrineExtractor] Fix indexBy with custom and some core types 2020-02-19 23:15:50 +01:00
Nicolas Grekas
212841b3e6 bug #35772 [Config] don't throw on missing excluded paths (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config] don't throw on missing excluded paths

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

Commits
-------

2f65a7a255 [Config] don't throw on missing excluded paths
2020-02-19 18:19:43 +01:00
Nicolas Grekas
a81cbc99c7 bug #35774 [Ldap] force default network timeout (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Ldap] force default network timeout

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

The default network timeout is infinite, which makes no sense and can block workers.

Note that LDAP supports also "timelimit" options, but those are max-durations for LDAP queries. We cannot limit them by default.

Commits
-------

63f9e013a1 [Ldap] force default network timeout
2020-02-19 17:02:56 +01:00
Nicolas Grekas
7225a01bc6 minor #35786 Do not rely on the current locale when dumping a Graphviz object (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

Do not rely on the current locale when dumping a Graphviz object

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

---

Funny bug !

With `de_DE.UTF-8` as locale:
```
php > echo sprintf('%s', 0.5);
0,5
php > echo sprintf('%d', 0.5);
0
php > echo sprintf('%f', 0.5);
0,500000
php > echo (string) 0.5;
0,5
```

(so external tools like graphviz could not parse `0,5` - and so skipped the arrow)

So now we force `'0.5'`

/cc @OskarStark

Commits
-------

094e4bbbc2 Do not rely on the current locale when dumping a Graphviz object
2020-02-19 16:50:34 +01:00
Grégoire Pineau
094e4bbbc2 Do not rely on the current locale when dumping a Graphviz object
Funny bug !

With `de_DE.UTF-8` as locale:
```
php > echo sprintf('%s', 0.5);
0,5
php > echo sprintf('%d', 0.5);
0
php > echo sprintf('%f', 0.5);
0,500000
php > echo (string) 0.5;
0,5
```

So now we force `'0.5'`
2020-02-19 15:50:10 +01:00
Robin Chalas
1c24ccc635 fix typo 2020-02-18 22:48:57 +01:00
Nicolas Grekas
63f9e013a1 [Ldap] force default network timeout 2020-02-18 14:07:02 +01:00
Nicolas Grekas
2f65a7a255 [Config] don't throw on missing excluded paths 2020-02-18 12:18:14 +01:00
Fabien Potencier
5867c7e090 minor #35760 [Validator] Add the missing translations for the Polish ("pl") locale (przemyslaw-bogusz)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add the missing translations for the Polish ("pl") locale

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

Fabbot indicates a typo, but there is no typo. The English word `address` is `adres` in Polish (with a single d and a single s).

Commits
-------

8c4de564a8 [Validator] Add the missing translations for the Polish ("pl") locale
2020-02-18 09:09:42 +01:00
Robin Chalas
da2f885777 minor #35742 Docs: Typo, grammar (michaelKaefer)
This PR was submitted for the 5.0 branch but it was squashed and merged into the 3.4 branch instead (closes #35742).

Discussion
----------

Docs: Typo, grammar

| Q             | A
| ------------- | ---
| Branch?       | master for features / 3.4, 4.4 or 5.0 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 #", if any -->
| 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
-------

dc11c8d1b8 Docs: Typo, grammar
2020-02-17 20:21:44 +01:00
Michael Käfer
dc11c8d1b8 Docs: Typo, grammar 2020-02-17 20:21:37 +01:00
Przemysław Bogusz
8c4de564a8 [Validator] Add the missing translations for the Polish ("pl") locale 2020-02-17 20:16:57 +01:00
Robin Chalas
334f0205d0 minor #35734 [Console] Inline exact-match handling with 4.4 (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Inline exact-match handling with 4.4

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

This reduces the patch for #35696 (not released yet), inlining 3.4's code with 4.4 which was not impacted by the fixed bug. The reverted logic was useless starting from 4.4.
Thanks @stof for the hint.

Commits
-------

e13470c823 [Console] Inline exact-match handling with 4.4
2020-02-15 15:10:52 +01:00
Robin Chalas
e13470c823 [Console] Inline exact-match handling with 4.4 2020-02-15 14:27:16 +01:00
Nicolas Grekas
b92168c110 bug #35702 [VarDumper] fixed DateCaster not displaying additional fields (Makdessi Alex)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] fixed DateCaster not displaying additional fields

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

----

Here's the result with [Holiday](https://github.com/azuyalabs/yasumi/blob/develop/src/Yasumi/Holiday.php) class

| before  | after
| ------- | -----
| ![before](https://user-images.githubusercontent.com/4425529/74445818-48f03d00-4e77-11ea-97e1-58d88ac52cba.png) | ![after](https://user-images.githubusercontent.com/4425529/74445825-4c83c400-4e77-11ea-8e8e-1fbbb1040438.png)

Commits
-------

f965971919 [VarDumper] fixed DateCaster not displaying additional fields
2020-02-15 11:39:34 +01:00
Fabien Potencier
1a51d34d8c bug #35722 [HttpKernel] Set previous exception when rethrown from controller resolver (danut007ro)
This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead.

Discussion
----------

[HttpKernel] Set previous exception when rethrown from controller resolver

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

If an `\InvalidArgumentException` is catched by ControllerResolver a new one is thrown. The old exception is not added as `previous` parameter on the new one so it is not visible on the exception page. This pull request adds old exception as previous on the new one, so it is also visible on the exception page.

Thank you.

Commits
-------

87d51c1e4b Set previous exception when rethrown from controller resolver
2020-02-15 08:21:47 +01:00
Daniel Gorgan
87d51c1e4b Set previous exception when rethrown from controller resolver 2020-02-15 08:21:39 +01:00
Fabien Potencier
926e19ce32 bug #35718 [HttpKernel] fix registering DebugHandlersListener regardless of the PHP_SAPI (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] fix registering DebugHandlersListener regardless of the PHP_SAPI

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

Commits
-------

3f995ac602 [HttpKernel] fix registering DebugHandlersListener regardless of the PHP_SAPI
2020-02-15 08:17:43 +01:00
Makdessi Alex
f965971919 [VarDumper] fixed DateCaster not displaying additional fields 2020-02-14 13:39:29 +01:00
Nicolas Grekas
3f995ac602 [HttpKernel] fix registering DebugHandlersListener regardless of the PHP_SAPI 2020-02-14 11:01:23 +01:00
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