Skip to content

Commit

Permalink
fix: bump PHP version requirement to 7.1
Browse files Browse the repository at this point in the history
PHP 7.0 reached end of life: https://www.php.net/supported-versions.php

Fixes #447
  • Loading branch information
felixfbecker committed Sep 20, 2019
1 parent 7281961 commit 18c03ef
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: php

php:
- '7.0'
- '7.1'

cache:
directories:
Expand All @@ -23,7 +23,7 @@ jobs:
include:
- stage: test
- stage: release
php: '7.0'
php: '7.1'
install:
- npm install
- composer install --prefer-dist --no-interaction --optimize-autoloader
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"prefer-stable": true,
"config": {
"platform": {
"php": "7.0.25"
"php": "7.1.0"
}
},
"require": {
Expand Down
46 changes: 23 additions & 23 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as semver from 'semver'
import * as url from 'url'
import * as vscode from 'vscode'
import { LanguageClient, LanguageClientOptions, StreamInfo } from 'vscode-languageclient'
const composerJson = require('../composer.json')

export async function activate(context: vscode.ExtensionContext): Promise<void> {
const conf = vscode.workspace.getConfiguration('php')
Expand Down Expand Up @@ -58,8 +59,8 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
if (!/^\d+.\d+.\d+$/.test(version)) {
version = version.replace(/(\d+.\d+.\d+)/, '$1-')
}
if (semver.lt(version, '7.0.0')) {
vscode.window.showErrorMessage('The language server needs at least PHP 7 installed. Version found: ' + version)
if (semver.lt(version, composerJson.config.platform.php)) {
vscode.window.showErrorMessage('The language server needs at least PHP 7.1 installed. Version found: ' + version)
return
}

Expand Down

0 comments on commit 18c03ef

Please sign in to comment.