- 🇵🇹Portugal jcnventura
@VladimirAus Use https://github.com/mglaman/composer-drupal-lenient + composer patches instead of adding custom repos when testing D10 support. It's a lot simpler :)
- Status changed to Needs review
almost 2 years ago 1:29pm 25 January 2023 - 🇵🇹Portugal jcnventura
Taking into account 📌 Fix tests in 8.x-1.x Fixed , I've rebased the MR, and undid all the changes from base 8.x-1.x that don't seem to be necessary for D10 support. If the tests pass, this should be a much easier change. I need to investigate when ResponseEvent and RequestEvent were made available in Symfony, as it may be that the Drupal 8 compatibility needs to be dropped.
- Status changed to RTBC
almost 2 years ago 5:25pm 25 January 2023 - 🇦🇺Australia VladimirAus Brisbane, Australia
Looking good.
Patch applies and doesn't break D10.
Cheers 🍻 - Status changed to Needs work
almost 2 years ago 5:34pm 25 January 2023 - 🇵🇹Portugal jcnventura
Well, the tests failed in D10. The fix is trivial, however. Let me just fix that and see if we need to supplement 📌 Fix tests in 8.x-1.x Fixed further..
- Status changed to Needs review
almost 2 years ago 6:35pm 25 January 2023 - 🇵🇹Portugal jcnventura
OK. All tests pass in Drupal 9.5 and Drupal 10.1. I dropped support for Drupal 8, since the new ResponseEvent and RequestEvent classes that are no longer available in Symfony 6 (used by Drupal 10) were first marked deprecated in Symfony 4.3 (which Drupal 9 uses).
- First commit to issue fork.
- Status changed to Needs work
almost 2 years ago 7:53pm 1 March 2023 - 🇳🇿New Zealand RoSk0 Wellington
This needs rebase now when ✨ Support more use cases Fixed is committed.
I'm curious is we would be able to support 9 and 10 on the same branch with the changes from
symfony/http-kernel
, like https://www.drupal.org/node/3236639 → .I will try to do it myself as it wouldn't be trivial with the IP restore functionality moved into middleware.
- Status changed to Needs review
almost 2 years ago 9:37pm 1 March 2023 - 🇳🇿New Zealand RoSk0 Wellington
Rebased and
bypassHost
property declaration on the middleware class (was breaking tests on PHP 8.2).Lets see if tests are green now.
- First commit to issue fork.
- 🇨🇦Canada mandclu
The bigger issue with the change from MASTER_REQUEST to MAIN_REQUEST in Symfony's HttpKernelInterface is that now it's impossible to have a CloudFlareMiddleware that doesn't throw a fatal error in either Drupal 9.5 or 10, at least as long as it continues to implement HttpKernelInterface.
For now I've updated it to work with Drupal 10, since that is ultimately the aim of the work here. I also added an ability for the SettingsForm to gracefully handle a ResponseException from the Cloudflare SDK.
It's down to one error on my local, I'll have to do some more investigation to figure out why the testbot isn't showing any improvement.
- 🇵🇹Portugal jcnventura
Yes, unfortunately now that ✨ Support more use cases Fixed has been committed and made available in a released version it seems that there needs to be a version for Drupal 10 and another for Drupal 9.
Please create a 2.x branch, and move this issue over to that branch.
- Status changed to RTBC
over 1 year ago 1:39pm 25 March 2023 -
RoSk0 →
committed 1145229c on 2.0.x authored by
balintpekker →
Issue #3296796: Reverted changes to logger
-
RoSk0 →
committed 1145229c on 2.0.x authored by
balintpekker →
-
RoSk0 →
committed 42c4ae9d on 2.0.x authored by
balintpekker →
Issue #3296796: Drupal 10 compatibility
-
RoSk0 →
committed 42c4ae9d on 2.0.x authored by
balintpekker →
- Status changed to Fixed
over 1 year ago 1:53pm 25 March 2023 - 🇨🇦Canada mandclu
I merged this into a new 2.0.x branch and rolled a 2.0.0-alpha1 release. My intent is to soon roll an alpha2 release that will only support Drupal 10, but I thought for the sake of upgrading that it was important to have at least one release that supported both major versions, even if it will cause fatal errors in Drupal 9.
Open to opinions on how quickly to release the alpha2.
- 🇳🇿New Zealand RoSk0 Wellington
Thanks for pushing this Martin.
Can you please elaborate why you choose
2.0.x
branch , rather than suggested in #312.x
? Major version branches make more sense in semver context , easier to maintain.I would really prefer to see
2.x
branch with corresponding2.x-dev
release for the latest changes. - 🇨🇦Canada mandclu
In my experience, feature version branches, e.g. 2.0.x are what the community intends. For example, when you create a new project, the suggested git code creates a 1.0.x branch, not 1.x. Further, in my experience a feature version dev branch displays coupled with the corresponding tagged release, as the 2.0.x-dev and 2.0.0-alpha1 display together on this project page currently.
On a more practical note, feature version branches allow for the development of new features in a separate branch while still being able to push maintenance fixes to the current stable branch. Once we get a stable 2.0.0 release, we can work on new features in a 2.1.x branch, while still being able to tag new bugfix releases e.g. 2.0.1.
- 🇳🇿New Zealand RoSk0 Wellington
Thanks. All good, as long as it's a conscious choice.
- Status changed to Needs work
over 1 year ago 7:44pm 26 March 2023 - 🇳🇿New Zealand RoSk0 Wellington
It looks like we are not done here - 2.0.x is still marked compatible with Drupal core 9, which is not true.
Also test are failing on PHP 8.2, but we can address that in another issue.
- 🇨🇦Canada mandclu
It was mentioned above that because of deeper changes in the versions of Symfony used by D9 and D10 (and this module's reliance on classes whose definitions have changed) it is impossible to have a release that supports both major versions, at least given other changes that have been merged in since this issue was started.
In the release notes for the 2.0.0-alpha1 release, it clearly indicates that the release should only be used by Drupal 9 sites that are preparing to upgrade to Drupal 10. I myself followed this process this weekend, and it worked seamlessly. Perhaps additional documentation on that front is warranted.
My plan is to tag a 2.0.0-alpha2 release that will only be compatible with Drupal 10, but having at least one release that composer thinks is compatible with both makes it easier to achieve the major version upgrade for Drupal.
- 🇩🇪Germany IT-Cru Munich
@mandclu: Would it than not be better to use 2.0.x for D9 / D10 and 2.1.x for D10 only. So it will be possible to provide fixes also for D9 compatible 2.0.x release for a while instead of blocking all development here with a 2.0.0-alpha2 which only supports D10.
- 🇩🇪Germany IT-Cru Munich
I've tried out 2.0.0-alpha1 with D9 which produce fatal errors like mentioned in info of this release. I think a lot of people could run into this issue, when they use upgrade_status module during D10 preparation and get a non-working cloudflare release installed in their D9 websites.
Would it be possible to avoid this with a new 2.0.0-alpha2 release which only supports D10 and mark 2.0.0-alpha1 as unsupported?
@mandclu: So I think you could ignore my previous comment #42 ;)
- 🇮🇳India kuhikar
Hello Team,
Added Patch : This is compatible for the Drupal 9 (9.5.7) and Drupal 10 (10.0.8-dev).
Created Patch on https://git.drupalcode.org/project/cloudflare/-/tree/2.0.x-dev
Patch Applied on Drupal 9 and Drupal 10:
1. Drupal 9:
Checking patch cloudflare.info.yml... Checking patch cloudflare.install... Checking patch modules/cloudflarepurger/cloudflarepurger.info.yml... Checking patch modules/cloudflarepurger/src/EventSubscriber/CloudFlareCacheTagHeaderGenerator.php... Checking patch modules/cloudflarepurger/src/Plugin/Purge/Purger/CloudFlarePurger.php... Checking patch modules/cloudflarepurger/tests/src/Unit/DiagnosticCheckTestBase.php... Checking patch src/CloudFlareMiddleware.php... Checking patch src/Form/ZoneSelectionForm.php... Checking patch src/State.php... Checking patch src/Zone.php... Checking patch tests/modules/cloudflare_form_tester/cloudflare_form_tester.info.yml... Checking patch tests/src/Functional/CloudFlareAdminSettingsFormTest.php... Checking patch tests/src/Functional/CloudFlareAdminSettingsInvalidFormTest.php... Checking patch tests/src/Functional/ComposerDependencyTest.php... Checking patch tests/src/Unit/ClientIpRestoreTest.php... Applied patch cloudflare.info.yml cleanly. Applied patch cloudflare.install cleanly. Applied patch modules/cloudflarepurger/cloudflarepurger.info.yml cleanly. Applied patch modules/cloudflarepurger/src/EventSubscriber/CloudFlareCacheTagHeaderGenerator.php cleanly. Applied patch modules/cloudflarepurger/src/Plugin/Purge/Purger/CloudFlarePurger.php cleanly. Applied patch modules/cloudflarepurger/tests/src/Unit/DiagnosticCheckTestBase.php cleanly. Applied patch src/CloudFlareMiddleware.php cleanly. Applied patch src/Form/ZoneSelectionForm.php cleanly. Applied patch src/State.php cleanly. Applied patch src/Zone.php cleanly. Applied patch tests/modules/cloudflare_form_tester/cloudflare_form_tester.info.yml cleanly. Applied patch tests/src/Functional/CloudFlareAdminSettingsFormTest.php cleanly. Applied patch tests/src/Functional/CloudFlareAdminSettingsInvalidFormTest.php cleanly. Applied patch tests/src/Functional/ComposerDependencyTest.php cleanly. Applied patch tests/src/Unit/ClientIpRestoreTest.php cleanly.
2. Drupal 10:
cloudflare.patch:109: trailing whitespace. cloudflare.patch:152: trailing whitespace. * cloudflare.patch:166: trailing whitespace. * cloudflare.patch:173: trailing whitespace. * cloudflare.patch:187: trailing whitespace. * Checking patch cloudflare.info.yml... Checking patch cloudflare.install... Checking patch modules/cloudflarepurger/src/EventSubscriber/CloudFlareCacheTagHeaderGenerator.php... Checking patch modules/cloudflarepurger/src/Plugin/Purge/Purger/CloudFlarePurger.php... Checking patch modules/cloudflarepurger/tests/src/Unit/DiagnosticCheckTestBase.php... Checking patch src/CloudFlareMiddleware.php... Checking patch src/Form/ZoneSelectionForm.php... Checking patch src/State.php... Checking patch src/Zone.php... Checking patch tests/src/Functional/CloudFlareAdminSettingsFormTest.php... Checking patch tests/src/Functional/CloudFlareAdminSettingsInvalidFormTest.php... Checking patch tests/src/Functional/ComposerDependencyTest.php... Checking patch tests/src/Unit/ClientIpRestoreTest.php... Applied patch cloudflare.info.yml cleanly. Applied patch cloudflare.install cleanly. Applied patch modules/cloudflarepurger/src/EventSubscriber/CloudFlareCacheTagHeaderGenerator.php cleanly. Applied patch modules/cloudflarepurger/src/Plugin/Purge/Purger/CloudFlarePurger.php cleanly. Applied patch modules/cloudflarepurger/tests/src/Unit/DiagnosticCheckTestBase.php cleanly. Applied patch src/CloudFlareMiddleware.php cleanly. Applied patch src/Form/ZoneSelectionForm.php cleanly. Applied patch src/State.php cleanly. Applied patch src/Zone.php cleanly. Applied patch tests/src/Functional/CloudFlareAdminSettingsFormTest.php cleanly. Applied patch tests/src/Functional/CloudFlareAdminSettingsInvalidFormTest.php cleanly. Applied patch tests/src/Functional/ComposerDependencyTest.php cleanly. Applied patch tests/src/Unit/ClientIpRestoreTest.php cleanly. warning: squelched 3 whitespace errors warning: 8 lines add whitespace errors
Please include this patch in the alpha-2 release
- last update
over 1 year ago Patch Failed to Apply - Status changed to Needs review
over 1 year ago 10:45am 24 April 2023 - last update
over 1 year ago Patch Failed to Apply - last update
over 1 year ago Patch Failed to Apply - 🇺🇸United States socketwench
While not a solution to this issue, this patch can help site maintainers who fall upon this fatal error with the 2.0.0-alpha1 version while on D9 as a stopgap.
https://www.drupal.org/files/issues/2023-07-13/cloudflare_2.0.0_D9_compa... →
- last update
over 1 year ago 59 pass - 🇺🇸United States kleinmp
This patch is allowing a site I'm working on to run in both Drupal 9.5.x and 10.0.x with version 2.0 of this module. It probably does not work for Drupal 9.4 and less.
I updated the handle method to match how core is using it:
https://git.drupalcode.org/project/drupal/-/blob/10.0.11/core/modules/pa...
- Status changed to Fixed
over 1 year ago 1:25am 21 September 2023 - 🇦🇺Australia VladimirAus Brisbane, Australia
@socketwench do you want to raise separate ticket for it?
I'm marking this issue as fixed as it was committed 6 month ago.
You can test it on D9 and D10 by running
composer require 'drupal/cloudflare:2.0.x-dev@dev'
Maintainers, do you help with releases? Happy to help.
Automatically closed - issue fixed for 2 weeks with no activity.