Commit Graph

40838 Commits

Author SHA1 Message Date
Ryan Weaver
a989384999 Adding global retry support, events & more to messenger transport
Co-authored-by: Samuel ROZE <samuel.roze@gmail.com>
2019-03-23 09:39:27 -04:00
Anthony MARTIN
1ee0a1147a [HttpClient] Add a ScopingHttpClient 2019-03-23 10:56:47 +01:00
Roland Franssen
b9ac3a52fb Debug finalized config in debug:config 2019-03-22 20:30:22 +01:00
tdutrion
c40017d63c
Allow user to set the project dir
Currently, the project directory is defined by the location of the composer.json file.
That file is not required in production, which therefore breaks the method getProjectDir (who sends back null).
This does not fix the behaviour, but allows the developer to pass the project dir as a parameter.
2019-03-22 19:38:23 +01:00
Fabien Potencier
dae5686722 [HttpClient] added CachingHttpClient 2019-03-22 16:52:17 +01:00
Christian Flothmann
2d3f2b7a74 undeprecate the RoleHierarchyInterface
Instead of deprecating the interface it is sufficient to deprecate its
getReachableRoles() method and add a new getReachableRoleNames() method
in Symfony 5.
2019-03-22 16:40:58 +01:00
Grégoire Pineau
59f20ad8fd minor #30551 [Workflow] Deprecate MultipleStateMarkingStore and SingleStateMarkingStore in favor of MethodMarkingStore (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Workflow] Deprecate MultipleStateMarkingStore and SingleStateMarkingStore in favor of MethodMarkingStore

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

4d58beb7c8 [Workflow] Deprecate MultipleStateMarkingStore and SingleStateMarkingStore in favor of MethodMarkingStore
2019-03-22 16:04:19 +01:00
Grégoire Pineau
9354c8ef45 minor #30643 Make MethodMarkingStore final (vudaltsov)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Make MethodMarkingStore final

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

Made `MethodMarkingStore` final as proposed in https://github.com/symfony/symfony/pull/29146#issuecomment-475574327.

Commits
-------

bbf582bce5 Make MethodMarkingStore final
2019-03-22 15:58:38 +01:00
Grégoire Pineau
4d58beb7c8 [Workflow] Deprecate MultipleStateMarkingStore and SingleStateMarkingStore in favor of MethodMarkingStore 2019-03-22 15:53:11 +01:00
Grégoire Pineau
98045b1a90 feature #30468 [Workflow] Added support for many inital places (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Workflow] Added support for many inital places

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

Commits
-------

