@@ -200,8 +200,11 @@ extern crate proc_macro;
200200/// # fn main() {}
201201/// ````
202202#[ proc_macro_attribute]
203- pub fn php_class ( _args : TokenStream , input : TokenStream ) -> TokenStream {
203+ pub fn php_class ( args : TokenStream , input : TokenStream ) -> TokenStream {
204204 let input = parse_macro_input ! ( input as ItemStruct ) ;
205+ if !args. is_empty ( ) {
206+ return err ! ( input => "`#[php_class(<args>)]` args are no longer supported. Please use `#[php(<args>)]` instead." ) . to_compile_error ( ) . into ( ) ;
207+ }
205208
206209 class:: parser ( input)
207210 . unwrap_or_else ( |e| e. to_compile_error ( ) )
@@ -363,8 +366,11 @@ pub fn php_class(_args: TokenStream, input: TokenStream) -> TokenStream {
363366/// translated into an exception and thrown. See the section on
364367/// [exceptions](../exceptions.md) for more details.
365368#[ proc_macro_attribute]
366- pub fn php_function ( _args : TokenStream , input : TokenStream ) -> TokenStream {
369+ pub fn php_function ( args : TokenStream , input : TokenStream ) -> TokenStream {
367370 let input = parse_macro_input ! ( input as ItemFn ) ;
371+ if !args. is_empty ( ) {
372+ return err ! ( input => "`#[php_function(<args>)]` args are no longer supported. Please use `#[php(<args>)]` instead." ) . to_compile_error ( ) . into ( ) ;
373+ }
368374
369375 function:: parser ( input)
370376 . unwrap_or_else ( |e| e. to_compile_error ( ) )
@@ -423,8 +429,11 @@ pub fn php_function(_args: TokenStream, input: TokenStream) -> TokenStream {
423429/// var_dump(MANUAL_CONSTANT); // string(12) "Hello world!"
424430/// ```
425431#[ proc_macro_attribute]
426- pub fn php_const ( _args : TokenStream , input : TokenStream ) -> TokenStream {
432+ pub fn php_const ( args : TokenStream , input : TokenStream ) -> TokenStream {
427433 let input = parse_macro_input ! ( input as ItemConst ) ;
434+ if !args. is_empty ( ) {
435+ return err ! ( input => "`#[php_const(<args>)]` args are no longer supported. Please use `#[php(<args>)]` instead." ) . to_compile_error ( ) . into ( ) ;
436+ }
428437
429438 constant:: parser ( input)
430439 . unwrap_or_else ( |e| e. to_compile_error ( ) )
@@ -498,8 +507,11 @@ pub fn php_const(_args: TokenStream, input: TokenStream) -> TokenStream {
498507/// # fn main() {}
499508/// ```
500509#[ proc_macro_attribute]
501- pub fn php_module ( _args : TokenStream , input : TokenStream ) -> TokenStream {
510+ pub fn php_module ( args : TokenStream , input : TokenStream ) -> TokenStream {
502511 let input = parse_macro_input ! ( input as ItemFn ) ;
512+ if !args. is_empty ( ) {
513+ return err ! ( input => "`#[php_module(<args>)]` args are no longer supported. Please use `#[php(<args>)]` instead." ) . to_compile_error ( ) . into ( ) ;
514+ }
503515
504516 module:: parser ( input)
505517 . unwrap_or_else ( |e| e. to_compile_error ( ) )
@@ -685,8 +697,11 @@ pub fn php_module(_args: TokenStream, input: TokenStream) -> TokenStream {
685697///
686698/// [`php_async_impl`]: ./async_impl.md
687699#[ proc_macro_attribute]
688- pub fn php_impl ( _args : TokenStream , input : TokenStream ) -> TokenStream {
700+ pub fn php_impl ( args : TokenStream , input : TokenStream ) -> TokenStream {
689701 let input = parse_macro_input ! ( input as ItemImpl ) ;
702+ if !args. is_empty ( ) {
703+ return err ! ( input => "`#[php_impl(<args>)]` args are no longer supported. Please use `#[php(<args>)]` instead." ) . to_compile_error ( ) . into ( ) ;
704+ }
690705
691706 impl_:: parser ( input)
692707 . unwrap_or_else ( |e| e. to_compile_error ( ) )
0 commit comments