Skip to content

Change Attribute Syntax from @@ to #[] #5989

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

Closed
wants to merge 1 commit into from

Conversation

beberlei
Copy link
Contributor

@beberlei beberlei commented Aug 15, 2020

This is the same patch as for the @[Attr] syntax, replacing @[ with #[. No other changes are necessary.

RFC: https://wiki.php.net/rfc/shorter_attribute_syntax_change

Copy link
Contributor

@kooldev kooldev left a comment

Choose a reason for hiding this comment

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

The same changes also need to be applied to @[] in #5928.

@beberlei beberlei force-pushed the RustAttributeSyntax branch from 03802a7 to 80d4ab1 Compare August 15, 2020 09:27
@cmb69 cmb69 added the RFC label Aug 21, 2020
@beberlei beberlei marked this pull request as ready for review August 31, 2020 16:16
@nikic
Copy link
Member

nikic commented Sep 2, 2020

Tests for grouping?

@beberlei beberlei force-pushed the RustAttributeSyntax branch from 80d4ab1 to 8008e3c Compare September 2, 2020 16:42
@beberlei
Copy link
Contributor Author

beberlei commented Sep 2, 2020

@nikic right, i have added some now in 028_grouped.phpt, rebased on master.

--FILE--
<?php

#[A1(1), A1(2), A2(3)]
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good to also test that grouping works for attributes without an argument list.

@beberlei beberlei force-pushed the RustAttributeSyntax branch from 8008e3c to 4f1a879 Compare September 2, 2020 18:26
@beberlei
Copy link
Contributor Author

beberlei commented Sep 2, 2020

Merged in 8b37c1e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants