Subject: bug#76955: 30.1; php-ts-mode-php-executable default path may not match remote path

From: Morgan Willcock <[email-masked]>
Date: Thu, 13 Mar 2025 11:26:03 +0000

Vincenzo Pupillo <[email-masked]> writes:

> 'php-ts-mode-php-executable' it's used for 'php-ts-mode-flymake-php',
> 'run-php' and 'php-ts-mode-run-php-webserver'.

It was calling run-php where I initially found the problem.

> @Morgan: Will setting the executable path to "php" work in your scenario?
> Of the functions listed above, which one do you usually use?

Setting the value to "php" is how I use it, because that works
everywhere I need it even though the local and remote setups have
nothing in common.

Just to be clear, the "bug" I am reporting here is that the current
default value seems to assume that the local PHP setup will be identical
to a remote PHP setup, and that falling back to using a full path like
"/usr/bin/php" makes similar and platform specific assumptions.

To work in more places without requiring customisation, I think the
default value should be "php".

I cannot see any benefit in calling executable-find to set the default
value because this seems at odds with using the major mode with TRAMP
connections.

I see little benefit in "/usr/bin/php" as a default fallback value
because it is very likely that the binary would have been automatically
located in /usr/bin if that path exists.

If someone could explain the reasoning behind how the default value is
currently being set, and why that is better than just using the value
"php", feel free to close this bug report.

Thanks,
Morgan

-- 
Morgan Willcock