Skip to content

Commit

Permalink
Check for attempts at using old versions of PHP, and fail fast with a…
Browse files Browse the repository at this point in the history
…n error.
  • Loading branch information
greg-1-anderson committed Dec 16, 2024
1 parent 6687c21 commit 56e985d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/3x.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Terminus 3.x
name: Terminus 4.x
on:
push:
schedule:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ A PHAR file must also be built before running tests.

The functional test files are in the `tests/Functional` directory.

The Terminus 3.x functional tests can be run via:
The Terminus 4.x functional tests can be run via:

```bash
cd /install/location/terminus
Expand Down
4 changes: 2 additions & 2 deletions bin/terminus
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// Unset memory limit
ini_set('memory_limit', -1);

if (version_compare(PHP_VERSION, '7.4.0', '<') === true) {
if (version_compare(PHP_VERSION, '8.2.0', '<') === true) {
fwrite(STDERR, "\n");
fwrite(STDERR, 'Sorry, your PHP version (' . PHP_VERSION . ') is no longer supported.' . "\n");
fwrite(STDERR, 'Upgrade to PHP 7.4 or newer to use Terminus 3. For PHP versions prior to 7.4, downgrade to Terminus 2.x.' . "\n\n");
fwrite(STDERR, 'Upgrade to PHP 8.2 or newer to use Terminus 4. For PHP versions prior to 8.2, downgrade to Terminus 3.x.' . "\n\n");
fwrite(STDERR, 'For more information, see https://pantheon.io/docs/terminus/updates#php-version-compatibility-matrix' . "\n\n");
exit(1);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/Self/Plugin/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function migrate()
return;
}

// Get installed Terminus 3 plugins.
// Get installed Terminus 4 plugins.
$plugins = $this->getPluginProjects();
$t3projects = array_filter(
array_map(
Expand Down

0 comments on commit 56e985d

Please sign in to comment.