Closed (fixed)
Project:
JSON:API Image Styles
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Aug 2021 at 17:29 UTC
Updated:
7 Oct 2021 at 15:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
larisse commentedHere's a patch to fix this error.
Is necessary apply the patch in #3229545: TypeError: Argument 1 passed to Drupal\jsonapi_image_styles\EventSubscriber\ConfigSubscriber::onResponse() must be an instance of Symfony\Component\HttpKernel\Event\ResponseEvent, instance of Symfony\Component\HttpKernel\Event\FilterResponseEvent given too to install this module.
Comment #3
takuma shimabukuro commentedComment #4
takuma shimabukuro commentedI revewed the patch and after the apply this patch i could install correctly in my enviroment
I attached the image that it works
Comment #5
guypaddock commentedTechnically, the previous syntax should be valid for PHP 7.4. @larisse and @Takuma Shimabukuro: What version of PHP are you using?
Comment #6
larisse commentedHi @GuyPaddock! I'm using PHP 7.4.3 version.
Comment #7
guypaddock commentedThe reason I ask is because I am running PHP 7.4 as well and did not need to apply the patch because the syntax was valid for 7.4 variable type declarations: https://stitcher.io/blog/typed-properties-in-php-74
Comment #8
hamrant commentedI have this issue on PHP 7.3.19. Security Support of the 7.3 version will be until 6 Dec 2021 - https://www.php.net/supported-versions.php, so, in my case will be simpler to use a patch for now and later update PHP. So maybe there is no point in committing this fix.
Anyway, @larisse, thanks for the fix!
Comment #9
wellsTechnically Drupal 9 still supports PHP 7.3 but given that security support for it ends in about two months I think we should continue to target 7.4 as a minimum version. As @hamrant notes folks who need PHP 7.3 support can use this patch.
Comment #10
lamp5So please tell me why you didn't set min php version in composer file? https://git.drupalcode.org/project/jsonapi_image_styles/-/blob/2.0.x/com...
You know that we are using this module on production ? this is not a stable, it is dev.... without any standards of release process.
Comment #11
wellsGood point. Happy to take an MR for that change. I took this module over as abandoned only a few weeks ago I can’t say I’ll intimately familiar with it (:
Comment #12
wellsAnd given the decision is #3229545: TypeError: Argument 1 passed to Drupal\jsonapi_image_styles\EventSubscriber\ConfigSubscriber::onResponse() must be an instance of Symfony\Component\HttpKernel\Event\ResponseEvent, instance of Symfony\Component\HttpKernel\Event\FilterResponseEvent given I’ll open this one back up as well for 2.x. Though let’s update this MR to set the minimum PHP version for the 2.x branch to 7.3.
Comment #14
wellsOn second thought that seems unnecessary since we can't technically enforce PHP 7.4 on the new 3.0.x branch. I'll update the project description to clarify this stuff after I get a 3.x release out. Thanks, all!