Problem/Motivation

Hello project maintainers,

This is an automated issue to help make this module compatible with Drupal 10.

To read more about this effort by the Drupal Association, please read: The project update bot is being refreshed to support Drupal 10 readiness of contributed projects

Patches will periodically be added to this issue that remove Drupal 10 deprecated API uses. To stop further patches from being posted, change the status to anything other than Active, Needs review, Needs work or Reviewed and tested by the community. Alternatively, you can remove the "ProjectUpdateBotD10" tag from the issue to stop the bot from posting updates.

The patches will be posted by the Project Update Bot official user account. This account will not receive any issue credit contributions for itself or any company.

Proposed resolution

You have a few options for how to use this issue:

  1. Accept automated patches until this issue is closed

    If this issue is left open (status of Active, Needs review, Needs work or Reviewed and tested by the community) and the "ProjectUpdateBotD10" tag is left on this issue, new patches will be posted periodically if new deprecation fixes are needed.

    As the Drupal Rector project improves and is able to fix more deprecated API uses, the patches posted here will cover more of the deprecated API uses in the module.

    Patches and/or merge requests posted by others are ignored by the bot, and general human interactions in the issue do not stop the bot from posting updates, so feel free to use this issue to refine bot patches. The bot will still post new patches then if there is a change in the new generated patch compared to the patch that the bot posted last. Those changes are then up to humans to integrate.

  2. Leave open but stop new automated patches.

    If you want to use this issue as a starting point to remove deprecated API uses but then don't want new automated patches, remove the "ProjectUpdateBotD10" tag from the issue and use it like any other issue (the status does not matter then). If you want to receive automated patches again, add back the "ProjectUpdateBotD10" tag.

  3. Close it and don't use it

    If the maintainers of this project don't find this issue useful, they can close this issue (any status besides Active, Needs review, Needs work and Reviewed and tested by the community) and no more automated patches will be posted here.

    If the issue is reopened, then new automated patches will be posted.

    If you are using another issue(s) to work on Drupal 10 compatibility it would be very useful to other contributors to add those issues as "Related issues" when closing this issue.

Remaining tasks

Using the patches

  1. Apply the latest patch in the comments by Project Update Bot or human contributors that made it better.
  2. Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.
  3. Provide feedback about how the testing went. If you can improve the patch, post an updated patch here.

Providing feedback

If there are problems with one of the patches posted by the Project Update Bot, such as it does not correctly replace a deprecation, you can file an issue in the Drupal Rector issue queue. For other issues with the bot, for instance if the issue summary created by the bot is unclear, use the Project analysis issue queue.

Issue fork pwa-3289196

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Project Update Bot created an issue. See original summary.

Project Update Bot’s picture

Status: Active » Needs review
FileSize
858 bytes

This is an automated patch generated by Drupal Rector. Please see the issue summary for more details.

It is important that any automated tests available are run with this patch and that you manually test this patch.

Drupal 10 Compatibility

According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 10.

Currently Drupal Rector, version 0.12.0, cannot fix all Drupal 10 compatibility problems.

This patch does not update the info.yml file for Drupal 10 compatibility.

Leaving this issue open, even after committing the current patch, will allow the Project Update Bot to post additional Drupal 10 compatibility fixes as they become available in Drupal Rector.

Debug info

Bot run #127

This patch was created using these packages:

  1. mglaman/phpstan-drupal: 1.1.9
  2. palantirnet/drupal-rector: 0.12.0
Project Update Bot’s picture

This is an automated patch generated by Drupal Rector. Please see the issue summary for more details.

It is important that any automated tests available are run with this patch and that you manually test this patch.

Drupal 10 Compatibility

According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 10.

Currently Drupal Rector, version 0.13.0, cannot fix all Drupal 10 compatibility problems.

This patch does not update the info.yml file for Drupal 10 compatibility.

Leaving this issue open, even after committing the current patch, will allow the Project Update Bot to post additional Drupal 10 compatibility fixes as they become available in Drupal Rector.

Debug info

Bot run #139

This patch was created using these packages:

  1. mglaman/phpstan-drupal: 1.1.24
  2. palantirnet/drupal-rector: 0.13.0
