Commit Graph

42879 Commits

Author SHA1 Message Date
Fabien Potencier
f2b261d8e0 minor #32233 [PropertyInfo] Add type-hints to public interfaces and classes (jschaedl)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[PropertyInfo] Add type-hints to public interfaces and classes

| 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 | #32179  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A <!-- required for new features -->

This PR adds type hints to public interfaces and classes of the PropertyInfo component. Some docblocks without valuable information got also removed.

Commits
-------

fe3b165354 [PropertyInfo] Add type-hints to public interfaces and classes
2019-06-29 08:43:42 +02:00
Fabien Potencier
bac35b04b4 minor #32202 [Asset] Add type-hints to public interfaces and classes (jschaedl)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[Asset] Add type-hints to public interfaces and classes

| 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 | #32179  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A <!-- required for new features -->

This PR adds type hints to all public interfaces of the Asset component.

Commits
-------

065fdc146c [Asset] Add type-hints to public interfaces
2019-06-29 08:42:46 +02:00
Fabien Potencier
0781b6090c minor #32229 [Serializer] [5.0] Add type-hints to serializer interface (Simperfit)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[Serializer] [5.0] Add type-hints to serializer interface

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

This PR adds type-hints to the serializer component ;).

Commits
-------

68b588cf45 [Serializer] [5.0] Add type-hints to serializer interface
2019-06-29 08:28:05 +02:00
Jan Schädlich
065fdc146c [Asset] Add type-hints to public interfaces 2019-06-29 08:09:27 +02:00
Tobias Schultze
aac5765779 minor #32261 [Debug] Remove all deprecated classes that were moved to the ErrorCatcher component (fancyweb)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[Debug] Remove all deprecated classes that were moved to the ErrorCatcher component

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

https://github.com/symfony/symfony/pull/31694#discussion_r298601576

Commits
-------

8ce3a89ac2 [Debug] Remove all deprecated classes that were moved to the ErrorCatcher component
2019-06-28 18:09:04 +02:00
Tobias Schultze
c5715a384b minor #32263 [ErrorCatcher] Remove all deprecated code (fancyweb)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[ErrorCatcher] Remove all deprecated code

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

Commits
-------

