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

Error of "[preflight] Unable to parse at line 2 (near "<?php")." when trying to run remote:drush commands #1849

Open
alphex opened this issue Apr 19, 2018 · 12 comments

Comments

@alphex
Copy link

alphex commented Apr 19, 2018

Expected behavior

Running terminus remote:drush sitename.dev uli should get me a login URL for admin.

Actual behavior

It errors out with [preflight] Unable to parse at line 2 (near "<?php").

Steps to reproduce the behavior

None that I can document. Its just happening.

This is a D8 site in question(updated to 8.5.2), and I'm able to run the same command successfully on another D852 site.

@aaron-capellic
Copy link

I see this on a site without using terminus, just drush. Maybe not terminus related.

@dirtystylus
Copy link

dirtystylus commented May 9, 2018

@alphex Just ran into this myself — so far I don’t have any other info besides the fact that my colleague and I had a ton of composer-related issues with our vendor folder. Did you manage to isolate/replicate this?

FWIW I do not have issues with the same site running on a local lando instance — drush executes cleanly

@alphex
Copy link
Author

alphex commented May 9, 2018 via email

@dirtystylus
Copy link

@alphex Ah! Ty Duran

@dirtystylus
Copy link

@alphex Downgrading to 8.1.16 solved this. I tried:

composer remove drush/drush

but that failed.

I had to manually change my composer.json and run composer update. Not sure that was proper, but it worked after I pushed code to Pantheon.

@greg-1-anderson
Copy link
Member

The status of Drush 8 for Drupal 8.4+ is "happens to work". Depending on what happens in Drupal core, it may or may not be possible for Drush 8 to continue to work e.g with Drupal 8.6+. It is also possible that a contrib module could become incompatible with Drush 8, depending on what APIs it uses.

Work is underway to improve support for Drush 9 on Pantheon. It will probably be a while yet before Drush 9 is fully supported on Pantheon.

@cnovak
Copy link

cnovak commented Aug 1, 2019

Is there an update on this issue? I used drupal-composer/drupal-project to bring up a Drupal 8 site on Pantheon and terminus remote:drush sitename.dev -- uli works correctly. Like @alphex pointed out, Drush 8 is not recommended on newer versions of Drupal 8.

@greg-1-anderson
Copy link
Member

@cnovak
Copy link

cnovak commented Aug 6, 2019

The actual issue is that we are trying to figure out how to get our distribution to run on Pantheon.io, but keep our distribution up to date w/latest dependencies. It seems to run fine with Drush 9, so wondering if Drush 9 is supported yet, and if not if it is being worked on.

@greg-1-anderson
Copy link
Member

Drupal 8 is supported on Pantheon; however, combining Drops-8 in a distribution can be tricky. Again, I would use https://github.com/pantheon-systems/example-drops-8-composer as a starting point. I would recommend looking at a couple of examples:

Note that these examples are old / out-of-date / not maintained. You'll need to start with the latest example-drops-8-composer template and update per those examples.

Drupal 8.8.0 will make it much easier to make a Drupal 8 site with Pantheon + profile additions, but the needed bits have not all been committed to 8.8.x-dev yet.

If you want to chat about any issues specific to your use-case, hit me up on slack (@greg).

@cnovak
Copy link

cnovak commented Aug 6, 2019

Sorry @greg-1-anderson , meant to say "Drush 9", I updated my comment. Thanks for the update however on "making Drupal 8 site + profile additions". That is another problem I am facing, but did not mean to take over this issue w/separate discussion.

@greg-1-anderson
Copy link
Member

Drush 9 is essentially at a functional level on Pantheon right now. The main things that are outstanding is alias file generation and of course updated documentation. Drupal sites using Drush 9 should pretty much work on the platform at this point.

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

No branches or pull requests

6 participants