Looks like some of the coding standards like indentation missing in superfish.install file and Type hint "array" missing for $plugin_definition in SuperfishBlock.php file

Comments

MRPRAVIN created an issue. See original summary.

MRPRAVIN’s picture

Title: Found intendation issus in superfish.install » Found coding standard issues in superfish

  • mehrpadin committed d5f82a1 on 8.x-1.x authored by MRPRAVIN
    Issue #2951400 by MRPRAVIN: Found coding standard issues in superfish
    

  • mehrpadin committed 3d52697 on 8.x-1.x
    Issue #2951400 by MRPRAVIN: Found coding standard issues in superfish
    
vakulrai’s picture

Status: Active » Needs review
StatusFileSize
new612 bytes

MRPRAVIN,
I ran phpcs on my local it does not log any code errors.

Adding a patch for typehint array.

deepanker_bhalla’s picture

Status: Needs review » Reviewed & tested by the community

@vakulrai Good work. I can confirm the patch #5 is applying cleanly. Here is the output:

❯ superfish 8.x-1.x* git apply -v coding-error-2951400.patch
Checking patch src/Plugin/Block/SuperfishBlock.php...
Applied patch src/Plugin/Block/SuperfishBlock.php cleanly.

❯ superfish 8.x-1.x* phpcs --standard=Drupal .

❯ superfish 8.x-1.x*
PHPCS is reporting no coding standard warning after applying the patch #5.

mehrpadin’s picture

Hey there,

I think this was suggested before and I applied it and ran into the same error that I just did, thanks anyway.

Declaration of Drupal\superfish\Plugin\Block\SuperfishBlock::create(Symfony\Component\DependencyInjection\ContainerInterface $container, array $configuration, $plugin_id, array $plugin_definition) must be compatible with Drupal\system\Plugin\Block\SystemMenuBlock::create(Symfony\Component\DependencyInjection\ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) in N:\XAMPP\htdocs\WWW\D8\modules\contrib\superfish\src\Plugin\Block\SuperfishBlock.php on line 24

mehrpadin’s picture

Status: Reviewed & tested by the community » Postponed
nwom’s picture

Category: Task » Bug report
Status: Postponed » Needs work

I can confirm the same problem as #7 after applying the patch. The WSOD and error still occurs.

The error also only started occurring after I installed the following core patch (perhaps there are other ways to reproduce it): #3164389: Enforce block plugins returning an array

indrapatil’s picture

StatusFileSize
new1.46 KB

Hi,
I fixed the coding standard issue
please review it.
Thanks

sourabhjain’s picture

Status: Needs work » Needs review
nayana_mvr’s picture

Verified the patch #10 and tested it on Drupal version 10.1.x and Superfish version 8.x-1.x. The patch works fine and all the coding standard issues are fixed.

ivnish’s picture

Category: Bug report » Task

  • LOBsTerr committed 673180bd on 8.x-1.x authored by Indrapatil
    Issue #2951400 by LOBsTerr: Found coding standard issues in superfish
    
lobsterr’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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