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

Project Update Bot created an issue. See original summary.

project update bot’s picture

Status: Active » Needs review
StatusFileSize
new418 bytes

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-127659

These packages were used to generate the fixes:

  1. drupal/upgrade_status: 4.1.0
  2. mglaman/phpstan-drupal: 1.2.9
  3. palantirnet/drupal-rector: 0.20.1

xem8vfdh’s picture

Issue summary: View changes
Related issues: +#3030506: Plan for release 8.x-1.0
emptyvoid’s picture

Upgrade Status Report

================================================================================
Views Field View,  8.x-1.0-beta5
Scanned on Mon, 09/16/2024 - 15:41

FILE:
modules/contrib/views_field_view/tests/modules/views_field_view_test_config/test
_views/views.view.views_field_view_test_parent_normal.yml

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 281  Support from all Views contextual filter settings for the   
                    default_argument_skip_url setting is removed from           
                    drupal:11.0.0. No replacement is provided. See              
                    https://www.drupal.org/node/3382316.                        
--------------------------------------------------------------------------------

FILE: modules/contrib/views_field_view/views_field_view.info.yml

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 4    Value of core_version_requirement: ^9 || ^10 is not         
                    compatible with the next major version of Drupal core. See  
                    https://drupal.org/node/3070687.                            
--------------------------------------------------------------------------------


emptyvoid’s picture

StatusFileSize
new1.12 KB

Drupal 11 patch

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

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

patelh84’s picture

#MR13 works fine for both D10 & D11 versions. Requesting for the issue RTBC.

ajitdalal’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new28.74 KB
new88.78 KB

I tested MR https://git.drupalcode.org/project/views_field_view/-/merge_requests/13.
No issue found in upgraded status and installation. Attached artifacts

bisonbleu’s picture

Status: Reviewed & tested by the community » Needs work

Tried all 3 MR patches. Unfortunately only the partial project-update-bot patch from MR11 applies correctly when it is added to composer.json. So something is not right in MR12 and MR13.

The error message when trying to apply MR13:

# composer install
Gathering patches for root package.
Removing package drupal/views_field_view so that it can be re-installed and re-patched.
  - Removing drupal/views_field_view (1.0.0-beta5)
Deleting docroot/modules/contrib/views_field_view - deleted
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 1 install, 0 updates, 0 removals
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Installing drupal/views_field_view (1.0.0-beta5): Extracting archive
  - Applying patches for drupal/views_field_view
    https://git.drupalcode.org/project/views_field_view/-/merge_requests/13.patch (Drupal 11 compatibility)
   Could not apply patch! Skipping. The error was: Cannot apply patch https://git.drupalcode.org/project/views_field_view/-/merge_requests/13.patch

Generating autoload files

bisonbleu’s picture

The issue I'm having with patches failing is related to additional lines added by Drupal.org's packaging script in views_field_view_test_config.info.yml. I have this

name: 'Views field view test Config'
type: module
description: 'Provides default views for tests.'
package: Testing
# version: VERSION
core_version_requirement: ^9 || ^10
dependencies:
  - drupal:views

# Information added by Drupal.org packaging script on 2023-02-02
version: '8.x-1.0-beta5'
project: 'views_field_view'
datestamp: 1675318986

but the patches expect this:

name: 'Views field view test Config'
type: module
description: 'Provides default views for tests.'
package: Testing
version: VERSION
core_version_requirement: ^9 || ^10
dependencies:
  - drupal:views
bisonbleu’s picture

Status: Needs work » Needs review

RESOLVED

As mentioned above, the reason why composer install is complaining «Could not apply patch …13.patch» is because the dist version of the module contains those additional lines added by Drupal.org's packaging script. The way to fix this is to use the --prefer-source flag, this way you get the raw Git repository state, without the packaging modifications.

SOLUTION

And there's a nice way, in composer.json, to differentiate between packages that can use the default fetch method (--prefer-dist) and those that should use --prefer-source instead; see the preferred-install section where I've added views_field_view and where multiple projects can be listed:

"config": {
    "allow-plugins": {
        "composer/installers": true,
        "drupal/core-composer-scaffold": true,
        "drupal/core-project-message": true,
        "dealerdirect/phpcodesniffer-composer-installer": true,
        "cweagans/composer-patches": true,
        "php-http/discovery": false,
        "oomphinc/composer-installers-extender": true,
        "drupal/core-vendor-hardening": true,
        "phpstan/extension-installer": true
    },
    "sort-packages": true,
    "preferred-install": {
        "drupal/views_field_view": "source",
        "*": "dist"
    }
},

With the above, composer install works as usual.

In the end, I'm using MR !15 because it preserves BC (backward compatibility), MR !13 does not, i.e.

  • MR !15: core_version_requirement: ^9 || ^10 || ^11
  • MR !13: core_version_requirement: ^10 || ^11

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

heddn’s picture

Unit tests are now passing green on MR 15.

heddn’s picture

Version: 8.x-1.0-beta5 » 8.x-1.x-dev

I would mark this as RTBC except I made some minor changes to the tests to get them to green. Anyone else able to make that call?

heddn’s picture

Status: Needs review » Reviewed & tested by the community

My changes to the tests are so minimal, I'm going to say this is good to go. LGTM

heddn changed the visibility of the branch 3435465-d11_ready to hidden.

heddn changed the visibility of the branch 3435465-automated-drupal-11 to hidden.

heddn changed the visibility of the branch project-update-bot-only to hidden.

nicxvan’s picture

RTBC +1 it's pretty straightforward

jibran’s picture

Saving credits

  • jibran committed 58f9e82c on 8.x-1.x authored by bisonbleu
    Issue #3435465 by project update bot, heddn, bisonbleu, emptyvoid,...
jibran’s picture

Committed and pushed to 1.x. Thank you all.

jibran’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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