Commit Graph

49871 Commits

Author SHA1 Message Date
Niklas Keller bf2d1cf6e7 Improve pause handler 2020-08-26 12:30:57 +02:00
Nicolas Grekas ba4d57bb5f Merge branch '5.1'
* 5.1:
  [Cache] fix merge
2020-07-13 11:17:24 +02:00
Nicolas Grekas 85da081614 [Cache] fix merge 2020-07-13 11:17:19 +02:00
Nicolas Grekas d8338dc358 minor #36799 Remove some magic from TypeValidator logic and OptionsResolver type verify logic (drealecs)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

Remove some magic from TypeValidator logic and OptionsResolver type verify logic

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

Following discussion on https://twitter.com/Ocramius/status/1260236117129015297
The changes in this PR could ensure that types that can be verified by the TypeValidator is limited and there is no way to magically use it.
For example you can break it by defining you own function like:
```php
function is_usercollection {
    return true;
}
```
that will validate any value that have the validator type as 'UserCollection'.

Another example would be defining `is_lower` or `ctype_int` that would also break the implementation.

Commits
-------

e8c9049a5a Remove some magic from TypeValidator logic and OptionsResolver type verify logic
2020-07-13 11:15:52 +02:00
Alexandru Patranescu e8c9049a5a Remove some magic from TypeValidator logic and OptionsResolver type verify logic 2020-07-13 11:15:37 +02:00
Nicolas Grekas ef19a03b2b Merge branch '5.1'
* 5.1:
  [Cache] Use the default expiry when saving (not when creating) items
  Fix typo
  Fix DBAL deprecation
  [Form] Fix ChoiceType translation domain
  Add Tagalog translations for new form messages
  [Form] Add missing vietnamese translations
  sync translations from master
  [OptionsResolver] Fix force prepend normalizer
  add vietnamese translation for html5 color validation
2020-07-12 14:58:15 +02:00
Nicolas Grekas c87847c361 Merge branch '5.0' into 5.1
* 5.0:
  [Cache] Use the default expiry when saving (not when creating) items
  Fix typo
  Fix DBAL deprecation
  [Form] Fix ChoiceType translation domain
  Add Tagalog translations for new form messages
  [Form] Add missing vietnamese translations
  sync translations from master
  [OptionsResolver] Fix force prepend normalizer
  add vietnamese translation for html5 color validation
2020-07-12 14:58:00 +02:00
Nicolas Grekas afd9760357 Merge branch '4.4' into 5.0
* 4.4:
  [Cache] Use the default expiry when saving (not when creating) items
  Fix typo
  Fix DBAL deprecation
  [Form] Fix ChoiceType translation domain
  Add Tagalog translations for new form messages
  [Form] Add missing vietnamese translations
  sync translations from master
  [OptionsResolver] Fix force prepend normalizer
  add vietnamese translation for html5 color validation
2020-07-12 14:51:51 +02:00
Nicolas Grekas 701161eb40 Merge branch '3.4' into 4.4
* 3.4:
  [Cache] Use the default expiry when saving (not when creating) items
2020-07-12 14:49:36 +02:00
Nicolas Grekas a397c490b0 bug #37562 [Cache] Use the default expiry when saving (not when creating) items (philipp-kolesnikov)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] Use the default expiry when saving (not when creating) items

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

This PR is for align expiration handling in ChainAdapter with ChainCache as proposed in #37263.

Commits
-------

49e9f3229c [Cache] Use the default expiry when saving (not when creating) items
2020-07-12 14:39:01 +02:00
Philipp Kolesnikov 49e9f3229c [Cache] Use the default expiry when saving (not when creating) items 2020-07-12 14:37:39 +02:00
Nicolas Grekas 0db52e106d Merge branch '3.4' into 4.4
* 3.4:
  Fix typo
2020-07-12 13:20:48 +02:00
Nicolas Grekas adc79e3035 Fix typo 2020-07-12 13:20:43 +02:00
Nicolas Grekas c4e47fdd65 Merge branch '3.4' into 4.4
* 3.4:
  Fix DBAL deprecation
  [Form] Fix ChoiceType translation domain
  Add Tagalog translations for new form messages
  [Form] Add missing vietnamese translations
  sync translations from master
  add vietnamese translation for html5 color validation
2020-07-12 12:34:29 +02:00
Nicolas Grekas 3ae61ec22c bug #37563 Fix DBAL deprecation (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix DBAL deprecation

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

Follows https://github.com/doctrine/dbal/pull/4163

Commits
-------

4273aedfae Fix DBAL deprecation
2020-07-12 12:25:53 +02:00
Nicolas Grekas 4273aedfae Fix DBAL deprecation 2020-07-12 12:21:23 +02:00
Nicolas Grekas a56f6482a5 bug #37521 [Form] Fix ChoiceType translation domain (VincentLanglet)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Form] Fix ChoiceType translation domain

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

When using
```
->add('foo', ChoiceType::class, [
    'label'       => 'label',
    'translation_domain' => false,
    'choices'     => [
        'choice.no'  => false,
        'choice.yes' => true,
    ],
    'choice_translation_domain' => 'messages',
    'expanded'    => true,
    'required'    => false,
    'placeholder' => false,
]);
```

I discovered that the choices was not translated.

Seems like it's because the subForm is using the `translation_domain` instead of the `choice_translation_domain`.

Commits
-------

2effda79ea [Form] Fix ChoiceType translation domain
2020-07-12 11:52:47 +02:00
Vincent Langlet 2effda79ea [Form] Fix ChoiceType translation domain 2020-07-12 11:52:40 +02:00
Nicolas Grekas a10ff4cb00 bug #37550 [OptionsResolver] Fix force prepend normalizer (hason)
This PR was merged into the 4.4 branch.

Discussion
----------

[OptionsResolver] Fix force prepend normalizer

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

Commits
-------

6eb836b6f9 [OptionsResolver] Fix force prepend normalizer
2020-07-12 11:44:05 +02:00
Nicolas Grekas ae91683ba4 minor #37552 [Form] sync translations from master (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] sync translations from master

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

Commits
-------

acea9be6d3 sync translations from master
2020-07-12 11:42:44 +02:00
Nicolas Grekas d705b21def minor #37555 Add Tagalog translations for new form messages (ocrampete16)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

Add Tagalog translations for new form messages

| 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       |
| License       | MIT
| Doc PR        |

This PR adds Tagalog translations for the new form messages @xabbuh added in https://github.com/symfony/symfony/pull/37552.

~~As I'm not aware of any Filipinos that regularly review Symfony pull requests, I'm going to ask my mother to proof-read this first before I remove the "WIP" label from the title. :)~~

Commits
-------

1809b7c5eb Add Tagalog translations for new form messages
2020-07-12 11:42:01 +02:00
Marco Petersen 1809b7c5eb Add Tagalog translations for new form messages 2020-07-12 11:41:55 +02:00
Nicolas Grekas bff7dfc4df minor #37557 [Form] Add missing vietnamese translations (jschaedl)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Form] Add missing vietnamese 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       | - <!-- 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 -->
<!--
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
-------

68e2b34a9f [Form] Add missing vietnamese translations
2020-07-12 11:41:15 +02:00
Jan Schädlich 68e2b34a9f [Form] Add missing vietnamese translations 2020-07-12 11:41:09 +02:00
Fabien Potencier 63f8827cf0 feature #36178 [Mime] allow non-ASCII characters in local part of email (dmaicher)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Mime] allow non-ASCII characters in local part of email

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/34932
| License       | MIT
| Doc PR        | -

This fixes https://github.com/symfony/symfony/issues/34932 by allowing non-ASCII characters in the local part of emails.

I tried this using 3 different smtp servers (gmail, mailgun and local postfix) and for me this just works in case there are non-ASCII characters in the local part of emails. Emails are correctly delivered.

