You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "haidubogdan (via GitHub)" <gi...@apache.org> on 2025/11/23 10:07:46 UTC

[I] Support for PHP 8.5 [netbeans]

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

   ### Description
   
   Support for the latest version of Php 8.5
   
   ### Use case/motivation
   
   With the recent release of PHP 8.5 https://www.php.net/releases/8.5/en.php I think we can start preparing the support code for the new version.
   
   I want to help with the support process, but there are some parts which I don't know the process.
   
   Ex: It looks like the parser compiler uses a library `parser.cutter` for which is not clear what is the source code.
   
   I, also, know we would need to see the availability of junichi11 for this feature development.
   
   ### Related issues
   
   Possible evolution conflicts as there are some pull requests for PHP 8.4 which are in draft mode / work in progress.
   
   https://github.com/apache/netbeans/pull/8227
   
   ### Are you willing to submit a pull request?
   
   Yes


-- 
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] Support for PHP 8.5 [netbeans]

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

   What would happen if `parser.cutter` isn't used? Would it exceed field count or method size limits for java files?


-- 
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] Support for PHP 8.5 [netbeans]

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

   > Didn't enter into details but it might exceed the array limit also.
   
   this sounds to me like a common problem for parser generators. Wondering if jflex improved over time and can handle those issues now without extra steps?
   
   also: There were some efforts a while ago to let the build generate the files and remove them from the repo (https://github.com/apache/netbeans/pull/7189, https://github.com/apache/netbeans/pull/7186, ..). Since parser diffs are huge and they aren't reviewable anyway. But this obviously requires that the build is able to run the parser generator in the first place.


-- 
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] Support for PHP 8.5 [netbeans]

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

   Didn't enter into details but it might exceed the array limit also.
   So, for the moment I think we are stuck with depending on parser.cutter.
   
   It would be interesting to migrate to Antlr and see if there are no performance drawback :) .


-- 
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] Support for PHP 8.5 [netbeans]

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

   Hi @troizet , @junichi11 
   I want just to inform you that I started to work on the pipe operator support for Php 8.5 .
   https://github.com/apache/netbeans/compare/master...haidubogdan:netbeans:t_php85
   
   I thought of naming the callable expression node as `CompositionExpression`  based on this rfc : https://wiki.php.net/rfc/function-composition. But it's something to be discussed, I'm not that good at naming conventions :) .
   
   I hope that by the start of the next year I will be able to prepare a valid pull request.
   The main remaining things to work on are : formatting, adapting the unit tests and create new unit tests.


-- 
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] Support for PHP 8.5 [netbeans]

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

   Thanks @troizet .
   
   Yes, you can mail me if you can the jar for the parser.cutter at `haidubogdan@gmail` .
   
   I found the issue with the parser on my machine. By default the ant task used the cup library 11b version from /usr/share/java ... so generated file was completely different. So, I'm able to generate the parser.
   


-- 
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] Support for PHP 8.5 [netbeans]

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

   `parser.cutter` is needed to split the generated huge parser class into smaller classes, such as `EncodeActionTable1`, `EncodeActionTable2`, and so on.
     Somewhere in the mailing list archives, I found a discussion that `parser.cutter` wasn't donated by Oracle, so it's not in the repository.
   But I found it in the old repositories at http://hg.netbeans.org/releases/. It seems that this repository is no longer available. If you need it, I can email it to you.
   
   To generate the parser, java-cup-11a.jar is used, which can be found in [/php/libs.javacup/external](https://github.com/apache/netbeans/tree/master/php/libs.javacup/external).
   
   I hope @junichi11 will correct me if anything.
   
   I slightly adjusted `build.xml` for the parser assembly,
   <details>
     <summary>and it looks like this:</summary>
   
   ```xml
   
       <!-- add license and @SuppressWarnings for FindBugs in the generated ASTPHP5Parser & ASTPHP5Symbols files -->
       <!-- parsercutter can be found in misc repository -->
       <target name="gen-astparser">
           <taskdef name="javacup"
               classname="java_cup.anttask.CUPTask"
               classpath="${nb_all}/php/libs.javacup/external/java-cup-11a.jar" />
               <javacup srcfile="${nb_all}/php/php.editor/tools/ASTPHP5Parser.cup"
               destdir="${nb_all}/php/php.editor/src"
               parser="ASTPHP5Parser"
               symbols="ASTPHP5Symbols"
               interface="on"/>
           <taskdef name="parsercutter"
               classname="org.netbeans.modules.php.editor.cup.parser.cutter.ParserCutter"
               classpath="/home/troizet/dev/parser.cutter/dist/parser.cutter.jar" />
               <parsercutter parserpath="${nb_all}/php/php.editor/src/org/netbeans/modules/php/editor/parser/ASTPHP5Parser.java" />
               <replaceregexp match="[ \t]+$" replace="" byline="true" >
                   <fileset dir="${nb_all}/php/php.editor/src/org/netbeans/modules/php/editor/parser">
                       <include name="ASTPHP5Parser.java"/>
                       <include name="EncodedActionTable*.java"/>
                   </fileset>
               </replaceregexp>
               <replace file="src/org/netbeans/modules/php/editor/parser/ASTPHP5Parser.java">
                   <replacetoken>public class ASTPHP5Parser extends java_cup.runtime.lr_parser {</replacetoken>
                   <replacevalue><![CDATA[@org.netbeans.api.annotations.common.SuppressWarnings({"EI_EXPOSE_REP", "MS_PKGPROTECT", "BC_BAD_CAST_TO_CONCRETE_COLLECTION"})
   public class ASTPHP5Parser extends java_cup.runtime.lr_parser {]]></replacevalue>
               </replace>
               <replace>
                   <fileset dir="src/org/netbeans/modules/php/editor/parser">
                       <include name="ASTPHP5Parser.java"/>
                       <include name="ASTPHP5Symbols.java"/>
                   </fileset>
                   <replacetoken>
   //&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;
   // The following code was generated by CUP v0.11a beta 20060608
   </replacetoken>
                   <replacevalue>/*
    * Licensed to the Apache Software Foundation (ASF) under one
    * or more contributor license agreements.  See the NOTICE file
    * distributed with this work for additional information
    * regarding copyright ownership.  The ASF licenses this file
    * to you under the Apache License, Version 2.0 (the
    * "License"); you may not use this file except in compliance
    * with the License.  You may obtain a copy of the License at
    *
    *   http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing,
    * software distributed under the License is distributed on an
    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    * KIND, either express or implied.  See the License for the
    * specific language governing permissions and limitations
    * under the License.
    */
   
   //&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;
   // The following code was generated by CUP v0.11a beta 20060608
   </replacevalue>
               </replace>
       </target>
       
   ``` 
   
   </details>


-- 
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