Commit Graph

38481 Commits

Author SHA1 Message Date
Robin Chalas
10b8a5f041 [Validator] Add BC layer covering BicValidator without Intl 2018-09-30 00:23:16 +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
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
Fabien Potencier
85d335a66a feature #28551 [VarDumper] add caster for MessageFormatter (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarDumper] add caster for MessageFormatter

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

There are more classes in intl that could benefit from having a caster, see
http://php.net/manual/en/book.intl.php

Let's start with MessageFormatter.
PRs welcome for adding more.

Commits
-------

aa24e4ce15 [VarDumper] add caster for MessageFormatter
2018-09-22 17:44:38 +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
Nicolas Grekas
2c8c6f7736 bug #28548 [Console] Fixed boxed table style with colspan (ro0NL)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Fixed boxed table style with colspan

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28532
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Commits
-------

a67ff2a2d6 [Console] Fixed boxed table style with colspan
2018-09-22 09:36:09 +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
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
Nicolas Grekas
3c1961ca37 minor #28513 [Validator] add exception when intl component not found (ronfroy)
This PR was squashed before being merged into the 4.2-dev branch (closes #28513).

Discussion
----------

[Validator] add exception when intl component not found

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

<!--
Add some exception when the Intl component is not found but required on some constraints
-->

Commits
-------

b6f29f4721 [Validator] add exception when intl component not found
2018-09-21 13:37:55 +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
Nicolas Grekas
7d51b57427 minor #28526 [Contracts] fine tune composer.json declarations for suggest/provide (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Contracts] fine tune composer.json declarations for suggest/provide

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

8a11e76c14 [Contracts] fine tune composer.json declarations for suggest/provide
2018-09-21 13:00:31 +02:00
Nicolas Grekas
8a11e76c14 [Contracts] fine tune composer.json declarations for suggest/provide 2018-09-20 15:44:19 +02:00
Nicolas Grekas
5a10f2de9e bug #28508 [Form] forward false label option to nested types (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] forward false label option to nested types

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

This change does not fix any built-in Symfony form themes, but takes
into account the changes made in #28469 to allow third-party form themes
work properly.

Commits
-------

3247cdeea9 forward false label option to nested types
2018-09-20 14:21:23 +02:00
Nicolas Grekas
bf4d011b3d feature #28473 [Validator] Check the BIC country with symfony/intl (sylfabre)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Validator] Check the BIC country with symfony/intl

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

Check the BIC country code against the list from Intl component instead of a simple check alphabetical test.

This PR uses the Intl component which is not part of the required dependencies of the Validator component (https://github.com/symfony/validator/blob/master/composer.json): `symfony/intl` is only required for dev. So I'm making a PR against master because it may break existing code.
But `CountryValidator` does the same so it may not be an issue after all.

Commits
-------

27bd3a8192 [Validator] Check the BIC country with symfony/intl Fix #28167
2018-09-20 14:02:31 +02:00
Nicolas Grekas
31e96f7435 bug #28471 [MonologBridge] Re-add option option to ignore empty context and extra data (mpdude)
This PR was squashed before being merged into the 3.4 branch (closes #28471).

Discussion
----------

[MonologBridge] Re-add option option to ignore empty context and extra data

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

In #11496, an option was added to `ConsoleFormatter` to ignore empty context and extra data. This setting was even turned on by default.

The `ConsoleHandler` was then overhauled in #21705. During this change, the option got lost.

Commits
-------

d1e7438605 [MonologBridge] Re-add option option to ignore empty context and extra data
2018-09-20 13:58:14 +02:00
Matthias Pigulla
d1e7438605 [MonologBridge] Re-add option option to ignore empty context and extra data 2018-09-20 13:58:05 +02:00
Nicolas Grekas
b349b64488 bug #28464 [Form] forward the invalid_message option in date types (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] forward the invalid_message option in date types

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

Commits
-------

5318e2eb15 forward the invalid_message option in date types
2018-09-20 13:52:05 +02:00
Nicolas Grekas
398e261e4f minor #28515 [Lock] remove useless code (ronfroy)
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #28515).

Discussion
----------

[Lock] remove useless code

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

remove usless code

Commits
-------

0d38c710c3 [Lock] remove useless code
2018-09-20 13:44:21 +02:00
Rudy Onfroy
0d38c710c3 [Lock] remove useless code 2018-09-20 13:44:13 +02:00
Yonel Ceruto
5330f2d017 [FrameworkBundle] Register an identity translator as fallback
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.
2018-09-20 13:39:51 +02:00
Nicolas Grekas
4da7ab1258 minor #28506 [PhpUnitBridge] Provide debug_backtrace with proper args (greg0ire)
This PR was merged into the 2.8 branch.

Discussion
----------

[PhpUnitBridge] Provide debug_backtrace with proper args

This would fail if we were using strict mode with php 7, because true is
only a valid argument for php < 5.3.6.
This was changed from PHP_VERSION_ID >= 50400 ?
DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT : true in
 #18272, but I do not understand why it was simlified, nor why
DEBUG_BACKTRACE_IGNORE_ARGS was there at that time.

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

Not sure if this qualifies as a bugfix. If not, should I simplify the ternary and target master? My fear is that having the code diverge too much will make it harder to merge subsequent PRs. I know this looks small, but I'm kind of preparing a big PR on the bridge and I'd rather have it smaller and easier to understand by moving everything I can with small patches like this one.

Commits
-------

0d826ae85d Provide debug_backtrace with proper args
2018-09-20 13:06:00 +02:00
Nicolas Grekas
a1ca55beea bug #28520 [Validator] Allow Validator without the translator component (sroze)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Validator] Allow Validator without the translator component

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

Validator should be available without the Translator service. #28210 introduced a regression, it was not the case anymore:
```

  You have requested a non-existent service "translator".

```

This fixes it.

Commits
-------

2dc92d7a4b Allow validator without the translator
2018-09-20 12:51:30 +02:00