-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
Description of the need
It doesn't happen often, but sometimes a syntax error sneaks in.
It can be a more obvious one that only got overlooked in a very big PR, for instance in an automated test. It can be a more subtle one, that only strikes on older PHP versions (short array syntax, using empty() with non-variables...) (the oldest officially supported PHP version is now 5.6.)
Anyway, it would be so easy to prevent that by simply running php -l on all changed files, for the oldest and newest PHP Backdrop supports.
Additional information
Not sure if this works as-is in the runners, but here's a simple bash one-liner that works for me locally:
git diff --name-only 1.x... | while read LINE; do php -l $LINE; done;
Feedback is welcome. 😃
Reactions are currently unavailable
Metadata
Metadata
Assignees
Type
Projects
Status
Proposed