- Issue created by @project update bot
- last update
6 months ago 20 pass This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.
It is important that any automated tests available are run and that you manually test the changes.
Drupal 11 Compatibility
According to the Upgrade Status module → these changes make this module compatible with Drupal 11! 🎉
Therefore these changes update theinfo.yml
file for Drupal 11 compatibility.Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot → to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.
Debug information
Bot run #11-188815These packages were used to generate the fixes:
- drupal/upgrade_status: 4.3.2
- mglaman/phpstan-drupal: 1.2.11
- palantirnet/drupal-rector: 0.20.2
- last update
6 months ago 20 pass - 🇯🇵Japan ptmkenny
Should the next version require 10.1+ or 9+?
If 10.1+, we should use DI and remove the watchdog function completely, no need for backwards compatibility (since at least 10.1 is needed).
- 🇳🇱Netherlands bbrala Netherlands
I think we should do the following:
Release 9/10/11 compatible version
Then start cleaning up for 4.xBut i'm not entirely sure we can do that with these changes:
public function normalize($object, $format = NULL, array $context = []): array|bool|string|int|float|null|\ArrayObject
In principle i don't mind we move to a ^10.1 || ^11 requirement. But i think that would also mean we need to rework some of the ways we change resources. Since we need less custom code for that. I don't have the scope of that ready mentally unfortunately.
- 🇯🇵Japan ptmkenny
Ok, let's see how the tests run when we add Drupal 9 to the GitLab CI mix.
I added the UpdateBot changes to the
3451984-automated-drupal-11
branch and then enabled Drupal 9 and Drupal 11 testing on GitLab CI. - last update
6 months ago 20 pass - 🇳🇱Netherlands bbrala Netherlands
Hmm, think a trailing comma in a function broke 9.x
- First commit to issue fork.
- last update
6 months ago 20 pass - 🇮🇳India ankitv18
@bbrala as we are supporting D10.1 and D11 then I dropped deprecation helper method as updated the code with Error::logException, also updated the gitlab template to run on previous_minor and next_minor.
for below code in response of #5
public function normalize($object, $format = NULL, array $context = []): array|bool|string|int|float|null|\ArrayObject
I believe drupal core jsonapi normalize method and other methods have these return typesPlease review the MR!52.
- 🇮🇳India ankitv18
@bbrala PHPunit next major pipeline: https://git.drupalcode.org/issue/jsonapi_extras-3451984/-/jobs/1830197
Do we need to fix this in this issue or open a separate issue? - Status changed to Needs work
6 months ago 3:01pm 14 June 2024 - 🇮🇳India chandu7929 Pune
@ankitv18 - I can see issue when enabling this module on Drupal 11.
PHP Fatal error: Declaration of Drupal\jsonapi_extras\Normalizer\JsonApiNormalizerDecoratorBase::supportsNormalization($data, $format = null): bool must be compatible with Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool in /Users/chandan.singh/Sites/D11/web/modules/contrib/jsonapi_extras/src/Normalizer/JsonApiNormalizerDecoratorBase.php on line 58 Fatal error: Declaration of Drupal\jsonapi_extras\Normalizer\JsonApiNormalizerDecoratorBase::supportsNormalization($data, $format = null): bool must be compatible with Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool in /Users/chandan.singh/Sites/D11/web/modules/contrib/jsonapi_extras/src/Normalizer/JsonApiNormalizerDecoratorBase.php on line 58 [warning] Drush command terminated abnormally.
- last update
6 months ago 20 pass - last update
6 months ago 18 pass, 2 fail - last update
6 months ago 18 pass, 2 fail - last update
6 months ago 9 pass, 6 fail - last update
6 months ago 9 pass, 6 fail - last update
6 months ago 20 pass - last update
6 months ago 20 pass - last update
6 months ago 20 pass - last update
6 months ago 20 pass - last update
6 months ago 20 pass - Status changed to Needs review
6 months ago 6:19pm 14 June 2024 - 🇮🇳India ankitv18
Updated the MR and fixes remaining type hint, validated on local by installing the module.
- 🇮🇳India ankitv18
ankitv18 → changed the visibility of the branch project-update-bot-only to hidden.
- last update
6 months ago 20 pass - last update
6 months ago 20 pass - last update
6 months ago 20 pass - last update
6 months ago 20 pass - 🇮🇳India ankitv18
for phpunit previous major: https://git.drupalcode.org/issue/jsonapi_extras-3451984/-/jobs/1867426#L217 (These are the failing)
Reason: to avoid phpcs issues like this: Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma
There are many places where comma separator is added at the end of closing statement in the constructor (These changes taken place couple of weeks ago).So do we need that change or we can remove comma separator from those places and add phpcs:ignore Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma above last argument in the method.
cc: @bbrala
- last update
6 months ago 20 pass - 🇮🇳India ankitv18
Now pipeline is failing on https://git.drupalcode.org/issue/jsonapi_extras-3451984/-/jobs/1867677#L102
So I believe we can't run the tests below D10 cause of return type hint ofpublic function normalize($object, $format = NULL, array $context = []): array|bool|string|int|float|null|\ArrayObject {
Dropping the D9 from info.yml, phpcs:ignore for comma trailing and previous major from gitlabcc: @bbrala @ptmkenny
- last update
6 months ago 20 pass - last update
6 months ago 20 pass This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.
It is important that any automated tests available are run and that you manually test the changes.
Drupal 11 Compatibility
According to the Upgrade Status module → these changes make this module compatible with Drupal 11! 🎉
Therefore these changes update theinfo.yml
file for Drupal 11 compatibility.Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot → to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.
Debug information
Bot run #11-199781These packages were used to generate the fixes:
- drupal/upgrade_status: 4.3.2
- mglaman/phpstan-drupal: 1.2.11
- palantirnet/drupal-rector: 0.20.3
- last update
6 months ago 20 pass - Status changed to RTBC
6 months ago 7:23am 18 June 2024 - 🇮🇳India chandu7929 Pune
Reviewed MR #52 and changes looks good to me, hence RTBC.
- 🇺🇸United States japerry KVUO
It'd be good if this still supported Drupal 9.5, as there are quite a few sites still on it -- supporting the last major allows people to more easily upgrade to D11 in the future.
public function normalize($object, $format = NULL, array $context = []): array|bool|string|int|float|null|\ArrayObject
While this is a hard break from Symfony, Drupal 9.5 is no worse off than 10. The bigger issue here is compatibility with downstream modules. I'm currently working on Schemata, and if I commit a release of that module before this one, JSONAPI extras will WSOD if its not updated first.
So I'd recommend support Drupal 9.5 and getting a release out for this asap.
- Status changed to Needs review
5 months ago 12:27am 26 June 2024 - Status changed to Needs work
5 months ago 12:29am 26 June 2024 - 🇳🇱Netherlands bbrala Netherlands
Keeping Drupal 9 support is kinda annoying, not sure how you see that with the return type changes. Those changes were introduced in 10. I could conditionally load imposters, but that feels kinda crap.
Not sure how you see this.
- 🇮🇳India ankitv18
@bbrala https://git.drupalcode.org/issue/jsonapi_extras-3451984/-/jobs/1867802#L71 should I fix this in this MR or log a separate issue for that?
- last update
5 months ago 20 pass - last update
5 months ago 20 pass - last update
5 months ago 20 pass - last update
5 months ago 20 pass - last update
5 months ago 20 pass - last update
5 months ago 20 pass - last update
5 months ago 20 pass - Status changed to Needs review
5 months ago 7:26pm 26 June 2024 - 🇺🇸United States japerry KVUO
Changing back to needs review, I think we're good to go here.
-
bbrala →
committed d7ab3765 on 8.x-3.x authored by
ptmkenny →
Issue #3451984 by ankitv18, japerry, Project Update Bot, ptmkenny,...
-
bbrala →
committed d7ab3765 on 8.x-3.x authored by
ptmkenny →
- Status changed to Fixed
5 months ago 7:30am 27 June 2024 - 🇳🇱Netherlands bbrala Netherlands
Thanks so much guys for working on this. I've tested the changes locally on 9, 10 and 11. Also tested on a running public api which works perfectly.
Al seems to work as intended. Lovely. Merging and releasing a RC for this
Automatically closed - issue fixed for 2 weeks with no activity.