Skip to content

Support 8.0 attributes in extension stubs #9967

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
tillkruss opened this issue Nov 17, 2022 · 5 comments
Closed

Support 8.0 attributes in extension stubs #9967

tillkruss opened this issue Nov 17, 2022 · 5 comments

Comments

@tillkruss
Copy link

Description

Hello!

We'd like to use 8.0 attributes in generated arginfo files for our extensions.

it seems that #[\SensitiveParameter] is supported, but that's about not:

namespace MyExtension {
​
  class Foobar {
    
    #[\MyExtension\FooAttribute]
    public function getBaz() {
      //
    }
​
  }

  class FooAttribute { }
​
}
@cmb69
Copy link
Member

cmb69 commented Nov 18, 2022

Supporting arbitrary attributes might open up a can of worms, though.

cc @kocsismate

@tillkruss
Copy link
Author

It seems that as of 8.2 any arbitrary "argument attribute" works, but not "method attributes".

@tillkruss
Copy link
Author

It seems that zend_add_class_attribute and zend_add_parameter_attribute are being generated, but NOT: zend_add_function_attribute

@kocsismate
Copy link
Member

I've just filed #10170 to implement the feature request.

kocsismate added a commit to kocsismate/php-src that referenced this issue Jan 1, 2023
kocsismate added a commit to kocsismate/php-src that referenced this issue Jan 1, 2023
@iluuu1994
Copy link
Member

Closing this as there's a PR for this now (#10170). Please comment there to advance it.

@iluuu1994 iluuu1994 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2023
kocsismate added a commit to kocsismate/php-src that referenced this issue Jun 8, 2023
kocsismate added a commit to kocsismate/php-src that referenced this issue Jul 1, 2023
kocsismate added a commit to kocsismate/php-src that referenced this issue Jul 2, 2023
kocsismate added a commit that referenced this issue Jul 3, 2023
kocsismate added a commit that referenced this issue Jul 3, 2023
* PHP-8.2:
  Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs

Closes GH-10170
iluuu1994 added a commit that referenced this issue Jul 4, 2023
… const, and property attributes in stubs"

This reverts commit d7ab0ff.
iluuu1994 added a commit that referenced this issue Jul 4, 2023
* PHP-8.2:
  Revert "Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs"
kocsismate added a commit to kocsismate/php-src that referenced this issue Aug 15, 2023
kocsismate added a commit to kocsismate/php-src that referenced this issue Aug 15, 2023
kocsismate added a commit to kocsismate/php-src that referenced this issue Aug 15, 2023
kocsismate added a commit to kocsismate/php-src that referenced this issue Aug 15, 2023
kocsismate added a commit to kocsismate/php-src that referenced this issue Aug 24, 2023
kocsismate added a commit to kocsismate/php-src that referenced this issue Aug 24, 2023
kocsismate added a commit to kocsismate/php-src that referenced this issue Aug 26, 2023
kocsismate added a commit that referenced this issue Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants