The problem was that the php command on my host machine was not running the CLI version of php. When I run the command php-cli artisan list
then I get the expected list of Laravel artisan commands.
To get composer to call this properly, then, I just had to update the 'scripts' section in my composer.json to use php-cli
instead of plain php
.
(As a side note, composer had been spitting out a similar warning with this message: Warning: Composer should be invoked via the CLI version of PHP, not the cgi-fcgi SAPI
)