Automated Drupal 11 compatibility fixes for views_data_export

Created on 6 July 2024, 7 months ago

Problem/Motivation

Hello project maintainers,

This is an automated issue to help make this module compatible with Drupal 11.

Changes will periodically be added to this issue that remove deprecated API uses. To stop further changes from being posted, change the status to anything other than Active, Needs review, Needs work or Reviewed and tested by the community. Alternatively, you can remove the "ProjectUpdateBotD11" tag from the issue to stop the bot from posting updates.

The changes 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:

  1. Accept automated changes until this issue is closed

    If this issue is left open (status of Active, Needs review, Needs work or Reviewed and tested by the community) and the "ProjectUpdateBotD11" tag is left on this issue, new changes will be posted periodically if new deprecation fixes are needed.

    As the Drupal Rector project improves and is able to fix more deprecated API uses, the changes posted here will cover more of the deprecated API uses in the module.

    Patches and/or merge requests posted by others are ignored by the bot, and general human interactions in the issue do not stop the bot from posting updates, so feel free to use this issue to refine bot changes. The bot will still post new changes then if there is a change in the new generated patch compared to the changes that the bot posted last. Those changes are then up to humans to integrate.

  2. Leave open but stop new automated changes.

    If you want to use this issue as a starting point to remove deprecated API uses but then don't want new automated changes, remove the "ProjectUpdateBotD11" tag from the issue and use it like any other issue (the status does not matter then). If you want to receive automated changes again, add back the "ProjectUpdateBotD11" tag.

  3. Close it and don't use it

    If the maintainers of this project don't find this issue useful, they can close this issue (any status besides Active, Needs review, Needs work and Reviewed and tested by the community) and no more automated changes will be posted here.

    If the issue is reopened, then new automated changes will be posted.

    If you are using another issue(s) to work on Drupal 11 compatibility it would be very useful to other contributors to add those issues as "Related issues" when closing this issue.

Remaining tasks

Using the patches

  1. Apply the latest patch in the comments by Project Update Bot โ†’ or human contributors that made it better.
  2. Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.
  3. Provide feedback about how the testing went. If you can improve the patch, post an updated patch here.

Using the merge request

  1. Review the merge request and test it.
  2. Thoroughly test the changes. These changes are automatically generated so they haven't been tested manually or automatically.
  3. Provide feedback about how the testing went. If you can improve the merge request, create a new branch and merge request and work from there.

Warning: The 'project-update-bot-only' branch will always be overwritten. Do not work in that branch!

Providing feedback

If there are problems with one of the changes posted by the Project Update Bot โ†’ , such as it does not correctly replace a deprecation, you can file an issue in the Drupal Rector issue queue โ†’ . For other issues with the bot, for instance if the issue summary created by the bot is unclear, use the Project analysis issue queue โ†’ .

๐Ÿ“Œ Task
Status

Needs review

Version

2.0

Component

Code

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @project update bot
  • This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.

    It is important that any automated tests available are run and that you manually test the changes.

    Drupal 11 Compatibility

    According to the Upgrade Status module โ†’ these changes make this module compatible with Drupal 11! ๐ŸŽ‰
    Therefore these changes update the info.yml file for Drupal 11 compatibility.

    Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot โ†’ to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.

    Debug information

    Bot run #11-217342

    These packages were used to generate the fixes:

    1. drupal/upgrade_status: 4.3.4
    2. mglaman/phpstan-drupal: 1.2.11
    3. palantirnet/drupal-rector: 0.20.3
  • Pipeline finished with Failed
    7 months ago
    Total: 173s
    #217660
  • Status changed to RTBC 5 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States BenStallings

    This works for me!

  • First commit to issue fork.
  • Merge request !45Resolve #3459698 "Automated drupal 11" โ†’ (Merged) created by acbramley
  • Pipeline finished with Success
    5 months ago
    Total: 217s
    #272081
  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia acbramley

    acbramley โ†’ changed the visibility of the branch project-update-bot-only to hidden.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States AaronBauman Philadelphia

    MR45 works for me
    RTBC+1

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States emptyvoid

    The patch does not appear to address all of the issues identified in the code audit.

    [notice] Processing /srv/drupal/hudoig-d10/dev/code/hudoigd10/docroot/modules/contrib/views_data_export.
    
    ================================================================================
    Views Data Export,  8.x-1.4
    Scanned on Mon, 09/16/2024 - 13:38
    
    FILE: modules/contrib/views_data_export/src/Plugin/views/display/DataExport.php
    
    STATUS         LINE                           MESSAGE                           
    --------------------------------------------------------------------------------
    Ignore         749  Fetching deprecated class constant EXISTS_REPLACE of        
                        interface Drupal\Core\File\FileSystemInterface. Deprecated  
                        in drupal:10.3.0 and is removed from drupal:12.0.0. Use     
                        Drupal\Core\File\FileExists::Replace instead.               
    --------------------------------------------------------------------------------
    
    FILE:
    /srv/drupal/hudoig-d10/dev/code/hudoigd10/vendor/symfony/deprecation-contracts/f
    unction.php
    
    STATUS         LINE                           MESSAGE                           
    --------------------------------------------------------------------------------
    Check manually 25   Since twig/twig 3.12: Getting node "filter" on a            
                        "Twig\Node\Expression\FilterExpression" class is deprecated.
    --------------------------------------------------------------------------------
    Check manually 25   Since twig/twig 3.12: Getting node "filter" on a            
                        "Twig\Node\Expression\FilterExpression" class is deprecated.
    --------------------------------------------------------------------------------
    Check manually 25   Since twig/twig 3.12: Getting node "filter" on a            
                        "Twig\Node\Expression\FilterExpression" class is deprecated.
    --------------------------------------------------------------------------------
    Check manually 25   Since twig/twig 3.12: Getting node "filter" on a            
                        "Twig\Node\Expression\FilterExpression" class is deprecated.
    --------------------------------------------------------------------------------
    Check manually 25   Since twig/twig 3.12: Getting node "filter" on a            
                        "Twig\Node\Expression\FilterExpression" class is deprecated.
    --------------------------------------------------------------------------------
    Check manually 25   Since twig/twig 3.12: Not passing an instance of            
                        "TwigFunction" when creating a "render_var" function of type
                        "Twig\Node\Expression\FunctionExpression" is deprecated.    
    --------------------------------------------------------------------------------
    
    FILE: modules/contrib/views_data_export/views_data_export.info.yml
    
    STATUS         LINE                           MESSAGE                           
    --------------------------------------------------------------------------------
    Check manually 5    Value of core_version_requirement: ^9 || ^10 is not         
                        compatible with the next major version of Drupal core. See  
                        https://drupal.org/node/3070687.                            
    --------------------------------------------------------------------------------
    
    
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States emptyvoid

    Created patch properly addressing all incompatible classes and functions.
    Now Drupal 11 compliant.

    Tested in existing build and export functions as designed on D10 and D11.

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia acbramley

    Fixed in the MR, patches are dead so push fixes to the MR instead.

  • Pipeline finished with Success
    4 months ago
    Total: 433s
    #284856
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance mably

    Successfully tested on Drupal 11 PHP 8.3.

    I think it's ready for a 2.x release...

  • This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.

    It is important that any automated tests available are run and that you manually test the changes.

    Drupal 11 Compatibility

    According to the Upgrade Status module โ†’ these changes make this module compatible with Drupal 11! ๐ŸŽ‰
    Therefore these changes update the info.yml file for Drupal 11 compatibility.

    Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot โ†’ to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.

    Debug information

    Bot run #11-321467

    These packages were used to generate the fixes:

    1. drupal/upgrade_status: 4.3.6
    2. mglaman/phpstan-drupal: 1.3.1
    3. palantirnet/drupal-rector: 0.20.3
  • Pipeline finished with Failed
    3 months ago
    Total: 48s
    #321707
  • This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.

    It is important that any automated tests available are run and that you manually test the changes.

    Drupal 11 Compatibility

    According to the Upgrade Status module โ†’ these changes make this module compatible with Drupal 11! ๐ŸŽ‰
    Therefore these changes update the info.yml file for Drupal 11 compatibility.

    Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot โ†’ to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.

    Debug information

    Bot run #11-321467

    These packages were used to generate the fixes:

    1. drupal/upgrade_status: 4.3.6
    2. mglaman/phpstan-drupal: 1.3.1
    3. palantirnet/drupal-rector: 0.20.3
  • Pipeline finished with Failed
    3 months ago
    #321714
  • ๐Ÿ‡ฆ๐Ÿ‡นAustria maxilein

    Upgrade_status also reports this:

    File name Line Error
    web/modules/contrib/views_data_export/src/Plugin/views/display/DataExport.php 838 Call to deprecated method setCellValueByColumnAndRow() of class PhpOffice\PhpSpreadsheet\Worksheet\Worksheet: 1.23.0 Use the setCellValue() method with a cell address such as 'C5' instead;, or passing in an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object.

  • Pipeline finished with Failed
    3 months ago
    Total: 106s
    #326934
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States BenStallings

    Thanks, @maxilein, MR!45 now incorporates that change.

  • First commit to issue fork.
  • Merge request !53Drupal 11 compatibility โ†’ (Open) created by abhinavk
  • Pipeline finished with Failed
    3 months ago
    Total: 45s
    #329937
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom steven jones

    Which merge request do we want to merge here?

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States BenStallings

    @steven jones MR!53 does not incorporate the fix on MR!45. MR!45 is the one we should consider for merge.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom steven jones

    Great.

    Looking at the pipelines on your MR...they are failing because of trying to install with Drupal 11 at the moment.

    Ideally we'd have a pipeline for each of our core versions we support, if d.o supports doing such a thing, anyone know?

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom steven jones

    I've added the automated test for Drupal 10, and now we can see that the Drupal 11 tests are failing because there's not a version of https://www.drupal.org/project/xls_serialization โ†’ that's compatible with Drupal 11 yet.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance mably

    mably โ†’ changed the visibility of the branch 3459698-d11_ready to hidden.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia rahul1707

    rahul17 โ†’ made their first commit to this issueโ€™s fork.

  • Pipeline finished with Success
    2 months ago
    Total: 314s
    #336402
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia rahul1707

    I have committed deprecation fixes in MR !53 and also verified functionality in Drupal 10.3 and Drupal 11. Found no error in upgrade status as well. Also verified PHP 8.3 compatibility. Everything looks good to me.

    Changing status to needs review. Kindly review and merge changes.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance mably

    mably โ†’ changed the visibility of the branch 3459698-d11_ready to active.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom steven jones

    Thanks everyone for pushing this one along. @mably are you able to make a new release of Excel Serialization โ†’ module? Then we won't need the awkward workarounds to get the testing to pass.

  • ๐Ÿ‡ง๐Ÿ‡ฌBulgaria pfrenssen Sofia

    Excel Serialization is now D11 compatible, ๐Ÿ“Œ Drupal 11 compatability Active got committed!

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance mably

    xls_serialization 8.x-1.6, compatible with Drupal 11, has been released!

    https://www.drupal.org/project/xls_serialization/releases/8.x-1.6 โ†’

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom steven jones

    steven jones โ†’ changed the visibility of the branch 3459698-d11_ready to hidden.

  • Pipeline finished with Skipped
    2 months ago
    #338898
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom steven jones

    Thanks for everyone's patience here.

    Leaving this issue open so we benefit from further input from @Project Update Bot

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom steven jones

    Ah shoot.

    8.x-1.5rc1 isn't compatible with Drupal 9 eh? Because we're using the new FileExists class.

    Boo. I'll cut a 8.x-2.0 asap.

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia mstrelan

    You don't need a new major to drop D9 support. But if you decide to do that anyway you might like to take the chance to move to semver and cut 2.0.0

    If you want D9 users to be happy ideally you should release 8.x-1.6 that rolls back the breaking change and restore it in 8.x-1.7 with a constraint on D10+. That will give the smoothest update path for all users.

  • Assigned to steven jones
  • Status changed to Needs work 2 months ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom steven jones

    It's not compatible with Drupal 10.2 either, let's get a simple BC layer in.

  • Pipeline finished with Skipped
    2 months ago
    #346958
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom steven jones

    Merged that BC layer in too.

    Leaving this issue open so we benefit from further input from @Project Update Bot

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom steven jones
Production build 0.71.5 2024