Commit Graph

50688 Commits

Author SHA1 Message Date
Nicolas Grekas
65f2620bc4 Merge branch '4.4' into 5.1
* 4.4:
  fix merge
  Remove branch-version (keep them for contracts only)
  [HttpClient] relax auth bearer format requirements
  [PHPUnitBridge] Silence errors from mkdir()
  [DependencyInjection] Preload classes with union types correctly.
  [Serializer] fix decoding float XML attributes starting with 0
  add missing dutch translations
  Support PHPUnit 8 and PHPUnit 9 in constraint compatibility trait
  Add expectDeprecation, expectNotice, expectWarning, and expectError to TestCase polyfill
  Add missing exporter function for PHPUnit 7
  [Validator] Add missing romanian translations
  [Cache] Use correct expiry in ChainAdapter
  do not translate null placeholders or titles
2020-10-24 14:01:57 +02:00
Nicolas Grekas
2c4dff8461 fix merge 2020-10-24 13:56:22 +02:00
Nicolas Grekas
77aa17401d Merge branch '3.4' into 4.4
* 3.4:
  Remove branch-version (keep them for contracts only)
  [Serializer] fix decoding float XML attributes starting with 0
  add missing dutch translations
  [Validator] Add missing romanian translations
  do not translate null placeholders or titles
2020-10-24 13:50:19 +02:00
Nicolas Grekas
d152131452 minor #38704 Remove branch-version (keep them for contracts only) (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove branch-version (keep them for contracts only)

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

As advised by @Seldaek

Commits
-------

f8fe4bf9f5 Remove branch-version (keep them for contracts only)
2020-10-24 13:20:12 +02:00
Nicolas Grekas
f8fe4bf9f5 Remove branch-version (keep them for contracts only) 2020-10-24 12:57:07 +02:00
Nicolas Grekas
4abbb1d6a9 bug #38647 [HttpClient] relax auth bearer format requirements (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] relax auth bearer format requirements

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

Commits
-------

ac20594267 [HttpClient] relax auth bearer format requirements
2020-10-24 11:44:37 +02:00
Christian Flothmann
ac20594267 [HttpClient] relax auth bearer format requirements 2020-10-24 11:44:22 +02:00
Nicolas Grekas
3ebcd3b0ec minor #38702 [PHPUnitBridge] Silence warnings from mkdir() (Nyholm)
This PR was merged into the 4.4 branch.

Discussion
----------

[PHPUnitBridge] Silence warnings from mkdir()

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

When I run `./phpunit` the second time I get a warning thrown at me. I think we could silence this warning. If the directory cannot be created then we will get a similar warning from the `touch()` function.

```
 ./phpunit --exclude-group tty,benchmark,intl-data
#!/usr/bin/env php
PHP Warning:  mkdir(): File exists in /path/to/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php on line 44
PHP Stack trace:
PHP   1. {main}() /path/to/symfony/phpunit:0
PHP   2. require() /path/to/symfony/phpunit:31
PHP   3. require() /path/to/symfony/vendor/symfony/phpunit-bridge/bin/simple-phpunit:13
PHP   4. include() /path/to/symfony/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php:411
PHP   5. PHPUnit\TextUI\Command::main($exit = *uninitialized*) /path/to/symfony/.phpunit/phpunit-9.4-0/phpunit:22
PHP   6. Symfony\Bridge\PhpUnit\Legacy\CommandForV9->run($argv = *uninitialized*, $exit = *uninitialized*) /path/to/symfony/.phpunit/phpunit-9.4-0/src/TextUI/Command.php:101
PHP   7. Symfony\Bridge\PhpUnit\Legacy\CommandForV9->handleArguments($argv = *uninitialized*) /path/to/symfony/.phpunit/phpunit-9.4-0/src/TextUI/Command.php:116
PHP   8. PHPUnit\TextUI\XmlConfiguration\TestSuiteMapper->map($configuration = *uninitialized*, $filter = *uninitialized*) /U
```

Commits
-------

f3976ee5d8 [PHPUnitBridge] Silence errors from mkdir()
2020-10-24 11:35:09 +02:00
Nyholm
f3976ee5d8
[PHPUnitBridge] Silence errors from mkdir() 2020-10-24 10:20:26 +02:00
Fabien Potencier
bfa396d6bf bug #38699 [DependencyInjection] Preload classes with union types correctly (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Preload classes with union types correctly

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

Commits
-------

a7b0f16a56 [DependencyInjection] Preload classes with union types correctly.
2020-10-24 04:48:21 +02:00
Alexander M. Turek
a7b0f16a56 [DependencyInjection] Preload classes with union types correctly. 2020-10-23 19:57:28 +02:00
Fabien Potencier
85e8de6137 bug #38669 [Serializer] fix decoding float XML attributes starting with 0 (Marcin Kruk)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Serializer] fix decoding float XML attributes starting with 0

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

This is a naive approach to fix #38666, assuming it is something worth fixing.

I checked different cases and it seems to be fixing all of them, but I bet there will be some other edge cases which still won't be covered properly.

Commits
-------

97b4306c30 [Serializer] fix decoding float XML attributes starting with 0
2020-10-23 06:26:46 +02:00
Marcin Kruk
97b4306c30 [Serializer] fix decoding float XML attributes starting with 0 2020-10-23 06:26:38 +02:00
Fabien Potencier
9bfd3ee66e bug #38680 [PhpUnitBridge] Support new expect methods in test case polyfill (alcaeus)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Support new expect methods in test case polyfill

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| License       | MIT

This PR adds the `expectError`, `expectWarning`, `expectNotice`, ~and `expectDeprecation`~ methods to the test case polyfill.

~Note that I saw a `expectDeprecation` message in `ExpectDeprecationTrait`, but I couldn't quite figure out what it's supposed to do. Please let me know if the `expectDeprecation` method needs to be removed from the test polyfill.~

Commits
-------

8a49a263a2 Add expectDeprecation, expectNotice, expectWarning, and expectError to TestCase polyfill
2020-10-23 06:24:01 +02:00
Fabien Potencier
49182e1eeb bug #38681 [PHPUnitBridge] Support PHPUnit 8 and PHPUnit 9 in constraint compatibility trait (alcaeus)
This PR was merged into the 4.4 branch.

Discussion
----------

[PHPUnitBridge] Support PHPUnit 8 and PHPUnit 9 in constraint compatibility trait

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | not really
| New feature?  | yes
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License       | MIT

This expands the compatibility layer for PHPUnit constraints by supporting PHPUnit 8 and PHPUnit 9. Support for the latter requires also adding the `evaluate` method to the trait, as this method gets a signature change in PHPUnit 9.

Commits
-------

f79ad80009 Support PHPUnit 8 and PHPUnit 9 in constraint compatibility trait
2020-10-23 06:19:51 +02:00
Fabien Potencier
a623492aab bug #38686 [TwigBridge] Remove "transchoice" from the code base (nicolas-grekas)
This PR was merged into the 5.1 branch.

Discussion
----------

[TwigBridge] Remove "transchoice" from the code base

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

Commits
-------

713c2623e5 [TwigBridge] Remove "transchoice" from the code base
2020-10-23 06:15:15 +02:00
Fabien Potencier
81d29f3fd0 minor #38687 [Validator] adds missing dutch translations to validator component (zghosts)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] adds missing dutch translations to validator component

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| License       | MIT
[Validator] This PR adds some missing dutch translations to the validator component

Commits
-------

02a8ca39f4 add missing dutch translations
2020-10-23 06:12:28 +02:00
Jos Elstgeest
02a8ca39f4 add missing dutch translations 2020-10-22 22:50:11 +02:00
Nicolas Grekas
713c2623e5 [TwigBridge] Remove "transchoice" from the code base 2020-10-22 20:37:20 +02:00
Nyholm
310926fa88
bug #38678 [String] fix before/after[Last]() returning the empty string instead of the original one on non-match (nicolas-grekas)
This PR was merged into the 5.1 branch.

Discussion
----------

[String] fix before/after[Last]() returning the empty string instead of the original one on non-match

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

The current behavior is the least useful one. Returning the original string when no match is found is the most sensible behavior. It saves code instead of requiring more.

Typical example is when removing a potential suffix:
`$bar = $foo->beforeLast(['.svg', '.png']);` should remove any of these extensions if found, and return the original string otherwise.

Commits
-------

22a2740888 [String] fix before/after[Last]() returning the empty string instead of the original one on non-match
2020-10-22 19:01:40 +02:00
Fabien Potencier
5c98c75170 minor #38673 [Validator] Add missing romanian translations (marmichalski)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add missing romanian translations

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

This PR adds missing romanian validator translations.

Commits
-------

ced43e1ec2 [Validator] Add missing romanian translations
2020-10-22 15:52:29 +02:00
Alexander M. Turek
e5faa29c5e bug #38679 [PhpUnitBridge] Add missing exporter function for PHPUnit 7 (alcaeus)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Add missing exporter function for PHPUnit 7

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License       | MIT

This adds a missing `exporter` function to the compatibility trait for PHPUnit constraints. This method is still required for PhpUnit 7.

Commits
-------

52e7d78dca Add missing exporter function for PHPUnit 7
2020-10-22 15:51:15 +02:00
Andreas Braun
f79ad80009
Support PHPUnit 8 and PHPUnit 9 in constraint compatibility trait 2020-10-22 14:29:45 +02:00
Andreas Braun
8a49a263a2
Add expectDeprecation, expectNotice, expectWarning, and expectError to TestCase polyfill 2020-10-22 14:28:16 +02:00
Nicolas Grekas
22a2740888 [String] fix before/after[Last]() returning the empty string instead of the original one on non-match 2020-10-22 14:08:44 +02:00
Andreas Braun
52e7d78dca
Add missing exporter function for PHPUnit 7 2020-10-22 14:02:19 +02:00
Marcin Michalski
ced43e1ec2 [Validator] Add missing romanian translations 2020-10-22 08:30:04 +02:00
Alexander M. Turek
29684ac38c bug #38659 [String] fix slicing in UnicodeString (nicolas-grekas)
This PR was merged into the 5.1 branch.

Discussion
----------

[String] fix slicing in UnicodeString

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

Spotted while reviewing https://github.com/symfony/polyfill/pull/297

Commits
-------

d31ac74c03 [String] fix slicing in UnicodeString
2020-10-21 16:55:37 +02:00
Nicolas Grekas
d31ac74c03 [String] fix slicing in UnicodeString 2020-10-21 15:57:40 +02:00
Fabien Potencier
1eead3f2af bug #38595 [TwigBridge] do not translate null placeholders or titles (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] do not translate null placeholders or titles

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

Commits
-------

2ee24a0592 do not translate null placeholders or titles
2020-10-21 11:42:21 +02:00
Nicolas Grekas
5a4be6841d bug #38635 [Cache] Use correct expiry in ChainAdapter (Nyholm)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Cache] Use correct expiry in ChainAdapter

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

When we are syncing the chain, Let's use expiry if we have it. If not, fallback to defaultLifetime.

TODO:
- [x] Add tests

Commits
-------

17e0167798 [Cache] Use correct expiry in ChainAdapter
2020-10-21 11:34:34 +02:00
Nyholm
17e0167798 [Cache] Use correct expiry in ChainAdapter 2020-10-21 11:34:26 +02:00
Fabien Potencier
baf8c2355f Merge branch '4.4' into 5.1
* 4.4:
  [Filesystem] Check if failed unlink was caused by permission denied
  fix APCu installation for the nightly build job
  skip Vulcain-based tests if the binary cannot be executed
2020-10-21 06:47:05 +02:00
Fabien Potencier
19637c5de3 Merge branch '3.4' into 4.4
* 3.4:
  [Filesystem] Check if failed unlink was caused by permission denied
2020-10-21 06:38:54 +02:00
Fabien Potencier
3ff93848cd bug #38652 [Filesystem] Check if failed unlink was caused by permission denied (Nyholm)
This PR was submitted for the 4.4 branch but it was squashed and merged into the 3.4 branch instead.

Discussion
----------

