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

Closed
3 tasks done
junichi11 opened this issue Nov 15, 2023 · 2 comments
Closed
3 tasks done

PHP 8.3 Support #6701

junichi11 opened this issue Nov 15, 2023 · 2 comments
Assignees
Labels
kind:feature A feature request PHP [ci] enable extra PHP tests (php/php.editor)
Milestone

Comments

@junichi11
Copy link
Member

junichi11 commented Nov 15, 2023

@junichi11 junichi11 added the kind:feature A feature request label Nov 15, 2023
@junichi11 junichi11 self-assigned this Nov 15, 2023
junichi11 added a commit to junichi11/netbeans that referenced this issue Nov 27, 2023
- 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};
```
junichi11 added a commit to junichi11/netbeans that referenced this issue Nov 27, 2023
- 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
junichi11 added a commit to junichi11/netbeans that referenced this issue Nov 27, 2023
- 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
junichi11 added a commit to junichi11/netbeans that referenced this issue Nov 27, 2023
- 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
@junichi11 junichi11 added the PHP [ci] enable extra PHP tests (php/php.editor) label Nov 27, 2023
junichi11 added a commit to junichi11/netbeans that referenced this issue Nov 27, 2023
- 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};
```
junichi11 added a commit to junichi11/netbeans that referenced this issue Nov 27, 2023
- 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
junichi11 added a commit to junichi11/netbeans that referenced this issue Nov 27, 2023
- 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
junichi11 added a commit to junichi11/netbeans that referenced this issue Nov 27, 2023
- 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
junichi11 added a commit to junichi11/netbeans that referenced this issue Nov 27, 2023
- apache#6701
- https://wiki.php.net/rfc/dynamic_class_constant_fetch
- Fix the `IntroduceSuggestion` and `PHP55UnhandledError`
- Add unit tests
junichi11 added a commit to junichi11/netbeans that referenced this issue Nov 27, 2023
- apache#6701
- https://wiki.php.net/rfc/dynamic_class_constant_fetch
- Fix the `IntroduceSuggestion` and `PHP55UnhandledError`
- Add unit tests
junichi11 added a commit to junichi11/netbeans that referenced this issue Nov 27, 2023
- 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};
```
junichi11 added a commit to junichi11/netbeans that referenced this issue Nov 27, 2023
- 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
junichi11 added a commit to junichi11/netbeans that referenced this issue Nov 27, 2023
- 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
junichi11 added a commit to junichi11/netbeans that referenced this issue Nov 27, 2023
- 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
junichi11 added a commit to junichi11/netbeans that referenced this issue Nov 27, 2023
- apache#6701
- https://wiki.php.net/rfc/dynamic_class_constant_fetch
- Fix the `IntroduceSuggestion` and `PHP55UnhandledError`
- Add unit tests
junichi11 added a commit that referenced this issue Nov 28, 2023
…fetch

PHP 8.3 Support: Dynamic class constant fetch #6701
@junichi11 junichi11 added this to the NB21 milestone Nov 28, 2023
@hantsy
Copy link

hantsy commented Dec 4, 2023

In PHP 8.3, override a method should add #[Override]

@junichi11
Copy link
Member Author

Yes, I know it. I'll add it to the list. Thanks.

junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 5, 2023
- apache#6701
- https://wiki.php.net/rfc/typed_class_constants
- Fix the grammar file (parser)
- Fix the `PHP83UnhandledError`
- Add/Fix unit tests for the parser
- Increment the spec version

Example:
```php
class Example {
    public const string CONSTANT1 = 'constant';
    public const ?int CONSTANT2 = 1;
    public const int|string CONSTANT3 = 1;
}
```
junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 5, 2023
- apache#6701
- https://wiki.php.net/rfc/typed_class_constants
- Index class constant types
- Fix the navigator
- Add/Fix unit tests for the indexer and the navigator
- Increment the spec version
junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 5, 2023
- apache#6701
- https://wiki.php.net/rfc/typed_class_constants
- Fix the context sensitive lexer (Reserved keywords can be used as constant names)
- Get the constant names as the `PHP_STRING` token
- Add unit tests

Example:
```php
class Example {
    public const string|array array = [1, 2, 3], string = "example";
}
```
junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 5, 2023
- apache#6701
- https://wiki.php.net/rfc/typed_class_constants
- Fix the mark occurences and the go to declaration features
- Add unit tests
junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 5, 2023
- apache#6701
- https://wiki.php.net/rfc/typed_class_constants
- Fix the Code Completion feature
- Add templates for constant statements
- Add unit tests
junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 5, 2023
- apache#6701
- https://wiki.php.net/rfc/typed_class_constants
- Fix the formatter (don't add spaces within parens of DNF types)
- Fix the `UnusableTypeHintError`
- Add unit tests
junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 5, 2023
- apache#6701
- https://wiki.php.net/rfc/typed_class_constants
- Fix the formatter (don't add spaces within parens of DNF types)
- Fix the `UnusableTypeHintError`
- Add unit tests
junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 8, 2023
- apache#6701
- https://wiki.php.net/rfc/typed_class_constants
- Index class constant types
- Fix the navigator
- Add/Fix unit tests for the indexer and the navigator
- Increment the spec version
junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 8, 2023
- apache#6701
- https://wiki.php.net/rfc/typed_class_constants
- Fix the context sensitive lexer (Reserved keywords can be used as constant names)
- Get the constant names as the `PHP_STRING` token
- Add unit tests

Example:
```php
class Example {
    public const string|array array = [1, 2, 3], string = "example";
}
```
junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 8, 2023
- apache#6701
- https://wiki.php.net/rfc/typed_class_constants
- Fix the mark occurences and the go to declaration features
- Add unit tests
junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 8, 2023
- apache#6701
- https://wiki.php.net/rfc/typed_class_constants
- Fix the Code Completion feature
- Add templates for constant statements
- Add unit tests
junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 8, 2023
- apache#6701
- https://wiki.php.net/rfc/typed_class_constants
- Fix the formatter (don't add spaces within parens of DNF types)
- Fix the `UnusableTypeHintError`
- Add unit tests
junichi11 added a commit that referenced this issue Dec 8, 2023
junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 22, 2023
- apache#6701
- https://wiki.php.net/rfc/marking_overriden_methods
- Add the `hasOverrideAttribute()` method to the `PhpVersion`
- Add the `AddOverrideAttributeHint`
- Add unit tests
- Increment spec versions

Note:
If some trait methods have `#[\Override]`, we should also check wheter the parent class has them.
However, attributes are not indexed at the moment. So, we should improve the indexer.
(Currently, the following case is not supported.)

e.g.
```php
trait T {
    #[\Override]
    public function traitMethod(): void {}
}
class C {
    // Fatal error:  C::traitMethod() has #[\Override] attribute, but no matching parent method exists
    use T;
}
```
junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 22, 2023
- apache#6701
- https://wiki.php.net/rfc/marking_overriden_methods
- Fix the code generator, code completion, and `ImplementAbstractMethodsHintError`
- Add/Fix unit tests
junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 22, 2023
- apache#6701
- https://wiki.php.net/rfc/marking_overriden_methods
- Fix the code generator, code completion, and `ImplementAbstractMethodsHintError`
- Add/Fix unit tests
junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 22, 2023
- apache#6701
- https://wiki.php.net/rfc/marking_overriden_methods
- Add the `hasOverrideAttribute()` method to the `PhpVersion`
- Add the `AddOverrideAttributeHint`
- Add unit tests
- Increment spec versions

Note:
If some trait methods have `#[\Override]`, we should also check wheter the parent class has them.
However, attributes are not indexed at the moment. So, we should improve the indexer.
(Currently, the following case is not supported.)

e.g.
```php
trait T {
    #[\Override]
    public function traitMethod(): void {}
}
class C {
    // Fatal error:  C::traitMethod() has #[\Override] attribute, but no matching parent method exists
    use T;
}
```
junichi11 added a commit to junichi11/netbeans that referenced this issue Dec 22, 2023
- apache#6701
- https://wiki.php.net/rfc/marking_overriden_methods
- Fix the code generator, code completion, and `ImplementAbstractMethodsHintError`
- Add/Fix unit tests
junichi11 added a commit that referenced this issue Dec 23, 2023
PHP 8.3 Support: Marking overridden methods (#[\Override]) #6701
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:feature A feature request PHP [ci] enable extra PHP tests (php/php.editor)
Projects
None yet
Development

No branches or pull requests

2 participants