PHPMailer does this in the same way: https://github.com/PHPMailer/PHPMailer/blob/master/src/PHPMailer.php#L1411

This is also in line with the behavior of Swiftmailer (< 6.1) **before** this commit that introduced the `IdnAddressEncoder`: 6a87efd39b (diff-e5f85d26733017e183b2633ae3c433f0R31)

I'm not an expert when it comes to SMTP and all the different RFCs out there 😕 But for me this exception seems not needed.

Maybe @c960657 can help here?

Commits
-------

d057dffcd6 [Mime] allow non-ASCII characters in local part of email
2020-07-10 18:20:57 +02:00
Christian Flothmann acea9be6d3 sync translations from master 2020-07-10 16:23:16 +02:00
Christian Flothmann dfc32678c1 feature #30931 [Form] Improve invalid messages for form types (hiddewie)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Form] Improve invalid messages for form types

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #27142, #5946
| License       | MIT
| Doc PR        | TODO

This merge request is a continuation of https://github.com/symfony/symfony/pull/27142.

Changes done here:

* rebased on master
* made the error messages friendlier

Commits
-------

8728927a22 Improve invalid messages for form types
2020-07-10 16:13:16 +02:00
Hidde Wieringa 8728927a22 Improve invalid messages for form types 2020-07-10 11:35:53 +02:00
Martin Hasoň 6eb836b6f9 [OptionsResolver] Fix force prepend normalizer 2020-07-10 11:12:14 +02:00
Christian Flothmann 44226b378a Merge branch '5.1'
* 5.1:
  fix PropertyAccess version constraints
2020-07-10 10:14:54 +02:00
Christian Flothmann 5a84bae822 Merge branch '5.0' into 5.1
* 5.0:
  fix PropertyAccess version constraints
2020-07-10 10:14:24 +02:00
Christian Flothmann 16b5e8a203 Merge branch '4.4' into 5.0
* 4.4:
  fix PropertyAccess version constraints
2020-07-10 10:13:40 +02:00
Christian Flothmann 73cb33a54e minor #37549 [Form] fix tests (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] fix tests

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

Commits
-------

6fa19242ed fix PropertyAccess version constraints
2020-07-10 10:12:17 +02:00
Christian Flothmann 6fa19242ed fix PropertyAccess version constraints 2020-07-10 10:02:08 +02:00
Fabien Potencier 2e7b9938c9 minor #37548 [Form] Add vietnamese translation for html5 color validation (jschaedl)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Add vietnamese translation for html5 color validation

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

89314b5992 add vietnamese translation for html5 color validation
2020-07-10 09:08:56 +02:00
Jan Schädlich 89314b5992 add vietnamese translation for html5 color validation 2020-07-10 08:36:00 +02:00
Nicolas Grekas be81e3d513 Merge branch '5.1'
* 5.1:
  cs fix
  add german translation of the html5 color validation
  Fix PHP 8 deprecations
  ensure compatibility with PHP 8 stack traces
  clean up HHVM instructions
  sync translations from master branch
  silently ignore uninitialized properties when mapping data to forms
2020-07-09 18:48:43 +02:00
Nicolas Grekas 8ecd0c9040 Merge branch '5.0' into 5.1
* 5.0:
  cs fix
  add german translation of the html5 color validation
  Fix PHP 8 deprecations
  ensure compatibility with PHP 8 stack traces
  clean up HHVM instructions
  sync translations from master branch
  silently ignore uninitialized properties when mapping data to forms
2020-07-09 18:47:40 +02:00
Nicolas Grekas 6e59119f81 Merge branch '4.4' into 5.0
* 4.4:
  cs fix
  add german translation of the html5 color validation
  Fix PHP 8 deprecations
  ensure compatibility with PHP 8 stack traces
  clean up HHVM instructions
  sync translations from master branch
  silently ignore uninitialized properties when mapping data to forms
