emacs-php / php-mode

A powerful and flexible Emacs major mode for editing PHP scripts
GNU General Public License v3.0
580 stars 118 forks source link

Skip PHP8.1 tests when exec is not found #689

Closed sten0 closed 2 years ago

sten0 commented 2 years ago

Hi, I had to add this patch to the Debian package when PHP8.1 was still in beta, but I've decided to retain it so that self-tests can still run, and pass, successfully on systems that don't have PHP8.1. For example, this allows Ubuntu's CI to pass if someone updates the package in one of their LTS releases.

zonuexe commented 2 years ago

@sten0 I'm sorry I missed your PR for a long time.

However, PHP Mode testing doesn't depend on the PHP runtime, so this patch doesn't seem to be needed for any environment.

Please reopen this PR if necessary. I am always grateful to you and the Debian team. Thanks!

sten0 commented 2 years ago

@zonuexe, you're right :-)

When packaging the latest release, builds began to fail with a message like "php8.1 exec not found", so I hypothesised that this test was most likely to be something that calls that exec. Later I discovered the build had been substantially restructured and had to make many adjustments or workarounds. I trust that you had good reasons to make these changes, but selfishly hope these kind of changes will be rare in the future ;-) Oh, and thank you for the enhanced test coverage and functional tests--they're totally worthwhile!

The workarounds are because Debian's build servers and CI are extremely strict (ie: build tests are from the software installed to the stage area, CI is of the package as-installed-system-wide, both in RO mode unless an auxiliary workspace is created/configured...it doesn't effect php-mode mode, but non-localhost net access is also forbidden)

At any rate, the adjustment/workarounds were what actually solved the bizarre "php8.1 exec not found" error, and I just confirmed that my patch can be dropped. Thank you for correcting the error of my ways, and no worries about the delay; We live in strange times. 'hope this message finds you well, and Happy New Year!