2016-01-08 00:33:37 +01:00
|
|
|
{
|
2016-11-21 23:08:17 +01:00
|
|
|
"name": "vimeo/psalm",
|
|
|
|
"description": "A static analysis tool for finding errors in PHP applications",
|
2016-01-08 00:33:37 +01:00
|
|
|
"keywords": ["php", "code", "inspection"],
|
|
|
|
"type": "library",
|
2016-11-21 23:08:17 +01:00
|
|
|
"license": "MIT",
|
2016-01-08 00:33:37 +01:00
|
|
|
"authors": [
|
|
|
|
{
|
|
|
|
"name": "Matthew Brown"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"require": {
|
2019-05-17 00:36:36 +02:00
|
|
|
"php": "^7.1",
|
2019-02-04 14:59:33 +01:00
|
|
|
"nikic/php-parser": "^4.0.2 || ^4.1",
|
2017-11-11 18:11:11 +01:00
|
|
|
"openlss/lib-array2xml": "^0.0.10||^0.5.1",
|
2019-05-17 00:36:36 +02:00
|
|
|
"ocramius/package-versions": "^1.2",
|
2018-10-17 21:52:26 +02:00
|
|
|
"composer/xdebug-handler": "^1.1",
|
|
|
|
"felixfbecker/language-server-protocol": "^1.2",
|
|
|
|
"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 05:23:36 +01:00
|
|
|
"webmozart/path-util": "^2.3",
|
2019-04-01 01:08:55 +02:00
|
|
|
"symfony/console": "^3.3||^4.0",
|
2019-02-06 02:00:13 +01:00
|
|
|
"amphp/amp": "^2.1",
|
2019-03-07 20:56:18 +01:00
|
|
|
"amphp/byte-stream": "^1.5",
|
2019-05-17 17:26:44 +02:00
|
|
|
"phpmyadmin/sql-parser": "^5.0",
|
|
|
|
"sebastian/diff": "^3.0"
|
2016-01-08 00:33:37 +01:00
|
|
|
},
|
2018-11-12 21:48:08 +01:00
|
|
|
"bin": ["psalm", "psalter", "psalm-language-server", "psalm-plugin"],
|
2016-01-08 00:33:37 +01:00
|
|
|
"autoload": {
|
|
|
|
"psr-4": {
|
2018-11-12 16:11:08 +01:00
|
|
|
"Psalm\\Plugin\\": "src/Psalm/Plugin",
|
2016-07-26 00:37:44 +02:00
|
|
|
"Psalm\\": "src/Psalm"
|
2016-04-04 01:47:06 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"autoload-dev": {
|
|
|
|
"psr-4": {
|
2016-10-20 17:51:45 +02:00
|
|
|
"Psalm\\Tests\\": "tests"
|
2016-01-08 00:33:37 +01:00
|
|
|
}
|
2016-10-20 17:54:55 +02:00
|
|
|
},
|
2017-11-11 18:11:11 +01:00
|
|
|
"config": {
|
|
|
|
"optimize-autoloader": true
|
|
|
|
},
|
2018-10-17 21:52:26 +02:00
|
|
|
"minimum-stability": "dev",
|
|
|
|
"prefer-stable": true,
|
2016-10-20 17:54:55 +02:00
|
|
|
"require-dev": {
|
2019-05-17 01:05:27 +02:00
|
|
|
"phpunit/phpunit": "^7.5 || ^8.0",
|
2019-03-19 16:46:51 +01:00
|
|
|
"squizlabs/php_codesniffer": "3.4.0",
|
2019-03-01 22:37:55 +01:00
|
|
|
"bamarni/composer-bin-plugin": "^1.2",
|
2019-05-17 00:36:36 +02:00
|
|
|
"psalm/plugin-phpunit": "^0.5.8"
|
2016-10-20 17:54:55 +02:00
|
|
|
},
|
2018-02-19 17:14:07 +01:00
|
|
|
"suggest": {
|
2018-02-19 17:16:13 +01:00
|
|
|
"ext-igbinary": "^2.0.5"
|
2018-02-19 17:14:07 +01:00
|
|
|
},
|
2016-10-20 17:54:55 +02:00
|
|
|
"scripts": {
|
2018-02-19 18:20:34 +01:00
|
|
|
"psalm": "./psalm --find-dead-code",
|
|
|
|
"standards": "phpcs",
|
2017-05-27 00:26:14 +02:00
|
|
|
"tests": [
|
2018-02-19 18:20:34 +01:00
|
|
|
"phpcs",
|
|
|
|
"phpunit"
|
|
|
|
],
|
|
|
|
"all-tests": [
|
|
|
|
"phpcs",
|
|
|
|
"./psalm --find-dead-code",
|
2017-05-27 00:26:14 +02:00
|
|
|
"phpunit"
|
|
|
|
]
|
2018-07-10 05:14:28 +02:00
|
|
|
},
|
|
|
|
"extra": {
|
|
|
|
"branch-alias": {
|
2018-11-18 23:42:26 +01:00
|
|
|
"dev-master": "3.x-dev",
|
2018-11-20 21:51:47 +01:00
|
|
|
"dev-2.x": "2.x-dev",
|
2018-07-10 05:14:28 +02:00
|
|
|
"dev-1.x": "1.x-dev"
|
|
|
|
}
|
2018-07-10 17:01:05 +02:00
|
|
|
},
|
|
|
|
"provide": {
|
2018-07-10 17:39:38 +02: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 05:23:36 +01:00
|
|
|
},
|
|
|
|
"repositories": [
|
|
|
|
{
|
|
|
|
"type": "path",
|
2018-11-14 08:05:12 +01: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 05:23:36 +01:00
|
|
|
}
|
|
|
|
]
|
2016-01-08 00:33:37 +01:00
|
|
|
}
|