Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"LanguageServer\\": "src/"
},
"files" : [
"src/utils.php"
"src/utils.php",
"src/bootstrap.php"
]
},
"autoload-dev": {
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php">
<phpunit bootstrap="src/bootstrap.php">
<testsuites>
<testsuite name="PHP Language Server Test Suite">
<directory>./tests</directory>
Expand Down
5 changes: 5 additions & 0 deletions src/bootstrap.php
Original file line number Diff line number Diff line change
@@ -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";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't it miss to include the "regular" vendor/autoload.php now?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm a bit worried we are coupling ourselves to the CodeSniffer autoloader here. So far, I only had problems with it and passing CodeSniffer a string to format while we already have an AST for the document is less than ideal

Copy link
Contributor Author

@mousetraps mousetraps Mar 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other option is just locking to the RC3 release, which is not broken.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was at the time a reason why I had to depend on the unstable version, it had an important bug fix - maybe it's fixed now in the most recent RC, might be worth to try out

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, just saw that I do not depend on the unstable version anymore:

        "squizlabs/php_codesniffer" : "^3.0",

I wonder how the breaking change got in there then, as preferStable is set?
Anyway, if it fixes it and tests pass I would prefer to lock the most recent version that works

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because there aren't any stable versions for 3.0 yet (2.x is the current stable version)