Commit Graph

41122 Commits

Author SHA1 Message Date
Alexander M. Turek
2081035295 Merge branch '4.4' into 5.1 2020-11-05 20:04:46 +01:00
Robin Chalas
75f8ac1e9b bug #38991 [Console] Fix ANSI when stdErr is not a tty (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Fix ANSI when stdErr is not a tty

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

Taking the @wouterj 's comment into account (https://github.com/symfony/symfony/issues/38981#issuecomment-721915428)

This PR prevents using the same Formatter for stdOut and stdErr when possible.

When user send a custom formatter (or call `setFormatter`) the previous logic is kept.
Otherwise, symfony is asked to create the Formatter, and thus is able to clone the formatter.

In a future PR targeting 5.3, we could improve the constructor to let people inject 2 distinguished formatters

Commits
-------

f3a398b5af Fix ANSI when stdErr is not a tty
2020-11-05 16:22:05 +01:00
Nicolas Grekas
61b3872b65 bug #38980 [DependencyInjection] Fix circular reference with Factory + Lazy Iterrator (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Fix circular reference with Factory + Lazy Iterrator

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

The issue, occurs when a `factory` iterates over services (think tagged iterator) that also need the `factory`.
The PhpDumper is not able to detect the loop because the TaggedService iterator is flaged as "lazy" which is ignored in the loop detection. 2d7e0b02c6/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php (L474-L476)

See test case for a reproduce case.

This PR takes into account lazy services when computing loops.

I'm not sure this is the right thing to do /cc @nicolas-grekas .
A better solution could be to do this ONLY when the service is used as a factory?

Commits
-------

51ff060603 Fix circular referene with Factory and LazyIterator
2020-11-05 12:51:33 +01:00
Jérémy Derussé
f3a398b5af
Fix ANSI when stdErr is not a tty 2020-11-05 10:51:39 +01:00
Alexander M. Turek
60e506835a [Security] Fix docblock. 2020-11-05 00:24:50 +01:00
Jérémy Derussé
51ff060603
Fix circular referene with Factory and LazyIterator 2020-11-04 15:21:44 +01:00
Nicolas Grekas
ff7ffdf22a bug #38977 [HttpClient] Check status code before decoding content in TraceableResponse (chalasr)
This PR was merged into the 5.1 branch.

Discussion
----------

[HttpClient] Check status code before decoding content in TraceableResponse

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

Using `toArray()` on the response of a traceable client, the status code is currently checked after json decoding, which leads to `JsonException` being thrown instead of `ClientException`.
It should be the opposite, as for non-traceable responses.

Commits
-------

e5595dae73 [HttpClient] Check status code before decoding content in TraceableResponse
2020-11-03 21:22:18 +01:00
Robin Chalas
e5595dae73 [HttpClient] Check status code before decoding content in TraceableResponse 2020-11-03 21:20:54 +01:00
Thomas Lallement
3dd385f319
Rename security.pt_PT.xlf to security.pt.xlf 2020-11-03 17:58:31 +01:00
Nicolas Grekas
4541862a12 Merge branch '4.4' into 5.1
* 4.4:
  fix typo
2020-11-03 13:14:22 +01:00
Nicolas Grekas
6fe261a7ae fix typo 2020-11-03 13:14:11 +01:00
Nicolas Grekas
298422c844 Merge branch '4.4' into 5.1
* 4.4:
  [PhpUnitBridge] fix replaying skipped tests
  Switch nightly run to 8.0snapshot
2020-11-03 12:59:17 +01:00
Nicolas Grekas
703497dccf bug #38971 [PhpUnitBridge] fix replaying skipped tests (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] fix replaying skipped tests

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

Spotted while working on https://github.com/symfony/polyfill/pull/310

See also https://3v4l.org/D6Gro for the newly skipped tests in symfony/intl

Commits
-------

849d1b3845 [PhpUnitBridge] fix replaying skipped tests
2020-11-03 12:57:46 +01:00
Nicolas Grekas
849d1b3845 [PhpUnitBridge] fix replaying skipped tests 2020-11-03 12:50:26 +01:00
Nicolas Grekas
f0d9eeb257 Merge branch '4.4' into 5.1
* 4.4:
  [HttpKernel] fix merge
2020-11-02 17:09:08 +01:00
Nicolas Grekas
76c19393c8 [HttpKernel] fix merge 2020-11-02 17:06:19 +01:00
Nicolas Grekas
aae9211e7c Merge branch '4.4' into 5.1
* 4.4:
  [Process] Dont test TTY if there is no TTY support
  Fixing some Mongolian
  translating the validators for european portuguese language
  Fix CI
  Update validators.he.xlf
  Update security.he.xlf
  Update validators.he.xlf
  Improve performances in CircualReference detection
  [PHPUnitBridge] Fixed crash on Windows with PHP 8
  Fix session called initized several time
2020-11-02 16:45:32 +01:00
Nicolas Grekas
5831ab2b62 bug #38910 [HttpKernel] Fix session initialized several times (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] Fix session initialized several times

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

The session injected in the request is a factory. When the request is **cloned** (ie sub-request) while the session is not yet used in the master request (the session is still a factory), both Master and Sub request will have a factory.
If both requests attempt to read the session afterward, they both triggers the factory, and both initialize the session.

It's not a dead end for the `SessionListener` because the session come from the container and is shared, but:
- the session is initialized ($storage->setOptions(['cookie_secure' => true])) twice
- if we replace the sesssion from container to a factory, it could be an issue

Commits
-------

30a3c7c87b Fix session called initized several time
2020-11-02 16:36:10 +01:00
Nicolas Grekas
8375eeef67 bug #38882 [DependencyInjection] Improve performances in CircualReference detection (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Improve performances in CircualReference detection

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

This PR change the way circular references are detected.  And improve the project submitted in #37850 [by **86%**](https://blackfire.io/profiles/compare/cc4aa41d-5b63-4caa-9a1b-fc282dc5d64a/graph) (Build the container in 1.1 sec instead of 10)

Issue is: When a project contains a lot Circular Reference, the Dumper [spend a lot of time](https://blackfire.io/profiles/54f6eba2-b93c-4f2b-a268-1e58883faecb/graph) in merging those circular references.
note: a circular reference is not an issue when an service is not injected by constructor, but this Can not be known until all references are resolved (performed previously by connectCircularReferences)

This PR removed the connectCircularReferences and generate a flatten tree of dependencies:
 - the key is the service ID
 - the value is the list of direct **AND** indirect dependency + path to join the dependency

I also [benched the PR with a project with few references](https://blackfire.io/profiles/compare/2f9902e6-3347-40b3-8421-e1fd09c067d2/graph) and result are almost the same before/after.

Commits
-------

d4db75692b Improve performances in CircualReference detection
2020-11-02 16:10:49 +01:00
Nicolas Grekas
ed217a1435 bug #38950 [Process] Dont test TTY if there is no TTY support (Nyholm)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Process] Dont test TTY if there is no TTY support

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

Commits
-------

e918e5ab30 [Process] Dont test TTY if there is no TTY support
2020-11-02 16:10:23 +01:00
Nyholm
e918e5ab30 [Process] Dont test TTY if there is no TTY support 2020-11-02 16:10:16 +01:00
Nicolas Grekas
ca9ef822cf bug #38921 [PHPUnitBridge] Fixed crash on Windows with PHP 8 (villfa)
This PR was merged into the 4.4 branch.

Discussion
----------

[PHPUnitBridge] Fixed crash on Windows with PHP 8

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

The install command crashed with the message "The filename, directory name, or volume label syntax is incorrect.".
It happens only on Windows with PHP 8.

Probably due to https://github.com/php/php-src/blob/PHP-8.0/UPGRADING#L1121-L1123

I have a small repo to show the problem and how it is fixed: https://github.com/villfa/test-phpunit-bridge

Commits
-------

4b958917fd [PHPUnitBridge] Fixed crash on Windows with PHP 8
2020-11-02 16:07:32 +01:00
Nicolas Grekas
cd53800026 minor #38917 Fixing some Mongolian (Nyholm)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Fixing some Mongolian

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

Hey @luffy1727, could you help me with the last two strings here?

Commits
-------

5c848d9796 Fixing some Mongolian
2020-11-02 16:02:38 +01:00
Nyholm
5c848d9796 Fixing some Mongolian 2020-11-02 16:02:29 +01:00
Bruno Araujo
c0524197a0 translating the validators for european portuguese language 2020-11-02 16:00:21 +01:00
Ben Hakim
b99977efce
Update validators.he.xlf 2020-11-02 16:11:24 +02:00
Alexander M. Turek
ba7c60b745 minor #38961 Update validators.he.xlf (ben29)
This PR was merged into the 4.4 branch.

Discussion
----------

Update validators.he.xlf

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

Commits
-------

98a7e8e150 Update validators.he.xlf
2020-11-02 15:00:41 +01:00
Ben Hakim
c8ab10f427
Update security.he.xlf 2020-11-02 15:41:03 +02:00
Ben Hakim
98a7e8e150
Update validators.he.xlf 2020-11-02 15:36:19 +02:00
Alexander M. Turek
8d964bda5b Merge branch '4.4' into 5.1 2020-11-02 08:55:38 +01:00
Fabien Potencier
08da13391f minor #38932 [Validator] Merge RecursiveValidatorTest with its parents (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Merge RecursiveValidatorTest with its parents

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

`RecursiveValidatorTest` as two abstract parent classes that to my understanding exist mainly for historic reasons: We used to have different validator implementations and those abstract classes contained some shared test cases. This is not the case anymore, which leaves `RecursiveValidatorTest` as the only child class of those two abstract classes.

This PR suggests to merge the three classes into one.

I've executed the test suite before and after the change and PHPUnit reported the same number of assertions and test cases.

I've also checked how the merge to 5.1 and 5.x would look like. The merge to 5.1 works without conflicts. From 5.1 to 5.x, two additional test cases have to be moved down and the reference to a few fixture classes needs to be adjusted.

Commits
-------

6822774d37 [Validator] Merge RecursiveValidatorTest with its parents.
2020-11-02 07:49:36 +01:00
Fabien Potencier
5c3781ae18 minor #38945 [Finder] Force set access time in test (Nyholm)
This PR was merged into the 4.4 branch.

Discussion
----------

[Finder] Force set access time in test

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no, it only updates the tests
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #38942
| License       | MIT
| Doc PR        |

OSX don't really update atime (access time). They claim it is because performance reasons. So this PR will update the test to make PHP force access time on a file.

The different runs of `testAccept` depends on each other because each test modifies the filesystem a bit. That is why I added the extra `sleep(1)`.

Commits
-------

c5ec51abdf [Finder] Force set access time in test
2020-11-02 07:48:36 +01:00
Fabien Potencier
20306a23bf minor #38911 Fix transiant tests in 4.4 (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix transiant tests in 4.4

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

I noticed this week 2 currencies of this failure. in both case the `METADATA_EXPIRY` were 1.5 sec under the expected value

Commits
-------

833029ca7e Fix transiant tests in 4.4
2020-11-02 07:46:39 +01:00
Alexander M. Turek
7c319be805 minor #38953 [Form] Add missing Azerbaijani translation (seferov)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Form] Add missing Azerbaijani translation

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Part of #38725 and #38710
| License       | MIT
| Doc PR        | N/A

Commits
-------

142cfeed55 [Form] Add missing Azerbaijani translation
2020-11-02 01:33:19 +01:00
Farhad Safarov
142cfeed55 [Form] Add missing Azerbaijani translation 2020-11-02 01:33:09 +01:00
Alexander M. Turek
8bc1c76308 minor #38952 [Security] Add missing Azerbaijani translation (seferov)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Add missing Azerbaijani translation

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Part of #38725 and #38710
| License       | MIT
| Doc PR        | N/A

Commits
-------

665b25cd1e [Security] Add missing Azerbaijani translations
2020-11-02 01:32:18 +01:00
Alexander M. Turek
6576fea4bf minor #38951 [Validator] Add missing Azerbaijani translation (seferov)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Add missing Azerbaijani translation

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Part of #38725 and #38710
| License       | MIT
| Doc PR        | N/A

Commits
-------

317f17a2f3 [Validator] Add missing Azerbaijani translation
2020-11-02 01:31:27 +01:00
Alexander M. Turek
8898c0f3b6 minor #38955 Missing translations for Catalan (ca) (rogerguasch)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Missing translations for Catalan (ca)

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #38731
| 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 5.x.
-->

Commits
-------

6efa4ed777 Missing translations for Catalan (ca)
2020-11-02 00:26:16 +01:00
Roger Guasch
6efa4ed777 Missing translations for Catalan (ca) 2020-11-02 00:26:09 +01:00
Alexander M. Turek
61f715fbbc minor #38924 fix: updating translation issues (hugovms)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

fix: updating translation issues

| Q             | A
| ------------- | ---
| Branch?       | 5.x for features / 4.4 or 5.1 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 #", no need to create an issue if none exist, explain below instead -->
| 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 5.x.
-->

Commits
-------

b39ff818ca fix: updating translation issues
2020-11-02 00:24:41 +01:00
hugovms
b39ff818ca fix: updating translation issues 2020-11-02 00:24:32 +01:00
Jérémy Derussé
833029ca7e
Fix transiant tests in 4.4 2020-11-01 22:34:37 +01:00
Farhad Safarov
665b25cd1e [Security] Add missing Azerbaijani translations 2020-11-01 23:48:39 +03:00
Farhad Safarov
317f17a2f3 [Validator] Add missing Azerbaijani translation 2020-11-01 22:40:44 +03:00
Alexander M. Turek
e68da40f56 Merge branch '4.4' into 5.1 2020-11-01 20:20:14 +01:00
Nyholm
c5ec51abdf
[Finder] Force set access time in test 2020-11-01 20:04:13 +01:00
Nyholm
c377f73304 [Messenger] Fixed tests with doctrine 3 2020-11-01 20:02:47 +01:00
Alexander M. Turek
3a8570e569 Add symfony/translation to the dev dependencies of symfony/security. 2020-11-01 19:34:19 +01:00
Fabien Potencier
7539597bbd Merge branch '4.4' into 5.1
* 4.4:
  Validate XLIFF files in tests using the XSD
2020-11-01 18:42:02 +01:00
Fabien Potencier
9947e14c11 minor #38939 Validate XLIFF files in tests using the XSD (wouterj)
This PR was merged into the 4.4 branch.

Discussion
----------

Validate XLIFF files in tests using the XSD

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

The current tests only validated that the Xliff files were valid XML. This improves it to also validate the Xliff files against the correct XSD. This will avoid issues like https://github.com/symfony/symfony/issues/38935 in the future.

cc @Nyholm

Commits
-------

17dfa1d5fc Validate XLIFF files in tests using the XSD
2020-11-01 18:35:28 +01:00