Skip to content

Conversation

Haehnchen
Copy link
Contributor

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

RoutingExtension missed docblock for Twig extension so path and url are not fully recognized by PhpStorm.

Haehnchen/idea-php-symfony2-plugin#864 will add more smarter completion
{{ p<caret> }} -> {{ path('<caret>') }}, but string parameter is not detected. This will add the minimal docs

@Haehnchen Haehnchen changed the title add docblocks for Twig url and path function to improve ide completion [TwigBridge] Add docblocks for Twig url and path function to improve ide completion Feb 5, 2017
@nicolas-grekas nicolas-grekas added this to the 2.7 milestone Feb 6, 2017
@@ -40,11 +40,25 @@ public function getFunctions()
);
}

/**
* @param string $name
* @param array $parameters
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$s need to be aligned

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@fabpot
Copy link
Member

fabpot commented Feb 16, 2017

Thank you @Haehnchen.

@fabpot fabpot merged commit 93ab017 into symfony:2.7 Feb 16, 2017
fabpot added a commit that referenced this pull request Feb 16, 2017
…n to improve ide completion (Haehnchen)

This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] Add docblocks for Twig url and path function to improve ide completion

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

`RoutingExtension` missed docblock for Twig extension so `path` and `url` are not fully recognized by PhpStorm.

Haehnchen/idea-php-symfony2-plugin#864 will add more smarter completion
`{{ p<caret> }} -> {{ path('<caret>') }}`, but string parameter is not detected. This will add the minimal docs

Commits
-------

93ab017 add docblocks for Twig url and path function to improve ide completion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants