Open idchlife opened 7 years ago
@felixfbecker custom annotations, e.g: doctrine annotations (autocomplete, auto import, parameters intellisense etc):
/**
*
* @ORM\Column(type="boolean", options={"default": false})
* @var
*/
private $fallback = false;
I actually don't know if this even suppose to be in php server... Because in intellij idea it's separate plugin called "php-annotations".
Trying to switch to vscode from phpstorm, learning which you can and cannot do when comparing both.
I still don't understand what kind of feature you want from these annotations?
As far as I understand, he wants inside these annotations support for the parameters, that we can grab from the definition file.
@jens1o you are partially right.
@felixfbecker like this (video): https://monosnap.com/file/BEOMmQpvpjaCae4p1Ya2LURr49LqAc
Is there a standard for this syntax?
Also goto definition, since custom annotation is always class, which should be used (e.g.: use App\Annotations\NotNull)
@felixfbecker as far as I know, no. Well, I guess that's why it's separate plugin for phpstorm called "php annotations".
Annotations widely used in Symfony and Doctrine.
I guess issue could be closed now 😞
This issue shouldn't be dismissed. While not an official standard at the PHP level, Doctrine is one of the most widely used projects in the PHP ecosystem, which makes annotations kind of a de-facto standard.
Of course, actual PHP language support remains more important, but annotations support should be a secondary goal in my opinion.
I take a look at it as soon as the large pr is merged and I investigated in some other things. It would be interesting wether we have a clean api and there aren't any dialects which would complex it.
The annotations standard is from PHPDoc if i'm not mistaken.
Doctrine is very popular ORM but unfortunately there is no support for it in VSCode, is there any package out there to support (syntax highlight and autocomplete) doctrine annotation https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/annotations-reference.html?
Also, annotations are widely used in other libraries (symfony routing)
I don't know about VSCode packages, but if you really need annotations support, you should take a look on PHP Storm by Jetbrains. Also, this IDE could be a starting point for implementing annotation support here as well.
Aren't doctrine style annotations going to be replaced by the upcoming PHP 8 attributes? If this is the case it would seem a little bit pointless to implement support for docblock annotations at this point.
Even if it comes to PHP, it will take several months until ship and adoption. I think this issue still valid as long as PHP 8 ins't ready for production, but then this issue dead. I personally can't wait for PHP 8, that looks so damn awesome.
Please clarify what you mean with "annotations functionality"