-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
php docs IDE #3793
Comments
Relates #1590 |
so as i see |
@Ragazzo as I remember, Netbeans supports current format well. Will check it. |
No , it does not support it , see above link to |
+1, I have the same problem with netbeans |
Perhaps related: yiisoft/yii#2758 |
should be fixed in the same way as it was done before |
Looking at the PHPdoc standard draft they always have the type before the variable name. https://github.com/php-fig/fig-standards/pull/169/files?short_path=9a10a11#824-var-deprecated I think we should not change our code to outdated usage and rather report this to netbeans that they add support for it. |
Yes, but @var tag is used to "document a class property", not for variable type : |
The main agrument for the current implementation is spoken at #1590:
I personally prefer current syntax: it seems to be more logical:
It is a bit odd I have to switch var name and type for this single case. |
@klimov-paul not sure about php-documentator, it ignores inline-docs, and here we have problem only with inline docs. I dont think that we should skip this, only because core developers have phpstorm - i think it was main reason for using this inline format. |
@Ragazzo the generation of api documentation does ignore inline docs but the PHPDoc standard draft covers this case. |
@cebe if you will remember |
This issue is sounds more like NetBeans bug (outdated standards or whatever proper name for this is). |
+1 for logical syntax @klimov-paul But really annoying with Netbeans, problem here is that PHPDOC does not officialy handle this |
Don't know about Eclipse, but it seems to accept the same syntax as Netbeans : |
I also think we should keep the current syntax as is. It's dangerous chasing around things. If Netbeans adds support for the new syntax later, it would become Yii's trouble. |
Once NetBeans team appraoched us with suggestion of Yii 1.x support: |
@qiangxue so as i see, in this issue you ignore usability and IDE autocomplete issues. Not sure if you would be saying that if your IDE was netbeans. |
None keeps you from using another code style as well as comments style in your particular project. |
@klimov-paul i have not found any standard for php-doc for inline docs, can you show where on php-doc site it is located? There only php-docs for methods, classes, functions and other. |
@Ragazzo I have linked it above.: #3793 (comment) Also this issue is not about usability or autocompletion as you are talking about inline docs in the framework code. This does not affect users of the framework. It may only affect you slightly when working on the framework itself and then only may not offer good autocompletion. We use valid PHPdoc comments and your IDE can support this easily, please report it to netbeans. There is no point for us to change framework internal comments to something less straight forward because of lack of support in an IDE that is following old habits. |
@cebe your links for php-fig, they have nothing to do with php-docs and how they are implemented.
i see, so once again, when autocomplete needed by core - developers it is usability and very important, when it needed by other developers (big part of them) it is not Yii problem. Ok ) |
@Ragazzo looks like you have not read what I have linked, it is the draft of the PHPDoc Standard so it really has to do with this. Your second point is also not true. As explained above, this is not about making core devs more important than others, it is about keeping a consistent usage of documentation. Using type before var in one place and type after var in an other is just not consistent. |
@klimov-paul i think we should also contact netbeans developers (not those who developerd Yii plugin). Will see if this issue was raised before there on forums, i dont have any doubts it was ) |
Searched, not raised since there is no official support for this in phpdoc (only in draft with @type tag) |
One last opinion : as I said before I agree for consistency (even if it this not described in phpdoc...), but the big problem I see is that 2 majors IDE (netbeans, eclipse) does not support this... Is there so much phpstorm (which is not free...) users here ?? |
I'll contact Netbeans team but overall I think we should get maximum amount of IDEs supported out of the box. |
Netbeans won't suport the syntax we're using. I think it worth changing it to what's accepted by most IDEs. Will handle it. |
so as i see it was |
I'm chaning it all to common format that's supported by most of IDEs. |
so no support for netbeans and eclipse ? |
@Ragazzo ? |
Great, thanks @samdark It is just a matter of gii template after all :) PS: just for information, I have a little problem about phpdoc in core files with netbeans, e.g. :
Two problems :
|
@cebe nothing ) |
Hmm. There's one more thing. Netbeans doesn't understand the following: /**
* @var $this yii\web\View
* @var $test string
*/ and even the following: /* @var $this yii\web\View
* @var $test string
*/ It should be: /* @var $this yii\web\View */
/* @var $test string */ |
Yes, it has to be inline |
@cebe you are right, I was confused by "Summary". Made a bug report : https://netbeans.org/bugzilla/show_bug.cgi?id=245158 |
👍 |
There are a lot of inline php - docs in code, however as i see they have
phpstorm
format,netbeans
use different one - type should go last one as you can see. Can we maybe adjust code or make some workaround ?The text was updated successfully, but these errors were encountered: