Commit Graph

49064 Commits

Author SHA1 Message Date
Fabien Potencier
853b1dc57b minor #41263 [Security] Added missing translations for Serbian (sr_Cyrl) (ajakov)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Added missing translations for Serbian (sr_Cyrl)

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

Added 2 missing translations.

Commits
-------

0e3165c67d minor #41065 [Security] Added missing translations for Serbian (sr_Cyrl)
2021-05-19 13:54:43 +02:00
Fabien Potencier
3ae7e0a60d minor #41246 [Security] Missing translations for Chinese (zh_TW & zh_CN) (fd6130)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Missing translations for Chinese (zh_TW & zh_CN)

| Q             | A
| ------------- | ---
| Branch?       | 4.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       | Fix #41037 , Fix #41038 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | no <!-- 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 5.x.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
-->

Added missing translation for Chinese (zh_TW & zh_CN).

Commits
-------

26d156f17f add chinese translation
2021-05-19 08:29:58 +02:00
ajakov
0e3165c67d minor #41065 [Security] Added missing translations for Serbian (sr_Cyrl) 2021-05-18 10:51:58 +02:00
Alexander M. Turek
373528fce2 bug #41230 [FrameworkBundle][Validator] Fix deprecations from Doctrine Annotations+Cache (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][Validator] Fix deprecations from Doctrine Annotations+Cache

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

* Doctrine Annotations' `CachedReader` is deprecated. Let's not use it if we don't have to.
* Doctrine Cache 2 has been released. Since we're mostly only using the interfaces, we can indicate compatibility.

Paslm is going to complain about missing classes, which is kind-of expected here. 🙂

Commits
-------

ec51c21a9d Fix deprecations from Doctrine Annotations+Cache
2021-05-17 21:13:41 +02:00
Alexander M. Turek
ec51c21a9d Fix deprecations from Doctrine Annotations+Cache 2021-05-16 23:41:25 +02:00
fd6130
26d156f17f add chinese translation 2021-05-16 22:49:50 +08:00
Fabien Potencier
907f1033ad minor #41244 [Security] Keep Bulgarian wording consistent across all texts (Warxcell)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Keep Bulgarian wording consistent across all texts

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

Keep wording consistent across all texts in translations:

Trans unit id=17:
Too many === Твърде много
Trans unit id=19:
Too many === Прекалено много

I put word "Твърде", because it was used before.

Commits
-------

4f1b4f993e [Security] Keep Bulgarian wording consistent across all texts.
2021-05-16 15:01:26 +02:00
Fabien Potencier
518badd980 minor #41243 Migrate configuration file for PHP CS Fixer 2.19/3.0 (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Migrate configuration file for PHP CS Fixer 2.19/3.0

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

This PR suggests to rename the PHP CS Fixer configuration file as expected by version 2.19 and 3.0. I don't know what version Fabbot is currently running, but as soon as it is updated to 2.19, we can merge this PR.

Commits
-------

1462a3215e Migrate configuration file for PHP CS Fixer 2.19/3.0
2021-05-16 14:39:59 +02:00
Fabien Potencier
eb3a3c1c0a bug #41240 Fixed deprecation warnings about passing null as parameter (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Fixed deprecation warnings about passing null as parameter

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

Various built-in PHP functions will trigger a deprecation warning if `null` is passed as parameter. This PR attempts to fix all warnings that our test suite currently picks up.

Commits
-------

7d9bdf5734 Fixed deprecation warnings about passing null as parameter
2021-05-16 14:27:45 +02:00
Fabien Potencier
03519d40b8 bug #41241 [Finder] Fix gitignore regex build with "**" (mvorisek)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Finder] Fix gitignore regex build with "**"

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

covered with tests, also faster, we do not have to explode the rule at all :)

ping `@lindelius` `@OskarStark`

Commits
-------

ce22d5ddd7 [Finder] Fix gitignore regex build with "**"
2021-05-16 14:25:11 +02:00
Michael Voříšek
ce22d5ddd7 [Finder] Fix gitignore regex build with "**" 2021-05-16 14:25:02 +02:00
Alexander M. Turek
7d9bdf5734 Fixed deprecation warnings about passing null as parameter 2021-05-16 11:52:47 +02:00
Nicolas Grekas
d3ebc5fd53 minor #41238 [Form] Replace broken ServerParams mock (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] Replace broken ServerParams mock

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

`AbstractRequestHandlerTest` creates a mocked version of the `ServerParams` class. Since `getNormalizedIniPostMaxSize()` does not have a return type declaration, PHPUnit will by default create an implementation that always returns `null`. However, the real implementation of that method guarantees to always return a string.

This becomes problematic in PHP 8.1 because the return value is sometimes passed as-is into functions like `strtolower()` which trigger a deprecation warning on `null` now.

This PR proposes to replace the mock with a dummy implementation that returns an empty string by default.

Commits
-------

77c2d69f19 [Form] Replace broken ServerParams mock
2021-05-16 10:57:09 +02:00
Warxcell
4f1b4f993e [Security] Keep Bulgarian wording consistent across all texts. 2021-05-16 11:22:39 +03:00
Alexander M. Turek
1462a3215e Migrate configuration file for PHP CS Fixer 2.19/3.0 2021-05-15 21:29:53 +02:00
Alexander M. Turek
77c2d69f19 [Form] Replace broken ServerParams mock 2021-05-15 16:44:53 +02:00
Nyholm
dffdc71adb
minor #41080 Add a GitHub Action for tests against PHP 8.1 (derrabus, Nyholm)
This PR was merged into the 4.4 branch.

Discussion
----------

Add a GitHub Action for tests against PHP 8.1

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

I'd like to monitor our compatibility with the upcoming PHP 8.1 release. Because I failed miserably at convincing Travis to run our tests with PHP 8.1 (see #40532), I tried to do the same with GitHub Actions.

Commits
-------

6a328ae01e Update .github/workflows/tests.yml
6f1c4b8c58 PHP 8.1 must not cause the build to fail (yet)
b0b45105d7 Add _run_tests bash function
de4f0170e2 Add a GitHub Action for tests against PHP 8.1
2021-05-15 10:53:02 +02:00
Tobias Nyholm
6a328ae01e
Update .github/workflows/tests.yml 2021-05-15 10:42:08 +02:00
Nicolas Grekas
3b0c6f9ae7 bug #41224 [HttpClient] fix adding query string to relative URLs with scoped clients (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix adding query string to relative URLs with scoped clients

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

Commits
-------

5ccba2c3e5 [HttpClient] fix adding query string to relative URLs with scoped clients
2021-05-15 10:05:42 +02:00
Nicolas Grekas
9e12a383ee bug #41233 [DependencyInjection][ProxyManagerBridge] Don't call class_exists() on null (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection][ProxyManagerBridge] Don't call class_exists() on null

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

PHP 8.1 complains if we pass `null` to `class_exists()` or `interface_exists()`:

> class_exists(): Passing null to parameter `#1` ($class) of type string is deprecated

Commits
-------

88520e53b2 Don't call class_exists() on null
2021-05-15 10:05:00 +02:00
Nyholm
a7d3533619
minor #41192 [Security] Added Ukrainian translations (andrii-bodnar)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Added Ukrainian translations

| Q             | A
| ------------- | ---
| Branch?       | 4.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       | Fix #41088 <!-- 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 -->

Added some missing Ukrainian translations.

Commits
-------

8f34572a65 [Security] Added Ukrainian translations
2021-05-15 08:45:00 +02:00
Nyholm
4289ab9f77
minor #41231 [Security] Added and improved Bulgarian translations (I-Valchev)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Added and improved Bulgarian translations

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

Added missing translations for id 19 and 20.
Replaced the word "incorrect" with "unsuccessful"/"failed" for id 17.
Replaced the phonetic use of "cookie" with the word for "cookie" in Bulgarian for id 5 and 10.
Fixed grammatical error, now use the definite article ("the") instead of the indefinine for id 11, 13, 15 and 16.

Commits
-------

b79962b676 Added and improved Bulgarian translations
2021-05-15 08:41:48 +02:00
Alexander M. Turek
88520e53b2 Don't call class_exists() on null 2021-05-15 01:35:14 +02:00
Alexander M. Turek
9c3ee3d82e minor #41228 Introduce SYMFONY_FEATURE_BRANCH variable in Travis config (derrabus)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Introduce SYMFONY_FEATURE_BRANCH variable in Travis config

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

This PR proposes to introduce a `SYMFONY_FEATURE_BRANCH` variable that always points to the branch of Symfony's next feature release. This is a setting that we need to adjust twice a year. This way, the branch does not have to follow the `.x` suffix convention anymore.

~~I'm currently testing my changes against the 5.x branch. As soon as the PR is ready, I will target 4.4.~~

Update: `SYMFONY_FEATURE_BRANCH` is now populated via an API request.

Commits
-------

7de11c0e44 Introduce SYMFONY_FEATURE_BRANCH variable in Travis config
2021-05-15 00:43:41 +02:00
Alexander M. Turek
7de11c0e44 Introduce SYMFONY_FEATURE_BRANCH variable in Travis config 2021-05-15 00:43:34 +02:00
Ivo Valchev
b79962b676 Added and improved Bulgarian translations 2021-05-14 22:24:36 +02:00
Alexander M. Turek
6f1c4b8c58 PHP 8.1 must not cause the build to fail (yet) 2021-05-14 20:01:46 +02:00
Alexander M. Turek
b0b45105d7 Add _run_tests bash function 2021-05-14 19:21:16 +02:00
Alexander M. Turek
de4f0170e2 Add a GitHub Action for tests against PHP 8.1 2021-05-14 17:37:17 +02:00
Nicolas Grekas
5ccba2c3e5 [HttpClient] fix adding query string to relative URLs with scoped clients 2021-05-14 09:58:18 +02:00
Andrii Bodnar
8f34572a65 [Security] Added Ukrainian translations 2021-05-13 14:52:11 +03:00
Nyholm
90666777c7
minor #41097 [Security] Missing lt translations (rmikalkenas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Missing lt translations

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

For minute/minutes translation I decided to use "min." abbreviation, because in lithuanian language the plural translation might not always match the word case.
For example:
1 minute -> 1 minutė
2 minutes -> 2 minutės
...
10 minutes -> 10 minučių
...
21 minutes -> 21 minutė
22 minutes -> 22 minutės
...
30 minutes -> 30 minučių

and so on...

Commits
-------

f2dedd8a53 Missing security lt translations added
2021-05-13 12:10:00 +02:00
Nicolas Grekas
49dd6ef279 bug #41210 [Console] Fix Windows code page support (orkan)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Fix Windows code page support

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37385, Fix #35842, Fix #36324, Fix #37495, Fix #37278
| License       | MIT

Corrects mojibake problem on Windows where an OEM code page was applied to an input string and then messed with PHP.internal_encoding setting used by the script. This caused strings with different encodings to be displayed on the console output.

Commits
-------

41452785c6 [Console] Fix Windows code page support
2021-05-13 08:28:07 +02:00
Marek Zajac
41452785c6 [Console] Fix Windows code page support 2021-05-13 07:53:50 +02:00
Nicolas Grekas
616b2c9fdb minor #41183 [CI][Psalm] Install stable/released PHPUnit (Nyholm)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[CI][Psalm] Install stable/released PHPUnit

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

PHPUnit 10 is soon released. We dont need to install it before it is actually released.

Currently, PHPUnit is updating dependencies and we get psalm failing with things like:

<img width="918" alt="Screenshot 2021-05-12 at 08 28 29" src="https://user-images.githubusercontent.com/1275206/117930440-468cc500-b2fe-11eb-8028-579478c001cf.png">
<img width="972" alt="Screenshot 2021-05-12 at 08 33 54" src="https://user-images.githubusercontent.com/1275206/117930443-47bdf200-b2fe-11eb-8cb7-79255532e899.png">

Commits
-------

2345614316 [CI][Psalm] Install stable/released PHPUnit
2021-05-12 18:08:07 +02:00
Nyholm
2345614316 [CI][Psalm] Install stable/released PHPUnit 2021-05-12 18:07:54 +02:00
Fabien Potencier
22a9510dff Bump Symfony version to 4.4.24 2021-05-12 15:18:54 +02:00
Fabien Potencier
bb7ec823d2
Merge pull request #41194 from fabpot/release-4.4.23
released v4.4.23
2021-05-12 15:15:51 +02:00
Fabien Potencier
5f8f60cdbc Update VERSION for 4.4.23 2021-05-12 15:13:32 +02:00
Fabien Potencier
91b37fdb8d Update CONTRIBUTORS for 4.4.23 2021-05-12 15:13:25 +02:00
Fabien Potencier
32932d00ff Update CHANGELOG for 4.4.23 2021-05-12 15:13:15 +02:00
Nicolas Grekas
d5c0fbac85 Merge branch '3.4' into 4.4
* 3.4:
  [Security][Guard] Prevent user enumeration via response content
