Php Documentor Tag support
11 posts
• Page 1 of 2 • 1, 2
Php Documentor Tag support
It would be great if you could provide support for the phpDocumentor tags.
Especially {@inheritdoc}
Thanks
Ioannis
Especially {@inheritdoc}
Thanks
Ioannis
- ikappas
- Posts: 21
- Joined: December 13th, 2014, 3:50 pm
Re: Php Documentor Tag support
Hi,
Thanks for the feedback. We are planning missing support for PHPDoc tags
- @inheritdoc
- IntelliSense for tags
- code snippets for PHPDoc
Currently PHP Tools support following http://www.devsense.com/doc/phptools/ed ... c-comments
Thanks for the feedback. We are planning missing support for PHPDoc tags
- @inheritdoc
- IntelliSense for tags
- code snippets for PHPDoc
Currently PHP Tools support following http://www.devsense.com/doc/phptools/ed ... c-comments
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Php Documentor Tag support
That is great to hear Jakub. Any ETA on that?
- ikappas
- Posts: 21
- Joined: December 13th, 2014, 3:50 pm
Re: Php Documentor Tag support
IntelliSense and snippets are planned for the next release 1.17 or lately. Processing @inheritdoc so you'll see correct PHPDoc in tooltips will be avail. within near preview release ~week or so.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Php Documentor Tag support
There is an issue with @property[-read] tags.
if you define a property with the same name as a private/protected member of the class, IntelliSense does not show for that property outside of the class.
In the example of the below, no IntelliSense is shown from outside of the class until the properties $foo an $bar have been accessed.
Example:
if you define a property with the same name as a private/protected member of the class, IntelliSense does not show for that property outside of the class.
In the example of the below, no IntelliSense is shown from outside of the class until the properties $foo an $bar have been accessed.
Example:
- Code: Select all
/**
* @property string $foo
* @property-read string $bar
*/
class FooBar
{
protected $foo;
protected $bar;
public function __get($name)
{
return $this->{$name};
}
public function __set($name, $value)
{
if($name === 'foo') $this->{$name} = $value;
}
}
- josh
- Posts: 7
- Joined: February 27th, 2015, 7:43 pm
Re: Php Documentor Tag support
According to documentation (http://manual.phpdoc.org/HTMLSmartyConv ... y.pkg.html) @property documents "magic" properties accessed using __get/__set magic methods.josh wrote:There is an issue with @property[-read] tags.
if you define a property with the same name as a private/protected member of the class, IntelliSense does not show for that property outside of the class.
In case properties are real, you should not use @property tag. Add PHPDoc above the property declaration instead.
Edit: the sample is really nasty, I didn't see anything like this before
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Php Documentor Tag support
In this sample, what I'm really interested in is the @property-read.
I want to give access to a protected/private member in a read-only manner to external classes without having to explicitly make a getFoo() method. I can change the name of either the property or the internal member and get the expected IntelliSense for @property-read. It looks like IntelliSense for the protected member is always suppressed regardless of the @property-read statement. I think this should be reversed, where the @property-read takes precedent.
I want to give access to a protected/private member in a read-only manner to external classes without having to explicitly make a getFoo() method. I can change the name of either the property or the internal member and get the expected IntelliSense for @property-read. It looks like IntelliSense for the protected member is always suppressed regardless of the @property-read statement. I think this should be reversed, where the @property-read takes precedent.
- josh
- Posts: 7
- Joined: February 27th, 2015, 7:43 pm
Re: Php Documentor Tag support
Technically, it is possible. Internally we would have to treat access from inside the class context, its subclasses and outside the context differently. I'll note this case, but I'm not sure it makes much sense to support it. We may compare other IDEs how they handle such sample.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Php Documentor Tag support
I know PHPStorm for sure handles this. That is the only other IDE I a have experience with though.
- josh
- Posts: 7
- Joined: February 27th, 2015, 7:43 pm
Re: Php Documentor Tag support
Hello i like PHP Tools from DevSense with Visual Studio very much. IT is the best with VS, diveinto code with F12
I use latly YII framework.
I have this issue Lots of warnings
"@inheritdoc should be {@inheritdoc}"
https://github.com/yiisoft/yii2/issues/ ... -221995372
Will this be supported or could i suppress this warning in Visual Studio/PHP Tools ?
I use latly YII framework.
I have this issue Lots of warnings
"@inheritdoc should be {@inheritdoc}"
https://github.com/yiisoft/yii2/issues/ ... -221995372
Will this be supported or could i suppress this warning in Visual Studio/PHP Tools ?
- JeanVanDender
- Posts: 3
- Joined: June 19th, 2016, 7:36 pm
11 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 122 guests