Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update drush version to 8.3.2 #1999

Closed
truls1502 opened this issue Dec 12, 2019 · 13 comments
Closed

Update drush version to 8.3.2 #1999

truls1502 opened this issue Dec 12, 2019 · 13 comments

Comments

@truls1502
Copy link
Contributor

Describe the bug
When I did drush make-command; I got the error such as:

truls1502$ ddev ssh
truls1502@web:/var/www/html/web$ drush make ../site.make
Make new site in the current directory? (y/n): y
include(phar:///usr/local/bin/drush8/vendor/composer/../../src/Internal/Symfony/Yaml/Yaml.php): failed to open stream: phar error:        [warning]
"src/Internal/Symfony/Yaml/Yaml.php" is not a file in phar "/usr/local/bin/drush8" ClassLoader.php:444
include(): Failed opening 'phar:///usr/local/bin/drush8/vendor/composer/../../src/Internal/Symfony/Yaml/Yaml.php' for inclusion           [warning]
(include_path='.:/usr/share/php') ClassLoader.php:444
PHP Fatal error:  Class 'Drush\Internal\Symfony\Yaml\Yaml' not found in phar:///usr/local/bin/drush8/lib/Drush/Make/Parser/ParserYaml.php on line 26
Fatal error: Class 'Drush\Internal\Symfony\Yaml\Yaml' not found in phar:///usr/local/bin/drush8/lib/Drush/Make/Parser/ParserYaml.php on line 26
Drush command terminated abnormally due to an unrecoverable error.                                                                        [error]
Error: Class 'Drush\Internal\Symfony\Yaml\Yaml' not found in phar:///usr/local/bin/drush8/lib/Drush/Make/Parser/ParserYaml.php, line 26

After talked on #drush-channel and they mentioned the issue should be resolved on Drush version 8.3.2.
So this line needs to be fixed.

So I tried to add a new file .ddev/web-build/Dockerfile with below:

ARG BASE_IMAGE=drud/ddev-webserver:v1.12.1
FROM $BASE_IMAGE

ENV DRUSH_VERSION=8.3.2

RUN curl -sSL "https://github.com/drush-ops/drush/releases/download/${DRUSH_VERSION}/drush.phar" -o /usr/local/bin/drush8 && chmod +x /usr/local/bin/drush8

Then it is working smooth now.

To Reproduce
Steps to reproduce the behavior:

  1. ddev config --project-name="DrushMake" --project-type="drupal7" --php-version="5.6"
  2. ddev start && ddev exec drush make site.make (You need a make file).

Expected behavior
It shouldn't throw such error.

Version and configuration information (please complete the following information):

  • Host computer OS and Version: macOS Catalina
  • Docker version:
Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea
 Built:             Wed Nov 13 07:22:34 2019
 OS/Arch:           darwin/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea
  Built:            Wed Nov 13 07:29:19 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
@rfay
Copy link
Member

rfay commented Dec 12, 2019

How about that. I wouldn't have expected old-old drush make to be affected by a minor-version update in drush.

Would you like to do a PR?

@rfay
Copy link
Member

rfay commented Dec 12, 2019

For your own problem with this, you'll probably want to temporarily put the upgrade process into .ddev/web-build/Dockerfile so it just automatically gets 8.3.2

@truls1502
Copy link
Contributor Author

truls1502 commented Dec 12, 2019

How about that. I wouldn't have expected old-old drush make to be affected by a minor-version update in drush.

Would you like to do a PR?

I am working on PR now. Just created the issue first to use the issue number 😊

@truls1502
Copy link
Contributor Author

For your own problem with this, you'll probably want to temporarily put the upgrade process into .ddev/web-build/Dockerfile so it just automatically gets 8.3.2

Yes, I am using this solution as temporary until the release next release with this Drush version. 😊

We can noticed others from drush-ops/drush#4253 had similar problem with make.

@ssudhak
Copy link

ssudhak commented May 5, 2022

I am facing this issue 8.4.10. Please confirm if this commit was added to it.

@rfay
Copy link
Member

rfay commented May 5, 2022

The current version of drush8 is 8.4.10 The version shipped in ddev v1.19+ is 8.4.8, but v1.19.2 will have drush8 8.4.10

Drush 8 is obsolete though - you should probably be using something else.

I didn't really understand what you were asking @ssudhak - Were you asking something about drush 8.3.2? Were you requesting an update to 8.4.10?

@ssudhak
Copy link

ssudhak commented May 5, 2022

@rfay , sorry if i confused you. I was getting this error for Drush 8.4.10. Not using ddev. Was browsing throw drush issues in github and ultimately landed here :) . But help me understand here, was the fixes done for this issue in ddev? because if u are going to use 8.4.10, you might be getting same issue.

@rfay
Copy link
Member

rfay commented May 5, 2022

If you're not using ddev... then of course you shouldn't be commenting here. And drush 8 is obsolete. The drush repo is https://github.com/drush-ops/drush - problems with drush should be taken up there.

Again, all ddev projects in the last 2 years have had a higher drush version.

I invite you to the ddev community, https://ddev.readthedocs.io/en/latest/

@nikolay-jobiqo
Copy link

nikolay-jobiqo commented Jun 2, 2022

@rfay thanks a lot for clarification.
I am not able to use Drush 8.4.10 on ddev 1.19.2.
Because at least drush vget is not working.

Is it possible to downgrade drush version back to 8.4.8 for next ddev?

Update: drush v 8.4.11 was just released. And drush vget works for me, we can try to update to 8.4.11.

@rfay
Copy link
Member

rfay commented Jun 2, 2022

You can always install the version of drush you want in a project using a Dockerfile, just add a RUN statement that curls or wgets the version you want. https://ddev.readthedocs.io/en/latest/users/extend/customizing-images/#adding-extra-dockerfiles-for-webimage-and-dbimage

I had hoped that 8.4.11 would also fix

But @nikolay-jobiqo - what version of Drupal are you running drush against?

@nikolay-jobiqo
Copy link

nikolay-jobiqo commented Jun 3, 2022

I am using drush 8.4.11 for Drupal 7.90 from yesterday. PHP 7.4.
Before I was using drush 8.4.8, because it was provided in ddev 1.18 and 1.19.
And was able to run drush make and drush vget. Didn't have any issue with 8.4.8 on my end.

@rfay
Copy link
Member

rfay commented Jun 3, 2022

Thanks. I think I might roll back to drush 8.4.8 in ddev v1.19.3, to be released in the next day or two.

@rfay
Copy link
Member

rfay commented Mar 15, 2023

This seems to be solved upstream now, so Drush will be upgraded to 8.4.12 for D7 in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants