Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D11 support #974

Open
wants to merge 2 commits into
base: 6.x
Choose a base branch
from
Open

Conversation

jackrabbithanna
Copy link

Overview

Changes to support Drupal 11

Technical Details

Drupal deprecation code analysis provides this output for deprecations needing to be changed in D11

 ------ --------------------------------------------------------- 
  Line   src/WebformCivicrmBase.php                               
 ------ --------------------------------------------------------- 
  825    Call to deprecated function file_icon_class():           
         in drupal:10.3.0 and is removed from drupal:11.0.0. Use  
           \Drupal\file\IconMimeTypes::getIconClass() instead.    
 ------ --------------------------------------------------------- 

Comments

Drupal change record: https://www.drupal.org/node/3411269

To support D9 and D11, we have to check if function exists, and then use full object path.
When D9 support is dropped, should add a "use" statement and remove the conditional

@jackrabbithanna
Copy link
Author

I've created this composer template to assist with development: https://github.com/jackrabbithanna/drupal11-civicrm-proto

Uses recently merged D11 support in CiviCRM Core
Retrieves the Webform module with Drupal lenient, and patches it.

@demeritcowboy
Copy link
Collaborator

Thanks for the PR. It should get merged once the tests are running. They don't run yet because the parent webform even patched or with "lenient" doesn't install during tests. Something about ckeditor schema.

And looks like the function_exists is needed in 10.2 since the replacement doesn't even exist until 10.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants