Trait "Drush\Commands\AutowireTrait" not found in ViewsDataExportCommands.php on line 23

Created on 20 October 2025, 10 days ago

Problem/Motivation

This issues is not unique to views_data_export, but it comes up when trying to keep D9 running while also supporting newer versions of PHP and Drush.

πŸ› After update drush quits with error "Trait not found" Active has a fix for it in https://git.drupalcode.org/project/search_api/-/merge_requests/203/diffs

In other cases like Devel, the answer is to update to Drush 12 (https://github.com/drush-ops/drush/issues/5941).

Steps to reproduce

Drupal 9.5.11, PHP 8.1.33, Drush 10 and drupal/views_data_export:^1.7

Proposed resolution

The quick fix is just to patch away https://git.drupalcode.org/project/views_data_export/-/tree/8.x-1.x/src/... or upgrade to supported versions of Drupal core and Drush.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States kreynen

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.

Production build 0.71.5 2024