Skip to content

Commit

Permalink
feat: supports php 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
kokororin committed Sep 5, 2023
1 parent bc9a69a commit 394d452
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, windows-latest]
php-version: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
name: Test on ${{ matrix.os }} & PHP ${{ matrix.php-version }}
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The missing phpfmt extension for Visual Studio Code.

Open command palette `F1` and select `Extensions: Install Extension`, then search for phpfmt.

**Note**: PHP 7.x or newer is required in the machine to run this plugin.
**Note**: PHP 5.6 or newer is required in the machine to run this plugin.


## Usage
Expand Down
4 changes: 2 additions & 2 deletions src/PHPFmt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ export class PHPFmt {
throw new PHPFmtError('PHP version < 5.6 or > 8.0');
}
} else {
if (semver.lt(phpVersion, '7.0.0')) {
throw new PHPFmtError('PHP version < 7 is not supported');
if (semver.lt(phpVersion, '5.6.0') || semver.gt(phpVersion, '8.3.0')) {
throw new PHPFmtError('PHP version < 5.6 or > 8.3');
}
}
} catch (err) {
Expand Down

0 comments on commit 394d452

Please sign in to comment.