Commit Graph

40437 Commits

Author SHA1 Message Date
Christian Flothmann
348193609f Merge branch '3.4' into 4.2
* 3.4:
  fix tests by adapting Twig namespace changes
2019-02-15 19:54:27 +01:00
Christian Flothmann
823ccf086d minor #30262 [TwigBridge] fix tests by adapting Twig namespace changes (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] fix tests by adapting Twig namespace changes

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

bbc2656619 fix tests by adapting Twig namespace changes
2019-02-15 19:54:00 +01:00
Christian Flothmann
bbc2656619 fix tests by adapting Twig namespace changes 2019-02-15 18:05:19 +01:00
Tobias Schultze
bf4cd6164d [Routing] deprecate some router options 2019-02-15 15:28:25 +01:00
Christian Flothmann
a617006e6c minor #30231 [FrameworkBundle] ignore not-existent service definitions (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] ignore not-existent service definitions

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

see the currently failing tests of the TwigBundle

Commits
-------

592e03f065 ignore not-existent service definitions
2019-02-14 19:23:12 +01:00
Christian Flothmann
592e03f065 ignore not-existent service definitions 2019-02-14 17:43:30 +01:00
Christian Flothmann
3df9a5683d minor #30246 (finally) fix version dependent Form tests (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

(finally) fix version dependent Form tests

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

Commits
-------

d42e054d2c (finally) fix version dependent Form tests
2019-02-14 17:24:44 +01:00
Christian Flothmann
d42e054d2c (finally) fix version dependent Form tests 2019-02-14 17:03:15 +01:00
Christian Flothmann
b09761778a Merge branch '4.2'
* 4.2:
  allow to skip tests based on the supported version
  Update validators.bg.xlf
  Update validators.ca.xlf
  fixed CS
  Updated validators.eu.xlf with missing translations
  fixed typo
  backported a translation
  [Validator] added missing translation for UK validator
  Validator: add the Persian translations
  Update validators.sq.xlf
  fixed CS
  forward valid numeric values to transform()
  add constraint validators before optimizations
2019-02-14 16:32:59 +01:00
Christian Flothmann
c58d4c2e22 Merge branch '3.4' into 4.2
* 3.4:
  allow to skip tests based on the supported version
  Update validators.bg.xlf
  Update validators.ca.xlf
  fixed CS
  Updated validators.eu.xlf with missing translations
  fixed typo
  backported a translation
  [Validator] added missing translation for UK validator
  Validator: add the Persian translations
  Update validators.sq.xlf
  fixed CS
  forward valid numeric values to transform()
  add constraint validators before optimizations
2019-02-14 16:32:36 +01:00
Christian Flothmann
37b0eeb007 minor #30241 allow to skip tests based on the supported version (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

allow to skip tests based on the supported version

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Writing tests for Form related features in the Doctrine and Twig bridges
as well as the FrameworkBundle is a pain as soon as these tests are run
with more recent versions of the Form component. This is due to the fact
that our tests in the bridges and bundle extend test cases from the
component. The tests in the component are expanded with every feature
that gets added there. However, these new features are not present in
the other packages in older version and we thus need to be able to skip
them somehow.

Commits
-------

be23926bf8 allow to skip tests based on the supported version
2019-02-14 16:26:56 +01:00
Christian Flothmann
be23926bf8 allow to skip tests based on the supported version
Writing tests for Form related features in the Doctrine and Twig bridges
as well as the FrameworkBundle is a pain as soon as these tests are run
with more recent versions of the Form component. This is due to the fact
that our tests in the bridges and bundle extend test cases from the
component. The tests in the component are expanded with every feature
that gets added there. However, these new features are not present in
the other packages in older version and we thus need to be able to skip
them somehow.
2019-02-14 15:58:36 +01:00
Fabien Potencier
6a80e7ddd5 minor #30234 [Routing] fix changelog typo (Tobion)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Routing] fix changelog typo

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License       | MIT
| Doc PR        |

Fix small typos from #28865

Commits
-------

