You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/11/24 00:21:59 UTC
[GitHub] [netbeans] junichi11 opened a new pull request #3331: [NETBEANS-5599] PHP 8.1 Support: Final class constants part
junichi11 opened a new pull request #3331:
URL: https://github.com/apache/netbeans/pull/3331
https://issues.apache.org/jira/browse/NETBEANS-5599
- Add PHP 8.1 to the PhpVersion
- Fix the grammar file
- Add `FinalModifierHintError` and `PHP81UnhandledError`
- Add unit tests
### Screenshots
PHP Version:

with PHP 8.1

with PHP 8.0

Errors for the final modifier

--
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
[GitHub] [netbeans] junichi11 commented on a change in pull request #3331: [NETBEANS-5599] PHP 8.1 Support: Final class constants part
Posted by GitBox <gi...@apache.org>.
junichi11 commented on a change in pull request #3331:
URL: https://github.com/apache/netbeans/pull/3331#discussion_r755608568
##########
File path: php/php.editor/tools/ASTPHP5Parser.cup
##########
@@ -2926,6 +2928,27 @@ constant_modifiers ::=
{:
RESULT = modifier;
:}
+
+| final_modifier:modifier
+{:
+ RESULT = modifier;
+:}
+
+| final_modifier:fModifier ppp_modifiers:pModifier
+{:
+ int result = 0;
+ result |= fModifier.intValue();
+ result |= pModifier.intValue();
+ RESULT = Integer.valueOf(result);
+:}
+
+| ppp_modifiers:pModifier final_modifier:fModifier
+{:
+ int result = 0;
+ result |= pModifier.intValue();
+ result |= fModifier.intValue();
+ RESULT = Integer.valueOf(result);
+:}
Review comment:
`constant_modifiers ::=` part
--
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
[GitHub] [netbeans] junichi11 commented on pull request #3331: [NETBEANS-5599] PHP 8.1 Support: Final class constants part
Posted by GitBox <gi...@apache.org>.
junichi11 commented on pull request #3331:
URL: https://github.com/apache/netbeans/pull/3331#issuecomment-977797704
@tmysik Thank you as always :)
--
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
[GitHub] [netbeans] junichi11 commented on a change in pull request #3331: [NETBEANS-5599] PHP 8.1 Support: Final class constants part
Posted by GitBox <gi...@apache.org>.
junichi11 commented on a change in pull request #3331:
URL: https://github.com/apache/netbeans/pull/3331#discussion_r755609865
##########
File path: php/php.editor/test/unit/data/testfiles/parser/finalClassMethods_01.php
##########
@@ -0,0 +1,104 @@
+<?php
+/*
+ * 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.
+ */
+
+class FinalMethod {
Review comment:
Add missing unit tests for final methods.
--
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
[GitHub] [netbeans] junichi11 commented on a change in pull request #3331: [NETBEANS-5599] PHP 8.1 Support: Final class constants part
Posted by GitBox <gi...@apache.org>.
junichi11 commented on a change in pull request #3331:
URL: https://github.com/apache/netbeans/pull/3331#discussion_r755608222
##########
File path: php/php.editor/tools/ASTPHP5Parser.cup
##########
@@ -3075,7 +3106,16 @@ method_modifiers ::=
RESULT = Integer.valueOf(result);
:}
-| af_modifiers:fModifier ppp_modifiers:sModifier static_modifier:tModifier
+| abstract_modifier:aModifier ppp_modifiers:sModifier static_modifier:tModifier
+{:
+ int result = 0;
+ result |= aModifier.intValue();
+ result |= sModifier.intValue();
+ result |= tModifier.intValue();
+ RESULT = Integer.valueOf(result);
+:}
+
+| final_modifier:fModifier ppp_modifiers:sModifier static_modifier:tModifier
Review comment:
The same as above
--
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
[GitHub] [netbeans] junichi11 commented on a change in pull request #3331: [NETBEANS-5599] PHP 8.1 Support: Final class constants part
Posted by GitBox <gi...@apache.org>.
junichi11 commented on a change in pull request #3331:
URL: https://github.com/apache/netbeans/pull/3331#discussion_r755607933
##########
File path: php/php.editor/tools/ASTPHP5Parser.cup
##########
@@ -3022,7 +3045,15 @@ method_modifiers ::=
RESULT = Integer.valueOf(result);
:}
-| af_modifiers:fModifier ppp_modifiers:sModifier
+| abstract_modifier:aModifier ppp_modifiers:sModifier
+{:
+ int result = 0;
+ result |= aModifier.intValue();
+ result |= sModifier.intValue();
+ RESULT = Integer.valueOf(result);
+:}
+
+| final_modifier:fModifier ppp_modifiers:sModifier
Review comment:
`method_modifiers ::=` part
Why did separate `abstract` and `final`?
The reason: because the following cases are marked as syntax errors...
(I'm not sure the cause...)
```php
final public function method() {}
final public static function method() {}
```
--
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
[GitHub] [netbeans] junichi11 commented on pull request #3331: [NETBEANS-5599] PHP 8.1 Support: Final class constants part
Posted by GitBox <gi...@apache.org>.
junichi11 commented on pull request #3331:
URL: https://github.com/apache/netbeans/pull/3331#issuecomment-977497184
@tmysik I've started supporting PHP 8.1. Could you please review this when you have time? If there is no problem, let's merge it. I've created the new branch(`php81-support`) for it. 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
[GitHub] [netbeans] tmysik commented on pull request #3331: [NETBEANS-5599] PHP 8.1 Support: Final class constants part
Posted by GitBox <gi...@apache.org>.
tmysik commented on pull request #3331:
URL: https://github.com/apache/netbeans/pull/3331#issuecomment-977818015
@junichi11 You are the one doing the great work, not me ;)
--
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
[GitHub] [netbeans] tmysik merged pull request #3331: [NETBEANS-5599] PHP 8.1 Support: Final class constants part
Posted by GitBox <gi...@apache.org>.
tmysik merged pull request #3331:
URL: https://github.com/apache/netbeans/pull/3331
--
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