fix: bump PHP version requirement to 7.1
PHP 7.0 reached end of life: https://www.php.net/supported-versions.php Fixes #447pull/438/head
parent
7281961bde
commit
18c03ef974
|
@ -1,7 +1,7 @@
|
||||||
language: php
|
language: php
|
||||||
|
|
||||||
php:
|
php:
|
||||||
- '7.0'
|
- '7.1'
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
|
@ -23,7 +23,7 @@ jobs:
|
||||||
include:
|
include:
|
||||||
- stage: test
|
- stage: test
|
||||||
- stage: release
|
- stage: release
|
||||||
php: '7.0'
|
php: '7.1'
|
||||||
install:
|
install:
|
||||||
- npm install
|
- npm install
|
||||||
- composer install --prefer-dist --no-interaction --optimize-autoloader
|
- composer install --prefer-dist --no-interaction --optimize-autoloader
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"prefer-stable": true,
|
"prefer-stable": true,
|
||||||
"config": {
|
"config": {
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": "7.0.25"
|
"php": "7.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "6ed459a7ca4ebd4f2b24f3881ca1d1d0",
|
"content-hash": "9c2828a729b23a2d11872a4acf98a8e5",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "composer/xdebug-handler",
|
"name": "composer/xdebug-handler",
|
||||||
|
@ -343,35 +343,33 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpdocumentor/reflection-common",
|
"name": "phpdocumentor/reflection-common",
|
||||||
"version": "1.0.1",
|
"version": "2.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
|
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
|
||||||
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
|
"reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
|
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a",
|
||||||
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
|
"reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.5"
|
"php": ">=7.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^4.6"
|
"phpunit/phpunit": "~6"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.0.x-dev"
|
"dev-master": "2.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"phpDocumentor\\Reflection\\": [
|
"phpDocumentor\\Reflection\\": "src/"
|
||||||
"src"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
@ -393,7 +391,7 @@
|
||||||
"reflection",
|
"reflection",
|
||||||
"static analysis"
|
"static analysis"
|
||||||
],
|
],
|
||||||
"time": "2017-09-11T18:02:19+00:00"
|
"time": "2018-08-07T13:53:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpdocumentor/reflection-docblock",
|
"name": "phpdocumentor/reflection-docblock",
|
||||||
|
@ -448,30 +446,31 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpdocumentor/type-resolver",
|
"name": "phpdocumentor/type-resolver",
|
||||||
"version": "0.5.1",
|
"version": "1.0.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
||||||
"reference": "cf842904952e64e703800d094cdf34e715a8a3ae"
|
"reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/cf842904952e64e703800d094cdf34e715a8a3ae",
|
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9",
|
||||||
"reference": "cf842904952e64e703800d094cdf34e715a8a3ae",
|
"reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.0",
|
"php": "^7.1",
|
||||||
"phpdocumentor/reflection-common": "^1.0"
|
"phpdocumentor/reflection-common": "^2.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"mockery/mockery": "^1.0",
|
"ext-tokenizer": "^7.1",
|
||||||
"phpunit/phpunit": "^6.4"
|
"mockery/mockery": "~1",
|
||||||
|
"phpunit/phpunit": "^7.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.0.x-dev"
|
"dev-master": "1.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -489,7 +488,8 @@
|
||||||
"email": "me@mikevanriel.com"
|
"email": "me@mikevanriel.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2017-12-30T13:23:38+00:00"
|
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
|
||||||
|
"time": "2019-08-22T18:11:29+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/log",
|
"name": "psr/log",
|
||||||
|
@ -859,6 +859,6 @@
|
||||||
"platform": [],
|
"platform": [],
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"platform-overrides": {
|
"platform-overrides": {
|
||||||
"php": "7.0.25"
|
"php": "7.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import * as semver from 'semver'
|
||||||
import * as url from 'url'
|
import * as url from 'url'
|
||||||
import * as vscode from 'vscode'
|
import * as vscode from 'vscode'
|
||||||
import { LanguageClient, LanguageClientOptions, StreamInfo } from 'vscode-languageclient'
|
import { LanguageClient, LanguageClientOptions, StreamInfo } from 'vscode-languageclient'
|
||||||
|
const composerJson = require('../composer.json')
|
||||||
|
|
||||||
export async function activate(context: vscode.ExtensionContext): Promise<void> {
|
export async function activate(context: vscode.ExtensionContext): Promise<void> {
|
||||||
const conf = vscode.workspace.getConfiguration('php')
|
const conf = vscode.workspace.getConfiguration('php')
|
||||||
|
@ -58,8 +59,8 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
|
||||||
if (!/^\d+.\d+.\d+$/.test(version)) {
|
if (!/^\d+.\d+.\d+$/.test(version)) {
|
||||||
version = version.replace(/(\d+.\d+.\d+)/, '$1-')
|
version = version.replace(/(\d+.\d+.\d+)/, '$1-')
|
||||||
}
|
}
|
||||||
if (semver.lt(version, '7.0.0')) {
|
if (semver.lt(version, composerJson.config.platform.php)) {
|
||||||
vscode.window.showErrorMessage('The language server needs at least PHP 7 installed. Version found: ' + version)
|
vscode.window.showErrorMessage('The language server needs at least PHP 7.1 installed. Version found: ' + version)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue