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.0 Support: Attribute Syntax (Part 4) #6929

Merged
merged 1 commit into from Jan 9, 2024

Conversation

junichi11
Copy link
Member

@junichi11 junichi11 commented Jan 8, 2024

nb-php-gh-4300-attribute-cc

Note: The following case is not fixed yet.

 #[MyAttr(self::^CONST1)] // don't work here yet
 class Example {
     public const CONST1 = 1;
 }

@junichi11 junichi11 added the PHP [ci] enable extra PHP tests (php/php.editor) label Jan 8, 2024
@junichi11 junichi11 added this to the NB21 milestone Jan 8, 2024
@junichi11 junichi11 linked an issue Jan 8, 2024 that may be closed by this pull request
@junichi11 junichi11 requested a review from tmysik January 8, 2024 23:11
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.

The change is not small but looks OK to me. Also, as always, we have plenty of tests, thanks!

@junichi11
Copy link
Member Author

@tmysik Thank you for your review and your time! I'll merge this after I remove the unused methods :)

- apache#4300
- https://wiki.php.net/rfc/attributes_v2
- https://wiki.php.net/rfc/shorter_attribute_syntax
- https://wiki.php.net/rfc/shorter_attribute_syntax_change
- Fix the code completion feature
- Index classess marked as the Attribute(`#[\Attribute]`)
- Add/Fix unit tests for the indexer and the code completion
- Increment the spec version

Note: The following case is not fixed yet.
```php
 #[MyAttr(self::^CONST1)] // don't work here yet
 class Example {
     public const CONST1 = 1;
 }
```
@tmysik
Copy link
Member

tmysik commented Jan 9, 2024

@junichi11 No need to thank me, you did all the work :)

@junichi11 junichi11 merged commit bf409a9 into apache:master Jan 9, 2024
34 checks passed
@junichi11 junichi11 deleted the php-gh-4300-attribute-cc branch January 9, 2024 16:02
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.

Autocompletion for PHP Attributes
2 participants