This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 270411 - [PHP7.1] Nullable types are not recognized in PHPDoc
Summary: [PHP7.1] Nullable types are not recognized in PHPDoc
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: Dev
Hardware: All All
: P3 normal (vote)
Assignee: junichi11
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-16 04:49 UTC by junichi11
Modified: 2017-04-18 02:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description junichi11 2017-04-16 04:49:41 UTC
GoToDeclaration and MarkOccurrences e.t.c do not work.

Sample code:
<?php
/**
 * @method ?\PHPDocTags testMethod2(?PHPDocTags $tags) Description
 * @property ?PHPDocTags $test Description
 */
class PHPDocTags {

    /**
     * @param ?PHPDocTags $tags
     * @return ?PHPDocTags
     */
    public function testMethod(?PHPDocTags $tags, bool $isNull) {
        if ($isNull) {
            return null;
        }
        return new PHPDocTags();
    }

}

I'm not sure whether nullable types for @property and @param, .e.t.c are proper formats. However, probably, they would be used. So they should be handled.

Thanks.
Comment 1 junichi11 2017-04-17 00:58:57 UTC
Fixed.

http://hg.netbeans.org/web-main/rev/22573549c48f

Thanks.
Comment 2 Quality Engineering 2017-04-18 02:32:32 UTC
Integrated into 'main-silver', will be available in build *201704180002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/22573549c48f
User: Junichi Yamamoto <junichi11@netbeans.org>
Log: #270411 - [PHP7.1] Nullable types are not recognized in PHPDoc