Commit Graph

42823 Commits

Author SHA1 Message Date
Fabien Potencier 9830c64db0 bug #32156 [Workflow] re-add workflow.definition tag to workflow services (nikossvnk)
This PR was squashed before being merged into the 4.3 branch (closes #32156).

Discussion
----------

[Workflow] re-add workflow.definition tag to workflow services

| 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 | #32155   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |

Add again the `workflow.definition` tag in workflow services.

Commits
-------

4df2dc5aaa [Workflow] re-add workflow.definition tag to workflow services
2019-06-25 14:31:05 +02:00
nikos.sotiropoulos 4df2dc5aaa [Workflow] re-add workflow.definition tag to workflow services 2019-06-25 14:30:50 +02:00
Nicolas Grekas 61ea53d57f [Security/Core] Don't use ParagonIE_Sodium_Compat 2019-06-25 14:22:47 +02:00
Ben Davies 3d37cc98f6 revert #30525 due to performance penalty 2019-06-25 10:08:34 +01:00
Christian Flothmann 2ad32df6e0 collect called listeners information only once 2019-06-25 09:45:31 +02:00
Amrouche Hamza 71eb8cfe99
[Lock] fix missing inherit docs in RedisStore 2019-06-25 07:47:15 +02:00
Jonathan e6cb7d866a Remove return type from ExceptionHandler::setFileLinkFormat 2019-06-25 09:03:15 +04:00
Robin Chalas d2711bfe0e minor #32144 add missing return type in User class (Tobion)
This PR was merged into the 5.0-dev branch.

Discussion
----------

add missing return type in User class

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Fixed a missing type in #31996 chasing #17201
Every method in this class had a return type but this method.

Commits
-------

7857f2fe7b add missing return type in User class
2019-06-25 03:54:01 +02:00
Robin Chalas efaa154c74 minor #32146 [Security] add return type declaration (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] add return type declaration

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

Commits
-------

9fe532d657 add return type declaration
2019-06-25 03:46:17 +02:00
Tobias Schultze 8124159052 minor #32078 [Messenger] make all stamps final and mark stamp not meant to be sent (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] make all stamps final and mark stamp not meant to be sent

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

Some newer stamps were already final. This makes all of them final. Also marks all stamps that are not meant to be sent using the new `NonSendableStampInterface`. This makes it easier to see which stamps are actually important and required to persist in a queue for certain functionality, like the `BusNameStamp` for the `RoutableMessageBus`

Commits
-------

013904b081 [Messenger] make all stamps final and mark stamp not meant to be sent
2019-06-24 23:33:22 +01:00
Tobias Schultze 67af93f3b0 bug #32053 [Messenger] No need for retry to require SentStamp (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] No need for retry to require SentStamp

| 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 |
| License       | MIT
| Doc PR        |

Fixes 2) in #32049
@weaverryan the SentStamp in the worker seems totally irrelevant. You always want to send messages back to the transport where they came from for retry. The only relevance I can potentially see is for the SyncTransport. Messages received async from worker might be routed to the SyncTransport. Using the SentStamp would redeliver the messages into the SyncTransport instead of the async. But that doesn't seem to have any use-case. I'm running the worker which handles the messages immediately. So basically there is no difference if they go to the Sync or Async transport from within the worker.

Commits
-------

0034dee641 [Messenger] make retry logic work without SentStamp
2019-06-24 23:32:13 +01:00
Tobias Schultze 66c2e8483a [Messenger] fix retrying handlers using DoctrineTransactionMiddleware 2019-06-24 15:34:54 +01:00
Hippolyte Alain afbefe131b [Mailgun Mailer] fixed issue when using html body 2019-06-24 16:09:08 +02:00
Tobias Schultze 013904b081 [Messenger] make all stamps final and mark stamp not meant to be sent 2019-06-24 14:58:45 +01:00
Nicolas Grekas c5c3332400 [HttpClient] fix timing measurements with NativeHttpClient 2019-06-24 10:59:29 +02:00
Christian Flothmann 9fe532d657 add return type declaration 2019-06-24 10:10:57 +02:00
Tobias Schultze 2f9121b74d use proper return types in ErrorHandler and ArgumentResolver 2019-06-24 02:04:42 +01:00
Tobias Schultze 7857f2fe7b add missing return type in User class 2019-06-24 01:51:21 +01:00
Tobias Schultze 18793b7ca7 feature #31996 [5.0] Add return types in final classes (dFayet)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[5.0] Add return types in final classes

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

This is the first step for the issue #31981

I have some questions:

-  ~I have not added type for methods with `@inheritdoc` annotation, should I?~
- ~Don't we want to type also functions without `@return` annotation? (still in `final` classes)~
- ~If yes is the answer of the previous one, do we also want the `void` return type?~
- ~I have also added the return type in the `DependencyInjection` PhpDumper, but is it also wanted? (if yes, I will clean a bit the code changed)~
- ~Should we update the documentation's code samples when they display `final` classes?~

Todo:
- [x] Adjust the PR, following the answers of the questions
- [x] Add return type also when there is no `@return`, or with `@inheritdoc`
- [x] [src/Symfony/Component/Debug/ErrorHandler.php#L383](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Debug/ErrorHandler.php#L383) `@return` annotation is not correct according to the return, investigate and adjust if needed
- [x] [src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php#L50](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php#L50) `@return` annotation is not correct according to the return, investigate and adjust if needed
- [x] Do a PR on documentation to add return type on code snippets with final classes => unneeded as they were already typed

Commits
-------

ca5ae1989e Replace @return annotation by return type in final classes
2019-06-23 23:15:46 +01:00
Amrouche Hamza 3f8354f58f
[Process] Allow writing portable "prepared" command lines 2019-06-23 21:19:36 +02:00
Nicolas Grekas 412411d795 [HttpClient] fix dealing with 1xx informational responses 2019-06-23 19:42:15 +02:00
Nicolas Grekas 698601140b minor #31993 [Mailer] Catch missing scheme in DSN (derrabus)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer] Catch missing scheme in DSN

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

The `Symfony\Component\Mailer\Transport::createTransport()` method parses and validates a passed DSN. I noticed that we never check if the DSN contains a valid scheme, but we always assume that the scheme is present in then parse result. If someone passes a DSN without a scheme to that method, they would almost certainly run into a PHP notice.

This PR makes sure that a scheme is present in the URL and throws a proper exception otherwise.

Commits
-------

3eba36c088 [Mailer] Catch missing scheme in DSN.
2019-06-23 17:43:40 +02:00
Nicolas Grekas b56591c92d bug #32083 [HttpClient] fixing passing debug info to progress callback (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fixing passing debug info to progress callback

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

NativeHttpClient already has it.

Commits
-------

dc55cf826a [HttpClient] fixing passing debug info to progress callback
2019-06-23 17:19:50 +02:00
Nicolas Grekas 57d73fcac3 minor #32140 [Filesystem] add test to avoid regressions (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Filesystem] add test to avoid regressions

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

Commits
-------

0d7d1f81bc add test to avoid regressions
2019-06-23 17:08:29 +02:00
Nicolas Grekas 6d02c89c21 bug #32129 [DebugBundle] fix register ReflectionCaster::unsetClosureFileInfo caster in var cloner service (alekitto)
This PR was merged into the 4.3 branch.

Discussion
----------

[DebugBundle] fix register ReflectionCaster::unsetClosureFileInfo caster in var cloner service

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

Non-existent class was checked by `method_exists` in Debug bundle.
This should fix (and correctly register) the caster while loading `DebugExtension` from `DebugBundle`

Commits
-------

860164ee7e [DebugBundle] fix register ReflectionCaster::unsetClosureFileInfo caster in var cloner service
2019-06-23 16:55:14 +02:00
Christian Flothmann 0d7d1f81bc add test to avoid regressions 2019-06-23 11:29:17 +02:00
Christian Flothmann b58a806340 fix mirroring directory into parent directory 2019-06-23 10:51:25 +02:00
Christian Flothmann 196ee5599d fix typos 2019-06-23 10:10:04 +02:00
Christian Flothmann 8a00c256f2 minor #32112 Turkish translation added to Form Component (emr)
This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead (closes #32112).

Discussion
----------

Turkish translation added to Form Component

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

Commits
-------

a030e393c5 Turkish translation added to Form Component
2019-06-23 09:45:29 +02:00
Emre Akinci a030e393c5 Turkish translation added to Form Component 2019-06-23 09:45:21 +02:00
dFayet ca5ae1989e Replace @return annotation by return type in final classes 2019-06-23 00:57:33 +02:00
Tobias Schultze 7822b3cbc0 bug #32027 [Messenger] Remove DispatchAfterCurrentBusStamp when message is put on internal queue (Nyholm)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] Remove DispatchAfterCurrentBusStamp when message is put on internal queue

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

This will fix #32009.

Thank you @brpauwels for the report.

I consider it safe to remove the `DispatchAfterCurrentBusStamp` because its meaning disappear after we handled the "current bus".

T0: We add the stamp
T1: We put the envelope on an internal queue in `DispatchAfterCurrentBusMiddleware`
T2: We handle the current bus.
T3: We start processing our internal queue.

At T3 there we are "after current bus", that is why we dont need the stamp any more.

Commits
-------

91f1680b3f [Messenger] Remove DispatchAfterCurrentBusStamp when message is put on internal queue
2019-06-22 23:18:30 +01:00
Christian Flothmann 7a4570dcac fix accessing session bags 2019-06-22 22:10:25 +02:00
Fabien Potencier 3634390a27 Merge branch '4.2' into 4.3
* 4.2:
  Fix link to documentation
  [Validator] Use LogicException for missing Property Access Component in comparison constraints
2019-06-22 10:39:44 +02:00
Fabien Potencier aa4385dc12 feature #31532 [Ldap] Add users extraFields in ldap component (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[Ldap] Add users extraFields in ldap component

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- 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 | #28873, #19329 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | todo when validated, before merge <!-- required for new features -->

As I'm using ldap too in some personal project, It seems that this feature is a really good nice to have IMHO.

Adding the wanted field in the `user_metadata` array transform them as field -> value in the `metadata` field of the user.

Commits
-------

bcfff04797 [Ldap] Add users extra_fields in ldap component
2019-06-22 10:38:33 +02:00
Amrouche Hamza bcfff04797
[Ldap] Add users extra_fields in ldap component 2019-06-22 10:34:40 +02:00
Fabien Potencier 115e67b92a feature #32104 Add autowiring for HTTPlug (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Add autowiring for HTTPlug

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

Commits
-------

f76e77d58f Add autowiring for HTTPlug
2019-06-22 10:32:12 +02:00
Fabien Potencier 0dbf4775e2 bug #32125 [Form] accept floats for input="string" in NumberType (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Form] accept floats for input="string" in NumberType

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

Commits
-------

2abf85599d accept floats for input="string" in NumberType
2019-06-22 10:27:15 +02:00
Fabien Potencier 2f9e69e117 minor #32128 [Validator] Add ExpressionValidator typehint & remove deprecation (ogizanagi)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[Validator] Add ExpressionValidator typehint & remove deprecation

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| 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 | #32041   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

e4c4d2dce8 [Validator] Add ExpressionValidator typehint & remove deprecation
2019-06-22 10:26:14 +02:00
Fabien Potencier b9ad880792 feature #32130 [Form] deprecate int/float for string input in NumberType (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] deprecate int/float for string input in NumberType

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

Commits
-------

d8c008aa4d deprecate int/float for string input in NumberType
2019-06-22 10:21:37 +02:00
Fabien Potencier 0546941dc1 minor #32121 Fix link to documentation (AMartinNo1)
This PR was submitted for the master branch but it was merged into the 4.2 branch instead (closes #32121).

Discussion
----------

Fix link to documentation

| Q             | A
| ------------- | ---
| Branch?       | 4.4 for features / 3.4, 4.2 or 4.3 for bug fixes <!-- see below -->
| Bug fix?      | yes
| New feature?  |No, update link to VarExporter doc only
| BC breaks?    | no
| Deprecations? | no
| Test pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | symfony/symfony-docs

Commits
-------

e0d2c58bc2 Fix link to documentation
2019-06-22 10:17:24 +02:00
Alex Nostadt e0d2c58bc2 Fix link to documentation 2019-06-22 10:17:17 +02:00
Fabien Potencier 5471867efc bug #32094 [Validator] Use LogicException for missing Property Access Component in comparison constraints (Lctrs)
This PR was merged into the 4.2 branch.

Discussion
----------

[Validator] Use LogicException for missing Property Access Component in comparison constraints

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

For consistency.

Commits
-------

6ac2316993 [Validator] Use LogicException for missing Property Access Component in comparison constraints
2019-06-22 10:13:40 +02:00
Fabien Potencier f429986dbb feature #31547 [Ldap] Add exception for mapping ldap errors (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[Ldap] Add exception for mapping ldap errors

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- 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 | #28677   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | <!-- 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 the master branch.
-->

Maybe we could add more exception code since the list has a lot of errors, maybe we could add a class that maps the error to the right exeptions. see https://www.php.net/manual/en/function.ldap-errno.php

Commits
-------

1b29cb1a5f [Ldap] Add exception for mapping ldap errors
2019-06-22 10:08:21 +02:00
Fabien Potencier 04b2f7f3ef bug #32136 [FrameworkBundle] sync `require-dev` and `conflict` constraints (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[FrameworkBundle] sync `require-dev` and `conflict` constraints

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

The `conflict` section already prevents the Translation component 4.2 to be installed.

Commits
-------

47f9235568 sync `require-dev` and `conflict` constraints
2019-06-22 10:05:56 +02:00
Christian Flothmann d8c008aa4d deprecate int/float for string input in NumberType 2019-06-21 23:21:11 +02:00
Christian Flothmann 47f9235568 sync `require-dev` and `conflict` constraints 2019-06-21 23:08:55 +02:00
Christian Flothmann 48664445ba fix typo 2019-06-21 22:46:43 +02:00
Christian Flothmann 1ac9cc285c Merge branch '4.4'
* 4.4:
  fix order of items in upgrade file
  fix translation domain
  tag the FileType service as a form type
  don't validate IP addresses from env var placeholders
  [Validator] Fix GroupSequenceProvider annotation
  [Messenger] fix delay exchange recreation after disconnect
  Update ajax security cheat sheet link
  Fix AuthenticationException::getToken typehint
2019-06-21 12:30:11 +02:00
Alessandro Chitolina 860164ee7e
[DebugBundle] fix register ReflectionCaster::unsetClosureFileInfo caster in var cloner service 2019-06-21 12:18:42 +02:00