Comments

yogeshmpawar created an issue. See original summary.

yogeshmpawar’s picture

Assigned: yogeshmpawar » Unassigned
Status: Active » Needs review
Issue tags: +Drupal 9 compatibility, +Drupal 9 readiness, +Drupal 9 porting day
StatusFileSize
new206 bytes

Wrong file

yogeshmpawar’s picture

StatusFileSize
new389 bytes

Here's the patch for Drupal 9 readiness.

kishor_kolekar’s picture

Status: Needs review » Reviewed & tested by the community

Ran drupal-check and found no issues:

➜  drupal-8.9 git:(8.9.x) ✗ ./vendor/bin/drupal-check   modules/contrib/simplify_menu
 2/2 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 [OK] No errors

Rector O/P

➜  drupal-8.9 git:(8.9.x) ✗ ./vendor/bin/rector process  modules/contrib/simplify_menu --dry-run
Rector 0.8.x-dev@8896f0a
Config file: rector.yml

 6/6 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 [OK] Rector is done!

Patch #3. LGTM. Updating the status to RTBC

kristen pol’s picture

Title: Drupal 9 readiness » Drupal 9 compatibility
Issue tags: -Drupal 9 readiness

Per a Slack discussion with Gábor Hojtsy last year regarding usage of D9 tags (Drupal 9, Drupal 9 compatibility, Drupal 9 readiness, etc.), "Drupal 9 compatibility" should be used for contributed projects that need updating and "Drupal 9" was the old tag for D8 issues before the D9 branch was ready. Doing title and tag cleanup here based on that discussion. Please use "Drupal 9 compatibility" for titles and tags on other issues. Thanks.

diveshh’s picture

StatusFileSize
new378 bytes

I tried #3 on Drupal 9.0.0 and it didn't work for me.
I created a new patch.

cbanman’s picture

#6 worked for me

digitaldonkey’s picture

StatusFileSize
new910 bytes

I saw two more problems.

/docroot (release/8.5.x-dev ✘)✹✭ ᐅ ~/.composer/vendor/mglaman/drupal-check/drupal-check  -d modules/contrib/simplify_menu
 4/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ----------------------------------------------------------------------
  Line   src/Tests/SimplifyMenuTest.php
 ------ ----------------------------------------------------------------------
  12     Class Drupal\simplify_menu\Tests\SimplifyMenuTest extends deprecated
         class Drupal\simpletest\WebTestBase:
         in drupal:8.8.0 and is removed from drupal:9.0.0. Instead,
         use \Drupal\Tests\BrowserTestBase. See
         https://www.drupal.org/node/3030340.
  34     Call to method setUp() of deprecated class
         Drupal\simpletest\WebTestBase:
         in drupal:8.8.0 and is removed from drupal:9.0.0. Instead,
         use \Drupal\Tests\BrowserTestBase. See
         https://www.drupal.org/node/3030340.
 ------ ----------------------------------------------------------------------

... and I learned patches can't be tested against D9.

digitaldonkey’s picture

Status: Reviewed & tested by the community » Needs review
digitaldonkey’s picture

In order to progress on a D9 release I would suggest that a maintainer creates a D9 release branch, so that we can also test against the D9 codebase.

meghasharma’s picture

Assigned: Unassigned » meghasharma
meghasharma’s picture

Assigned: meghasharma » Unassigned
Status: Needs review » Needs work

Ran rector tools and scanned upgrade_status on simplify menu module: No errors reported

my_site_name_dir % vendor/bin/rector process web/modules/contrib/simplify_menu --dry-run
Rector 0.8.x-dev@8896f0a
Config file: rector.yml

 12/12 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
                                                                                                                     
 [OK] Rector is done!                                                                                                   
                                                                                                                        

Ran drupal-check, I saw some errors
After applied #8 patch

