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

Summary: Add code completion for MongoDB extension
Product: php Reporter: kacer
Component: EditorAssignee: Tomas Mysik <tmysik>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

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.