Commit Graph

49150 Commits

Author SHA1 Message Date
Nicolas Grekas 54bee29572 bug #40866 [Filesystem] fix readlink() for Windows (a1812)
This PR was merged into the 4.4 branch.

Discussion
----------

[Filesystem] fix readlink() for Windows

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

**How to reproduce**

Windows 10.0.19042.928, PHP 8.0.3, PHPUnit 9.5.4
run as Administrator
C:\php\php.exe ./phpunit --bootstrap ./vendor/autoload.php --configuration ./phpunit.xml.dist ./src/Symfony/Component/Filesystem/Tests

There were 2 failures:

1) Symfony\Component\Filesystem\Tests\FilesystemTest::testRemoveCleansInvalidLinks
Failed asserting that 'C:\Users\albat\AppData\Local\Temp\1618836823.005.2057903605\directory\dir\' is false.

D:\Z__PHP_PROJECT\symfony\src\Symfony\Component\Filesystem\Tests\FilesystemTest.php:379

2) Symfony\Component\Filesystem\Tests\FilesystemTest::testReadAbsoluteLink
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'C:\Users\albat\AppData\Local\Temp\1618836823.1681.131301953\dir\link'
+'C:\Users\albat\AppData\Local\Temp\1618836823.1681.131301953\file'

Commits
-------

f1b95d3c93 [Filesystem] fix readlink for Windows
2021-05-26 19:30:55 +02:00
Nicolas Grekas 12030e5622 minor #41412 [HttpKernel] Fixes file_get_content in HttpCache's Store for PHP7.4+ (0x346e3730)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] Fixes file_get_content in HttpCache's Store for PHP7.4+

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

While trying to get 6.0 branch tests green, I encountered an error on multiple HttpKernel tests.
After investigating, it comes from the file_get_contents in the load method of the Store class from HttpCache. For obscure reasons, some calls are in errors and the content can't be read for "permission denied".
This is happening only on PHP 7.4.0+ (and that explains why the tests are green on the branch 5.4 as it runs php 7.2), adding the `@` error suppressor fixes this.

Commits
-------

c3ac11cc64 [HttpKernel] Fixes tests for PHP7.4+
2021-05-26 19:22:19 +02:00
Oskar Stark 26d682fd96 minor #41415 Fix markdown in README files (OskarStark)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix markdown in README files

| 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 #... <!-- 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 -->

I would up merge it and fix the upper branches while upmerging or via separate PR's, whatever is prefered

Commits
-------

ad0890c604 Fix markdown
2021-05-26 13:45:23 +02:00
Oskar Stark ad0890c604 Fix markdown 2021-05-26 13:20:16 +02:00
Antonin "0x346e3730" CLAUZIER c3ac11cc64
[HttpKernel] Fixes tests for PHP7.4+ 2021-05-26 12:28:46 +02:00
Christian Flothmann b917fafc8d keep container.service_subscriber tag on the decorated definition 2021-05-25 15:33:15 +02:00
Nicolas Grekas 7ccda8eedb bug #41394 [Form] fix support for years outside of the 32b range on x86 arch (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] fix support for years outside of the 32b range on x86 arch

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

Commits
-------

2353f19cc2 [Form] fix support for years outside of the 32b range on x86 arch
2021-05-24 12:31:21 +02:00
Nicolas Grekas 2353f19cc2 [Form] fix support for years outside of the 32b range on x86 arch 2021-05-24 12:24:40 +02:00
Alexander M. Turek 53d9b105a0 bug #39847 [Messenger] Fix merging PrototypedArrayNode associative values (svityashchuk)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Messenger] Fix merging PrototypedArrayNode associative values

Now keys will not be considered as irrelevant.

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

The problem was because in ConfigTree `options` are defined as `arrayNode` and has a `prototype('variable')`. So for combining config together `PrototypedArrayNode::mergeValues()` was called. And there was a trouble - for that `PrototypedArrayNode` `$rightSide` values were added without keys:

`\Symfony\Component\Config\Definition\PrototypedArrayNode::mergeValues`
```php
foreach ($rightSide as $k => $v) {
    // prototype, and key is irrelevant, append the element
    if (null === $this->keyAttribute) {
        $leftSide[] = $v;
        continue;
    }
```

Commits
-------

11128c9c0b [Messenger] Fix merging PrototypedArrayNode associative values
2021-05-22 21:45:48 +02:00
Oleksii Svitiashchuk 11128c9c0b [Messenger] Fix merging PrototypedArrayNode associative values 2021-05-22 21:45:39 +02:00
Nicolas Grekas a76cdecd01 bug #41346 [WebProfilerBundle] Wrapping exception js in Sfjs check and also loading base_js Sfjs if needed (weaverryan)
This PR was merged into the 4.4 branch.

Discussion
----------

[WebProfilerBundle] Wrapping exception js in Sfjs check and also loading base_js Sfjs if needed

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

This bug was introduced in #41168.

Best viewed with: https://github.com/symfony/symfony/pull/41346/files?w=1 - we could also remove the new indentation in `exception.js`.

In that PR, we innocently don't reload `Sfjs` if it doesn't exist. However, on an error page, that template ALSO adds an `Sfjs`, and that `Sfjs` is *smaller* - containing only a subset of the `Sfjs` functions. This is tricky, but this PR fixes it.

Here are the various situations:

1) I hit an exception page. The `Sfjs` from `exception.js` is loaded first. This adds the smaller `Sfjs`. Then the `base_js.html.twig` version is hit. Because `Sfjs` is missing the `loadToolbar()` method, that code DOES run again to reinitialize it.

2) I am on a normal page, then travel to an exception page with Turbo. In this case, the original `Sfjs` from `base_js.html.twig` was processed. Then, on the exception page, the `Sfjs` from `exception.js` is ignored, as is the 2nd execution of `base_js.html.twig`.

Overall, the JS could use some work for supporting things like Turbo (e.g. `DOMContentLoaded` doesn't work with Turbo, so the exception page JS is broken). But I wanted to focus on fixing the bug in this PR.

As a reminder, #41168 (avoiding overriding `Sfjs`) was done to help with the AJAX toolbar and Turbo - it's explained in point (1) on #41168.

Cheers!

Commits
-------

5fa42f11f3 Wrapping exception js in Sfjs check and also loading base_js Sfjs if needed
2021-05-21 08:36:22 +02:00
Ryan Weaver 5fa42f11f3 Wrapping exception js in Sfjs check and also loading base_js Sfjs if needed 2021-05-21 08:36:12 +02:00
Alexander M. Turek 68224c2b42 minor #41345 [FrameworkBundle] Return early (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Return early

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

Commits
-------

b6c8aa5b68 [FrameworkBundle] Return early
2021-05-20 22:46:30 +02:00
Alexander M. Turek b6c8aa5b68 [FrameworkBundle] Return early 2021-05-20 20:46:32 +02:00
Alexander M. Turek c995f1c814 minor #41333 doctrine/doctrine-bundle should not be a dep (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

doctrine/doctrine-bundle should not be a dep

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

Commits
-------

e006eaf26a doctrine/doctrine-bundle should not be a dep
2021-05-20 15:34:38 +02:00
Nicolas Grekas e006eaf26a doctrine/doctrine-bundle should not be a dep 2021-05-20 15:25:36 +02:00
Nicolas Grekas b6496ed6dc minor #41328 Improve .travis.yml (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Improve .travis.yml

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

Follow up of #41293

- For the highest branch (6.0 right now), when deps=high, the version before it is checked out (5.4) and tested with the locally patched components (6.0)
- For `*.4` branches, aka when the current branch version has not the same major version number as the next one, in addition to testing with the next major as deps (6.0 deps on patched-5.4), we also checkout the previous major and test it with the locally patched components (aka patched-5.4 deps on 4.4).

Commits
-------

2620da26dc Improve .travis.yml
2021-05-20 14:32:29 +02:00
Nicolas Grekas 2620da26dc Improve .travis.yml 2021-05-20 14:19:15 +02:00
Alexander M. Turek e955a1e2f0 minor #41297 Remove always-true requirement (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

Remove always-true requirement

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

This requirement is always true for our version constraint

Commits
-------

5783800e8f Remove always-true requirement
2021-05-19 23:08:14 +02:00
Jérémy Derussé 5783800e8f
Remove always-true requirement 2021-05-19 22:55:56 +02:00
Fabien Potencier 36238a4134 minor #41281 Add 5.3 in github PR template (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

Add 5.3 in github PR template

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

Right time now :)

Commits
-------

327014b104 Add 5.3 in github PR template
2021-05-19 15:46:28 +02:00
Jérémy Derussé 327014b104
Add 5.3 in github PR template 2021-05-19 14:57:42 +02:00
Fabien Potencier 4ce0b75ffa Bump Symfony version to 4.4.25 2021-05-19 14:20:36 +02:00
Fabien Potencier 854af7600a
Merge pull request #41278 from fabpot/release-4.4.24
released v4.4.24
2021-05-19 14:17:14 +02:00
Fabien Potencier 861b12724a Update VERSION for 4.4.24 2021-05-19 14:12:19 +02:00
Fabien Potencier 9df9107c70 Update CONTRIBUTORS for 4.4.24 2021-05-19 14:12:04 +02:00
Fabien Potencier 028cc4040a Update CHANGELOG for 4.4.24 2021-05-19 14:11:58 +02:00
Nicolas Grekas cbdb66a1d1 Merge branch '3.4' into 4.4
* 3.4:
  [Security\Core] Fix user enumeration via response body on invalid credentials
  Update VERSION for 3.4.48
  Update CHANGELOG for 3.4.48
2021-05-19 14:06:31 +02:00
Nicolas Grekas 1ad13fec2e security #cve-2021-21424 [Security\Core] Fix user enumeration via response body on invalid credentials (chalasr)
This PR was merged into the 3.4 branch.
2021-05-19 14:03:21 +02:00
Robin Chalas e85070088e [Security\Core] Fix user enumeration via response body on invalid credentials 2021-05-19 14:03:21 +02:00
Fabien Potencier 5f8035e121 minor #41261 [Security] Added missing translations for Serbian (sr_Latn) (AJ-computerrock)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Added missing translations for Serbian (sr_Latn)

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

Added 2 missing translations  for Serbian (sr_Latn).

Commits
-------

ce31fc3643 [Security] Added missing translations for Serbian (sr_Latn) #41066
2021-05-19 13:56:33 +02:00
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
Aleksandar Jakovljevic ce31fc3643 [Security] Added missing translations for Serbian (sr_Latn) #41066 2021-05-18 10:13:34 +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