Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.3 Support: Dynamic class constant fetch #6701 #6752

Conversation

junichi11
Copy link
Member

PHP 8.3 Support: Add PHP 8.3 to the PhpVersion

PHP 8.3 Support: Dynamic class constant fetch (Part 1)

  • Fix the grammar file (parser)
  • Add the PHP83UnhandledError
  • Add/Fix unit tests for the parser

Example:

class Example {
    const CONSTANT = 'constant';
}
$constant = 'CONSTANT';
echo Example::{$constant};

PHP 8.3:

nb-php83-dynamic-class-constant-fetch-syntax

PHP 8.2:

nb-php83-dynamic-class-constant-fetch-php82

PHP 8.3 Support: Dynamic class constant fetch (Part 2)

  • Fix the SemanticAnalysis
  • Fix the mark occurrences and the go to declaration features
  • Add unit tests

PHP 8.3 Support: Dynamic class constant fetch (Part 3)

  • Fix the formatter
    • Add the option of the around spaces for the scope resolution operator (::)
    • Don't add spaces within braces ({}) e.g. {$example}
  • Add unit tests

PHP 8.3 Support: Dynamic class constant fetch (Part 4)

  • Fix the code completion feature
  • Add unit tests for the code completion and brace matching features

PHP 8.3 Support: Dynamic class constant fetch (Part 5)

  • Fix the IntroduceSuggestion and PHP55UnhandledError
  • Add unit tests

@junichi11 junichi11 added the PHP [ci] enable extra PHP tests (php/php.editor) label Nov 27, 2023
@junichi11 junichi11 added this to the NB21 milestone Nov 27, 2023
@junichi11 junichi11 force-pushed the php83-dynamic-class-constant-fetch branch from b14721e to e53b927 Compare November 27, 2023 11:38
@junichi11
Copy link
Member Author

junichi11 commented Nov 27, 2023

@tmysik Could you please have a look at each commit when you have time?

Copy link
Member

@tmysik tmysik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks OK to me. As always, thanks a lot for all the tests! 👍

- apache#6701
- https://wiki.php.net/rfc/dynamic_class_constant_fetch
- Fix the grammar file (parser)
- Add the `PHP83UnhandledError`
- Add/Fix unit tests for the parser

Example:
```php
class Example {
    const CONSTANT = 'constant';
}
$constant = 'CONSTANT';
echo Example::{$constant};
```
- apache#6701
- https://wiki.php.net/rfc/dynamic_class_constant_fetch
- Fix the `SemanticAnalysis`
- Fix the mark occurrences and the go to declaration features
- Add unit tests
- apache#6701
- https://wiki.php.net/rfc/dynamic_class_constant_fetch
- Fix the formatter
  - Add the option of the around spaces for the scope resolution operator (`::`)
  - Don't add spaces within braces (`{}`) e.g. {$example}
- Add unit tests
- apache#6701
- https://wiki.php.net/rfc/dynamic_class_constant_fetch
- Fix the code completion feature
- Add unit tests for the code completion and brace matching features
- apache#6701
- https://wiki.php.net/rfc/dynamic_class_constant_fetch
- Fix the `IntroduceSuggestion` and `PHP55UnhandledError`
- Add unit tests
@junichi11 junichi11 force-pushed the php83-dynamic-class-constant-fetch branch from e53b927 to 7e70563 Compare November 27, 2023 23:25
@junichi11
Copy link
Member Author

@tmysik Fixed : https://github.com/apache/netbeans/compare/e53b9278c63011edf23dc592d66827e77d98edbe..7e705639b19ce57a0fe0984cdc8e91ac2f4272bc

Thank you for your review and your time :)

@junichi11 junichi11 mentioned this pull request Nov 28, 2023
3 tasks
@tmysik
Copy link
Member

tmysik commented Nov 28, 2023

@junichi11 Nothing to thank for, really. NetBeans users have to thank you, Junichi. Without you, there would not be any up-to-date PHP support in NetBeans at all! 👍

@junichi11 junichi11 merged commit 16b9fc1 into apache:php-nb21-features Nov 28, 2023
34 checks passed
@junichi11 junichi11 deleted the php83-dynamic-class-constant-fetch branch November 28, 2023 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PHP [ci] enable extra PHP tests (php/php.editor)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants