Drush Commands [D10]

Created on 9 September 2021, over 3 years ago
Updated 18 August 2024, 4 months ago

Problem/Motivation

Drupal 9 uses Drush 10, currently the Drush commands that content sync support are for Drush 9.
Include the compatibility for Drush 10 commands.

Feature request
Status

Needs work

Version

3.0

Component

Code

Created by

🇨🇦Canada blanca.esqueda

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • 🇩🇪Germany guido_s Cologne

    I'm working with drush commands the first time here so I'm not 100% sure what needs to be checked and done in total.
    I checked the Drush 12 documentation for this as drush 12 is in use on Drupal 10.

    Things I've done so far to give you a starting point to work with:

    • Changed folder structure and file name (also in drush.services.yml)
    • Completed the create method as many of the containers were missing
    • Fixed PHP Code Sniffer issues
    • Used PHP Attributes instead of Annotations as Drush recommends using this if PHP 8+ is used

    I didn't change any code inside the functions (apart from phpcs fixes).

    I'm not sure about the requirements that need to be set in composer.json

    Proper usage description for the commands is still missing.

    I'm also not sure if some of the function code can be improved or needs to be changed since drush introduced new functions for yaml files for example.

  • 🇩🇪Germany guido_s Cologne
  • Status changed to Needs work 7 months ago
  • 🇩🇪Germany guido_s Cologne
  • 🇩🇪Germany guido_s Cologne

    I tried using a drush command with this merge request applied and the drupal 10 compatibility issue merge request applied, but it seems this is not working correctly yet.

    cli-drupal:/app$ drush cse --entity-types=node --files=base64
    Differences of the active content to the export directory:
    
    +------------+--------------+-----------+
    | Collection | Content Name | Operation |
    +------------+--------------+-----------+
    
     Do you want to export? (yes/no) [yes]:
     >

    It never shows any differences although I never exported any content (also skipped the snapshot on installation as it would take hours to enable the module). Exporting and importing single content items via the UI seems to work fine though.

  • Pipeline finished with Skipped
    3 months ago
    #291955
  • 🇨🇦Canada blanca.esqueda

    I tried the code on the MR with Drush version : 12.5.3.0
    and it works good for me.

    Followed the next steps:

    • set the content/sync folder
    • installed/enabled the module -- as it was a new site it had only a couple of users - but the snapshot was skipped.
    • used the drush command to export the content
    • duplicated one of the YML, updated the uuid on the name and content and a couple of properties.
    • used the drush command to import the content.

    Also tried the single import/export using the UI

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

Production build 0.71.5 2024