1
0
Fork 0

Fix formatting breakage

PHP_CodeSniffer 3.0 RC4 introduces a breaking change that removes PHPCS from the composer autoloader. This fix adds a bootstrapping step so that we can invoke the autoloader automatically.
pull/322/head
Sara Itani 2017-03-01 18:06:11 -08:00
parent 56bd465bf8
commit 3773a2da0a
3 changed files with 8 additions and 2 deletions

View File

@ -47,7 +47,8 @@
"LanguageServer\\": "src/" "LanguageServer\\": "src/"
}, },
"files" : [ "files" : [
"src/utils.php" "src/utils.php",
"src/boostrap.php"
] ]
}, },
"autoload-dev": { "autoload-dev": {

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"> <phpunit bootstrap="src/bootstrap.php">
<testsuites> <testsuites>
<testsuite name="PHP Language Server Test Suite"> <testsuite name="PHP Language Server Test Suite">
<directory>./tests</directory> <directory>./tests</directory>

5
src/bootstrap.php Normal file
View File

@ -0,0 +1,5 @@
<?php
// PHP_CodeSniffer does not define an autoloader in its composer.json,
// so we must invoke it ourselves.
require __DIR__ . "/../vendor/squizlabs/php_codesniffer/autoload.php";