* Move psalm entry-point to a Cli command class
* Moved psalter to the CLI command class
* Moved psalm-language-server to the CLI command class
* Moved psalm-refactor to the CLI command class
* Moved psalm_plugin to the CLI command class
* Use CLI commands directly and deprecate trampolines
* Require CLI commands directly and don't use trampolines
* Announce isAbsolutePath() removal
* Deprecate \Psalm\requireAutoloaders() function
* Deprecate \Psalm\getVendorDir() function
* Deprecate Psalm\getArguments() function
* Deprecate \Psalm\getPathsToCheck() function
* Deprecate \Psalm\getPsalmHelpText() function
* Deprecate \Psalm\initialiseConfig() function
* Deprecate Psalm\update_config_file() function
* Deprecate \Psalm\get_path_to_config() function
* Deprecate Psalm\getMemoryLimitInBytes() function
* CS fix
* Untangle Psalm entrypoint
* Untangle Psalter entrypoint
* Drop command_functions.php references
* Adjust phar build
Fixesvimeo/psalm#5405
Requires new patch release.
This PR reverts changes to the signature of `IssueBuffer::finish()` and
introduces separate method to be used to capture `$_SERVER`
* Wrap entrypoints into IIFE to protect their variables
Fixesvimeo/psalm#5359
* Add tests for Psalm variable isolation
* Capture environment before registering autoloader
* Sort uses
* Add ErrorHandler
* Use new error handler
* Drop old exception handler
* Suppress error-triggered exceptions during external autoload calls
Fixesvimeo/psalm#5048
The issue was caused by missing dependency of a class that Psalm tried
to inspect through reflection. Fixed by using composer autoloader which
avoids the need to use reflection.
E.g. `psalm --report=report.txt --report=report.pylint`.
It may be useful to have both a machine-readable and human readable
report, e.g. during taint analysis.
Previously, psalm would generate neither report if the report option was
repeated.
* Use pretty print for JSON reporting.
* Use pretty print for JSON reporting.
* Use pretty-print option on CLI for BC.
* Change static:: const to self::
Co-authored-by: Matthew Brown <github@muglug.com>
if a composer.json is present and a PHP version requirement is
configured, we set the php version to the minimal PHP version that
satisfies the composer requirement.
Additionally, this adds a `phpVersion` attribute to the <psalm> tag. If
that's set, it takes precedence over what has been detected in
composer.json.
And finally, the --php-version command line flag continues to work and
takes precedence over the setting in the <psalm> tag
this fixes#2628
By default, php will only print the first few thousand bytes of the
exception, for an uncaught exception
(I think that's the default, and not just my configuration)
Instead, print all of the parts of the exception.
For #1083 (this PR does not cover set_error_handler)