2020-07-09 18:47:28 +02:00
Nicolas Grekas ecb5f7c875 Merge branch '3.4' into 4.4
* 3.4:
  cs fix
  add german translation of the html5 color validation
  sync translations from master branch
  silently ignore uninitialized properties when mapping data to forms
2020-07-09 18:43:26 +02:00
Christian Flothmann 8314762882 Merge branch '5.1'
* 5.1:
  consider traits imported in parent classes
2020-07-09 18:42:07 +02:00
Nicolas Grekas 6bfdb92736 bug #37520 [Form] silently ignore uninitialized properties when mapping data to forms (ph-fritsche)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] silently ignore uninitialized properties when mapping data to forms

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

Commits
-------

b4616c810c silently ignore uninitialized properties when mapping data to forms
2020-07-09 18:41:59 +02:00
Nicolas Grekas 87e28f77b9 minor #37524 [Form] sync translations from master branch (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] sync translations from master branch

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

Commits
-------

d962202c5f sync translations from master branch
2020-07-09 18:41:07 +02:00
Nicolas Grekas 3a4303d303 cs fix 2020-07-09 18:40:43 +02:00
Nicolas Grekas 2b18acc8af bug #37543 [PhpUnitBridge] consider traits imported in parent classes (xabbuh)
This PR was merged into the 5.1 branch.

Discussion
----------

[PhpUnitBridge] consider traits imported in parent classes

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

A public method declared in a trait can be used by a class without
importing the trait itself when the trait is already imported by one
of the parent classes from the inheritance chain.

Commits
-------

eac6369db7 consider traits imported in parent classes
2020-07-09 18:35:35 +02:00
Christian Flothmann eac6369db7 consider traits imported in parent classes
A public method declared in a trait can be used by a class without
importing the trait itself when the trait is already imported by one
of the parent classes from the inheritance chain.
2020-07-09 18:32:43 +02:00
Christian Flothmann f49e8b5071 minor #37536 [Form] add german translation of the html5 color validation (ABSAhmad)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] add german translation of the html5 color validation

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

Commits
-------

f41c03b8aa add german translation of the html5 color validation
2020-07-09 10:59:31 +02:00
Christian Flothmann 812a4d5a27 Merge branch '5.1'
* 5.1:
  Expect deprecations in isolation
2020-07-09 10:28:11 +02:00
Ahmad El-Bardan f41c03b8aa add german translation of the html5 color validation 2020-07-09 10:22:35 +02:00
Nicolas Grekas 5992bf04cf bug #37515 [PhpUnitBridge] Fix expectDeprecation() in isolation (alexpott)
This PR was squashed before being merged into the 5.1 branch.

Discussion
----------

[PhpUnitBridge] Fix expectDeprecation() in isolation

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| 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 #... <!-- 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 -->

Tests like
```
    /**
     * Do not remove this test in the next major version.
     *
     * @group legacy
     * @runInSeparateProcess
     */
    public function testOneInIsolation()
    {
        $this->expectDeprecation('foo');
        @trigger_error('foo', E_USER_DEPRECATED);
    }
```
will fail due to:

```
Testing Symfony\Bridge\PhpUnit\Tests\ExpectDeprecationTraitTest
R                                                                   1 / 1 (100%)R

Time: 111 ms, Memory: 6.00 MB

There were 2 risky tests:

1) Symfony\Bridge\PhpUnit\Tests\ExpectDeprecationTraitTest::testOneInIsolation
This test did not perform any assertions

/Users/alex/dev/symfony/src/Symfony/Bridge/PhpUnit/Tests/ExpectDeprecationTraitTest.php:38

2) Symfony\Bridge\PhpUnit\Tests\ExpectDeprecationTraitTest::testOneInIsolation
This test did not perform any assertions

OK, but incomplete, skipped, or risky tests!
Tests: 1, Assertions: 0, Risky: 2.
```

Commits
-------

e7e2ee75d3 Expect deprecations in isolation
2020-07-09 10:06:55 +02:00