my_site_name_dir % vendor/bin/drupal-check -ad web/modules/contrib/simplify_menu        
 4/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ----------------------------------------------------------------------------------------------------------------- 
  Line   src/MenuItems.php                                                                                                
 ------ ----------------------------------------------------------------------------------------------------------------- 
  89     Cannot access offset mixed on Drupal\Core\Menu\MenuLinkTree.                                                     
  89     Result of && is always false.                                                                                    
  134    PHPDoc tag @param has invalid value ($menu_id                                                                    
         The id of the menu to check for active links.): Unexpected token "$menu_id", expected type at offset 91          
  138    Property Drupal\simplify_menu\MenuItems::$activeMenuTree (Drupal\Core\Menu\MenuLinkTree) does not accept array.  
 ------ ----------------------------------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------------------------------------- 
  Line   src/Tests/SimplifyMenuTest.php                                                                                   
 ------ ----------------------------------------------------------------------------------------------------------------- 
  95     PHPDoc tag @param has invalid value ($group                                                                      
         The type of assertion - examples are "Browser", "PHP".): Unexpected token "$group", expected type at offset 347  
  95     PHPDoc tag @param has invalid value ($message                                                                    
         The message to display along with the assertion.): Unexpected token "$message", expected type at offset 270      
  95     PHPDoc tag @param has invalid value ($xpath                                                                      
         An XPath expression.): Unexpected token "$xpath", expected type at offset 71                                     
  95     PHPDoc tag @return has invalid value (): Unexpected token "\n   *", expected type at offset 433                  
  97     Method Drupal\Tests\BrowserTestBase::assertTrue() invoked with 3 parameters, 1-2 required.                       
  97     Result of method Drupal\Tests\BrowserTestBase::assertTrue() (void) is used.                                      
 ------ ----------------------------------------------------------------------------------------------------------------- 
digitaldonkey’s picture

StatusFileSize
new3.94 KB
digitaldonkey’s picture

StatusFileSize
new3.93 KB
digitaldonkey’s picture

StatusFileSize
new3.85 KB
~/htdocs/drupal (9.0.x ✘)✹✭ ᐅ vendor/bin/drupal-check  -ad --drupal-root ~/htdocs/drupal  modules/simplify_menu
 4/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
 [OK] No errors
digitaldonkey’s picture

Status: Needs work » Needs review
meghasharma’s picture

Assigned: Unassigned » meghasharma
tobiasb’s picture

I move the test into the tests folder and some other small improvements.

tobiasb’s picture

StatusFileSize
new8.66 KB
new2.58 KB

Improved coding standards.

tobiasb’s picture

StatusFileSize
new8.5 KB
new2.42 KB

meghasharma’s picture

Assigned: meghasharma » Unassigned
Status: Needs review » Needs work

After applied #20 patch
i saw one error when i run drupal check on simplify menu module.

my_site_name_dir % vendor/bin/drupal-check -ad web/modules/contrib/simplify_menu
 4/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ------------------------------------------------------------------------------------------------------------------------------------------------ 
  Line   src/MenuItems.php                                                                                                                               
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------ 
  39     Property Drupal\simplify_menu\MenuItems::$menuLinkTree (Drupal\Core\Menu\MenuLinkTree) does not accept Drupal\Core\Menu\MenuLinkTreeInterface.  
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------ 
                                                                                                                        
 [ERROR] Found 1 error                                                                                                  
                                                                                                                        
tobiasb’s picture

Status: Needs work » Needs review
StatusFileSize
new8.68 KB
new525 bytes
meghasharma’s picture

Status: Needs review » Reviewed & tested by the community

#23 patch applied cleanly.
Ran drupal check, rector tools and scanned upgrade_status on simplify menu module: No errors reported

my_site_name_dir % vendor/bin/rector process web/modules/contrib/simplify_menu --dry-run
Rector 0.8.x-dev@8896f0a
Config file: rector.yml

 12/12 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

                                                                                                                        
 [OK] Rector is done!                                                                                                   
                                                                                                                        
my_site_name_dir %  vendor/bin/drupal-check -ad web/modules/contrib/simplify_menu   

 4/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
                                                                                                                       
 [OK] No errors                                                                                                         
                                                                                                                     
yogeshmpawar’s picture

+1 for RTBC.
@maintainer's - Please review this & please create a new release as it blocks Drupal 9 site.

gauravvvv’s picture

StatusFileSize
new1.05 MB

+1 RTBC
#23 patch works fine for me. Adding a screenshot for ref.

  • shrop committed 26bb172 on 8.x-2.x authored by tobiasb
    Issue #3131750 by tobiasb, digitaldonkey, yogeshmpawar, Diveshh,...
shrop’s picture

shrop’s picture

Status: Reviewed & tested by the community » Fixed

8.x-2.1 has been released with Drupal 8 and 9 compatibility. Closing this issue. Thank you all!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.