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

BasicTwigExtensions.php doesn't pass deprecations tests nor coding standards #129

Open
joestewart opened this issue Nov 11, 2021 · 1 comment

Comments

@joestewart
Copy link

joestewart commented Nov 11, 2021

Using drupal-check:

1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ------------------------------------------------------------------ 
  Line   BasicTwigExtensions.php                                           
 ------ ------------------------------------------------------------------ 
         Reflection error: Provided node "Twig_ExtensionInterface" is not  
         interface, but "class"                                            
  8      Reflection error: Provided node "Twig_ExtensionInterface" is not  
         interface, but "class"                                            
  8      Reflection error: Provided node "Twig_ExtensionInterface" is not  
         interface, but "class"                                            
  8      Reflection error: Provided node "Twig_ExtensionInterface" is not  
         interface, but "class"                                            
 ------ ------------------------------------------------------------------ 

 [ERROR] Found 4 errors

Using phpcs:

--------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
--------------------------------------------------------------------------------------------------------------------
  3 | ERROR   | Missing short description in doc comment
  7 | ERROR   | Missing short description in doc comment
  9 | WARNING | Line exceeds 80 characters; contains 85 characters
 10 | ERROR   | Missing parameter type
 13 | ERROR   | Invalid function name, expected twig_extensions but found twigExtensions
 13 | ERROR   | Expected type hint "Twig_Environment"; found "\Twig_Environment" for $env
 15 | WARNING | Line exceeds 80 characters; contains 81 characters
--------------------------------------------------------------------------------------------------------------------



-------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------------
 106 | ERROR | The text '@deprecated since 1.23 (to be removed in 2.0), implement Twig_Extension_GlobalsInterface instead' does not
     |       | match the standard format: @deprecated in %deprecation-version% and is removed from %removal-version%. %extra-info%.
 106 | ERROR | Each @deprecated tag must have a @see tag immediately following it
 118 | ERROR | The text '@deprecated since 1.26 (to be removed in 2.0), not used anymore internally' does not match the standard
     |       | format: @deprecated in %deprecation-version% and is removed from %removal-version%. %extra-info%.
 118 | ERROR | Each @deprecated tag must have a @see tag immediately following it
-------------------------------------------------------------------------------------------------------------------------------------

Time: 387ms; Memory: 10MB
@richlawson
Copy link

Also noting here that I made the changes for the deprecation, I did not see the phpcs violations locally with the standard Drupal profile.

PR: #130

damienmckenna pushed a commit that referenced this issue Dec 7, 2021
Issue #129: Fix violations from Twig_ExtensionInteface deprecation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants