Try to detect when mismatched SAPI versions (i.e. CLI versus web-side) are in-use
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
In a traditional PHP deployment, the PHP CLI binary version should match the web facing PHP SAPI version. However it's common to have multiple versions of PHP binaries available. This can lead to different versions of PHP being called for CLI modes (i.e. all background jobs + occ).
PHP version mismatches between the CLI SAPI and the web-side SAPI could introduce unexpected behavior differences for code that runs via CLI.
We can probably add a setup check for this.
Implementation idea:
Whenever we're invoked from the CLI, we can check and store a CLI SAPI version fingerprint. Periodically we could do the same on the web-side. Then a setup check can easily retrieve these for comparison.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing setup-check entry point and the CLI and web-side SAPI entry points. Determine how each context could expose a PHP version fingerprint, then compare them in the setup check. Done means a mismatch is detected and reported while matching versions do not trigger the warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100