Skip to content

Commit

Permalink
minor #36654 Fix Form annotation (VincentLanglet)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.4 branch.

Discussion
----------

Fix Form annotation

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

Symfony form component provide his own exception `OutOfBoundsException` which is implementing `ExceptionInterface`. Form are returning this custom `OutOfBoundsException`, but the phpDoc say it's an original `\OutOfBoundsException`, which is not extending the `ExceptionInterface`.

This can provide issue with static analysis tools.

Commits
-------

67b7449 Fix annotation
  • Loading branch information
xabbuh committed May 2, 2020
2 parents f7749c3 + 67b7449 commit d765a09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Form/Form.php
Expand Up @@ -932,7 +932,7 @@ public function offsetExists($name)
*
* @return FormInterface The child form
*
* @throws \OutOfBoundsException if the named child does not exist
* @throws OutOfBoundsException if the named child does not exist
*/
public function offsetGet($name)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Form/FormInterface.php
Expand Up @@ -62,7 +62,7 @@ public function add($child, $type = null, array $options = []);
*
* @return self
*
* @throws \OutOfBoundsException if the named child does not exist
* @throws Exception\OutOfBoundsException if the named child does not exist
*/
public function get($name);

Expand Down

0 comments on commit d765a09

Please sign in to comment.