2891d3b506 [ErrorCatcher] Remove all deprecated code
2019-06-28 18:06:04 +02:00
Thomas Calvet
2891d3b506 [ErrorCatcher] Remove all deprecated code 2019-06-28 17:44:00 +02:00
Thomas Calvet
8ce3a89ac2 [Debug] Remove all deprecated classes that were moved to the ErrorCatcher component 2019-06-28 16:45:25 +02:00
Nicolas Grekas
58d61dc997 Merge branch '4.4'
* 4.4:
  fix merge
  [HttpFoundation] Throw exception when the \"session\" extension is not loaded
  remove invalid test case
  remove invalid test cases
  [Serializer] Fixed PHP of DenormalizableInterface::denormalize
  fix Debug component dependencies
  [Cache] work aroung PHP memory leak
  [Finder] docblock fixes
  pass error code as a string
  [travis] not all components have a master branch
  [HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client
  Catch JsonException and rethrow in JsonEncode
2019-06-28 15:34:46 +02:00
Tobias Schultze
7b3ef198be minor #32181 [Routing] Add type-hints RequestContext and Route classes. (derrabus)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[Routing] Add type-hints RequestContext and Route classes.

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

This PR adds type-hints to `RequestContext` and the Route classes to give them a more php7-like feeling. Adding these type-hints on master should not be a breaking change because we require php 7.2 there, which allows downstream classes/interfaces to remove a type-hint from a method signature.

Commits
-------

614e8248c3 [Routing] Add type-hints RequestContext and Route classes.
2019-06-28 15:32:02 +02:00
Nicolas Grekas
b40f6b5e72 fix merge 2019-06-28 15:25:44 +02:00
Nicolas Grekas
ab1bc87e43 Merge branch '4.3' into 4.4
* 4.3:
  [HttpFoundation] Throw exception when the \"session\" extension is not loaded
  remove invalid test case
  remove invalid test cases
  [Serializer] Fixed PHP of DenormalizableInterface::denormalize
  [Cache] work aroung PHP memory leak
  [Finder] docblock fixes
  pass error code as a string
  Catch JsonException and rethrow in JsonEncode
2019-06-28 15:17:39 +02:00
Nicolas Grekas
a218efebee Merge branch '4.2' into 4.3
* 4.2:
  [HttpFoundation] Throw exception when the \"session\" extension is not loaded
  remove invalid test cases
  [Serializer] Fixed PHP of DenormalizableInterface::denormalize
  [Cache] work aroung PHP memory leak
  [Finder] docblock fixes
  pass error code as a string
  Catch JsonException and rethrow in JsonEncode
2019-06-28 15:16:30 +02:00
Amrouche Hamza
68b588cf45
[Serializer] [5.0] Add type-hints to serializer interface 2019-06-28 15:15:46 +02:00
Nicolas Grekas
e62e2ddb38 minor #32250 [Validator] remove invalid test case (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Validator] remove invalid test case

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

Spotted while working on #32179 for the Validator component. Using property paths for comparison when validating arrays simply does not work.

Commits
-------

9000c1eab4 remove invalid test case
2019-06-28 14:57:32 +02:00
Nicolas Grekas
b8c4809a49 Merge branch '3.4' into 4.2
* 3.4:
  [HttpFoundation] Throw exception when the \"session\" extension is not loaded
  remove invalid test cases
  [Serializer] Fixed PHP of DenormalizableInterface::denormalize
  [Finder] docblock fixes
  pass error code as a string
  Catch JsonException and rethrow in JsonEncode
2019-06-28 14:55:49 +02:00
Nicolas Grekas
3f165064eb bug #32236 [Cache] work aroung PHP memory leak (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[Cache] work aroung PHP memory leak

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

Works around  https://bugs.php.net/76982, as identified by @goetas in the linked issue.

Commits
-------

5d55b91fae [Cache] work aroung PHP memory leak
2019-06-28 14:49:32 +02:00
Nicolas Grekas
b6e8b17dc4 minor #32215 [HttpFoundation] Throw exception when the "session" extension is not loaded (vudaltsov)
This PR was squashed before being merged into the 3.4 branch (closes #32215).

Discussion
----------

[HttpFoundation] Throw exception when the "session" extension is not loaded

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

Should I target `3.4` or `master` instead? This change does not alter behavior, but makes the failure more clear.

Commits
-------

b0c663071b [HttpFoundation] Throw exception when the \"session\" extension is not loaded
2019-06-28 14:47:57 +02:00
Valentin Udaltsov
b0c663071b [HttpFoundation] Throw exception when the \"session\" extension is not loaded 2019-06-28 14:47:50 +02:00
Nicolas Grekas
9bc8b39709 minor #32249 [Validator] remove invalid test cases (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] remove invalid test cases

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

Spotted while working on #32179 for the Validator component. Using property paths for comparison when validating arrays simply does not work.

Commits
-------

d1261e78a4 remove invalid test cases
2019-06-28 14:46:12 +02:00
Nicolas Grekas
3f53044b42 minor #32244 [Validator] pass error code as a string (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] pass error code as a string

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

901fe0d7c5 pass error code as a string
2019-06-28 14:40:38 +02:00
Nicolas Grekas
278bfbaea0 minor #32230 [Serializer] Fixed PHP of DenormalizableInterface::denormalize (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Serializer] Fixed PHP of DenormalizableInterface::denormalize

It can return an array of objects

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

379bbee370 [Serializer] Fixed PHP of DenormalizableInterface::denormalize
2019-06-28 14:36:51 +02:00
Alexander M. Turek
614e8248c3 [Routing] Add type-hints RequestContext and Route classes. 2019-06-28 14:36:16 +02:00
Nicolas Grekas
a670098879 minor #32245 [Finder] docblock fixes (smoench)
This PR was merged into the 3.4 branch.

Discussion
----------

[Finder] docblock fixes

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

This PR provides some docblock fixes found in #32243

Commits
-------

02ee4d0b05 [Finder] docblock fixes
2019-06-28 14:36:03 +02:00
Christian Flothmann
61d180e7de Merge branch '4.3' into 4.4
* 4.3:
  fix Debug component dependencies
  [travis] not all components have a master branch
  [HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client
2019-06-28 14:32:50 +02:00
Tobias Schultze
cf8cfebd5e Merge branch '4.4' 2019-06-28 14:28:16 +02:00
Christian Flothmann
a1de01c6ff Merge branch '4.2' into 4.3
* 4.2:
  fix Debug component dependencies
  [travis] not all components have a master branch
2019-06-28 14:12:54 +02:00
Tobias Schultze
efaecbf9d1 minor #32246 [Routing] Deprecate RouteCollection::addPrefix(null) (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[Routing] Deprecate RouteCollection::addPrefix(null)

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

This PR deprecates the undocumented possibility to pass `null` as prefix to `RouteCollection::addPrefix()`. This allows us to add a `string` type-hint on the parameter in 5.0, see https://github.com/symfony/symfony/pull/32181#discussion_r298419954

/cc @Tobion

Commits
-------

2a88752cd6 [Routing] Deprecate RouteCollection::addPrefix(null).
2019-06-28 14:04:32 +02:00
Christian Flothmann
5edac837a0 Merge branch '3.4' into 4.2
* 3.4:
  fix Debug component dependencies
  [travis] not all components have a master branch
2019-06-28 14:00:38 +02:00
Nicolas Grekas
2bab37d64f bug #32206 Catch JsonException and rethrow in JsonEncode (phil-davis)
This PR was merged into the 3.4 branch.

Discussion
----------

Catch JsonException and rethrow in JsonEncode

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | adjustment to implementation of previous PRs for issue #31447
| License       | MIT
| Doc PR        | not applicable

PR #31860 provided handling of PHP  7.3 `JSON_THROW_ON_ERROR` behavior in the various `JsonEncode` and related classes/methods.

PR #31869 adjusted that. In particular, it adjusted ` src/Symfony/Component/Serializer/Encoder/JsonDecode.php` so that it catches any `JsonException` and re-throws it as `NotEncodableValueException`. That preserves the previous behavior of `JsonDecode:decode` - it always throws `NotEncodableValueException` when something goes wrong.

IMO `JsonEncode:encode` needs the same logic. At the moment, if a caller specifies `JSON_THROW_ON_ERROR` then the method can throw `JsonException`, but actually the "standard" for `JsonEncode:encode` is that it throws `NotEncodableValueException`

Adjust `JsonEncode:encode` to catch `JsonException` and rethrow it as `NotEncodableValueException`

Commits
-------

9c76790ee8 Catch JsonException and rethrow in JsonEncode
2019-06-28 13:57:22 +02:00
Nicolas Grekas
9c668d9282 minor #32213 [HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client (teohhanhui)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client

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

As the deprecated `Symfony\Component\HttpKernel\Client` does not extend `Symfony\Component\HttpKernel\HttpKernelBrowser`, it has not retained the correct PHPDoc from before.

The order of inheritance was changed in https://github.com/symfony/symfony/pull/31881, but the PHPDoc was never restored.

Commits
-------

332135186a [HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client
2019-06-28 13:56:05 +02:00
Nicolas Grekas
8477f2b942 minor #32248 fix Debug component dependencies (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

fix Debug component dependencies

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

Commits
-------

87fe077a89 fix Debug component dependencies
2019-06-28 13:37:40 +02:00
Christian Flothmann
9000c1eab4 remove invalid test case 2019-06-28 12:20:30 +02:00
Christian Flothmann
d1261e78a4 remove invalid test cases 2019-06-28 12:15:37 +02:00
Grégoire Pineau
379bbee370 [Serializer] Fixed PHP of DenormalizableInterface::denormalize
It can return an array of objects
2019-06-28 11:46:25 +02:00
Christian Flothmann
87fe077a89 fix Debug component dependencies 2019-06-28 11:18:39 +02:00
Alexander M. Turek
2a88752cd6 [Routing] Deprecate RouteCollection::addPrefix(null). 2019-06-28 10:23:33 +02:00
Nicolas Grekas
5d55b91fae [Cache] work aroung PHP memory leak 2019-06-28 10:22:31 +02:00
smoench
02ee4d0b05
[Finder] docblock fixes 2019-06-28 10:02:59 +02:00
Christian Flothmann
901fe0d7c5 pass error code as a string 2019-06-28 09:33:32 +02:00
Fabien Potencier
a25848b2b5 Merge branch '4.4'
* 4.4:
  [ErrorCatcher] some cleanup and better doc
2019-06-28 07:53:21 +02:00
Fabien Potencier
7f6ed32a1d bug #32232 [ErrorCatcher] some cleanup and better doc (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorCatcher] some cleanup and better doc

| Q             | A
| ------------- | ---
| Branch?       | 4.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 |
| License       | MIT
| Doc PR        |

Commits
-------

a609f57c03 [ErrorCatcher] some cleanup and better doc
2019-06-28 07:52:45 +02:00
Jan Schädlich
fe3b165354 [PropertyInfo] Add type-hints to public interfaces and classes 2019-06-27 22:40:09 +02:00
Tobias Schultze
a609f57c03 [ErrorCatcher] some cleanup and better doc 2019-06-27 22:36:35 +02:00
Nicolas Grekas
1d57b800aa fix merge 2019-06-27 21:25:51 +02:00
Fabien Potencier
3e54cb71de Merge branch '4.4'
* 4.4:
  deprecated FlattenException::create()
  [ErrorHandler] made IDEs and static analysis tools happy
2019-06-27 20:22:01 +02:00
Fabien Potencier
b92e4ed9d4 feature #32221 [ErrorCatcher] Make IDEs and static analysis tools happy (fabpot)
This PR was squashed before being merged into the 4.4 branch (closes #32221).

Discussion
----------

[ErrorCatcher] Make IDEs and static analysis tools happy

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| 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
| 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
-------

f511bc5ff6 deprecated FlattenException::create()
7dd9dbf28d [ErrorHandler] made IDEs and static analysis tools happy
2019-06-27 20:20:54 +02:00
Fabien Potencier
bef96ee884 Merge branch '4.4'
* 4.4:
  renamed the ErrorHandler component to ErrorCatcher
2019-06-27 19:56:41 +02:00
Fabien Potencier
f511bc5ff6 deprecated FlattenException::create() 2019-06-27 19:51:41 +02:00
Fabien Potencier
7dd9dbf28d [ErrorHandler] made IDEs and static analysis tools happy 2019-06-27 19:50:32 +02:00