Project Update Bot’s picture

This is an automated patch generated by Drupal Rector. Please see the issue summary for more details.

It is important that any automated tests available are run with this patch and that you manually test this patch.

Drupal 10 Compatibility

According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 10.

Currently Drupal Rector, version 0.13.1, cannot fix all Drupal 10 compatibility problems.

This patch does not update the info.yml file for Drupal 10 compatibility.

Leaving this issue open, even after committing the current patch, will allow the Project Update Bot to post additional Drupal 10 compatibility fixes as they become available in Drupal Rector.

Debug info

Bot run #145

This patch was created using these packages:

  1. mglaman/phpstan-drupal: 1.1.25
  2. palantirnet/drupal-rector: 0.13.1
Project Update Bot’s picture

abhaisasidharan made their first commit to this issue’s fork.

czigor’s picture

Issue summary: View changes
FileSize
1.29 KB

Info file changes.

Cangurin limpiezas’s picture

Hi, i have problems in drupal 10.0.2 with pwa Versión: 8.x-1.5+25-dev + #4 patch
in Chrome browser online , not localhost,
when i try to register or login, after press the button i get a infinite loop,
if i refresh with f5 finally enter at the account page.

if i disable pwa module, the error dissappear.

any idea with this?

i try to get log of the error but i dont get errors in apache log

zenimagine’s picture

I can't update my website to Drupa 10 because PWA creates problems. Forever it is uninstalled. really weird

Anybody’s picture

Priority: Normal » Major

Drupal 10 is out and Drupal 9 close to EOL. Updating priority accordingly. Hopefully our team will have time to review this soon.
Any active maintainer?

Anybody’s picture

Status: Needs review » Needs work

core_version_requirement: ^8 || ...
should be
core_version_requirement: ^8.9 || ...
or at least
core_version_requirement: ^8.8 || ...

Anybody’s picture

What about reflecting the changes in 2.x @Ambient.Impact? #3165795: PWA module 3.x roadmap

Anybody’s picture

I guess it makes sense to proceed with the patch from #4 and incorporate #13.

#8 isn't really fixing any incompatibilities.

czigor’s picture

#8 isn't really fixing any incompatibilities.

@Anybody What do you mean? According to https://www.drupal.org/node/3070687 we need to update core_version_requirement to be D10 compatible. Were you able to enable the module without it?

Anybody’s picture

@czigor #8 tells Drupal the module is Drupal 10 compatible, but code isn't. Code changes are needed as #4 shows.
Apart from that, #12 has to be incorporated. That tells Drupal it's D10 compatible, but first the code has to be.

Grevil made their first commit to this issue’s fork.

Grevil’s picture

Version: 8.x-1.x-dev » 2.x-dev
Grevil’s picture

Is there a reason, that a 2.x release does not exist for this module?

I don't think we should make an old branch Drupal 10 compatible, maybe one of the maintainers can change the MR target to 2.x and generally create a 2.x release?

Grevil’s picture

Ok, I see 2.x is just an old forgotten branch. I'll reroll everything again.

Grevil’s picture

Ok I reverted the rebase on 2.x using reflog and rebased the reverted branch with 8.x-1.x. On to checking for any missing deprecation problems.

Anybody’s picture

@Grevil: The D10 compatibility should be against 8.x-1.x first please.

Independently, we may create a separate issue for 2.x, if it's not already D10 compatible. The situation for 2.x is messy, as you can read in my comment: https://www.drupal.org/project/pwa/issues/3165795#comment-14955764

8.x-1.x is important here. As you already did the work, you may also instead create a separate issue for 8.x-1.x and use this one for 2.x - but 2.x is not important and should be changed with care. I didn't touch it yet and won't touch it in the near future.

Grevil’s picture

Status: Needs work » Needs review

@Anybody, the fixes are now catered towards 8.x-1.x, making compatibility issues to 2.x seems pretty unnecessary.

Although, we need to drop the Drupal 8 support, as the "file_url_generator" service doesn't exist for 8.9 yet, as it was introduced in Drupal 9.3, see this change record.

