Problem/Motivation

In #3501734: Drupal 11 compatibility fixes we had to disable testing on 11.2.x branch by commenting out the OPT_IN_TEST_NEXT_MINOR in .gitlab-ci.yml due to two deprecations detected by phpstan here:

https://git.drupalcode.org/issue/svg_image_field-3501734/-/jobs/4109765

 ------ ----------------------------------------------------------------------- 
  Line   svg_image_field.views.inc                                              
 ------ ----------------------------------------------------------------------- 
  19     Call to deprecated function views_field_default_views_data():          
         in drupal:11.2.0 and is removed from drupal:12.0.0. Use                
         \Drupal::service('views.field_data_provider')                          
         ->defaultFieldImplementation($field_storage); instead.                 
         🪪  function.deprecated                                                
  48     Call to deprecated function views_entity_field_label():                
         in drupal:11.2.0 and is removed from drupal:12.0.0. Use                
           \Drupal::service('entity_field.manager')->getFieldLabels() instead.  
         🪪  function.deprecated                                                
 ------ ----------------------------------------------------------------------- 

The related CRs for these two deprecations include:

Steps to reproduce

Proposed resolution

Properly handle the deprecated functions following best practices.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jwilson3 created an issue. See original summary.

jwilson3’s picture

Issue summary: View changes

jwilson3’s picture

Title: Drupal 11.2.x compatiblity » Drupal 11.2.x compatibility
jwilson3’s picture

Issue summary: View changes
jwilson3’s picture

Issue summary: View changes
jwilson3’s picture

Issue summary: View changes

taran2l made their first commit to this issue’s fork.

taran2l’s picture

Status: Active » Needs review

Went ahead and fixed this .... still supporting 9.5, it's up to you if you want to go like that

jwilson3’s picture

Yes, for now the D9 compatibility should be kept. Eventually it makes sense to remove support but since it is not a burden yet, were okay to keep it. will review and test soon. Thanks so much for collaborating.

jwilson3’s picture

Status: Needs review » Needs work
jwilson3’s picture

Status: Needs work » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

  • jwilson3 committed 7fa08fe8 on 2.3.x
    Issue #3501879: Drupal 11.2.x compatibility
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jwilson3’s picture

This is now released in version 2.3.5 of SVG Image Field. Please check release notes.

jwilson3’s picture

This change introduced a bug in views integration for Drupal 11.2+ (See #3560629: You have requested a non-existent service "views.views_field_default_data")

It has since been fixed in release 2.3.6.