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 262171 - Add code completion for MongoDB extension
Summary: Add code completion for MongoDB extension
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-21 07:36 UTC by kacer
Modified: 2016-08-19 07:23 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kacer 2016-05-21 07:36:27 UTC
I would be great to add code completion (stubs) for 'mongodb' PHP extension to NetBeans IDE.

Extension doc: http://php.net/mongodb
Comment 1 Tomas Mysik 2016-05-23 08:38:48 UTC
You can easily do it yourself, if you are interested. Just create a signature ("dummy", "empty") file for all MongoDB classes, functiones, constants etc. For example:

-------------------------------------------------------
<?php
namespace MongoDB\Driver;

final class Manager {
    /**
     * PHPDoc comes here (@param, @return etc.)
     */
    final public __construct ( string $uri [, array $options [, array $driverOptions ]] ) {}

    ...
}

...
-------------------------------------------------------

Once such a file is created, feel free to attach it here.

Thanks.
Comment 2 kacer 2016-08-19 06:17:32 UTC
I tried to prepare signature, but there is a problem with documentation - some methods have obviously wrong return types: http://php.net/manual/en/class.mongodb-driver-writeerror.php

Is signature acceptable without complete return types specification?
Comment 3 Tomas Mysik 2016-08-19 07:23:44 UTC
Well, it depends whether the signature file will be useful for you and other developers even with this mistakes and incomplete documentation - will it be? If yes, feel free to do it.

Thanks.