This post was written collaboratively by tedbow and hestenet.
Project Update Bot now enabled for all projects
The initial testing period for the Project Update Bot is now complete, and the Bot has been enabled for all projects.
If you are a project maintainer and would like to understand how to control the bot for your projects, please consult the instructions on the bot's account page.
Drupal 9.0.0-beta2 has been released, and Drupal 9.0.0 is scheduled to be released on June 3, 2020. The upgrade from Drupal 8 to Drupal 9 should be the easiest major version update in the last decade of Drupal’s history. One of the reasons for this is because over 1,700 contributed modules already have a Drupal 9 compatible release. Making a module that's already compatible with Drupal 8 compatible with Drupal 9 just requires removing deprecations. When looking at just one module, these changes are usually trivial, but when we consider managing over 8,800 Drupal 8 modules on drupal.org the upgrade process could easily take hundreds or thousands of hours from the Drupal community.
Fortunately we can accelerate this process dramatically by using Drupal Rector, a tool developed by Palantir.net and Pronovix. Drupal Rector can be used by developers to automatically fix many of the deprecations needed to make a module Drupal 9 compatible. In fact Drupal Rector can currently fix deprecations in more than 2000 existing projects on Drupal.org. Although using Drupal Rector is not difficult, running it manually on all Drupal 8 modules would have taken hundreds of developer hours to complete.
To accelerate upgrading of modules to Drupal 9 the Drupal Association has partnered with Acquia and Palantir to automatically provide patches generated by Drupal Rector for all contributed modules possible. For many modules these patches will be able to make the modules fully compatible with Drupal 9. For some modules it will still be necessary for a developer to manually replace other deprecations. Patches will also be provided for contributed themes but preparing a theme for Drupal 9 will require other changes such as updates for Twig 2.
These patches will be posted to issues created by the new Project Update Bot. An example issue can be seen here: https://www.drupal.org/project/entity_block_visibility/issues/3134823
The Project Update Bot is not associated with any individual or company and therefore will not affect issue credits for any individual or company. If maintainers find the patches provided by the bot useful they are welcome to credit the bot account as a way to provide feedback on this initiative.
It will be up to the project maintainers to decide if they want to use these patches but in many cases the patches can help speed up the process of updating a module for Drupal 9 dramatically.
Maintainer Options
For project maintainers there are a few options for dealing with these issues
-
Leave the issue open and apply the provided patch to remove some or all Drupal 9 deprecations. The Project Update Bot will check weekly if Drupal Rector is able to remove new deprecations and post a new patch if possible.
-
Remove the “ProjectUpdateBotD9” tag from the issue to stop new patches from being posted. If you would like to use the issue and the patch as a starting point simply remove this tag and the bot will not post any new patches. Add the tag back and the bot will post new patches if possible.
-
Close the issue to stop the bot from posting new patches. If you are already handling deprecations in another issue or otherwise don’t find the patches helpful simply close the issue and the bot will not post any new patches
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 Rector issue queue. For other issues with the bot, for instance if the issue summary created by the bot is unclear, use the Infrastructure project issue queue using the component “Bot: Drupal Rector”.
How can you help?
While Drupal Rector can currently fix some or all of the deprecations in over 2000 contributed modules to Drupal 9 it currently only covers 50% of total Drupal 9 deprecations. New Rector rules are being added with every new release of Drupal Rector. You can help by making new Drupal Rector rules which will make it possible for Drupal Rector to upgrade even more modules.

Comments
Couple of questions popped out of curiosity
- Is the bot live as of now?
- How fast this bot can finish parsing and creating issues for all the contribs modules. Eg: no of modules in a day.
- IMO, the first candidates for this bot would be the list of modules which were marked "all rector covered" in Deprecation tool. How will this create issues for modules that require manual reviews as well? Will it create an incomplete patch? or it won't create a new issue in this case.
- If a module already has an issue in which for D9 compatibility and there is some work done already. Will the bot create a new patch for this case also?
- Expected release of this blog "Automatic Drupal 9 compatibility patches" mentioned by the bot in the issue. :)
Thank you DA, Acquia and Palantir for creating this bot. This will significantly reduce many hundred hours.
Exciting times !!
Thank you... 🙂
Patches generated
I can respond to the question about the patches generated. The patches are the same that are generated weekly for all 9000 projects on drupalci at https://dev.acquia.com/drupal9/deprecation_status?patch=available (currently 2393 patches). These include projects where the patch would only partially fix the issues. Even for patches where theoretically rector covers all the issues, it may or not may produce a complete patch for them and manual review is still required of course.
Jay good question.
Jay good question.
The bot is running actively but we are testing in out on individual projects. We didn't to do a full run until we have tested it more. We didn't want to test it on projects until we had somewhere to link to with more info.
Currently we would create a new issue but the maintainers are free to close the bots issue and the bot will not make more patches.
Want to know related to Drupal 9 over Drupal 8
Is the main difference between Drupal 8 & Drupal 9 only have deprecated function or something else ??
And also eagar to know what's is new in Drupal 9 which was not in Drupal 8 ??
And the use of bot is sufficient to work with Drupal 9 over to Drupal 8 to spent less time if yes then how ???
WOW my wish came TRUE !!!!!
WOW my wish came TRUE !!!!!
Thank you so much
Update Rector in Drupal.org
Automated fixers, standards and practice, drupal-check
What at community!! What a team!! What a system bot!!!
https://twitter.com/rajab_natshah/status/1251164987957161984
How to request a scan
Hi, are projects scanned automatically, or do we need to flag our projects? If so, how is this done?
Thanks for the awesome tool and providing this service for the community. Amazing!
Great question
Yes, this is all fantastic. I got the e-mail about it as I'm a maintainer, but I couldn't find any documentation anywhere on how to opt in once it becomes widely available. Will there be another e-mail sent around explaining how to turn it on for desired modules when possible?
We'll call out this
We'll call out this information more prominently in the post above:
To opt in early to the automated deprecation bot, please send a message via the Project Update Bot contact form with a list of modules you maintain that you want to opt in.
After a brief period of early testing by those who have opted in above, all projects will be added, and maintainers should see their first patch issues posted by the bot. You can then use the instructions under the heading 'Maintainer Instructions' to control the bot.
--
Tim L
Drupal Association - CTO
Thanks Tim - I've added mine
Thanks Tim - I've added mine :-)
Huge compliments for those involved in this initiative
Noticed that it not only provides patches, it also commits them.
In addition maintainer closed it as Fixed, suspect unintentionally. He probably didn't realize he is opting out with closing it.
Am I correct in assuming you don't set it to Fixed when you want to continue receiving patches? Do you need to set it back to Active?
The bot does commit any
The bot does commit any patches. Do have an issue link?
labboy0276 committed?
@mmjvb: Perhaps the maintainer labboy0276 did the commit at 20.12, since he also commented at 20.13?
If you see these three similar issues, there is no commit:
Yeah, saw many of those
Probably wishful thinking of me, but I understand why committing it is left to a maintainer. Saw many of those. Do still wonder whether setting to Fixed is just a Pavlov reaction. Only saw one that applied and left Status untouched.
Knew you were going to ask for it ;)
https://www.drupal.org/project/fancy_file_delete/issues/3140487
Oh yeah that is confusing but
Oh yeah that is confusing but if you click through to the commit https://www.drupal.org/commitlog/commit/79042/587e7f07429a0d6a23925f0fd7537137bf6a8a95
You will see "authored by Project Update Bot, committed by john@thinktandem.io". User @labboy0276 just used the
--authoroption. See https://stackoverflow.com/questions/18750808/difference-between-author-and-committer-in-gitUnderstood
Thanks, wishful thinking on my side, I guess.
Migrate your Drupal 7 site to Drupal 8 initiative?
Great initiative, this will be a big help!
Another initiative to consider would be "Migrate your Drupal 7 site to Drupal 8". The user may not even complete it, but at a minimum create Migrate Upgrade issues about the stumbling blocks encountered, in order to clear the way for other future migrators.
As part of the initiative, highly skilled developers could also pledge to subscribe to all Migrate Upgrade issues and related modules, and assist in solving them.
The epic series of podcasts by the courageous Jeff Geerling in Migrating JeffGeerling.com from Drupal 7 to Drupal 8 - How-to video series highlighted just how difficult the process can be, even for a fairly simple site. Since it turned out to be this difficult, even for an expert Drupal developer and experienced Composer user such as Jeff, imagine just how hard it is for an ordinary site builder ...
Migration Accelerator tool
I just heard about Acquias forthcoming Migration Accelerator tool. @wimleers:
https://twitter.com/wimleers/status/1255872225535819777
Demo by @webchick of the Acquia Migrate Accelerator, which looks really cool! I hope it will be open sourced and integrated into the Migrate modules suite, and not a paid service ... We do have to wait a few months, but it certainly looks like it will be worth the wait: "Beta coming in Q3 2020!"
Is there any reason to leave
Is there any reason to leave the issues created by Project Update Bot open still in 2021?
Why not?
Why not? If the patches were not yet committed then why not? There are still thousands of projects that need updating. The patches are a good indication of (some of) the work that needs to be done in a project.
Hi Gábor - My apologies for
Hi Gábor - My apologies for not writing a more specific question and I should clarify: If the patches are already applied/fixed, is there any reason for a project maintainer to leave the issues created by Project Update Bot open still in 2021?
I would assume the answer is "no", but the original Project Update Bot issues state "...new patches will be posted periodically if new deprecations are needed," and many projects have applied/fixed the deprecations but seem to be leaving the issue open, perhaps based on this language.
This may be an obvious answer since if a module is D9 compatible, I don't see why Project Update Bot would be suggesting new patches at this point, but I am seeking clarification. Thanks!
No reason then
Indeed, if the project is already Drupal 9 compatible, there is no reason to keep the issue open. There will not be any new deprecations targeted at Drupal 9 given that Drupal 9 has been out for a while.
Tell the maintainers?
Would it be possible to either: