- Issue created by @Grevil
- last update
over 1 year ago 15 pass - @grevil opened merge request.
- πΊπ¦Ukraine dinazaur
I'd suggest dropping php <8 support, 7.4 is not supported for almost half a year and Drupal 9 will be dropped in November.
- Status changed to Needs review
over 1 year ago 8:03am 3 August 2023 - π©πͺGermany Grevil
True! But I think this makes the code a bit cleaner (and a bit more performant), and we still support PHP 7.4 for the remaining few months!
Please review.
- πΊπ¦Ukraine dinazaur
But I think this makes the code a bit cleaner
Match
was added into the language to make code cleanerif else / switch
are not as clean as match as for me.and a bit more performant
I'm not sure about this.
I left one comment, once it will be fixed +1 RTBC.
- First commit to issue fork.
- last update
over 1 year ago 15 pass - π©πͺGermany Anybody Porta Westfalica
Please take a look, I think it's nice and self-explaining this way. To be honest, I think
match()
is personal preference or dislike, bit the code now should be very self-explaining to anyone?We shouldn't do it for the PHP <8 compatibility, but if we can have both, that's nice.
All fine and still working as expected?
- π©πͺGermany Anybody Porta Westfalica
No, dependency won't be undefined. We either have cdn enabled and $dependency will be "photoswipe/photoswipe.cdn" or it is not enabled and $dependency will be set to "photoswipe/photoswipe.local".
Even clearer now, where we use local as default and removed the if. - Status changed to RTBC
over 1 year ago 8:20am 3 August 2023 - π©πͺGermany Grevil
and a bit more performant
I'm not sure about this.
We completely remove the "library.libraries_directory_file_finder" service and do not need to search for the library at all? Depending on the amount of libraries, this indeed betters performance.
-
Grevil β
committed 29234253 on 5.x
Issue #3378957: Remove "match" expression, so the module is also PHP...
-
Grevil β
committed 29234253 on 5.x
- Status changed to Fixed
over 1 year ago 8:44am 3 August 2023 Automatically closed - issue fixed for 2 weeks with no activity.