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

refactor: Replace deprecated LevelSetLists for version specific PHPUnit, Symfony and Twig sets #290

Merged

Conversation

timohuisman
Copy link
Contributor

Description

In the latest rector release 0.19.2 there are some deprecations added for the Symfony/Twig/PHPUnit level sets. See rectorphp/rector-src#5477

https://github.com/palantirnet/drupal-rector/actions/runs/7643040570/job/20824102985?pr=289

------ ------------------------------------------------------------------- 
  Line   config/drupal-10/drupal-10.0-deprecations.php                      
 ------ ------------------------------------------------------------------- 
  13     Fetching class constant UP_TO_PHPUNIT_90 of deprecated class       
         Rector\PHPUnit\Set\PHPUnitLevelSetList:                            
         Instead of too bloated and overriding level sets, use only latest  
         PHPUnit set                                                        
  13     Fetching deprecated class constant UP_TO_PHPUNIT_90 of class       
         Rector\PHPUnit\Set\PHPUnitLevelSetList:                            
         Instead of too bloated and overriding level sets, use only latest  
         PHPUnit set                                                        
  14     Fetching class constant UP_TO_SYMFONY_62 of deprecated class       
         Rector\Symfony\Set\SymfonyLevelSetList:                            
         Instead of too bloated and overriding level sets, use only latest  
         Symfony set                                                        
  14     Fetching deprecated class constant UP_TO_SYMFONY_62 of class       
         Rector\Symfony\Set\SymfonyLevelSetList:                            
         Instead of too bloated and overriding level sets, use only latest  
         Symfony set                                                        
  15     Fetching class constant UP_TO_TWIG_2[40](https://github.com/palantirnet/drupal-rector/actions/runs/7643040570/job/20824102985?pr=289#step:5:41) of deprecated class         
         Rector\Symfony\Set\TwigLevelSetList:                               
         Instead of too bloated and overriding level sets, use only latest  
         Twig set                                                           
  15     Fetching deprecated class constant UP_TO_TWIG_240 of class         
         Rector\Symfony\Set\TwigLevelSetList:                               
         Instead of too bloated and overriding level sets, use only latest  
         Twig set                                                           
 ------ ------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------- 
  Line   config/drupal-10/drupal-10.1-deprecations.php                      
 ------ ------------------------------------------------------------------- 
  15     Fetching class constant UP_TO_SYMFONY_63 of deprecated class       
         Rector\Symfony\Set\SymfonyLevelSetList:                            
         Instead of too bloated and overriding level sets, use only latest  
         Symfony set                                                        
  15     Fetching deprecated class constant UP_TO_SYMFONY_63 of class       
         Rector\Symfony\Set\SymfonyLevelSetList:                            
         Instead of too bloated and overriding level sets, use only latest  
         Symfony set                                                        
 ------ ------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------- 
  Line   config/drupal-9/drupal-9-all-deprecations.php                      
 ------ ------------------------------------------------------------------- 
  20     Fetching class constant UP_TO_PHPUNIT_90 of deprecated class       
         Rector\PHPUnit\Set\PHPUnitLevelSetList:                            
         Instead of too bloated and overriding level sets, use only latest  
         PHPUnit set                                                        
  20     Fetching deprecated class constant UP_TO_PHPUNIT_90 of class       
         Rector\PHPUnit\Set\PHPUnitLevelSetList:                            
         Instead of too bloated and overriding level sets, use only latest  
         PHPUnit set                                                        
 ------ -------------------------------------------------------------------

To Test

  • run 'composer test'

Drupal.org issue

https://www.drupal.org/project/rector/issues/3416880

@bbrala
Copy link
Collaborator

bbrala commented Jan 28, 2024

Yeah makes sense to not have every single rector run for those sets.

@bbrala bbrala merged commit 2ccc94f into palantirnet:main Jan 28, 2024
7 checks passed
@bbrala bbrala changed the title refactor: replace deprecated LevelSetLists for PHPUnit, Symfony and Twig refactor: Replace deprecated LevelSetLists for version specific PHPUnit, Symfony and Twig Jan 28, 2024
@bbrala bbrala changed the title refactor: Replace deprecated LevelSetLists for version specific PHPUnit, Symfony and Twig refactor: Replace deprecated LevelSetLists for version specific PHPUnit, Symfony and Twig sets Jan 28, 2024
@jackbentley
Copy link

If any new PRs include code deprecated in a prior minor version then they will not get caught. For example, something deprecated in Symfony 6.1 wont get checked as you're specifying only check deprecations in 6.2.

@bbrala
Copy link
Collaborator

bbrala commented Feb 1, 2024

Hmm valid, perhaps need to revisit what new versions of symfony were supported in major Drupal.

@bbrala
Copy link
Collaborator

bbrala commented Mar 1, 2024

Ok, for this we need to check what versions are supported for the previous version of drupal then i guess, and add those. Then you cover the issues from last major also.

Or we could decide to exclude these from rector by default and have people handle this themselves?

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

Successfully merging this pull request may close these issues.

3 participants