Bug 261942 - www/drush-php80 drupal7 drupal9
Summary: www/drush-php80 drupal7 drupal9
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Matthias Fechner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-14 06:29 UTC by Richard Allen
Modified: 2022-07-11 15:14 UTC (History)
3 users (show)

See Also:


Attachments
Update version and take maintainership (951 bytes, patch)
2022-07-11 14:04 UTC, Mikle Davidkin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Allen 2022-02-14 06:29:37 UTC
drush-php80 8.3.3 is using each() function which was removed from php80.

So when ever I try to run this command "drush pm-update drupal -y" on a drupal7 install I get the following error.

WD php: Error: Call to undefined function each() in _drush_backend_proc_open() (line 360 of phar:///usr/local/bin/drush.phar/includes/backend.inc).

This issue is was fixed in 8.4.1. https://github.com/drush-ops/drush/releases/tag/8.4.1

drush-php80 8.3.3 is also using update_fix_compatibility() function that was removed with drupal9.

So when I try to run this command "drush updatedb" on a drupal9 install I get the following error.

Error: Call to undefined function update_fix_compatibility() in update_main() (line 136 of phar:///usr/local/bin/drush.phar/commands/core/drupal/update.inc) #0 

both issues were fix by using composer to install a newer version of drush using this command "composer require drush/drush:8.x -W" install drush 8.4.10. and fixed both of my issues.
Comment 1 Matthias Fechner freebsd_committer freebsd_triage 2022-02-15 06:24:41 UTC
Drupal has changed the way it is installed.
Nowadays drupal is installed using composer2.
Drupal is then installed as dependency by composer.

I think we can remove this port, it is more or less obsolete.

Any comments here?
Comment 2 Mikle Davidkin 2022-05-17 08:20:20 UTC
Drush is not just for Drupal install. I.e. right after usual 'composer update' you should run 'drush updatedb' to run DB update handlers but currently is not possible on Drupal 9 sites because of old port version.
Comment 3 Matthias Fechner freebsd_committer freebsd_triage 2022-05-27 19:24:29 UTC
(In reply to Mikle Davidkin from comment #2)
Please feel free to take this port as maintainer.
I do not use drupal anymore, so it is not possible for me to test it.
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-05-27 19:25:26 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3eb54392d47b9df5505771c69aefeee88ec921ad

commit 3eb54392d47b9df5505771c69aefeee88ec921ad
Author:     Matthias Fechner <mfechner@FreeBSD.org>
AuthorDate: 2022-05-27 19:23:42 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2022-05-27 19:23:42 +0000

    www/drush: drop maintainer ship for this port

    PR:             261942

 www/drush/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 Mikle Davidkin 2022-07-11 14:04:51 UTC
Created attachment 235191 [details]
Update version and take maintainership
Comment 6 Mikle Davidkin 2022-07-11 14:05:03 UTC
Hm. Why not? I use Drupal and Drush on many FreeBSD installs...
So here's patch with version update and maintainership change. New version works fine for me.
Comment 7 commit-hook freebsd_committer freebsd_triage 2022-07-11 15:14:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4c321d643e7d51ab151b139141dfd339754590ce

commit 4c321d643e7d51ab151b139141dfd339754590ce
Author:     Mikle Davidkin <me@skylord.ru>
AuthorDate: 2022-07-11 15:11:37 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2022-07-11 15:12:49 +0000

    www/drush: update to 8.4.11

    Take maintainer

    PR:             261942

 www/drush/Makefile | 4 ++--
 www/drush/distinfo | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
Comment 8 Matthias Fechner freebsd_committer freebsd_triage 2022-07-11 15:14:36 UTC
Committed, thanks.