[Filesystem] Check if failed unlink was caused by permission denied

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

Check why we failed to unlink the file. If the file was missing, then no exception should be thrown. However, if we failed to unlink it because of permissions, we should throw an exception.

Commits
-------

1cde6ca03f [Filesystem] Check if failed unlink was caused by permission denied
2020-10-21 06:37:34 +02:00
Nyholm
1cde6ca03f [Filesystem] Check if failed unlink was caused by permission denied 2020-10-21 06:37:26 +02:00
Fabien Potencier
45e53fb5c5 minor #38648 fix APCu installation for the nightly build job (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

fix APCu installation for the nightly build job

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

Commits
-------

53434c2bec fix APCu installation for the nightly build job
2020-10-21 06:33:56 +02:00
Christian Flothmann
53434c2bec fix APCu installation for the nightly build job 2020-10-21 06:33:43 +02:00
Nyholm
e731e37109
minor #38649 [HttpClient] skip Vulcain-based tests if the binary cannot be executed (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] skip Vulcain-based tests if the binary cannot be executed

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

Commits
-------

fa265c2ee4 skip Vulcain-based tests if the binary cannot be executed
2020-10-21 00:16:26 +02:00
Alexander M. Turek
1c6380f333 Merge branch '4.4' into 5.1 2020-10-20 22:28:16 +02:00
Fabien Potencier
aafad690de bug #38645 [PropertyAccess] forward the caught exception (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[PropertyAccess] forward the caught exception

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

Commits
-------

143f82ef8e forward the caught exception
2020-10-20 19:18:02 +02:00
Alexander M. Turek
b2821ec471 minor #38646 Refractor AbstractBrowserTest to assertSame (alexander-schranz)
This PR was merged into the 4.4 branch.

Discussion
----------

Refractor AbstractBrowserTest to assertSame

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #...instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

As mentioned by @nicolas-grekas at https://github.com/symfony/symfony/pull/38596#discussion_r508461764 the AbstractBrowserTest should be refractored to use `assertSame` instead of `assertEquals` to compare string.

Commits
-------

3f320c8d51 Refractor AbstractBrowserTest to assertSame
2020-10-20 17:41:28 +02:00
Christian Flothmann
fa265c2ee4 skip Vulcain-based tests if the binary cannot be executed 2020-10-20 15:38:40 +02:00
Alexander Schranz
3f320c8d51 Refractor AbstractBrowserTest to assertSame 2020-10-20 14:41:53 +02:00
Christian Flothmann
143f82ef8e forward the caught exception 2020-10-20 14:40:03 +02:00
Nicolas Grekas
c8c227f43f Merge branch '3.4' into 4.4
* 3.4:
  [Form] Sync translations
  Added dutch translations for new invalid messages
  Don't skip Doctrine tests on php 8.
  Bump APCu to 5.1.19 on Travis.
  [WebProfilerBundle] Hide debug toolbar in print view
  indexBy does not refer to attributes, but to column names
  Fix Reflection file name with eval()\'d code
  [HttpFoundation] Fix Range Requests
2020-10-20 13:58:22 +02:00
Fabien Potencier
5578239608 Merge branch '4.4' into 5.1
* 4.4:
  Don't skip Doctrine tests on php 8.
  Stop using set-env in GitHub actions.
  Bump igbinary to v3.1.6
  Add myself to CODEOWNERS for Form, OptionsResolver and TwigBundle
  Reference the correct interface in the RegistryInterface deprecation in upgrade notes
  Add myself to CODEOWNERS for Security and Console
  Add wouterj as codeowner for Security related packages
2020-10-20 08:22:32 +02:00
Fabien Potencier
3ed5ec0aab minor #38638 [Form] Sync translations (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Sync translations

| 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 -->
| Tickets       | n/a<!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

280a27fc16 [Form] Sync translations
2020-10-20 08:17:17 +02:00
Fabien Potencier
280a27fc16 [Form] Sync translations 2020-10-20 08:12:23 +02:00
Wouter de Jong
697fe21f24 Added dutch translations for new invalid messages 2020-10-20 08:10:02 +02:00