- Issue created by @roderik
- 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
(By the way we haven't been using your code yet in a way that can't be undone/changed. So... given your current reported install base... Feel free to solve in any way you see fit.)
- 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
- 🇧🇪Belgium dieterholvoet Brussels
You're right, I don't think there's any way around it except adding the Purge module as a dependency as you suggested before, or creating a submodule as you suggested in this issue. But since such a big part of the module depends on Purge, the first option is probably a better idea. I'll try to work on this in the coming days, we'll need to define the dependency in info.yml and add an update hook enabling the new dependency if it isn't enabled yet.
- Status changed to Needs review
11 months ago 3:32pm 22 January 2024 - Status changed to Needs work
11 months ago 5:14pm 22 January 2024 - 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
The dependency looks fine. (I agree with your earlier assessment that it ideally shouldn't be necessary, but hey -- people will want purge anyway.)
Tested. The update hook won't help:
composer require drupal/bunny_cdn:1.0.1 # problem free version composer require drupal/bunny_cdn:1.1.1 # just imagine 1.1.1. I did "require 1.1.0" immediately followed by patching .info and .install # NO OTHER commands executed, no HTTP requests done. Immediately: drush updb PHP Fatal error: Uncaught Error: Class "Drupal\purge\Plugin\Purge\Purger\PurgerSettingsBase" not found in /app/web/modules/contrib/bunny_cdn/src/Entity/BunnyCdnPurgerSettings.php:28 Stack trace: (...)
I'm setting NW for possibly removing the update hook, but feel free to interpret this as RTBC if you want to keep the hook to serve as... e.g. some 'documentation' about the evolution of the module...
- 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
For the user who would ever encounter this issue in theory: you need CLI / composer access to get out of it, and then:
composer require drupal/bunny_cdn:1.0.1 drush en purge composer require drupal/bunny_cdn:^1.1.1 drusn updb # this will execute the update hook which does essentially nothing. But it proves that it runs fine, at least.
- 🇧🇪Belgium dieterholvoet Brussels
Hmm okay, I'll remove the update hook and add your instructions to the release page. But I don't think anyone else is using this module, so should be fine.
-
DieterHolvoet →
committed 89a1eaeb on 1.x
Issue #3415864 by DieterHolvoet, roderik: Exception when enabling 1.1.0...
-
DieterHolvoet →
committed 89a1eaeb on 1.x
- Status changed to Fixed
11 months ago 10:33am 23 January 2024 Automatically closed - issue fixed for 2 weeks with no activity.