Commit Graph

30763 Commits

Author SHA1 Message Date
Fabien Potencier
f33b19cc40 minor #22347 [FrameworkBundle] Add autowiring alias for Stopwatch (BPScott)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Add autowiring alias for Stopwatch

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

Following in the footsteps of #22098 to add aliases for various services, this adds an alias for `Symfony\Component\Stopwatch\Stopwatch`.

Commits
-------

707f74b50f [FrameworkBundle] Add autowiring alias for Stopwatch
2017-04-09 07:27:17 -07:00
Christian Flothmann
faf671db0f don't keep internal state between parser runs 2017-04-09 10:04:00 +02:00
Ben Scott
707f74b50f [FrameworkBundle] Add autowiring alias for Stopwatch 2017-04-08 13:34:08 +01:00
Sanpi
8b83b58aa5 Throwing an exception when loading a directory 2017-04-07 19:12:03 +02:00
Fabien Potencier
b784449514 minor #22303 Add \Traversable typehint to phpdoc (MetalArend)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #22303).

Discussion
----------

Add \Traversable typehint to phpdoc

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

Most of the times you use a DataMapperInterface, the first thing you do on the `$forms` parameter is `iterator_to_array`. However, as that variable is only hinted as `FormInterface[]`, and most IDE's and static analysers don't rely on code, but on the phpdoc...

Commits
-------

5310f11418 Add \Traversable typehint to phpdoc
2017-04-07 10:05:02 -07:00
MetalArend
5310f11418 Add \Traversable typehint to phpdoc 2017-04-07 10:05:02 -07:00
Fabien Potencier
7b8409ad37 feature #22315 Add Kernel::getProjectDir() (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Add Kernel::getProjectDir()

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

`Kernel::getRootDir()` is misleading. It returns the path where `AppKernel.php` is stored, which is `app/` in Symfony 2/3, but `src/` in Symfony 4. But most of the time, we are using `getRootDir()` to get the project root dir, so `%kernel.root_dir%/../` is a common idiom.

Changing the value of `getRootDir()` would be a hard BC break, so I propose to create a new method, `getProjectDir()` to "replace" `getRootDir()` gradually.

Commits
-------

1f680ccb2d added Kernel::getProjectDir()
2017-04-07 09:56:33 -07:00
Fabien Potencier
49ae724e9c minor #22326 [DI] Enhance wording of autowiring exceptions (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Enhance wording of autowiring exceptions

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

> Cannot autowire service "j": argument "$i" of method "Symfony\Component\DependencyInjection\Tests\Compiler\J::__construct()" references class "Symfony\Component\DependencyInjection\Tests\Compiler\I" but no such service exists. You should maybe alias this class to the existing "i" service; or type-hint against interface "Symfony\Component\DependencyInjection\Tests\Compiler\IInterface" instead.

Commits
-------