2021-05-12 14:42:28 +02:00
Nicolas Grekas
2a581d22cc security #cve-2021-21424 [Security][Guard] Prevent user enumeration (chalasr)
This PR was merged into the 3.4 branch.
2021-05-12 14:32:10 +02:00
Nyholm
a0f8fc5c08
minor #41180 [Security] Add missing Finnish translations (mikkoaf)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Add missing Finnish translations

| Q             | A
| ------------- | ---
| Branch?       |  4.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       | Fix #41043
| License       | MIT
| Doc PR        |

Added some missing Finnish translations.

Commits
-------

c1cefc088d [Security] Add missing Finnish translations
2021-05-12 08:47:11 +02:00
Nyholm
d36f5e31ee
[CI][Psalm] Install stable/released PHPUnit 2021-05-12 08:32:34 +02:00
Mikko Ala-Fossi
c1cefc088d [Security] Add missing Finnish translations 2021-05-12 07:44:21 +03:00
Nicolas Grekas
9a53e6acc1 bug #41176 [DependencyInjection] fix dumping service-closure-arguments (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] fix dumping service-closure-arguments

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

5.3 uses service closures a bit more, so that this is required to make the `lint:container` command work.

Commits
-------

1aa9a249fc [DependencyInjection] fix dumping service-closure-arguments
2021-05-11 17:59:00 +02:00
Nicolas Grekas
1aa9a249fc [DependencyInjection] fix dumping service-closure-arguments 2021-05-11 17:55:42 +02:00
Fabien Potencier
89c1be89f0 bug #41168 WDT: Only load "Sfjs" if it is not present already (weaverryan)
This PR was merged into the 4.4 branch.

Discussion
----------

WDT: Only load "Sfjs" if it is not present already

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

Hi!

Playing with Turbo, I noticed two small issues with the WDT:

1) When you click a link (which Turbo loads via AJAX), the new toolbar would correctly load, but its "AJAX tab" would be missing/empty. At first, that seems.. at least... "correct enough". After all, we *did* just load a new web debug toolbar. However, this can be avoided by simply *not* redefining the `Sfjs` variable: if it already exists, just use it. And this is the intention of that object, I believe: for it to be loaded *once*, and then reused over and over again via its `loadToolbar()` method.

2) Additionally, I was experimenting with some crazy prefetch + Turbo functionality. It works, but caused one minor issue with the web debug toolbar. The flow is this:

A) A prefetch request is made to pre-cache a URL in Turbo.
B) When that links is actually clicked, the cached version from (A) is used as the "Preview". It's HTML calls `Sfjs.loadToolbar()`.
C) At the same moment as (B), another AJAX request is made to the same URL from (A) to get the full, fresh page (in case it's out of date).
D) When (C) finishes, it will have its own `Sfjs.loadToolbar()` call.

The problem is that the AJAX request for the first web debug toolbar (from B) sometimes finishes *after* the AJAX call made by Turbo for (C). The result is that the first web debug toolbar tries to activate itself... but it's already gone from the page.

I realize this is a... kind of crazy scenario, but I think the fix is legit: if, for any reason, the web debug toolbar element is not on the page, we should not try to initialize it. It results in:

<img width="431" alt="Screen Shot 2021-05-10 at 3 49 06 PM" src="https://user-images.githubusercontent.com/121003/117716165-429a5f00-b1a7-11eb-9b99-bf08591d2ff4.png">

## To Test

JUST to be on the safe side, I prepared a symfony-demo app with Turbo installed, and using these changes. You can try it here - https://github.com/weaverryan/symfony-demo/tree/turbo - the README is updated to quickly get it running (no need to even run yarn, the JavaScript files are committed).

Thanks!

Commits
-------

47ef65f336 only load Sfjs if it is not present
2021-05-11 08:55:30 +02:00
Ryan Weaver
47ef65f336 only load Sfjs if it is not present
Plus, avoid loading the toolbar if it is no longer on the page
2021-05-10 15:50:57 -04:00