Commit Graph

42575 Commits

Author SHA1 Message Date
Nicolas Grekas
ac7d168ffa Merge branch '4.4'
* 4.4:
  [PhpUnitBridge] Bump PHPUnit 7+8
  Prepare for PHP 7.4 preload
  prevent double deprecation message
  [Validator] Deprecate unused arg in ExpressionValidator
  [Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation
  [DomCrawler][Feature][DX] Add Form::getName() method
  [VarDumper] caster for HttpClient's response dumps all info
2019-06-17 13:53:04 +02:00
Nicolas Grekas
a0aa94114a minor #32054 Prepare for PHP 7.4 preload (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Prepare for PHP 7.4 preload

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

PHP 7.4 preloading is not compatible with declaring the same class twice in if/else blocks.
Let's split the ones we have in several files.

Commits
-------

7cf3fb4a21 Prepare for PHP 7.4 preload
2019-06-17 13:50:38 +02:00
Fabien Potencier
8496003634 feature #32059 [PhpUnitBridge] Bump PHPUnit 7+8 (ro0NL)
This PR was squashed before being merged into the 4.4 branch (closes #32059).

Discussion
----------

[PhpUnitBridge] Bump PHPUnit 7+8

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

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

5491d5347c [PhpUnitBridge] Bump PHPUnit 7+8
2019-06-16 13:16:34 +02:00
Roland Franssen
5491d5347c [PhpUnitBridge] Bump PHPUnit 7+8 2019-06-16 13:16:20 +02:00
Nicolas Grekas
7cf3fb4a21 Prepare for PHP 7.4 preload 2019-06-15 00:30:02 +02:00
Tobias Schultze
9f6cbaa6b9 minor #32047 [Validator] prevent double deprecation message (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] prevent double deprecation message

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

Commits
-------

ecded5ed03 prevent double deprecation message
2019-06-14 20:10:10 +02:00
Christian Flothmann
ecded5ed03 prevent double deprecation message 2019-06-14 16:37:07 +02:00
Fabien Potencier
68d1b3fab7 feature #32041 [Validator] Deprecate unused arg in ExpressionValidator (ogizanagi)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Deprecate unused arg in ExpressionValidator

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A <!-- required for new features -->

Time to deprecate this unused first argument?

Commits
-------

0c0978cd47 [Validator] Deprecate unused arg in ExpressionValidator
2019-06-14 10:56:41 +02:00
Maxime Steinhausser
0c0978cd47 [Validator] Deprecate unused arg in ExpressionValidator 2019-06-14 10:40:37 +02:00
Fabien Potencier
50c62d7704 feature #31287 [Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation (jschaedl)
This PR was squashed before being merged into the 4.4 branch (closes #31287).

Discussion
----------

[Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| 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 | #27534   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | tbd.

### Description

This PR introduces a new `find(string $nodePath)`method in the `ArrayNodeDefinition` class, which helps you finding the right node to prepend configuration to ease configuration tree manipulation.

### How to use it
```php
class Configuration implements ConfigurationInterface
{
    public function getConfigTreeBuilder()
    {
        ...

        $rootNode
            ->children()
                ->arrayNode('social_media_channels')
                    ->children()
                        ->booleanNode('enable')->end()
                        ->arrayNode('twitter')->end()
                        ->arrayNode('facebook')->end()
                        ->arrayNode('instagram')->end()
                    ->end()
                ->end()
            ->end()
        ;

        $this->changeSocialMediaChannelConfiguration($rootNode->find('social_media_channels.enable'));
        $this->addTwitterConfiguration($rootNode->find('social_media_channels.twitter'));
        $this->addFacebookConfiguration($rootNode->find('social_media_channels.facebook'));
        $this->addInstagramConfiguration($rootNode->find('social_media_channels.instagram'));

        return $treeBuilder;
    }

    private function changeSocialMediaChannelConfiguration(NodeDefinition $node)
    {
        $node
            ->defaultTrue()
        ;
    }

    private function addTwitterConfiguration(NodeDefinition $node)
    {
        $node
            ->children()
                ->integerNode('client_id')->end()
                ->scalarNode('client_secret')->end()
            ->end()
        ;
    }

    private function addFacebookConfiguration(NodeDefinition $node)
    {
        $node
            ->children()
                ->integerNode('client_id')->end()
                ->scalarNode('client_secret')->end()
            ->end()
        ;
    }

    private function addInstagramConfiguration(NodeDefinition $node)
    {
        $node
            ->children()
                ->integerNode('client_id')->end()
                ->scalarNode('client_secret')->end()
            ->end()
        ;
    }
}

```

Commits
-------

e3b248aee0 [Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation
2019-06-14 09:59:19 +02:00
Jan Schädlich
e3b248aee0 [Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation 2019-06-14 09:59:12 +02:00
Fabien Potencier
f06a35b974 feature #31959 [DomCrawler][Feature][DX] Add Form::getName() method (JustBlackBird)
This PR was squashed before being merged into the 4.4 branch (closes #31959).

Discussion
----------

[DomCrawler][Feature][DX] Add Form::getName() method

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | None
| License       | MIT
| Doc PR        | symfony/symfony-docs#11705

The PR adds `Symfony\Component\DomCrawler\Form::getName` method.

The method is actually a syntax sugar but can improve DX when dealing with tests. For example, in the snippet

```php
$client = static::createClient();
$crawler = $client->request('GET', '/post/hello-world');
$form = $crawler->selectButton('submit')->form();

$form['my_form[name]'] = 'Fabien';
$form['my_form[subject]'] = 'Symfony rocks!';
```
the prefix in field name (`my_form`) is form name, which is generated by Symfony automatically. The method, added in the PR helps to get that name in a most obvious way.

Commits
-------

ff53cb462a [DomCrawler][Feature][DX] Add Form::getName() method
2019-06-14 07:15:47 +02:00
Dmitry Simushev
ff53cb462a [DomCrawler][Feature][DX] Add Form::getName() method 2019-06-14 07:15:39 +02:00
Fabien Potencier
bad18dc4ac feature #32026 [VarDumper] caster for HttpClient's response dumps all info (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] caster for HttpClient's response dumps all info

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

No need to dump the internal structure for responses IMHO, here is a caster that dumps the info instead:

![image](https://user-images.githubusercontent.com/243674/59434490-efb5a280-8deb-11e9-8714-5f1ccbc208b1.png)

Commits
-------

2b268379f5 [VarDumper] caster for HttpClient's response dumps all info
2019-06-13 18:38:05 +02:00
Nicolas Grekas
2b268379f5 [VarDumper] caster for HttpClient's response dumps all info 2019-06-13 18:29:46 +02:00
Nicolas Grekas
fdc2c9cbb9 Allow doctrine-bundle ^2 2019-06-13 16:30:45 +02:00
Nicolas Grekas
23d8fc761b fix merge 2019-06-13 16:28:46 +02:00
Nicolas Grekas
1acb50e0a4 [Security] minor clean 2019-06-13 16:10:13 +02:00
Nicolas Grekas
0bb0335ab6 Merge branch '4.4'
* 4.4:
  [Security] minor improvement
  fix merge
2019-06-13 16:09:44 +02:00
Nicolas Grekas
567cb27a1d [Security] minor improvement 2019-06-13 16:09:13 +02:00
Nicolas Grekas
7a1e6f732e Merge branch '4.3' into 4.4
* 4.3:
  fix merge
2019-06-13 16:07:54 +02:00
Nicolas Grekas
648aa67eca fix merge 2019-06-13 16:07:09 +02:00
Fabien Potencier
fb9808a9e4 fixed CS 2019-06-13 13:20:38 +02:00
Fabien Potencier
b29c567600 fixed typo 2019-06-13 13:19:11 +02:00
Fabien Potencier
c449e6368c Merge branch '4.4'
* 4.4:
  fixed CS
  fixed CS
  fixed CS
  fixed CS
  Do not log or call the proxy function when the locale is the same
  Added missing required dependencies on psr/cache and psr/container in symfony/cache-contracts and symfony/service-contracts respectively.
  [HttpClient] fix closing debug stream prematurely
  [Mailer] made code more robust
  Restore compatibility with php 5.5
  fixed sender/recipients in SMTP Envelope
  collect called listeners information only once
  [HttpClient] add HttplugClient for compat with libs that need httplug v1 or v2
  [HttpKernel] Remove TestEventDispatcher.
2019-06-13 13:15:36 +02:00
Fabien Potencier
fa38497957 fixed CS 2019-06-13 13:06:22 +02:00
Fabien Potencier
8787bbc94a Merge branch '4.3' into 4.4
* 4.3:
  fixed CS
  fixed CS
  fixed CS
  Do not log or call the proxy function when the locale is the same
  Added missing required dependencies on psr/cache and psr/container in symfony/cache-contracts and symfony/service-contracts respectively.
  [HttpClient] fix closing debug stream prematurely
  [Mailer] made code more robust
  Restore compatibility with php 5.5
  fixed sender/recipients in SMTP Envelope
  collect called listeners information only once
  [HttpKernel] Remove TestEventDispatcher.
2019-06-13 13:05:05 +02:00
Fabien Potencier
9526988eca fixed CS 2019-06-13 13:03:18 +02:00
Fabien Potencier
84bc7aba91 Merge branch '4.2' into 4.3
* 4.2:
  fixed CS
  fixed CS
  [HttpKernel] Remove TestEventDispatcher.
2019-06-13 13:01:17 +02:00
Fabien Potencier
37fa45bbd1 fixed CS 2019-06-13 12:57:15 +02:00
Fabien Potencier
0f958aabfa Merge branch '3.4' into 4.2
* 3.4:
  fixed CS
  [HttpKernel] Remove TestEventDispatcher.
2019-06-13 12:50:42 +02:00
Fabien Potencier
a0b6d3de65 minor #32020 CS fixes native functions (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

CS fixes native functions

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

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

106b348d3d fixed CS
2019-06-13 12:42:06 +02:00
Fabien Potencier
106b348d3d fixed CS 2019-06-13 12:34:15 +02:00
Fabien Potencier
dab7a554ae bug #32014 Do not log or call the proxy function when the locale is the same (gmponos)
This PR was squashed before being merged into the 4.3 branch (closes #32014).

Discussion
----------

Do not log or call the proxy function when the locale is the same

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

I was the one creating the PR for logging the change of the locale but ATM I am filled with logs of translator about switching the locale from "en" to "en".. Not sure why.

Commits
-------

31bdfb372c Do not log or call the proxy function when the locale is the same
2019-06-13 11:55:06 +02:00
Mponos George
31bdfb372c Do not log or call the proxy function when the locale is the same 2019-06-13 11:54:55 +02:00
Fabien Potencier
e63577500c bug #32011 [HttpClient] fix closing debug stream prematurely (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix closing debug stream prematurely

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

@ElGecko76 can you please confirm this fixes the issue for you?
I'm not able to reproduce so I can't myself. Thanks.

Commits
-------

21857a1edb [HttpClient] fix closing debug stream prematurely
2019-06-13 11:48:41 +02:00
Fabien Potencier
d74f389143 bug #32017 [Contracts] add missing required dependencies (mbessolov)
This PR was merged into the 4.3 branch.

Discussion
----------

[Contracts] add missing required dependencies

| Q             | A
| ------------- | ---
| Branch?       | 4.3 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32016    <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a <!-- required for new features -->

As discussed in #32016, added missing required deps so that symfony/cache-contracts and symfony/service-contracts can be installed and used on their own.

cc @nicolas-grekas

Commits
-------

9cbeb63613 Added missing required dependencies on psr/cache and psr/container in symfony/cache-contracts and symfony/service-contracts respectively.
2019-06-13 11:07:42 +02:00
Michael Bessolov
9cbeb63613
Added missing required dependencies on psr/cache and psr/container
in symfony/cache-contracts and symfony/service-contracts respectively.
2019-06-12 23:16:15 -07:00
Fabien Potencier
1c1d6d9edf bug #31992 Fix sender/recipients in SMTP Envelope (fabpot)
This PR was merged into the 4.3 branch.

Discussion
----------

Fix sender/recipients in SMTP Envelope

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

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

7a2f9bf134 fixed sender/recipients in SMTP Envelope
2019-06-12 18:30:49 +02:00
Fabien Potencier
41ff9d31d4 minor #32002 [Mailer] made code more robust (fabpot)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer] made code more robust

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

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

8bdc6596ef [Mailer] made code more robust
2019-06-12 16:08:31 +02:00
Nicolas Grekas
21857a1edb [HttpClient] fix closing debug stream prematurely 2019-06-12 15:33:27 +02:00
Fabien Potencier
c45c6e50e1 bug #31999 [PhpunitBridge] Restore php 5.5 compat (greg0ire)
This PR was merged into the 4.3 branch.

Discussion
----------

[PhpunitBridge] Restore php 5.5 compat

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

The `ARRAY_FILTER_USE_KEY` constant was introduced in php 5.6, let us
avoid it for now.
See https://www.php.net/manual/en/function.array-filter.php#refsect1-function.array-filter-changelog

Thanks @alcaeus for spotting this in https://travis-ci.org/doctrine/DoctrineBundle/jobs/543340482#L596

Commits
-------

496c118c3a Restore compatibility with php 5.5
2019-06-12 06:56:39 +02:00
Fabien Potencier
8bdc6596ef [Mailer] made code more robust 2019-06-12 06:54:21 +02:00
Grégoire Paris
496c118c3a
Restore compatibility with php 5.5
The ARRAY_FILTER_USE_KEY constant was introduced in php 5.6, let us
avoid it for now.
See https://www.php.net/manual/en/function.array-filter.php#refsect1-function.array-filter-changelog
2019-06-11 23:50:05 +02:00
Fabien Potencier
7a2f9bf134 fixed sender/recipients in SMTP Envelope 2019-06-11 21:40:57 +02:00
Fabien Potencier
7a6ce5ff85 minor #31994 [HttpKernel] Remove TestEventDispatcher (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Remove TestEventDispatcher

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

This class seems to be an orphaned test fixture. Let's delete it.

Commits
-------

48be09f37e [HttpKernel] Remove TestEventDispatcher.
2019-06-11 21:38:58 +02:00
Fabien Potencier
ac1a660130 bug #31991 [EventDispatcher] collect called listeners information only once (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[EventDispatcher] collect called listeners information only once

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

Commits
-------

284262a219 collect called listeners information only once
2019-06-11 20:36:39 +02:00
Christian Flothmann
284262a219 collect called listeners information only once 2019-06-11 20:36:39 +02:00
Nicolas Grekas
9d7e9fcac9 feature #31976 [HttpClient] add HttplugClient for compat with libs that need httplug v1 or v2 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] add HttplugClient for compat with libs that need httplug v1 or v2

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

Many libs still depend on httplug:
https://packagist.org/packages/php-http/client-implementation/dependents

Until they're all updated to PSR-18 or SFContracts, this PR provides an adapter for injecting a Symfony HttpClient into httplug-compatible classes, v1 or v2.

Commits
-------

28674b1e30 [HttpClient] add HttplugClient for compat with libs that need httplug v1 or v2
2019-06-11 17:50:00 +02:00
Nicolas Grekas
28674b1e30 [HttpClient] add HttplugClient for compat with libs that need httplug v1 or v2 2019-06-11 17:49:07 +02:00