da792b2ff7 [DI] Enhance wording of autowiring exceptions
2017-04-07 09:43:12 -07:00
Fabien Potencier
0eed690679 minor #22325 [ExpressionLanguage] Avoid ExpressionLanguage dependency on ctype (nijel)
This PR was submitted for the 3.2 branch but it was merged into the 2.7 branch instead (closes #22325).

Discussion
----------

[ExpressionLanguage] Avoid ExpressionLanguage dependency on ctype

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

There is undocumented dependency on ctype extension in ExpressionLanguage. I've chosen to remove it rather than document as we're using ExpressionLanguage in phpMyAdmin and this is only dependency which needs ctype.

I'm submitting this against 3.2 to get this fix to released version sooner, but it can be without problems applied to master as well.

Commits
-------

81de5fef4b [ExpressionLanguage] Avoid dependency on ctype
2017-04-07 09:40:12 -07:00
Michal Čihař
81de5fef4b [ExpressionLanguage] Avoid dependency on ctype
This avoids ExpressionLanguage library dependency on ctype.
2017-04-07 09:40:11 -07:00
Fabien Potencier
f04c0b5f04 bug #22340 [HttpKernel] Skip ContainerAwareInterface::setContainer from service_arguments actions registration (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Skip ContainerAwareInterface::setContainer from service_arguments actions registration

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

As it would never be used

Commits
-------

ad59e1804f Skip ContainerAwareInterface::setContainer from service_arguments actions registration
2017-04-07 07:44:54 -07:00
Fabien Potencier
ec2cc08654 bug #22330 [HttpKernel] Resolve invokable controllers short notations using ServiceValueResolver (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Resolve invokable controllers short notations using ServiceValueResolver

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

Register the service id as an alias of `id:__invoke` so that using the invokable short notation (id only) triggers the ServiceArgumentResolver.

Commits
-------

717fa85b91 Resolve invokable controllers short notations using ServiceValueResolver
2017-04-07 07:41:23 -07:00
Fabien Potencier
1272be6376 minor #22332 [VarDumper] Relax tests to adapt for php 7.1rc4 (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Relax tests to adapt for php 7.1rc4

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

Commits
-------

3672c01e3c [VarDumper] Relax tests to adapt for php 7.1rc4
2017-04-07 07:37:21 -07:00
Roland Franssen
ff3cb9cb27 [Console] Inherit phpdoc from OutputFormatterInterface 2017-04-07 16:02:07 +02:00
Robin Chalas
ad59e1804f Skip ContainerAwareInterface::setContainer from service_arguments actions registration 2017-04-07 15:58:30 +02:00
Nicolas Grekas
325e61dbbe bug #22304 Moved $this->setDate() before the deprecation handling. (mpdonadio)
This PR was squashed before being merged into the 3.2 branch (closes #22304).

Discussion
----------

Moved $this->setDate() before the deprecation handling.

| Q             | A
| ------------- | ---
| Branch?       | 3.2 <!-- see comment below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no?
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- 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.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

https://github.com/symfony/symfony/pull/22036 merged the patch into the wrong place; the `$this->setDate()` happens after the deprecation handling, so it does not always get called.

See also https://www.drupal.org/node/2712647?page=1#comment-12025349

Commits
-------

b6df4e7 Moved ->setDate() before the deprecation handling.
2017-04-07 14:28:10 +02:00
Matthew Donadio
b6df4e7834 Moved ->setDate() before the deprecation handling. 2017-04-07 14:27:40 +02:00
Nicolas Grekas
d48fae7f8c bug #22307 [Debug] Fix php notice (enumag)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #22307).

Discussion
----------

[Debug] Fix php notice

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

Of course autoloading of an empty string should not actually happen (fixed that in https://github.com/twigphp/Twig/pull/2438) but if it does happen it should not throw a php notice.

```
Notice: Uninitialized string offset 0
```

Commits
-------

e333a1a [Debug] Fix php notice
2017-04-07 14:20:28 +02:00
Jáchym Toušek
e333a1a86e [Debug] Fix php notice 2017-04-07 14:16:45 +02:00
Nicolas Grekas
3672c01e3c [VarDumper] Relax tests to adapt for php 7.1rc4 2017-04-07 11:49:35 +02:00
Robin Chalas
717fa85b91 Resolve invokable controllers short notations using ServiceValueResolver 2017-04-07 11:28:11 +02:00
Nicolas Grekas
da792b2ff7 [DI] Enhance wording of autowiring exceptions 2017-04-07 10:22:28 +02:00
Nicolas Grekas
549af739af Merge branch '3.2'
* 3.2:
  [HttpFoundation] Fix transient tests
  [DI] Fix second auto-registration
2017-04-07 08:15:11 +02:00
Nicolas Grekas
db31e80f0e Merge branch '2.8' into 3.2
* 2.8:
  [HttpFoundation] Fix transient tests
  [DI] Fix second auto-registration
2017-04-07 08:13:01 +02:00
Fabien Potencier
3f07e10183 feature #22314 [HttpKernel][FrameworkBundle] Dump container logs in Kernel, to have them also on errors (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel][FrameworkBundle] Dump container logs in Kernel, to have them also on errors

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

Inspecting container failures without the logs is hard, let's have them at hand. This should not be the responsibility of a compiler pass.

Commits
-------

a8b83340bb [HttpKernel][FrameworkBundle] Dump container logs in Kernel, to have them also on errors
2017-04-06 20:07:22 -07:00
Fabien Potencier
abb8d2bebb feature #22316 [WebServerBundle] added a way to dump current status host/port/address when getting the status (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[WebServerBundle] added a way to dump current status host/port/address when getting the status

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

Now that the web server can run on an automatically chosen port, it's more complex to integrate it into tests (I want to run some functional tests locally).

The `server:status` command gives this information, but not in a machine-readable way.

I propose to add a `--filter` flag to fix that:

`./bin/console server:status --filter=address`

Commits
-------

b417b62a92 [WebServerBundle] added a way to dump current status host/port/address when getting the status
2017-04-06 16:46:08 -07:00
Fabien Potencier
3458edf7f0 feature #22323 [DI] Report cascades of autowiring error messages (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Report cascades of autowiring error messages

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

Enhance DX by reporting the cascade of errors that lead to an autowiring error, eg:
![capture du 2017-04-07 00-03-28](https://cloud.githubusercontent.com/assets/243674/24777441/ac1fb118-1b25-11e7-9459-ecdf13e79798.png)

Also contains a cleanup found along the way: processing of nested definitions should happen before the current one so that TypedReference are processed only once.

Commits
-------

6c0f5e3a6f [DI] Reporte cascades of autowiring error messages
2017-04-06 16:41:23 -07:00
Fabien Potencier
f9d5ede9c6 minor #22324 [HttpFoundation] Fix transient tests (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpFoundation] Fix transient tests

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

We need to call `time()` when creating `DateTime` objects so that the clock-mock system can work.
This fixes some newly introduced transient tests.
ping @mpdude FYI

Commits
-------

9f7a6bb5e5 [HttpFoundation] Fix transient tests
2017-04-06 16:38:46 -07:00
Nicolas Grekas
9f7a6bb5e5 [HttpFoundation] Fix transient tests 2017-04-07 00:17:40 +02:00
Nicolas Grekas
6c0f5e3a6f [DI] Reporte cascades of autowiring error messages 2017-04-07 00:09:43 +02:00
Nicolas Grekas
a8b83340bb [HttpKernel][FrameworkBundle] Dump container logs in Kernel, to have them also on errors 2017-04-06 19:59:10 +02:00
Nicolas Grekas
451c32a965 minor #22319 [HttpKernel] Fix missing use statement in RegisterControllerArgumentLocatorPass (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Fix missing use statement in RegisterControllerArgumentLocatorPass

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

Maybe meaning that this one misses a test case ensuring parent definitions are indeed took into account

Commits
-------

dc2fe60 [HttpKernel] Fix missing use statement in RegisterControllerArgumentLocatorsPass
2017-04-06 19:45:03 +02:00
Robin Chalas
dc2fe604a2 [HttpKernel] Fix missing use statement in RegisterControllerArgumentLocatorsPass 2017-04-06 19:34:08 +02:00
Fabien Potencier
b417b62a92 [WebServerBundle] added a way to dump current status host/port/address when getting the status 2017-04-06 09:46:55 -07:00
Fabien Potencier
1f680ccb2d added Kernel::getProjectDir() 2017-04-06 09:25:05 -07:00
Fabien Potencier
0eb4d2a4d7 bug #22311 [DI] Fix second auto-registration (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] Fix second auto-registration

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

My bad

Commits
-------

c02de845e7 [DI] Fix second auto-registration
2017-04-06 09:16:06 -07:00
Nicolas Grekas
c02de845e7 [DI] Fix second auto-registration 2017-04-06 16:56:25 +02:00
Fabien Potencier
d662b2152d feature #22306 [DI] Restrict autowired registration to "same-vendor" namespaces (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Restrict autowired registration to "same-vendor" namespaces

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

Following #22295, it came to me that I've already been bitten hard by the auto-registration we decided to keep working: when one type-hints some class in the Symfony namespace (eg `Request`), then autoregistration creates a corresponding service. You see the issue. Hard time debugging that.

By restricting autoregistration to same-vendor (=same-root-namespace), we can keep all benefits of autoregistration, while closing this DX trap.

The patch is bigger than strictly required to implement this, but contains a few related fixes and cleanups.

Commits
-------

9c53b3deb0 [DI] Restrict autowired registration to "same-vendor" namespaces
2017-04-06 07:27:53 -07:00
Nicolas Grekas
9c53b3deb0 [DI] Restrict autowired registration to "same-vendor" namespaces 2017-04-06 11:28:30 +02:00
Fabien Potencier
ab93feae3f feature #22295 [BC BREAK][DI] Always autowire "by id" instead of using reflection against all existing services (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[BC BREAK][DI] Always autowire "by id" instead of using reflection against all existing services

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

(patch best reviewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/22295/files?w=1).)

"By-id" autowiring, as introduced in #22060 is free from all the issues that "by-type" autowiring has:
- it has no magic and requires explicit type<>id matching (*vs* using reflection on all services to cherry-pick *the* one that matches some type-hint *at that time*, which is fragile)
- it is free from any ambiguities (*vs* the Damocles' sword of breaking config just by enabling some unrelated bundle)
- it is easily introspected: just look at DI config files (*vs* inspecting the type-hierarchy of all services + their type-hints)
- ~~it is side-effect free, thus plain predictable (*vs* auto-registration of discovered types as services)~~
- it plays nice with deprecated services or classes (see #22282)
- *etc.*

Another consideration is that any "by-type" autowired configuration is either broken (because of future ambiguities) - or equivalent to a "by-id" configuration (because resolving ambiguities *means* adding explicit type<>id mappings.) For theoreticians, we could say that "by-id" autowiring is the asymptotic limit of "by-type" autowiring :-)

For all these reasons - and also because it reduces the complexity of the code base - I propose to change the behavior and only support "by-id" autowiring in 3.3. This will break some configurations relying on "by-type" autowiring. Yet the break will only happen at compile-time, which means this won't *silently* break any apps. For all core Symfony services, they will work out of the box thanks to #22098 *et al.* For the remaining services, fixing ones config should be pretty straightforward: just follow the suggestions provided by the exception messages. If they are fine to you, you'll end up with the exact same config in the end. And maybe you'll spot issues that were hidden previously.

Commits
-------

cc5e582dcf [BC BREAK][DI] Always autowire "by id" instead of using reflection against all existing services
2017-04-05 16:31:59 -07:00
Fabien Potencier
d33c0ee4d1 feature #20951 Redesigned the exception pages (javiereguiluz)
This PR was squashed before being merged into the 3.3-dev branch (closes #20951).

Discussion
----------

Redesigned the exception pages

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

Here are some before/after screenshots:

| Before | After
| --- | ---
| ![exception-before-1](https://cloud.githubusercontent.com/assets/73419/21258148/f8fd6482-c37b-11e6-9efe-1bcf7b323c0f.png) | ![exception-after-1](https://cloud.githubusercontent.com/assets/73419/21258156/016059cc-c37c-11e6-8bab-80456189d614.png)

| Before | After
| --- | ---
| ![exception-before-2](https://cloud.githubusercontent.com/assets/73419/21258171/11198a46-c37c-11e6-8a28-ae45e19e3eaf.png) | ![exception-after-2](https://cloud.githubusercontent.com/assets/73419/21258223/4cb9ac66-c37c-11e6-93db-0db2c204dc0b.png)

| Before | After
| --- | ---
| ![exception-before-3](https://cloud.githubusercontent.com/assets/73419/21258239/5a0747ac-c37c-11e6-923e-564322e862a6.png) | ![exception-after-3](https://cloud.githubusercontent.com/assets/73419/21258246/62ad8b00-c37c-11e6-8838-3c1824c18287.png)

---

And here is the new design in action because everything is very dynamic and you can click anywhere to reveal/collapse things:

![exception-in-action](https://cloud.githubusercontent.com/assets/73419/21258261/7445f140-c37c-11e6-9318-f3807fe38689.gif)

Commits
-------

9d0c26377f Redesigned the exception pages
2017-04-05 16:04:34 -07:00
Javier Eguiluz
9d0c26377f Redesigned the exception pages 2017-04-05 16:04:30 -07:00
Nicolas Grekas
cc5e582dcf [BC BREAK][DI] Always autowire "by id" instead of using reflection against all existing services 2017-04-05 23:48:42 +02:00
Nicolas Grekas
12bb392a39 Merge branch '3.2'
* 3.2:
  move provider after test
  update dataProvider function name
  cast substr result to string and remove empty function use
  rename dataset provider
  Add a test to prevent future regressions
  Switch to `empty` native function to check emptiness
  remove non relevant test case
  Switch to `is_string` native method
  Remove unnecessary parentheses
  Add a test case to prevent future regressions
  Move empty condition in return statement
  Use LF line separator
  fix coding standard to comply with fabbot
  Remove malformed EmailValidatorTest + Update UrlValidator test
  Add empty check on host in other methods + add unit tests
  [Validator] Allow checkMX() to return false when $host is empty
  [DI] Prevent AutowirePass from triggering irrelevant deprecations
  [DI] Fix the xml schema
  [Translation] avoid creating cache files for fallback locales.
2017-04-05 23:43:54 +02:00
Nicolas Grekas
32f264f3c8 Merge branch '2.8' into 3.2
* 2.8:
  move provider after test
  update dataProvider function name
  cast substr result to string and remove empty function use
  rename dataset provider
  Add a test to prevent future regressions
  Switch to `empty` native function to check emptiness
  remove non relevant test case
  Switch to `is_string` native method
  Remove unnecessary parentheses
  Add a test case to prevent future regressions
  Move empty condition in return statement
  Use LF line separator
  fix coding standard to comply with fabbot
  Remove malformed EmailValidatorTest + Update UrlValidator test
  Add empty check on host in other methods + add unit tests
  [Validator] Allow checkMX() to return false when $host is empty
  [DI] Prevent AutowirePass from triggering irrelevant deprecations
  [DI] Fix the xml schema
  [Translation] avoid creating cache files for fallback locales.
2017-04-05 23:38:45 +02:00
Nicolas Grekas
8d0cfa444a Merge branch '2.7' into 2.8
* 2.7:
  move provider after test
  update dataProvider function name
  cast substr result to string and remove empty function use
  rename dataset provider
  Add a test to prevent future regressions
  Switch to `empty` native function to check emptiness
  remove non relevant test case
  Switch to `is_string` native method
  Remove unnecessary parentheses
  Add a test case to prevent future regressions
  Move empty condition in return statement
  Use LF line separator
  fix coding standard to comply with fabbot
  Remove malformed EmailValidatorTest + Update UrlValidator test
  Add empty check on host in other methods + add unit tests
  [Validator] Allow checkMX() to return false when $host is empty
  [DI] Fix the xml schema
  [Translation] avoid creating cache files for fallback locales.
2017-04-05 23:34:00 +02:00
Fabien Potencier
457174dad9 feature #21919 [Form] Deprecated usage of "choices" option in sub types (HeahDude)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Form] Deprecated usage of "choices" option in sub types

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | ~

Follows #21880 and the discussion in #20771.

Commits
-------

b5b56fcbac [Form] Deprecated usage of "choices" option in sub types
2017-04-05 11:14:26 -07:00
Fabien Potencier
2adfb375c6 bug #22109 [Validator] check for empty host when calling checkdnsrr() (apetitpa)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #22109).

Discussion
----------

[Validator] check for empty host when calling checkdnsrr()

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

This should fix the email validator issue

Commits
-------

7104c4e849 move provider after test
c07fb416ff update dataProvider function name
1825d0f2ae cast substr result to string and remove empty function use
894127bf09 rename dataset provider
d973eb1f7d Add a test to prevent future regressions
6f24b05467 Switch to `empty` native function to check emptiness
f390f29173 remove non relevant test case
91b665c12a Switch to `is_string` native method
6071ff6c8f Remove unnecessary parentheses
9753a2773e Add a test case to prevent future regressions
4fcb24bacb Move empty condition in return statement
a090ef855a Use LF line separator
60392fdd43 fix coding standard to comply with fabbot
197d19f34c Remove malformed EmailValidatorTest + Update UrlValidator test
6b0702e52a Add empty check on host in other methods + add unit tests
6dd023f255 [Validator] Allow checkMX() to return false when $host is empty
2017-04-05 11:10:59 -07:00
apetitpa
7104c4e849 move provider after test 2017-04-05 11:10:47 -07:00
apetitpa
c07fb416ff update dataProvider function name 2017-04-05 11:10:47 -07:00