2016-01-07 18:33:37 -05:00
|
|
|
{
|
2016-11-21 17:08:17 -05:00
|
|
|
"name": "vimeo/psalm",
|
|
|
|
"description": "A static analysis tool for finding errors in PHP applications",
|
2016-01-07 18:33:37 -05:00
|
|
|
"keywords": ["php", "code", "inspection"],
|
|
|
|
"type": "library",
|
2016-11-21 17:08:17 -05:00
|
|
|
"license": "MIT",
|
2016-01-07 18:33:37 -05:00
|
|
|
"authors": [
|
|
|
|
{
|
|
|
|
"name": "Matthew Brown"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"require": {
|
2019-09-18 20:03:12 +01:00
|
|
|
"php": "^7.1.3",
|
2019-11-08 12:18:28 -05:00
|
|
|
"nikic/php-parser": "4.2.*",
|
2019-06-06 10:31:29 +01:00
|
|
|
"openlss/lib-array2xml": "^1.0",
|
2019-05-16 18:36:36 -04:00
|
|
|
"ocramius/package-versions": "^1.2",
|
2018-10-17 15:52:26 -04:00
|
|
|
"composer/xdebug-handler": "^1.1",
|
2019-07-01 21:54:33 +02:00
|
|
|
"felixfbecker/language-server-protocol": "^1.4",
|
2018-10-17 15:52:26 -04:00
|
|
|
"felixfbecker/advanced-json-rpc": "^3.0.3",
|
|
|
|
"netresearch/jsonmapper": "^1.0",
|
|
|
|
"webmozart/glob": "^4.1",
|
Plugin loading (#855)
* add ability to load plugins by class names
- Plugins need to implement `__invoke(PluginFacade $psalm):void` method
- Plugins are enabled by adding `<pluginClass
class="Qualified\Class\Name"/>`
- `PluginFacade` provides a single point of contact with Psalm, so that
plugins cannot become coupled to Psalm internals
* added `psalm-plugin` cli tool to manage plugins
Available commands:
`psalm-plugin list` - lists available and enabled plugins
`psalm-plugin enable 'Plugin\Class\Name'` - enables plugin (modifies `psalm.xml`)
`psalm-plugin disable 'Plugin\Class\Name'` - disables plugin (modifies `psalm.xml`)
Plugin installation:
`composer install plugin-vendor/plugin-package-name`
Plugin authoring:
Plugins are identified by package `type` field, which should contain
`psalm-plugin` string.
`extra.pluginClass` should refer to the name of the class implementing
`__invoke(PluginFacade $psalm):void` function
Todo:
- better config file search
- better output for `psalm-plugin`
- better formatting for modified xml file
- composer skeleton project for plugins
- ability to refer to plugins by package name (cli only)
- composer plugin to (optionally) enable plugin upon installation
- documentation on plugin installation and authoring
- interfaces for plugin dependencies
- interface for plugin entry point
- migration path for legacy plugins
* documented previously undocumented plugin methods
* split legacy plugin registration into a wrapper class
also added `PluginApi` namespace and `RegistrationInterface`
* reuse psalm's config search algorithm
* enable/disable plugins by composer package name
* allow specifying alternative config file name
* whitelist PluginApi namespace
three times, but well, it works now
* interface for plugin entry points
* psalm-plugin as a symfony console app
* fixed errors found by psalm
* suppressed false positive UnusedMethods
* cs fix
* better psalm-plugin output
* don't leave empty `plugins` node to avoid old schema violation
* removed junk file that shouldn't be there
* cs fix
* fixed phpunit failure (constant redefinition)
* work around missing docblock in on symfony console
* php 7.0 compatibility
* allow `pluginClass` child elements as plugin configuration
* decouple console commands from undelying implementation
- introduce PluginListFactory
- add `PluginList::enable(string $class)` and `PluginList::disable(string $class)`
* PluginList tests
* ComposerLock test
* droppped debugging statement
* added part of console command tests
* added tests for EnableCommand
* added DisableCommand tests
* ignore unused args
* ConfigFile test
* disable travis cache in attempt to fix builds
* nah, that didn't work
* update for upstream changes
* rebase fixes
* namespaced `extra` entry for entry point
* s/PluginFacade/PluginRegistrationSocket/g
* Added $config parameter to PluginEntryPointInterface::__invoke()
* cs fixes
* entry point interface php7.0 compatibility
* cleaned up old cruft
- dropped todos I'm not going to pursues
- locked entry point to be a class implementing entry point interface
* fixed legacy plugins docs
* Added RegistrationInterface::registerHooksFromClass()
It mimics the way old plugins were registered in Psalm\Config, so
handler classes extending Psalm\Plugin should be fully compatible with
it.
Since Psalm\Plugin-style plugin registration was moved to
RegistrationSocket, LegacyPlugin now only load file-based plugins, so it
was renamed to FileBasedPluginAdapter.
* Converted EchoChecker plugin to composer-based format
- Its subfolder is registered as a local composer package in the root
composer.json, so it's directly installable with
```
composer require psalm/echo-checker-plugin
```
- Migration is trivial: drop the plugin into a separate folder, then add
simple composer.json and the entry point class.
* Updated docs
* Don't reject hook handlers that inherit handling methods
* strip void return type in stub file
2018-11-11 06:23:36 +02:00
|
|
|
"webmozart/path-util": "^2.3",
|
2019-06-04 19:14:12 -04:00
|
|
|
"symfony/console": "^3.3||^4.0",
|
2019-02-05 19:00:13 -06:00
|
|
|
"amphp/amp": "^2.1",
|
2019-03-07 14:56:18 -05:00
|
|
|
"amphp/byte-stream": "^1.5",
|
2019-05-17 11:26:44 -04:00
|
|
|
"sebastian/diff": "^3.0"
|
2016-01-07 18:33:37 -05:00
|
|
|
},
|
2019-06-10 14:01:47 -04:00
|
|
|
"bin": ["psalm", "psalter", "psalm-language-server", "psalm-plugin", "psalm-refactor"],
|
2016-01-07 18:33:37 -05:00
|
|
|
"autoload": {
|
|
|
|
"psr-4": {
|
2018-11-12 17:11:08 +02:00
|
|
|
"Psalm\\Plugin\\": "src/Psalm/Plugin",
|
2016-07-25 18:37:44 -04:00
|
|
|
"Psalm\\": "src/Psalm"
|
2019-06-01 15:26:22 +03:00
|
|
|
},
|
|
|
|
"files": [
|
|
|
|
"src/functions.php"
|
|
|
|
]
|
2016-04-03 19:47:06 -04:00
|
|
|
},
|
|
|
|
"autoload-dev": {
|
|
|
|
"psr-4": {
|
2016-10-20 11:51:45 -04:00
|
|
|
"Psalm\\Tests\\": "tests"
|
2016-01-07 18:33:37 -05:00
|
|
|
}
|
2016-10-20 11:54:55 -04:00
|
|
|
},
|
2017-11-11 12:11:11 -05:00
|
|
|
"config": {
|
|
|
|
"optimize-autoloader": true
|
|
|
|
},
|
2018-10-17 15:52:26 -04:00
|
|
|
"minimum-stability": "dev",
|
|
|
|
"prefer-stable": true,
|
2016-10-20 11:54:55 -04:00
|
|
|
"require-dev": {
|
2019-05-16 19:05:27 -04:00
|
|
|
"phpunit/phpunit": "^7.5 || ^8.0",
|
2019-03-19 11:46:51 -04:00
|
|
|
"squizlabs/php_codesniffer": "3.4.0",
|
2019-03-01 23:37:55 +02:00
|
|
|
"bamarni/composer-bin-plugin": "^1.2",
|
2019-06-01 20:06:36 -04:00
|
|
|
"psalm/plugin-phpunit": "^0.6",
|
2019-06-16 20:56:00 +01:00
|
|
|
"phpmyadmin/sql-parser": "^5.0",
|
2019-06-26 22:52:29 +02:00
|
|
|
"symfony/process": "^4.3",
|
2019-07-05 16:24:00 -04:00
|
|
|
"slevomat/coding-standard": "^5.0",
|
2019-09-12 21:41:21 +01:00
|
|
|
"friendsofphp/php-cs-fixer": "^2.15",
|
|
|
|
"ext-curl": "*"
|
2016-10-20 11:54:55 -04:00
|
|
|
},
|
2018-02-19 11:14:07 -05:00
|
|
|
"suggest": {
|
2018-02-19 11:16:13 -05:00
|
|
|
"ext-igbinary": "^2.0.5"
|
2018-02-19 11:14:07 -05:00
|
|
|
},
|
2016-10-20 11:54:55 -04:00
|
|
|
"scripts": {
|
2018-02-19 09:20:34 -08:00
|
|
|
"psalm": "./psalm --find-dead-code",
|
|
|
|
"standards": "phpcs",
|
2017-05-26 23:26:14 +01:00
|
|
|
"tests": [
|
2018-02-19 09:20:34 -08:00
|
|
|
"phpcs",
|
|
|
|
"phpunit"
|
|
|
|
],
|
|
|
|
"all-tests": [
|
|
|
|
"phpcs",
|
|
|
|
"./psalm --find-dead-code",
|
2017-05-26 23:26:14 +01:00
|
|
|
"phpunit"
|
|
|
|
]
|
2018-07-10 12:14:28 +09:00
|
|
|
},
|
|
|
|
"extra": {
|
|
|
|
"branch-alias": {
|
2018-11-18 17:42:26 -05:00
|
|
|
"dev-master": "3.x-dev",
|
2018-11-20 15:51:47 -05:00
|
|
|
"dev-2.x": "2.x-dev",
|
2018-07-10 12:14:28 +09:00
|
|
|
"dev-1.x": "1.x-dev"
|
|
|
|
}
|
2018-07-10 11:01:05 -04:00
|
|
|
},
|
|
|
|
"provide": {
|
2018-07-10 11:39:38 -04:00
|
|
|
"psalm/psalm": "self.version"
|
Plugin loading (#855)
* add ability to load plugins by class names
- Plugins need to implement `__invoke(PluginFacade $psalm):void` method
- Plugins are enabled by adding `<pluginClass
class="Qualified\Class\Name"/>`
- `PluginFacade` provides a single point of contact with Psalm, so that
plugins cannot become coupled to Psalm internals
* added `psalm-plugin` cli tool to manage plugins
Available commands:
`psalm-plugin list` - lists available and enabled plugins
`psalm-plugin enable 'Plugin\Class\Name'` - enables plugin (modifies `psalm.xml`)
`psalm-plugin disable 'Plugin\Class\Name'` - disables plugin (modifies `psalm.xml`)
Plugin installation:
`composer install plugin-vendor/plugin-package-name`
Plugin authoring:
Plugins are identified by package `type` field, which should contain
`psalm-plugin` string.
`extra.pluginClass` should refer to the name of the class implementing
`__invoke(PluginFacade $psalm):void` function
Todo:
- better config file search
- better output for `psalm-plugin`
- better formatting for modified xml file
- composer skeleton project for plugins
- ability to refer to plugins by package name (cli only)
- composer plugin to (optionally) enable plugin upon installation
- documentation on plugin installation and authoring
- interfaces for plugin dependencies
- interface for plugin entry point
- migration path for legacy plugins
* documented previously undocumented plugin methods
* split legacy plugin registration into a wrapper class
also added `PluginApi` namespace and `RegistrationInterface`
* reuse psalm's config search algorithm
* enable/disable plugins by composer package name
* allow specifying alternative config file name
* whitelist PluginApi namespace
three times, but well, it works now
* interface for plugin entry points
* psalm-plugin as a symfony console app
* fixed errors found by psalm
* suppressed false positive UnusedMethods
* cs fix
* better psalm-plugin output
* don't leave empty `plugins` node to avoid old schema violation
* removed junk file that shouldn't be there
* cs fix
* fixed phpunit failure (constant redefinition)
* work around missing docblock in on symfony console
* php 7.0 compatibility
* allow `pluginClass` child elements as plugin configuration
* decouple console commands from undelying implementation
- introduce PluginListFactory
- add `PluginList::enable(string $class)` and `PluginList::disable(string $class)`
* PluginList tests
* ComposerLock test
* droppped debugging statement
* added part of console command tests
* added tests for EnableCommand
* added DisableCommand tests
* ignore unused args
* ConfigFile test
* disable travis cache in attempt to fix builds
* nah, that didn't work
* update for upstream changes
* rebase fixes
* namespaced `extra` entry for entry point
* s/PluginFacade/PluginRegistrationSocket/g
* Added $config parameter to PluginEntryPointInterface::__invoke()
* cs fixes
* entry point interface php7.0 compatibility
* cleaned up old cruft
- dropped todos I'm not going to pursues
- locked entry point to be a class implementing entry point interface
* fixed legacy plugins docs
* Added RegistrationInterface::registerHooksFromClass()
It mimics the way old plugins were registered in Psalm\Config, so
handler classes extending Psalm\Plugin should be fully compatible with
it.
Since Psalm\Plugin-style plugin registration was moved to
RegistrationSocket, LegacyPlugin now only load file-based plugins, so it
was renamed to FileBasedPluginAdapter.
* Converted EchoChecker plugin to composer-based format
- Its subfolder is registered as a local composer package in the root
composer.json, so it's directly installable with
```
composer require psalm/echo-checker-plugin
```
- Migration is trivial: drop the plugin into a separate folder, then add
simple composer.json and the entry point class.
* Updated docs
* Don't reject hook handlers that inherit handling methods
* strip void return type in stub file
2018-11-11 06:23:36 +02:00
|
|
|
},
|
|
|
|
"repositories": [
|
|
|
|
{
|
|
|
|
"type": "path",
|
2018-11-14 09:05:12 +02:00
|
|
|
"url": "examples/plugins/composer-based/echo-checker"
|
Plugin loading (#855)
* add ability to load plugins by class names
- Plugins need to implement `__invoke(PluginFacade $psalm):void` method
- Plugins are enabled by adding `<pluginClass
class="Qualified\Class\Name"/>`
- `PluginFacade` provides a single point of contact with Psalm, so that
plugins cannot become coupled to Psalm internals
* added `psalm-plugin` cli tool to manage plugins
Available commands:
`psalm-plugin list` - lists available and enabled plugins
`psalm-plugin enable 'Plugin\Class\Name'` - enables plugin (modifies `psalm.xml`)
`psalm-plugin disable 'Plugin\Class\Name'` - disables plugin (modifies `psalm.xml`)
Plugin installation:
`composer install plugin-vendor/plugin-package-name`
Plugin authoring:
Plugins are identified by package `type` field, which should contain
`psalm-plugin` string.
`extra.pluginClass` should refer to the name of the class implementing
`__invoke(PluginFacade $psalm):void` function
Todo:
- better config file search
- better output for `psalm-plugin`
- better formatting for modified xml file
- composer skeleton project for plugins
- ability to refer to plugins by package name (cli only)
- composer plugin to (optionally) enable plugin upon installation
- documentation on plugin installation and authoring
- interfaces for plugin dependencies
- interface for plugin entry point
- migration path for legacy plugins
* documented previously undocumented plugin methods
* split legacy plugin registration into a wrapper class
also added `PluginApi` namespace and `RegistrationInterface`
* reuse psalm's config search algorithm
* enable/disable plugins by composer package name
* allow specifying alternative config file name
* whitelist PluginApi namespace
three times, but well, it works now
* interface for plugin entry points
* psalm-plugin as a symfony console app
* fixed errors found by psalm
* suppressed false positive UnusedMethods
* cs fix
* better psalm-plugin output
* don't leave empty `plugins` node to avoid old schema violation
* removed junk file that shouldn't be there
* cs fix
* fixed phpunit failure (constant redefinition)
* work around missing docblock in on symfony console
* php 7.0 compatibility
* allow `pluginClass` child elements as plugin configuration
* decouple console commands from undelying implementation
- introduce PluginListFactory
- add `PluginList::enable(string $class)` and `PluginList::disable(string $class)`
* PluginList tests
* ComposerLock test
* droppped debugging statement
* added part of console command tests
* added tests for EnableCommand
* added DisableCommand tests
* ignore unused args
* ConfigFile test
* disable travis cache in attempt to fix builds
* nah, that didn't work
* update for upstream changes
* rebase fixes
* namespaced `extra` entry for entry point
* s/PluginFacade/PluginRegistrationSocket/g
* Added $config parameter to PluginEntryPointInterface::__invoke()
* cs fixes
* entry point interface php7.0 compatibility
* cleaned up old cruft
- dropped todos I'm not going to pursues
- locked entry point to be a class implementing entry point interface
* fixed legacy plugins docs
* Added RegistrationInterface::registerHooksFromClass()
It mimics the way old plugins were registered in Psalm\Config, so
handler classes extending Psalm\Plugin should be fully compatible with
it.
Since Psalm\Plugin-style plugin registration was moved to
RegistrationSocket, LegacyPlugin now only load file-based plugins, so it
was renamed to FileBasedPluginAdapter.
* Converted EchoChecker plugin to composer-based format
- Its subfolder is registered as a local composer package in the root
composer.json, so it's directly installable with
```
composer require psalm/echo-checker-plugin
```
- Migration is trivial: drop the plugin into a separate folder, then add
simple composer.json and the entry point class.
* Updated docs
* Don't reject hook handlers that inherit handling methods
* strip void return type in stub file
2018-11-11 06:23:36 +02:00
|
|
|
}
|
|
|
|
]
|
2016-01-07 18:33:37 -05:00
|
|
|
}
|