You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "jwoehr (via GitHub)" <gi...@apache.org> on 2025/04/25 22:00:20 UTC

[I] NB 26 rc 2 error parsing MongoDB 2.0.0 PHP Library [netbeans]

jwoehr opened a new issue, #8458:
URL: https://github.com/apache/netbeans/issues/8458

   ### Apache NetBeans version
   
   Apache NetBeans 26 latest release candidate
   
   ### What happened
   
   Parsing MongoDB 2.0.0 PHP Library incorrectly flags error:
   ![Image](https://github.com/user-attachments/assets/8959c1a1-b33c-4775-8f06-2e79428c4ace)
   
   ### Language / Project Type / NetBeans Component
   
   _No response_
   
   ### How to reproduce
   
   - [Install MongoDB PHP driver](https://www.mongodb.com/docs/drivers/php-drivers/)
   - [Composer require MongoDB PHP Library](https://www.mongodb.com/docs/drivers/php-drivers/)
   - Open project and find errors
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   NAME="Pop!_OS" VERSION="22.04 LTS" ID=pop ID_LIKE="ubuntu debian"
   
   ### JDK
   
   openjdk 21.0.6 2025-01-21
   
   ### Apache NetBeans packaging
   
   Own source build
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] NB 26 rc 2 error parsing MongoDB 2.0.0 PHP Library [netbeans]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on issue #8458:
URL: https://github.com/apache/netbeans/issues/8458#issuecomment-2832067339

   Is there a real PHP documentation somewhere? The Traits documentation is littered with examples and prosa, but is lacking concrete grammar, so this might or might not be valid syntax. A hint to resolve this would be great.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] NB 26 rc 2 error parsing MongoDB 2.0.0 PHP Library [netbeans]

Posted by "jwoehr (via GitHub)" <gi...@apache.org>.
jwoehr commented on issue #8458:
URL: https://github.com/apache/netbeans/issues/8458#issuecomment-2873515218

   @matthiasblaesing I've figured out what is happening with
   ```php
   use Stage\FactoryTrait {
           match as private generatedMatch;
       }
   ```
   `match` here is being interpreted by NetBeans PHP support as the (relatively new) PHP keyword `match`.
   However, in this context, `match` means the function from `FactoryTrait`:
   
   ```php
       public static function match(QueryInterface|array $query): MatchStage
       {
           return new MatchStage($query);
       }
   ```
   The code is hiding the `match` function so it can overload the name and use it in the `Stage` class with a different signature.
   
   MongoDB development team must have named `match` after the MongoDB aggregation operator it implements named `$match` (before `match` became a keyword in PHP). NetBeans PHP support is intepreting the lexeme `match` as the PHP keyword rather than as an identifier.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] NB 26 rc 2 error parsing MongoDB 2.0.0 PHP Library [netbeans]

Posted by "jwoehr (via GitHub)" <gi...@apache.org>.
jwoehr commented on issue #8458:
URL: https://github.com/apache/netbeans/issues/8458#issuecomment-2832435353

   @matthiasblaesing searching I found this: https://phplang.org/spec/19-grammar.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] NB 26 rc 2 error parsing MongoDB 2.0.0 PHP Library [netbeans]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on issue #8458:
URL: https://github.com/apache/netbeans/issues/8458#issuecomment-2832538044

   @jwoehr thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] NB 26 rc 2 error parsing MongoDB 2.0.0 PHP Library [netbeans]

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #8458:
URL: https://github.com/apache/netbeans/issues/8458#issuecomment-2837932452

   The token colour of `match` stands out to me.  Am I right that `Query.php` has the same construct?  I have a feeling this might be getting confused with the support added for match expressions in #2303 ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Error parsing MongoDB 2.0.0 PHP Library [netbeans]

Posted by "jwoehr (via GitHub)" <gi...@apache.org>.
jwoehr commented on issue #8458:
URL: https://github.com/apache/netbeans/issues/8458#issuecomment-2877105563

   Thanks to the team for keeping PHP support in NetBeans relevant. It's my go-to for PHP.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] NB 26 rc 2 error parsing MongoDB 2.0.0 PHP Library [netbeans]

Posted by "jwoehr (via GitHub)" <gi...@apache.org>.
jwoehr commented on issue #8458:
URL: https://github.com/apache/netbeans/issues/8458#issuecomment-2832436517

   https://github.com/php/php-langspec


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] NB 26 rc 2 error parsing MongoDB 2.0.0 PHP Library [netbeans]

Posted by "jwoehr (via GitHub)" <gi...@apache.org>.
jwoehr commented on issue #8458:
URL: https://github.com/apache/netbeans/issues/8458#issuecomment-2832232779

   @matthiasblaesing I have posted that question in Slack to a co-worker who is a PHP committer.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] NB 26 rc 2 error parsing MongoDB 2.0.0 PHP Library [netbeans]

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #8458:
URL: https://github.com/apache/netbeans/issues/8458#issuecomment-2875708301

   Thanks @jwoehr As I said, this looks like it's coming from #2303 
   
   cc/ @junichi11 @tmysik to decide whether there's a relevant fix or this should be closed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Error parsing MongoDB 2.0.0 PHP Library [netbeans]

Posted by "tmysik (via GitHub)" <gi...@apache.org>.
tmysik commented on issue #8458:
URL: https://github.com/apache/netbeans/issues/8458#issuecomment-2876876359

   Your evaluation seems to be correct. @junichi11, please, would you be able to look into it? Thank you.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists