Commit Graph

31211 Commits

Author SHA1 Message Date
Fabien Potencier
10df10ce38 feature #28446 [SecurityBundle] make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_* (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[SecurityBundle] make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_*

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

Let's make it easier to have a good default security level, now for the remember-me cookie.

Commits
-------

6ec223bf6f [SecurityBundle] make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_*
2018-09-26 07:38:44 +02:00
Fabien Potencier
b36172c649 feature #28417 [VarExporter] add Instantiator::instantiate() to create+populate objects without calling their constructor nor any other methods (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarExporter] add Instantiator::instantiate() to create+populate objects without calling their constructor nor any other methods

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

A blend of features also provided by https://github.com/doctrine/instantiator and https://github.com/Ocramius/GeneratedHydrator in one simple method. Because it's just a few more lines on top of the existing code infrastructure in the component :)

For example, from the docblock:

```php
// creates an empty instance of Foo
Instantiator::instantiate(Foo::class);

// creates a Foo instance and sets one of its public, protected or private properties
Instantiator::instantiate(Foo::class, ['propertyName' => $propertyValue]);

// creates a Foo instance and sets a private property defined on its parent Bar class
Instantiator::instantiate(Foo::class, [], [
    Bar::class => ['privateBarProperty' => $propertyValue],
]);
```

Instances of ArrayObject, ArrayIterator and SplObjectHash can be created
by using the special `"\0"` property name to define their internal value:

```php
// creates an SplObjectHash where $info1 is attached to $obj1, etc.
Instantiator::instantiate(SplObjectStorage::class, ["\0" => [$obj1, $info1, $obj2, $info2...]]);

// creates an ArrayObject populated with $inputArray
Instantiator::instantiate(ArrayObject::class, ["\0" => [$inputArray, $optionalFlag]]);
```

Misses some tests for now, but reuses the existing code infrastructure used to "unserialize" objects.

Commits
-------

d9bade0385 [VarExporter] add Instantiator::instantiate() to create+populate objects without calling their constructor nor any other methods
2018-09-26 07:34:01 +02:00
Fabien Potencier
9db435ed0c feature #27819 [Serializer] deprecated normalizers and encoders who dont implement the base interfaces (rodnaph)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Serializer] deprecated normalizers and encoders who dont implement the base interfaces

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

Currently the `Serializer` can be constructed with any object regardless of whether or not it implements `NormalizerInterface` or `DenormalizerInterface`. This object will then be ignored when getting a normalizer/denormalizer, so in effect silently ignored for serializer operations.

This change throws an exception on construct if a given normalizer object does not implement one of these interfaces - are there use cases where this would not be true?

Commits
-------

cbc2be8ba8 [Serializer] deprecated normalizers and encoders who dont implement the base interfaces
2018-09-25 11:53:27 +02:00
Fabien Potencier
3d2124e128 feature #28572 Make it clear that the profiler is for dev only (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Make it clear that the profiler is for dev only

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | kinda yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes (permanent one)
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | symfony/symfony-docs#10386

Commits
-------

54fda55fd9 made it clear that the profiler is for dev only
2018-09-24 13:27:51 +02:00
Fabien Potencier
54fda55fd9 made it clear that the profiler is for dev only 2018-09-24 10:00:32 +02:00
Roland Franssen
c762735075 Favor LogicException for missing classes & functions 2018-09-24 09:37:12 +02:00
Fabien Potencier
31f8cb9706 feature #28569 [Form] deprecate precision in IntegerToLocalizedStringTransformer (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Form] deprecate precision in IntegerToLocalizedStringTransformer

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

Commits
-------

65362e0ace deprecate precision in IntegerToLocalizedStringTransformer
2018-09-24 07:57:37 +02:00
Fabien Potencier
792ec82c1a feature #28570 [Form] deprecate the unused scale option (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Form] deprecate the unused scale option

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

Commits
-------

40413aad24 deprecate the unused scale option
2018-09-24 07:52:57 +02:00
Christian Flothmann
65362e0ace deprecate precision in IntegerToLocalizedStringTransformer 2018-09-23 21:23:49 +02:00
Christian Flothmann
40413aad24 deprecate the unused scale option 2018-09-23 21:21:47 +02:00
Jan Schädlich
ae76c6824b [VarDumper] add casters for IntlDateFormatter and IntlCalendar 2018-09-23 18:25:21 +02:00
Nicolas Grekas
c53b687f21 feature #28559 [VarDumper] add caster for IntlTimeZone (jschaedl)
This PR was squashed before being merged into the 4.2-dev branch (closes #28559).

Discussion
----------

[VarDumper] add caster for IntlTimeZone

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

Commits
-------

c94217c832 [VarDumper] add caster for IntlTimeZone
2018-09-23 16:56:12 +02:00
Jan Schädlich
c94217c832 [VarDumper] add caster for IntlTimeZone 2018-09-23 16:56:03 +02:00
Fabien Potencier
7c08e43b78 feature #28449 [DependencyInjection] improved message when alias service is not found (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[DependencyInjection] improved message when alias service is not found

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

When using the YAML config format, it can be confusing that you need to
prefix the aliased service id with an `@` character when passing it as
a string, but that you have to omit it when using the `alias` attribute:

```yaml
foo: '@App\Foo'

foo:
    alias: 'App\Foo'
```

This commit will enhance the generated error message in cases where the
aliased service id is prefixed with the `@` character in the `alias`
option like this:

```yaml
foo:
    alias: '@App\Foo'
```

Commits
-------

280ecbc2be improved message when alias service is not found
2018-09-23 14:54:20 +02:00
Robin Chalas
e95ea8132f feature #27434 [Console] Add support for error ouput in the CommandTester (cdekok)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Console] Add support for error ouput in the CommandTester

Move initialization of the streams to the trait so the `capture_stderr_separately` also works in the CommandTester.

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

Make it possible to test seperate stderr output.

```$tester = new CommandTester($command);
$tester->execute(
    array('foo' => 'bar'),
    array('capture_stderr_separately' => true)
);

$this->assertEquals('foo', $tester->getErrorOutput());
````

Commits
-------

cec5317 [Console] Add support for error ouput in the CommandTester
2018-09-23 13:45:23 +02:00
Chris de Kok
cec531707f [Console] Add support for error ouput in the CommandTester 2018-09-23 13:34:50 +02:00
Nicolas Grekas
a43f307224 feature #28555 [VarDumper] add caster for NumberFormatter (jschaedl)
This PR was squashed before being merged into the 4.2-dev branch (closes #28555).

Discussion
----------

[VarDumper] add caster for NumberFormatter

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

Commits
-------

0bd8a0b0bb [VarDumper] add caster for NumberFormatter
2018-09-23 12:41:31 +02:00
Jan Schädlich
0bd8a0b0bb [VarDumper] add caster for NumberFormatter 2018-09-23 12:41:24 +02:00
Christian Flothmann
280ecbc2be improved message when alias service is not found
When using the YAML config format, it can be confusing that you need to
prefix the aliased service id with an `@` character when passing it as
a string, but that you have to omit it when using the `alias` attribute:

```yaml
foo: '@App\Foo'

foo:
    alias: 'App\Foo'
```

This commit will enhance the generated error message in cases where the
aliased service id is prefixed with the `@` character in the `alias`
option like this:

```yaml
foo:
    alias: '@App\Foo'
```
2018-09-23 11:10:46 +02:00
Nicolas Grekas
a26bd3673f Merge branch '4.1'
* 4.1:
  [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"
  [Console] Fixed boxed table style with colspan
  parse numbers terminated with decimal separator
  fail reverse transforming invalid RFC 3339 dates
2018-09-22 22:55:36 +02:00
Nicolas Grekas
0e47775d62 Merge branch '3.4' into 4.1
* 3.4:
  [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"
  [Console] Fixed boxed table style with colspan
  parse numbers terminated with decimal separator
  fail reverse transforming invalid RFC 3339 dates
2018-09-22 21:04:12 +02:00
Nicolas Grekas
9bc774ccf2 bug #28553 [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal" (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes (fixing and unreleased issue)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #28549
| License       | MIT
| Doc PR        | -

Introduced in #28411
Just a failing test for now.

Commits
-------

46c4f71bf0 [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"
2018-09-22 20:50:47 +02:00
Nicolas Grekas
3e47e9ca59 Merge branch '2.8' into 3.4
* 2.8:
  [Console] Fixed boxed table style with colspan
  parse numbers terminated with decimal separator
  fail reverse transforming invalid RFC 3339 dates
2018-09-22 20:49:52 +02:00
Nicolas Grekas
57a34131c6 bug #28466 [Form] fail reverse transforming invalid RFC 3339 dates (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] fail reverse transforming invalid RFC 3339 dates

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

Commits
-------

ee4ce43e91 fail reverse transforming invalid RFC 3339 dates
2018-09-22 20:44:32 +02:00
Nicolas Grekas
46c4f71bf0 [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal" 2018-09-22 20:25:03 +02:00
Fabien Potencier
7ae57225d1 feature #28538 [Lock] Wrap release exception (jderusse)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Lock] Wrap release exception

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/27920#discussion_r219112321
| License       | MIT
| Doc PR        | NA

Commits
-------

c37f9e9e32 Wrap release exception
2018-09-22 18:08:30 +02:00
Nicolas Grekas
aa24e4ce15 [VarDumper] add caster for MessageFormatter 2018-09-22 10:46:58 +02:00
Nicolas Grekas
40b547e122 bug #28540 [Intl] parse numbers terminated with decimal separator (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Intl] parse numbers terminated with decimal separator

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

Commits
-------

4225f36b86 parse numbers terminated with decimal separator
2018-09-22 09:42:26 +02:00
Roland Franssen
a67ff2a2d6 [Console] Fixed boxed table style with colspan 2018-09-21 21:58:02 +02:00
Nicolas Grekas
c51592c574 feature #28329 [Debug] Trigger a deprecation for new parameters not defined in sub classes (GuilhemN)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Debug] Trigger a deprecation for new parameters not defined in sub classes

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

I'm not sure the way https://github.com/symfony/symfony/pull/28316 is implemented is the best so here is an alternative.
Instead of counting on a call from the child method, it uses the `DebugClassLoader` and `@param` annotations. If a `@param` annotation is used on a parent but is then not actually implemented in the child class, a deprecation will be thrown.

Example:
```php
class ClassWithAnnotatedParameters
{
    /**
     * @param string $foo This is a foo parameter.
     */
    public function fooMethod(string $foo)
    {
    }

    /**
     * @param string $bar parameter not implemented yet
     */
    public function barMethod(/** string $bar = null */)
    {
    }

    /**
     * @param Quz $quz parameter not implemented yet
     */
    public function quzMethod(/** Quz $quz = null */)
    {
    }
}
```

```php
class SubClassWithAnnotatedParameters extends ClassWithAnnotatedParameters {
    public function fooMethod(string $foo) { }
    public function barMethod($bar = null) { }
    public function quzMethod() { }
}
```

A deprecation will be triggered because ``SubClassWithAnnotatedParameters::quzMethod()`` which doesn't definee `$quz`.

Commits
-------

1f5d8b62f7 [Debug] Trigger a deprecation for new parameters not defined in sub classes
2018-09-21 18:04:38 +02:00
Guilhem Niot
1f5d8b62f7 [Debug] Trigger a deprecation for new parameters not defined in sub classes 2018-09-21 17:50:51 +02:00
Christian Flothmann
4225f36b86 parse numbers terminated with decimal separator 2018-09-21 16:33:46 +02:00
Jérémy Derussé
c37f9e9e32
Wrap release exception 2018-09-21 15:50:12 +02:00
Nicolas Grekas
1fc66ff080 Merge branch '4.1'
* 4.1:
  Fix CS
  Allow reuse of Session between requests
  [MonologBridge] Re-add option option to ignore empty context and extra data
  [Lock] remove useless code
  [PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file
  Provide debug_backtrace with proper args
  [DI] fix infinite loop involving self-references in decorated services
  forward false label option to nested types
  [DI] fix dumping lazy services
  forward the invalid_message option in date types
2018-09-21 14:51:02 +02:00
Nicolas Grekas
76cf0ca661 Merge branch '3.4' into 4.1
* 3.4:
  Fix CS
  Allow reuse of Session between requests
  [MonologBridge] Re-add option option to ignore empty context and extra data
  [Lock] remove useless code
  [PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file
  Provide debug_backtrace with proper args
  [DI] fix infinite loop involving self-references in decorated services
  forward false label option to nested types
  forward the invalid_message option in date types
2018-09-21 14:49:42 +02:00
Nicolas Grekas
0218507b06 Merge branch '2.8' into 3.4
* 2.8:
  Fix CS
  Allow reuse of Session between requests
  Provide debug_backtrace with proper args
  forward false label option to nested types
  forward the invalid_message option in date types
2018-09-21 14:47:54 +02:00
Nicolas Grekas
76c2de0317 Fix CS 2018-09-21 14:46:38 +02:00
Rhodri Pugh
cbc2be8ba8 [Serializer] deprecated normalizers and encoders who dont implement the base interfaces 2018-09-21 14:14:25 +02:00
Nicolas Grekas
0d9154e5bb feature #27920 Add Zookeeper data store for Lock Component (Ganesh Chandrasekaran)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Add Zookeeper data store for Lock Component

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

This change adds a new feature to the Lock Component to give the capability to store locks in Zookeeper Data Store. The corresponding documentation PR should describe how this works.

The change here also adds a functional test to make sure all the basic functionality of the lock using this data store works.

Requirements for this to work are having a PHP-Zookeeper extension available to use this.

Commits
-------

c72c297dc3 Add new Zookeeper Data Store. Add functional test for Zookeeper Data Store. Modify Store Factory to support initialization of Zookeeper Data Store.
2018-09-21 13:57:52 +02:00
Nicolas Grekas
5d30df78e7 bug #28433 [HttpFoundation] Allow reuse of Session between requests if ID did not change (tgalopin)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpFoundation] Allow reuse of Session between requests if ID did not change

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

I stumbled upon the issue from https://github.com/symfony/symfony/issues/13450 in a more simple case than what was exposed in the issue. From my understanding, the problem arises when the session is used between an access to the session and a functional test request: because the session was accessed (usually using the container directly), the session has started and the following request fails.

This PR checks whether the ID was actually regenerated before throwing (if a setId is called with the same ID, it is the same request context, it shouldn't throw IMO).

Not sure I understood everything correctly though, feel free to fix it for me if needed.

Commits
-------

fd30f4a21d Allow reuse of Session between requests
2018-09-21 13:42:18 +02:00
Titouan Galopin
fd30f4a21d Allow reuse of Session between requests 2018-09-21 13:38:21 +02:00
Rudy Onfroy
b6f29f4721 [Validator] add exception when intl component not found 2018-09-21 13:37:49 +02:00
Nicolas Grekas
6856c023e3 feature #28317 [VarDumper] Allow dd() to be called without arguments (SjorsO)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarDumper] Allow dd() to be called without arguments

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

**Description**
A while back the `dd()` helper was [added to the VarDumper component](https://github.com/symfony/symfony/pull/26970) which was (i think) inspired by Laravel's `dd()` helper. Laravel has [removed their version of the helper](https://github.com/laravel/framework/pull/25087) in favor of the helper in Symfony.

However, as opposed to the Laravel helper, the Symfony helper requires at least one argument. Calling the Laravel helper with no arguments simply killed the program (and usually showed a white screen), calling the Symfony helper with no arguments throws a `TypeError: Too few arguments to function dd()` exception (which gets rendered by the error handler and fills the whole screen with useless information).

Being able to call the `dd()` helper with no arguments is useful because it is a quick way to tell you if your code reaches a certain point. If it does, you can fill in the `dd()` with variables to keep debugging.

This PR allows the dd helper to be called without arguments.

This PR also makes the helper call `die` instead of `exit` to better reflect the function name 😄

Commits
-------

a73dfadc18 [VarDumper] Allow dd() to be called without arguments
2018-09-21 13:20:56 +02:00
Sjors Ottjes
a73dfadc18 [VarDumper] Allow dd() to be called without arguments 2018-09-21 13:19:29 +02:00
Nicolas Grekas
ea2a65c271 feature #28424 [Ldap] Add verbose ext-ldap error if present for easier debugging (scaytrase)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Ldap] Add verbose ext-ldap error if present for easier debugging

| Q             | A
| ------------- | ---
| Branch?       | master (be careful when merging)
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   |
| Fixed tickets | #28149
| License       | MIT
| Doc PR        |

Added an optional message suffix if ldap_errno is not equals to 0

Commits
-------

761415fc1b Add verbose ext-ldap error if present for easier debugging
2018-09-21 13:16:30 +02:00
Nicolas Grekas
a55853d044 feature #28521 [Yaml] Added support for multiple files or directories in LintCommand (yceruto)
This PR was squashed before being merged into the 4.2-dev branch (closes #28521).

Discussion
----------

[Yaml] Added support for multiple files or directories in LintCommand

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

Commits
-------

d0f7950860 [Yaml] Added support for multiple files or directories in LintCommand
2018-09-21 13:02:50 +02:00
Yonel Ceruto
d0f7950860 [Yaml] Added support for multiple files or directories in LintCommand 2018-09-21 13:02:43 +02:00
Nicolas Grekas
4d6fc63b12 feature #28522 [Translation] Added support for multiple files or directories in XliffLintCommand (yceruto)
This PR was squashed before being merged into the 4.2-dev branch (closes #28522).

Discussion
----------

[Translation] Added support for multiple files or directories in XliffLintCommand

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

Same approach of https://github.com/symfony/symfony/pull/28521

Commits
-------

88ec37bed7 [Translation] Added support for multiple files or directories in XliffLintCommand
2018-09-21 13:01:58 +02:00
Yonel Ceruto
88ec37bed7 [Translation] Added support for multiple files or directories in XliffLintCommand 2018-09-21 13:01:50 +02:00
Nicolas Grekas
e198a26baf feature #28523 [FrameworkBundle] Register an identity translator as fallback (yceruto)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] Register an identity translator as fallback

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

The same approach as https://github.com/symfony/symfony/pull/24358, suggested by @xabbuh here https://github.com/symfony/symfony/issues/27589#issuecomment-421542776

**Templating Engine Context**

The Form component can be used without the Translation component.
However, to be able to use the default form themes provided by the
`FrameworkBundle` you need to have the `translator` helper to be available.

This change ensure that there will always be a `translator` helper which
as a fallback will just return the message key if no translator is present.

Commits
-------

5330f2d017 [FrameworkBundle] Register an identity translator as fallback
2018-09-21 13:01:20 +02:00