Incorrect typehint \Drupal\encrypt\EncryptionProfileInterface

Created on 26 April 2024, 7 months ago
Updated 13 June 2024, 5 months ago

The type-hint should be for `$encryptionProfile` in the base class should be a fully resolved encryption profile interface, not the manager.

See patch in next comment :)

๐Ÿ“Œ Task
Status

Needs work

Version

1.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States andyg5000 North Carolina, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @andyg5000
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States andyg5000 North Carolina, USA
  • Status changed to Needs work 7 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cmlara

    Good Evening, Thank you fort the patch.

    The patch file workflow has been deprecated on D.O. due to the upcoming decommissioning of DrupalCi which will be replaced by GitLab Ci.

    Patch files can only be tested in DrupalCi while MRโ€™s can be tested in both DrupalCi and GitLabCi

    Many modules, including TFA, have already adopted GitLab CI in order to be prepared for decommissioning. Part of the adoption processes involves disabling DrupalCi to conserve resources.

    Due to above reasons the TFA project can only work with MRโ€™s and will need the patch file converted to continue.

    Without checking:
    It is possible this change will require PHPStan baseline ignores to be removed to pass testing.

  • First commit to issue fork.
  • Pipeline finished with Success
    7 months ago
    Total: 248s
    #159397
  • Status changed to Needs review 7 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia zaryab_drupal Bhopal
  • Status changed to Needs work 7 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cmlara

    I re0targeted the MR as it was set against the 2.x branch (always validate Target branch when opening an MR)

    Needs work (as anticipated in #3) for removing the PHPStan baseline entries related to:

             Ignored error pattern #^Parameter \#2 \$encryption_profile of method     
             Drupal\\encrypt\\EncryptService\:\:decrypt\(\) expects                   
             Drupal\\encrypt\\EncryptionProfileInterface,                             
             Drupal\\encrypt\\EncryptionProfileManagerInterface given\.$# in path     
             /builds/project/tfa/web/modules/custom/tfa/src/Plugin/TfaBasePlugin.php  
             was not matched in reported errors.                                      
             Ignored error pattern #^Parameter \#2 \$encryption_profile of method     
             Drupal\\encrypt\\EncryptService\:\:encrypt\(\) expects                   
             Drupal\\encrypt\\EncryptionProfileInterface,                             
             Drupal\\encrypt\\EncryptionProfileManagerInterface given\.$# in path     
             /builds/project/tfa/web/modules/custom/tfa/src/Plugin/TfaBasePlugin.php  
             was not matched in reported errors.                                      
             Ignored error pattern #^Property                                         
             Drupal\\tfa\\Plugin\\TfaBasePlugin\:\:\$encryptionProfile                
             \(Drupal\\encrypt\\EncryptionProfileManagerInterface\) does not          
             accept Drupal\\encrypt\\EncryptionProfileInterface\.$# in path           
             /builds/project/tfa/web/modules/custom/tfa/src/Plugin/TfaBasePlugin.php  
             was not matched in reported errors.  

    (other existing failures that exist in mainline can/should stay, they will be cleaned up in a separate issue)

  • Pipeline finished with Success
    7 months ago
    Total: 256s
    #160368
  • Status changed to Needs review 7 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia zaryab_drupal Bhopal
  • Status changed to Needs work 7 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cmlara

    Feedback from #7 has not been addressed, back to NW.

  • First commit to issue fork.
  • Pipeline finished with Success
    6 months ago
    Total: 215s
    #194767
  • Pipeline finished with Failed
    5 months ago
    Total: 209s
    #196879
  • Pipeline finished with Success
    5 months ago
    Total: 205s
    #196887
  • Pipeline finished with Success
    5 months ago
    Total: 218s
    #196907
  • Pipeline finished with Success
    5 months ago
    Total: 208s
    #196914
  • Status changed to Needs review 5 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ankitv18

    Can someone review MR!83?

  • ๐Ÿ‡ต๐Ÿ‡นPortugal jcnventura

    Not changing the status, but I find it strange that there are so many unrelated changes to the phpstan-baseline.neon file, while the simple change done in this patch only shows up in the last 2 of the 5 blocks being deleted.

  • Status changed to Needs work 5 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cmlara

    Indeed looks like a couple of mainline no longer needed ignore removals slipped into this (one annoyance of PHPStan as the scanning is getting better some of our baseline ignores resolve with no action by us)

    One of the items looks like an entry jumped locations, Iโ€™m not sure if that was manual manipulation or if we somehow had an entry out of order however that should at least be verified as we donโ€™t want a programmatic run of this in the future moving it around again if this was a manual mis-positioning.

    NW on the two entries that should be left in and handled in a dedicated baseline update and possibly the one entry that jumped as well.

Production build 0.71.5 2024