Skip to content

Commit 0887237

Browse files
authored
Merge pull request #41 from SublimeLinter/deprecate-cmd-setting
Deprecate 'cmd' setting
2 parents 8610a2c + 16a0d47 commit 0887237

4 files changed

Lines changed: 22 additions & 18 deletions

File tree

README.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,6 @@ To install `php`, download and run the appropriate installer: [Linux/OS X](http:
1919
Please make sure that the path to `php` is available to SublimeLinter.
2020
The docs cover [troubleshooting PATH configuration](http://sublimelinter.com/en/latest/troubleshooting.html#finding-a-linter-executable).
2121

22-
#### Specific Executable
23-
It is possible to specify the `php` executable that should be used to lint your code, taking precedence over the executable available in your PATH.
24-
25-
##### Example:
26-
27-
```json
28-
{
29-
"SublimeLinter": {
30-
"linters": {
31-
"php": {
32-
"cmd": "/path/to/php"
33-
}
34-
}
35-
}
36-
}
37-
```
38-
3922

4023
## Settings
4124

linter.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@
1010

1111
"""This module exports the PHP plugin class."""
1212

13+
import logging
1314
from SublimeLinter.lint import Linter, util
1415

1516

17+
logger = logging.getLogger('SublimeLinter.plugin.eslint')
18+
19+
1620
class PHP(Linter):
1721
"""Provides an interface to php -l."""
1822

@@ -38,6 +42,8 @@ def cmd(self):
3842
settings = Linter.get_view_settings(self)
3943

4044
if 'cmd' in settings:
45+
logger.warning('The setting `cmd` has been deprecated. '
46+
'Use `executable` instead.')
4147
command = [settings.get('cmd')]
4248
else:
4349
command = ['php']

messages.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"install": "messages/install.txt",
3-
"1.1.0": "messages/1.1.0.txt"
3+
"1.1.0": "messages/1.1.0.txt",
4+
"1.2.1": "messages/1.2.1.txt"
45
}

messages/1.2.1.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
SublimeLinter-php 1.2.1
2+
---------------------------
3+
4+
The 'cmd' setting has been deprecated. The new name for the same thing is 'executable' which is the common name for all linters in SublimeLinter land.
5+
6+
{
7+
"SublimeLinter": {
8+
"linters": {
9+
"php": {
10+
"executable": "/path/to/php"
11+
}
12+
}
13+
}
14+
}

0 commit comments

Comments
 (0)