Problem/Motivation
Hello project maintainers,
This is an automated issue to help make this module compatible with Drupal 9.
To read more about this effort by the Drupal Association, please read: Accelerating Drupal 9 module and theme readiness with automated patches
Periodically patches will be added to this issue that remove Drupal 9 deprecations. To stop further patches from being posted simply close this issue(any status besides Active, Needs Review or Needs work) or remove the "ProjectUpdateBotD9" tag from the issue.
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:
- Accept automated patches until this issue is closed
If this issue is left open(status of Active, Needs Review or Needs work) and the "ProjectUpdateBotD9" tag is left on this issue, new patches will be posted periodically if new deprecations are needed.
As the Drupal Rector project improves and is able to fix more deprecations the patches posted here will cover more of the deprecations in the module.
- Leave open but stop new automated patches.
If you want to use this issue as a starting point to remove deprecations but don't want new automated patches simply leave this issue open but remove the "ProjectUpdateBotD9" from the issue.
You can use Drupal Rector yourself to make these patches.
If you want to receive automated patches again simply add back the "ProjectUpdateBotD9" tag.
- Close it and don't use it
If the maintainers of this project don't find this issue useful they can simply close this issue(any status besides Active, Needs Review or Needs work) 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 9 compatibility it may be useful to other contributors to add those issues as "Related issues" when closing this issue.
Remaining tasks
Using the patches
- Apply the patch in the comment by Project Update Bot
- Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.
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”.
| Comment | File | Size | Author |
|---|---|---|---|
| #44 | adminimal_theme-d9-interdiff-40-43.diff | 567 bytes | eugene_bsk |
| #44 | adminimal_theme-d9-3146068-43.patch | 2.42 KB | eugene_bsk |
| #14 | adminimal_theme.1.x-dev.rector_v2.patch | 1.54 KB | maenjuel |
| #17 | 3146068-16.interdiff.txt | 1.15 KB | neclimdul |
| #17 | 3146068-16.patch | 3.03 KB | neclimdul |
Comments
Comment #2
project update bot commentedThis 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 9 Compatibility
According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 9.
Currently Drupal-Rector, version 0.5.5, cannot fix all Drupal 9 compatibility problems.
This patch does not update the
info.ymlfile for Drupal 9 compatibility.Leaving this issue open, even after committing the current patch, will allow the Project Update Bot to post additional Drupal 9 compatibility fixes as they become available in Drupal-Rector.
Debug info
This patch was created using these packages:
Comment #3
andrey.troeglazov commentedComment #4
OCTOGONE.dev commentedI don't understand why this "must have admin theme" is not compatible with Drupal 9 yet. Please correct that ASAP!
Comment #5
andrey.troeglazov commentedI will roll a new release on this weekend. Dont panic :)
Comment #6
OCTOGONE.dev commentedThat a good news!
And update with the new Drupal logo please.
Comment #7
klemendev commentedGood to hear this! :)
Comment #8
dasginganinjaThanks! I'm interested in this as well.
Comment #9
phjou+1
Comment #10
darvanenGreat to see this is in the pipeline, +1 to D9 compatibility...
A gentle reminder to folks that Drupal exists because of community involvement, almost every line of code is developed and provided for free. Instead of demanding, try offering to help, or if you can't help just provide encouragement. That is the Drupal way.
@andrey.troeglazov - do you need assistance with rolling out the new version?
Comment #11
indrajithkb commentedHi I have tested with drupal 9.1.x-dev it's still not compatible with d9. Am attaching the screenshot after patch applied
Need to add the
core_version_requirementComment #12
indrajithkb commentedComment #13
indrajithkb commentedHi i have added the patch for this issue, please review.
Attaching screenshot after fix.
Comment #14
maenjuelWanted to create the same patch today, @Indrajith KB, but you were quicker ;)
I applied both patches, #2 and #13, and tested on Drupal 8 and 9. Worked with Drupal 8, but in Drupal 9 FILE_EXISTS_ERROR was removed. I updated the patch #2 accordingly.
Since EXISTS_ERROR, that is part of the patch, exists since 8.7.0, we have to update your patch as well, @Indrajith KB. And since "core_version_requirement" was only introduced in 8.7.7, I simply added that version as a requirement, and dropped "core: 8.x" from the file, that would guarantee compatibility for the versions between 8.7.x and 8.7.7.
Comment #15
maenjuelJust realized I added the second patch as a .diff file, sorry. Here is the same patch as a .patch file.
Comment #16
neclimdulThat constant isn't quite right, its not global its on the FileSystemInterface. Additionally, rector didn't pick it up but file_unmanaged_copy is removed as well. Here's an updated patch that worked for me. I combined the service retrieval since its used in both cases of the if statement.
Additionally, you only need to specify ^8 in the supported versions. Prior to that the line just gets ignored so there's not reason to be that specific.
I combined the two patches using format-patches. If you're not familiar with it you can read more about applying them here but git apply will also handle it just fine.
Comment #17
neclimdulbah, files didn't get uploaded.
Comment #18
indrajithkb commentedHi @neclimdul nice work it's fixing our problem...!!!
attaching screenshots
before:
after:
Comment #19
klemendev commentedAny plans to release these patches in a release?
Comment #20
satyaki_dutta commentedplease review the patch made on report from upgrade_status module.
Comment #21
artusamakI confirm that #16 works for D9 and satisfies Upgrade status module.
Comment #22
gobinathmReconforming the manul test
Installation: Patched Successfully via Composer Patch workflow

Functional Test: No issues identified
Comment #23
bryandenijs@satyaki_dutta What is exactly difference between your patch and the patch from #16?
I think the #16 works fine and is better than the #20 patch.
Hope there will be a new release soon so there won't be a composer issue anymore when upgrading to D9:
Comment #24
pavelculacov commentedComposer Update Patch working only for #20 File #16 not working
Comment #25
klemendev commentedConfirming #20 seems to work
Comment #26
johnpitcairn commentedPatch at #16 does not apply to current dev.
Comment #27
johnpitcairn commentedThis patch is practically the same as #16, but will apply to current dev via composer patches, git apply or plain old patch. Note it restores the
core: 8.xline which is commented out in dev for some reason, I believe this defines the minimum core version required, is more easily parsed thancore_version_requirement, and may remain present (correct me if I am wrong).Comment #28
johnpitcairn commentedHmm ... think that dev version I used with the commented-out core requirement was old (23 May), the result of downloading the .tar.gz. Try this patch against 1.5 or current dev (via composer or git checkout) instead.
Comment #29
johnpitcairn commentedComment #30
jcnventura@John Pitcairn, it would be nice if you could provide an interdiff between #16 and #28 then.
Comment #31
promesI installed this version + patch #28 yesterday and only found a missing file: /themes/adminimal_theme/logo.svg.
The name of the site is hardly visible: a link in a black background.
Comment #32
johnpitcairn commented@jcnventura: Here's an interdiff, for what it's worth. The patch is more readable than the interdiff. It's basically a re-roll, #16 (actually #17) has a bunch of email cruft in it, which is presumably what prevents it applying for me.
Comment #33
hideaway commentedI just would like to ask if this is going to be merged anytime soon with a new released version of adminimal theme. This issue is kind of blocking us for three months already from being able to upgrade to Drupal 9.
Comment #34
orlando.thoenyFYI if you want to work around Composer prohibiting you to update to Drupal 9 you can do it by changing your composer.json and use the patch provided here.
https://medium.com/@orlando.thoeny/drupal-9-fix-composer-modules-prohibiting-upgrade-6f3452849411
Comment #35
andyposthttps://www.drupal.org/node/3006851
both require ^8.7 so ^8 is not true
Comment #36
andypostI suggest to remove "core: 8.x" at all for
core_version_requirement: ^8.8 || ^9..and create new release as core 8.7 no longer supported
Ref https://www.drupal.org/node/3070687
Comment #37
jcnventuraAgree with @andypost, It's not possible to specify ^8.7 - only ^8.7.7 - so we might as well specify ^8.8 (or ^8.7.7). In any case that line needs to be changed.
Comment #38
fabsgugu commentedHello, I rectified the patch.
Comment #39
jcnventura@Fabsgugu can you create a real patch and not simply editing the file from #28. The patch you provided is invalid.
Comment #40
fabsgugu commentedComment #41
joshua.boltz commentedWe are currently using the 8.x-1.3 version. I tried applying the latest patch here, but it did not apply.
I also tried updating to latest 8.x-1.5 and applying the patch, and that didn't work either.
I'm also a little confused by this patch, because when i run Drupal check before the patch, I see no D9 deprecation issues, yet there are still some being fixed in this patch. The main part of this patch I think I need for D9 support is the addition of the `core_version_requirement`, but perhaps Drupal-check was wrong and/or missed some deprecations, so I would use this patch if it would apply. Or is it possible those deprecations were fixed and committed already in some other issue?
Comment #42
darvanen@joshua.boltz patches are usually created against the dev branch of a module in the first instance. You can check the primary branch for the issue in the metadata section.
Comment #43
eugene_bsk commentedI would add a fix code standard
./vendor/bin/rector process web/modules/contrib/adminimal_theme
Rector 0.8.x-dev@8896f0a
Config file: rector.yml
3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] Rector is done!
Comment #44
eugene_bsk commentedI would add a fix of code standard
Rector 0.8.x-dev@8896f0a
Config file: rector.yml
3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] Rector is done!
Comment #45
ysamoylenko commentedHello everyone.
The #43 looks good for me.
Please commit the changes.
Comment #46
andrey.troeglazov commentedComment #47
andrey.troeglazov commentedComment #49
andrey.troeglazov commentedThanks all.
New release: https://www.drupal.org/project/adminimal_theme/releases/8.x-1.6