As the original maintainer rejected @Anybody's request to reset the 2.x branch to the current state of 8.x-1.x, mainly because of "compatibility problems", he should decide whether we should drop the Drupal 8 compatibility. But without dropping the Drupal 8 compatibility, we can NOT make this module Drupal 10 compatible.

Grevil’s picture

Status: Needs review » Reviewed & tested by the community

FYI, the module is installable and general functionality works fine with the forks changes. All Incompatibilities are fixed.

Anybody’s picture

@Grevil: Drupal 8 support can be removed from 8.x-1.x, I think. Please create a separate issue or at least MR against 8,x-1.x.
@Ambient.Impact should decide then, how to proceed.

Another nice option I think would be to create 3.x to work on from 8.x-1.x, deprecate 8.x-1.x and once 2.x is cleaned up or finished, merge changes into that.

Currently, 8,x-1.x seems more stable then 2.x and has received more bugfixes. This leads to confusion, like here and nobody seems to actively work on 2.x at the moment.

Grevil’s picture

@Anybody this branch IS against 8.x-1.x!

Anybody’s picture

Version: 2.x-dev » 8.x-1.x-dev

Then it should be set so :)

Grevil’s picture

Ah, sorry, I see....

Anybody’s picture

Nice work @Grevil! Confirming RTBC for MR!27!

Let's wait for @Ambient.Impact's feedback on #25. Otherwise merge it into 8.x-1.x if there's no response.

ao5357’s picture

Wasn't able to push to the issue fork, but added a composer.json at https://github.com/solve-it-once/pwa/commits/3289196-automated-drupal-10 so it works with https://www.drupal.org/docs/develop/git/using-gitlab-to-contribute-to-dr... . You might want to get this into the MR before merging, in the event the D10 compatibility fixes don't get picked up by composer.

Grevil’s picture

@ao5357 it is generally not recommended to manually add a composer.json, since Drupal will auto generate it.

Ambient.Impact’s picture

@Grevil While Drupal.org can add it, I've not seen anyone else say it's not recommended. All the projects I maintain have one for various reasons, e.g. dependencies, maintainer credits, etc. and it all just works fine.

Anybody’s picture

@Ambient.Impact that's correct. What I think @Grevil wanted to say is, that it's questionable if it's the same as Drupal.org creates (and updates) automatically. There are pro's and con's. But there are not many reasons to add it in this issue. But let's focus on the issue itself now. You can decide, if you like the composer.json or not. How are you planning to proceed here @Ambient.Impact?

Grevil’s picture

@Ambient.Impact, my apologies, I thought adding a composer.json without the need of any external libraries outside of Drupal (or without the need of any other composer shenanigans) is actually not recommended! Turns out it just isn't required, ass seen in https://www.drupal.org/docs/develop/creating-modules/add-a-composerjson-.... No mention of whether it's recommended or not.

Ambient.Impact’s picture

@Anybody I'm definitely a fan of keeping the scope of issues to just what's relevant so agreed.

@Grevil No worries!

Anybody’s picture

Version: 8.x-1.x-dev » 2.x-dev
Related issues: +#3165795: PWA module 3.x roadmap

Anybody’s picture

Assigned: Unassigned » Ambient.Impact
Status: Reviewed & tested by the community » Fixed

Made it to escape from local rebase hell! Committed to 2.x!

So we can release 2.0.0 now, deprecate 8.x-1.x and create 3.x as new default branch for further development.

@Ambient.Impact could you please check this finally and take these steps? :)

Anybody’s picture

Anybody’s picture

Assigned: Ambient.Impact » Unassigned
Ambient.Impact’s picture

Just to be cautious, let's first release 2.0.0-rc1, use it for a bit, and if it doesn't introduce any new problems over 8.x-1.x, then we can tag a stable 2.0.0 - how's that sound?

Anybody’s picture

@Ambient.Impact perfect! :) Thanks!

heddn’s picture

Waiting with baited breath for a tagged release w/ Drupal 10 support

Anybody’s picture

@heddn I'll do so ;)

let's first release 2.0.0-rc1, use it for a bit

On it!

Anybody’s picture

@heddn: 2.0.0-rc1 is out! Feedback welcome.

Status: Fixed » Closed (fixed)

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