While using terminus (1.8.0) with a local lando environment connected to a Pantheon sandbox I ran into an error:
[preflight] Unable to parse at line 2 (near "<?php"). Looking in the terminus repo issue queue I noticed that the error was documented here by Duran Goodyear. Duran noted that Pantheon does not (yet) support drush version 9, which is what you get these days if you run composer (
composer require drush/drush) on your project. If you push that up you will get the error if you try to run any terminus commands.
What solved things was to downgrade drush in my local lando instance to the drush 8.1.x version. Pushing the codebase with that version of drush in the vendor folder resolved the terminus errors. (In my case I had to manually change the drush version in my composer.json file, since running
composer remove drush/drush didn’t work).