37dbab263e [Routing] fix changelog typos
2019-02-14 12:58:43 +01:00
Fabien Potencier
2f5b16fd4b minor #30227 Update validators.bg.xlf (LubenZA)
This PR was squashed before being merged into the 3.4 branch (closes #30227).

Discussion
----------

Update validators.bg.xlf

Translated 83, 84, & 85

| Q             | A
| ------------- | ---
| Branch?       | master for features / 3.4 up to 4.2 for bug fixes <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #30151
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest 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 the master branch.
-->

Commits
-------

4f3bc6bd47 Update validators.bg.xlf
2019-02-14 12:57:47 +01:00
LubenZA
4f3bc6bd47 Update validators.bg.xlf 2019-02-14 12:57:40 +01:00
Christian Flothmann
401cf8712d minor #30238 properly move test methods (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

properly move test methods

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

Commits
-------

6bfc5f0901 properly move test methods
2019-02-14 11:11:11 +01:00
Christian Flothmann
6bfc5f0901 properly move test methods 2019-02-14 10:58:14 +01:00
Przemysław Bogusz
c8d6dd7c8f Add element to ghost in Exception 2019-02-14 10:10:17 +01:00
Christian Flothmann
b5b547d5e4 minor #30232 [FrameworkBundle][TwigBridge] fix tests (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle][TwigBridge] fix tests

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

1fe359995b fix tests
2019-02-14 09:57:53 +01:00
Tobias Schultze
37dbab263e
[Routing] fix changelog typos
Fix small typos from #28865
2019-02-14 04:47:16 +01:00
Yonel Ceruto
9f9b828832 Added support for PHP files with translation in translation commands 2019-02-13 19:06:53 -05:00
Christian Flothmann
1fe359995b fix tests 2019-02-13 22:52:06 +01:00
Christian Flothmann
1a983d07db undeprecate date formats in single_text widgets 2019-02-13 20:45:31 +01:00
fedor.f
4532319520 publish message with custom queue options : update ConnectionTest 2019-02-13 14:53:10 +02:00
Fabien Potencier
320c05f9f1 minor #30223 Updated validators.eu.xlf (ikerib)
This PR was merged into the 3.4 branch.

Discussion
----------

Updated validators.eu.xlf

with missing translations

Commits
-------

f496ab638e Updated validators.eu.xlf with missing translations
2019-02-13 10:39:43 +01:00
Fabien Potencier
45023acc86 minor #30224 Update validators.ca.xlf (rogerguasch)
This PR was squashed before being merged into the 3.4 branch (closes #30224).

Discussion
----------

Update validators.ca.xlf

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Update validators.ca.xlf for Catalan language.

Commits
-------

077df27eca Update validators.ca.xlf
2019-02-13 10:38:01 +01:00
Roger Guasch
077df27eca Update validators.ca.xlf 2019-02-13 10:37:46 +01:00
Fabien Potencier
6c0190eee8 fixed CS 2019-02-13 10:35:08 +01:00
fedor.f
6f9fdaf7e4 publish message with custom queue options : flags | attributes 2019-02-13 11:30:45 +02:00
Iker Ibarguren
f496ab638e
Updated validators.eu.xlf with missing translations 2019-02-13 09:13:09 +01:00
Fabien Potencier
c6a2c3348f feature #28812 [Form] add a convenience method to get the parent form in Twig templates (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] add a convenience method to get the parent form in Twig templates

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

Commits
-------

cb60642d15 add a convenience method to get the parent form in Twig templates
2019-02-13 08:55:41 +01:00
Fabien Potencier
0887f62573 bug #30090 [FrameworkBundle] add constraint validators before optimizations (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] add constraint validators before optimizations

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #24222
| License       | MIT
| Doc PR        |

Commits
-------

05e0e162d3 add constraint validators before optimizations
2019-02-13 08:52:59 +01:00
Fabien Potencier
03dfdc4db3 feature #29121 [FrameworkBundle][Translation] Add support for Translator paths, Twig paths and Translator aware services paths in commands (yceruto)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle][Translation] Add support for Translator paths, Twig paths and Translator aware services paths in commands

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

Add custom (also common) Twig and Translation paths to the translation commands:
 * Custom directories configured in `twig.paths`.
 * Custom directories configured in `translator.paths`
 * The `Resources/translations/` directory of `Validation` component (if installed).
 * The `Resources/translations/` directory of `Form` component (if installed).
 * The `Resources/translations/` directory of Security Core component (if installed).

Commits
-------

31d7a09bf5 Add support for translator paths and twig paths in translation commands
2019-02-13 08:43:59 +01:00
Fabien Potencier
3b8893fd92 fixed typo 2019-02-13 08:40:41 +01:00
Fabien Potencier
3be75ccf82 minor #30220 [Validator] added missing translation for UK validator (Andrii Boiko)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] added missing translation for UK validator

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  |no
| BC breaks?    | no
| Deprecations? |no
| Tests pass?   | yes
| Fixed tickets | #30194
| License       | MIT

Commits
-------

387295e6a4 [Validator] added missing translation for UK validator
2019-02-13 08:38:34 +01:00
Fabien Potencier
1873f32a80 backported a translation 2019-02-13 08:37:30 +01:00
Fabien Potencier
21b8efc44c fixed typo 2019-02-13 08:36:40 +01:00
Fabien Potencier
b951a0fce4 feature #28477 [Validator] Add new json Validator (zairigimad)
This PR was squashed before being merged into the 4.3-dev branch (closes #28477).

Discussion
----------

[Validator] Add new json Validator

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/10351

Hi,

in so many cases we want to test if a value is a valid json or not, so I propose this new ~~NotJson~~  `Json` constraint for this need.

cordially,

Commits
-------

131febc7be [Validator] Add new json Validator
2019-02-13 08:35:29 +01:00
zairig imad
131febc7be [Validator] Add new json Validator 2019-02-13 08:35:16 +01:00
Andrii Boiko
387295e6a4 [Validator] added missing translation for UK validator 2019-02-13 09:30:52 +02:00
Fabien Potencier
fd7875726b feature #30126 [Form] forward valid numeric values to transform() (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] forward valid numeric values to transform()

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30114
| License       | MIT
| Doc PR        |

Commits
-------

3be0d35b17 forward valid numeric values to transform()
2019-02-13 08:28:22 +01:00
Fabien Potencier
09275d4e27 feature #28635 [Form] Add label_translation_parameters, help_translation_parameters and attr_translation_parameters options to base form type (webnet-fr)
This PR was squashed before being merged into the 4.3-dev branch (closes #28635).

Discussion
----------

[Form] Add label_translation_parameters, help_translation_parameters and attr_translation_parameters options to base form type

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes. Travis-ci isn't green because it tests the components separately. Fabbot.io requires license headers in files where they were not present before.
| Fixed tickets | #27698
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/10065

Hi, this is an alternative to #27775.

`translation_parameters` is separated to `label_translation_parameters`, `help_translation_parameters`, `attr_translation_parameters`.

Commits
-------

b3f3c5361f [Form] Add label_translation_parameters, help_translation_parameters and attr_translation_parameters options to base form type
2019-02-13 08:24:11 +01:00
Webnet team
b3f3c5361f [Form] Add label_translation_parameters, help_translation_parameters and attr_translation_parameters options to base form type 2019-02-13 08:24:03 +01:00
Fabien Potencier
12a01a26c9 feature #29767 Nullable environment variable processor (bpolaszek)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Nullable environment variable processor

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

Hey there,

Because environment variables are strings by design, empty environment variables are evaluated to `""` by default.
In the same way, `MY_ENV_VAR=null` will be evaluated to `"null"`, as a string.

What I suggest is to allow some environment variables to be evaluated to `null` (the real one) when their strings are _blank_ or equal _null_, _Null_ or _NULL_.

This can be easily done through a new `nullable` processor:

```bash
# .env
API_KEY=
```

```yaml
# config/services.yaml
services:
    FooService:
        arguments:
            $apiKey: %env(nullable:API_KEY)%
```
```php
# src/Services/FooService
namespace App\Services;

final class FooService
{
    /**
     * @var string|null
     */
    private $apiKey;

    /**
     * FooService constructor.
     */
    public function __construct(?string $apiKey)
    {
        $this->apiKey = $apiKey;
    }

    public function doSomething()
    {
        // Free plan
        if (null === $this->apiKey) {
            // ...
        }
    }

}
```
That's an example that comes to my mind but there can be many others.
This can also help in using null coalesce operators in constructors instead of checking if a string equals `""` (which is very PHP4 style).

Of course it can be used in conjunction with other types, i.e. `%env(float:nullable:SOME_OPTIONAL_FLOAT_ENV_VAR)%`.

What do you think?

Commits
-------

3a604ac392 Nullable environment variable processor
2019-02-13 08:12:17 +01:00
Fabien Potencier
491e87a1c4 minor #30219 Validator: add the Persian translations (behnoushnorouzi)
This PR was merged into the 3.4 branch.

Discussion
----------

Validator: add the Persian translations

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30162
| License       | MIT
| Doc PR        | -

Add the missing translations for the Persian (fa) validator.

Commits
-------

32306d8795 Validator: add the Persian translations
2019-02-13 08:09:37 +01:00
Fabien Potencier
a1626699b9 minor #30217 Update validators.sq.xlf (fatonh)
This PR was merged into the 3.4 branch.

Discussion
----------

Update validators.sq.xlf

#30187 Added the missing translations for the Albanian language

| Q             | A
| ------------- | ---
| Branch?       |  3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30187
| License       | MIT

This PR addresses the issue #30187, adding the missing translations for the Albanian (sq) locale.

Commits
-------

62b226e78e Update validators.sq.xlf
2019-02-13 08:07:43 +01:00
Behnoush
32306d8795 Validator: add the Persian translations 2019-02-12 22:50:28 +01:00
Faton
62b226e78e
Update validators.sq.xlf
#30187 Added the missing translations for the Albanian language
2019-02-12 22:10:37 +01:00
Fabien Potencier
3c2dc44af6 Merge branch '4.2'
* 4.2: (25 commits)
  Add missing ID_id validators translation
  fixed CS
  Added missing translations in validators.tr.xlf
  Update validators.es.xlf
  Update validators.hu.xlf
  [Validator] Add the missing translations for the Welsh (cy) locale
  [Validator] Add missing DE validator translations
  [Validator] Add the missing translations for the Dutch (nl) locale
  Add missing PL translation
  Add missing translations.
  Add missing translations for IT to Validator
  minor #30184 [Validator] Add the missing translations for the Russian (ru) locale (antonch1989)
  [Validator] Add the missing translations for the Arabic (ar) locale
  add_missing_translations_for_portuguese : [Validator] Add the missing translations for the Portuguese ("pt") locale
  [Validator] Add the missing translations for the French (fr) locale
  [Validator] Add some missing contents to the English translation
  use PropertyAccessorInterface instead of PropertyAccessor
  Fix KernelTestCase compatibility for PhpUnit 8 (bis)
  add xabbuh as code owner of the Form component
  [Validator] Added a missing translation
  ...
2019-02-12 21:07:40 +01:00
Fabien Potencier
c9c0d45d11 fixed CS 2019-02-12 21:06:43 +01:00