1af1bf29ef Added support for many inital places
2019-03-22 15:51:00 +01:00
Valentin Udaltsov
bbf582bce5 Make MethodMarkingStore final 2019-03-22 16:04:03 +03:00
Serkan Yildiz
28b6dd243e Replace class with new name. 2019-03-22 12:59:39 +01:00
THERAGE Kévin
b5b2a2557c Add tests for HttpBrowser 2019-03-22 12:38:01 +01:00
Fabien Potencier
dd55845706 [BrowserKit] added support for HttpClient 2019-03-22 12:38:00 +01:00
Fabien Potencier
522594a69d Merge branch '4.2'
* 4.2:
  [Phpunit] fixed support for PHP 5.3
  Response prepare method update
  [Workflow] Added missing license header
  Fix case when multiple loaders are providing paths for the same namespace
  Check if Client exists when test.client does not exist, to provide clearer exception message
  throw TypeErrors to prepare for type hints in 5.0
  [Form] Preventing validation of children if parent with Valid constraint has no validation groups
  [Form] Added ResetInterface to CachingFactoryDecorator
  Remove deprecated usage
  [Tests] fixed compatbility of assertEquals(): void
  Fixed usage of TranslatorInterface in form extension (fixes #30591)
  [Intl][4.2] Fix test
  [Intl] Fix test
  [Validator] Add the missing translations for the Arabic (ar) locale
  [Intl] Add compile binary
  Fix DebugCommand when chain loader is involved
  [Form] Fixed some phpdocs
2019-03-22 09:16:47 +01:00
Fabien Potencier
7e5dfcff7b Merge branch '3.4' into 4.2
* 3.4:
  [Phpunit] fixed support for PHP 5.3
  Response prepare method update
  [Workflow] Added missing license header
  Check if Client exists when test.client does not exist, to provide clearer exception message
  [Form] Preventing validation of children if parent with Valid constraint has no validation groups
  [Tests] fixed compatbility of assertEquals(): void
  [Intl] Fix test
  [Validator] Add the missing translations for the Arabic (ar) locale
  [Intl] Add compile binary
  [Form] Fixed some phpdocs
2019-03-22 09:16:34 +01:00
Fabien Potencier
9dad29d61c bug #30640 [Phpunit] fixed support for PHP 5.3 (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[Phpunit] fixed support for PHP 5.3

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

Compat with PHP 5.3 was broken by #30496
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

606b8af8ec [Phpunit] fixed support for PHP 5.3
2019-03-22 09:15:47 +01:00
Fabien Potencier
606b8af8ec [Phpunit] fixed support for PHP 5.3 2019-03-22 09:11:54 +01:00
Fabien Potencier
0b2a9d56d7 feature #30448 [Finder] Ignore paths from .gitignore #26714 (amaabdou)
This PR was squashed before being merged into the 4.3-dev branch (closes #30448).

Discussion
----------

 [Finder] Ignore paths from .gitignore #26714

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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->
Implementation of feature request #26714

Finder::ignoreVCS() is great at ignoring file patterns for the files created by popular VCS systems.

However, it would be great to be able to instruct Finder to actually exclude the paths excluded by .gitignore.

So if we have .gitignore:

vendor/
cache/

Finder::create()
	->files()
    ->ignoreVCS(true) // <--- Ignores `.git`
	->ignoreVCSIgnored(true); // <--- Ignores vendor/ and cache/

Commits
-------

9491393dc2  [Finder] Ignore paths from .gitignore #26714
2019-03-22 08:19:31 +01:00
Ahmed Abdou
9491393dc2 [Finder] Ignore paths from .gitignore #26714 2019-03-22 08:19:24 +01:00
Fabien Potencier
9ee5248731 minor #30633 Response prepare method update for more coherence (DamienVauchel)
This PR was merged into the 3.4 branch.

Discussion
----------

Response prepare method update for more coherence

$headers has been defined to avoid using $this->headers and is used everywhere but not in these lines.

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

Commits
-------

e89c9213e2 Response prepare method update
2019-03-22 07:11:03 +01:00
Fabien Potencier
7e30c971ab fixed CS 2019-03-22 07:07:54 +01:00
ScoobyDam
e89c9213e2
Response prepare method update
Response prepare updated for more coherence.
2019-03-21 19:51:37 +01:00
Fabien Potencier
4574f8543c feature #30625 [HttpKernel] add RealHttpKernel: handle requests with HttpClientInterface (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpKernel] add RealHttpKernel: handle requests with HttpClientInterface

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

This commit is directly extracted from #30602 by @fabpot

Commits
-------

b579b023bd [HttpKernel] add RealHttpKernel: handle requests with HttpClientInterface
2019-03-21 15:56:27 +01:00
Nicolas Grekas
6fdc1b43f7 minor #30626 [HttpClient] improve MockResponse (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient] improve MockResponse

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

While working with `MockHttpClient`, we figured out these would be useful:
 - `MockResponse::getRequestOptions()` to get the options that were used when doing the request
- relax the format of the `raw_headers` info and allow it to be defined as name=>value(s) pairs.

Commits
-------

26f6e28160 [HttpClient] improve MockResponse
2019-03-21 13:41:56 +01:00
Nicolas Grekas
26f6e28160 [HttpClient] improve MockResponse 2019-03-21 13:37:55 +01:00
Fabien Potencier
b579b023bd [HttpKernel] add RealHttpKernel: handle requests with HttpClientInterface 2019-03-21 12:53:53 +01:00
Fabien Potencier
e1df835816 minor #30618 [Workflow] Added missing license header (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Workflow] Added missing license header

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

Commits
-------

e78a13f717 [Workflow] Added missing license header
2019-03-20 22:14:09 +01:00
Fabien Potencier
af28965c24 fixed encoder in Mime 2019-03-20 21:49:31 +01:00
Fabien Potencier
b29686029a bug #30616 Fix case when multiple loaders are providing paths for the same namespace (yceruto)
This PR was merged into the 4.2 branch.

Discussion
----------

Fix case when multiple loaders are providing paths for the same namespace

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

Fixes @stof https://github.com/symfony/symfony/pull/30440#discussion_r267316027

Let me know if a test case is necessary for this.

Cheers!

Commits
-------

393d7280e5 Fix case when multiple loaders are providing paths for the same namespace
2019-03-20 21:18:35 +01:00
Grégoire Pineau
1af1bf29ef Added support for many inital places 2019-03-20 20:27:53 +01:00
Grégoire Pineau
e78a13f717 [Workflow] Added missing license header 2019-03-20 20:20:03 +01:00
Yonel Ceruto
393d7280e5 Fix case when multiple loaders are providing paths for the same namespace 2019-03-20 11:45:54 -04:00
Fabien Potencier
fc826aac4c feature #30508 [Routing] Exposed "utf8" option, defaults "locale" and "format" in configuration (Jules Pietri)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Routing] Exposed "utf8" option, defaults "locale" and "format" in configuration

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

A sibling to #30501, everything is in the title :).

Commits
-------

2911490c80 [Routing] Exposed "utf8" option, defaults "locale" and "format" in configuration
2019-03-20 16:17:03 +01:00
Jules Pietri
2911490c80 [Routing] Exposed "utf8" option, defaults "locale" and "format" in configuration 2019-03-20 15:57:56 +01:00
Fabien Potencier
1246c79b9f bug #30595 Do not validate child constraints if form has no validation groups (maryo)
This PR was merged into the 3.4 branch.

Discussion
----------

Do not validate child constraints if form has no validation groups

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

If a form has `Valid` constraint and `validation_groups` set to an empty array (to disable validation) then its children were still validated using default validation group because `FormValidator` validated the form data using the empty array validation group here
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php#L76

and then `RecursiveContextualValidator` treats the empty array as default validation group here.

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php#L86

Commits
-------

f45f0d03fc [Form] Preventing validation of children if parent with Valid constraint has no validation groups
2019-03-20 13:40:27 +01:00
Fabien Potencier
1479a26a0b feature #28920 [EventDispatcher] swap arguments of dispatch() to allow registering events by FQCN (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[EventDispatcher] swap arguments of dispatch() to allow registering events by FQCN

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

PR green and ready. From UPGRADE files:

 EventDispatcher
---------------

 * The signature of the `EventDispatcherInterface::dispatch()` method should be updated to `dispatch($event, string $eventName = null)`, not doing so is deprecated

HttpKernel
----------

 * Renamed `FilterControllerArgumentsEvent` to `ControllerArgumentsEvent`
 * Renamed `FilterControllerEvent` to `ControllerEvent`
 * Renamed `FilterResponseEvent` to `ResponseEvent`
 * Renamed `GetResponseEvent` to `RequestEvent`
 * Renamed `GetResponseForControllerResultEvent` to `ViewEvent`
 * Renamed `GetResponseForExceptionEvent` to `ExceptionEvent`
 * Renamed `PostResponseEvent` to `TerminateEvent`

Security
---------

 * The `ListenerInterface` is deprecated, turn your listeners into callables instead.
 * The `Firewall::handleRequest()` method is deprecated, use `Firewall::callListeners()` instead.

Commits
-------

75369dabb8 [EventDispatcher] swap arguments of dispatch() to allow registering events by FQCN
2019-03-20 13:34:13 +01:00
Fabien Potencier
81bf2abf19 feature #30605 [Cache] added DSN support for rediss in AbstractAdapter and RedisTrait (alex-vasilchenko-md)
This PR was squashed before being merged into the 4.3-dev branch (closes #30605).

Discussion
----------

[Cache] added DSN support for rediss in AbstractAdapter and RedisTrait

| 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/issues/30573
| License       | MIT

A fix for this issue: https://github.com/symfony/symfony/issues/30573
Support for "rediss:" in DSN added.

Commits
-------

7e2852dd44 [Cache] added DSN support for rediss in AbstractAdapter and RedisTrait
2019-03-20 12:35:16 +01:00
Alex Vasilchenko
7e2852dd44 [Cache] added DSN support for rediss in AbstractAdapter and RedisTrait 2019-03-20 12:35:07 +01:00
Fabien Potencier
2de59a1362 bug #30440 [TwigBridge] Fix DebugCommand when chain loader is involved (yceruto)
This PR was merged into the 4.2 branch.

Discussion
----------

[TwigBridge] Fix DebugCommand when chain loader is involved

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

Better diff: https://github.com/symfony/symfony/pull/30440/files?utf8=%E2%9C%93&diff=unified&w=1

Commits
-------

f647b4a29d Fix DebugCommand when chain loader is involved
2019-03-20 09:06:40 +01:00
Fabien Potencier
059ba38214 bug #30479 Check if Client exists when test.client does not exist, to provide clearer exception message (SerkanYildiz)
This PR was squashed before being merged into the 3.4 branch (closes #30479).

Discussion
----------

Check if Client exists when test.client does not exist, to provide clearer exception message

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

The `DotEnv` component does not overwrite by using environment variables declared in `.env` files.

In the `FrameworkExtension` will be checked if the framework.test config is set to a non-false value, if so it will load the `test.xml` file which contains the definition for the `test.client` service.

When running `php bin/phpunit` it will use `phpunit.xml.dist` but because we defined `APP_ENV` in our system it will not load `test.xml` so when creating a client to do functional tests, we'll get an exception which isn't correct: `You cannot create the client used in functional tests if the BrowserKit component is not available. Try running "composer require symfony/browser-kit"`

This PR aims to add a clearer exception message which indicates what really should be done to fix the error message.

Commits
-------

b429950af6 Check if Client exists when test.client does not exist, to provide clearer exception message
2019-03-20 08:44:30 +01:00
Serkan Yildiz
b429950af6 Check if Client exists when test.client does not exist, to provide clearer exception message 2019-03-20 08:44:21 +01:00
Fabien Potencier
3b9dad4e46 bug #30597 [Form] Added ResetInterface to CachingFactoryDecorator (HeahDude)
This PR was merged into the 4.2 branch.

Discussion
----------

[Form] Added ResetInterface to CachingFactoryDecorator

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

I don't know if this should be considered a feature and target master, but I tend to see it as a bug fix.

Commits
-------

4ddf5a14eb [Form] Added ResetInterface to CachingFactoryDecorator
2019-03-20 08:34:28 +01:00
Fabien Potencier
d92ae4544c minor #30600 [Workflow] Remove deprecated usage (Nek-)
This PR was merged into the 4.2 branch.

Discussion
----------

[Workflow] Remove deprecated usage

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

This is a little improvement suggestion because string usage is deprecated while it's still the default value. `null` is also deprecated but is required for BC.

Commits
-------

eeb3c29fab Remove deprecated usage
2019-03-20 08:31:47 +01:00
Fabien Potencier
2278d4c52b minor #30611 throw TypeErrors to prepare for type hints in 5.0 (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

throw TypeErrors to prepare for type hints in 5.0

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

10afb99e3f throw TypeErrors to prepare for type hints in 5.0
2019-03-20 08:28:49 +01:00
Fabien Potencier
388532f085 minor #30610 throw TypeErrors to prepare for type hints in 5.0 (xabbuh)
This PR was merged into the 4.2 branch.

Discussion
----------

throw TypeErrors to prepare for type hints in 5.0

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

Commits
-------

f18751bd98 throw TypeErrors to prepare for type hints in 5.0
2019-03-20 08:28:04 +01:00
Fabien Potencier
83ff914b25 bug #30612 [FrameworkBundle] fix max host connections option for XML configs (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] fix max host connections option for XML configs

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

Commits
-------

3378f5e9a1 fix max host connections option for XML configs
2019-03-20 08:26:26 +01:00
Christian Flothmann
3378f5e9a1 fix max host connections option for XML configs 2019-03-19 22:31:07 +01:00
Christian Flothmann
10afb99e3f throw TypeErrors to prepare for type hints in 5.0 2019-03-19 22:12:04 +01:00
Christian Flothmann
f18751bd98 throw TypeErrors to prepare for type hints in 5.0 2019-03-19 22:07:50 +01:00