1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
Commit Graph

51 Commits

Author SHA1 Message Date
Matthew Brown
a295d13f25 Fix other check 2020-12-29 12:57:09 +00:00
Matt Brown
187635c488 Fix Phar platform check
Fixes #4640
2020-11-20 11:08:40 -05:00
Matthew Brown
42c9f017f9
Experiment with PHP 7.1 compatibility (#4421)
* Experiment with PHP 7.1 compatibility

* Let’s hop
2020-10-26 15:14:48 -04:00
Matthew Brown
612f73de49
Bump Psalm Phar version 2020-10-25 16:17:24 -04:00
Matthew Brown
ced092874a Make config generation smarter 2020-02-17 22:05:58 -05:00
Matthew Brown
39afe9b4ff Add levels to every issue 2020-02-16 20:55:09 -05:00
Orklah
99b1f86e66 remove duplicate configs for InvalidReturnStatement 2020-02-16 20:53:49 -05:00
Barney Laurance
5e9045306a Remove references to deleted scripts in psalm/phar composer.json (#2514)
This should stop the error messages we are seeing on installing
psalm/phar:
    Skipped installation of bin psalm for package psalm/phar: file not
    found in package
    Skipped installation of bin psalter for package psalm/phar: file
    not found in package
    Skipped installation of bin psalm-language-server for
    package psalm/phar: file not found in package
    Skipped installation of bin psalm-plugin for package
    psalm/phar: file not found in package

They can be put back in future if/when
https://github.com/psalm/phar/issues/1 is fixed
2019-12-27 15:56:33 -05:00
Jeroen De Dauw
4b597d4ef9 Fix typo: mosts costs -> most costs (#2394) 2019-11-30 00:07:17 -05:00
Brown
95c61db513 Add a PossibleRawObjectIteration issue 2019-08-20 12:06:02 -04:00
Barney Laurance
94f934627c Work in progress - resolve directories from config file location (#1904)
* Add resolveFromConfigFile config option

Treats all paths as relative to the location of the config file, not
the current working directory of the process.

This commit just changes psalm, further commits will be needed to
apply the change to psalter and the LSP server.

* Copy asset xml files into project root for testing, delete during teardown

Needed since paths are now resolved relative to the position of the
file.

Not sure why I only saw a test failre for 1.xml - would have expected it
for all eight files.

* Fix following rebase

* Move psalm --init handly code above working directory setting code

If there's no psalm.xml yet we can't use the location of psalm.xml to
set our working directory

* Move Psalm version output code above working directory resolution

Working directory doesn't need to be known to output version constant

* Rely on new config file based working directory in end to end test

* Dont use rely on config dir for --alter - not currently working

* Fix code style error

* Add failing test for supporting config without `resolveFromConfigFile="true"`

* Don't treat config directory as a path to check

* Document resolveFromConfigFile setting
2019-07-06 12:21:39 -04:00
Matthew Brown
5a64e97f0f Fix #1793 - warn on deprecated function 2019-06-15 12:09:15 -04:00
Barney Laurance
08d029b3c5 Delete broken scripts from phar distribution
This resolves https://github.com/vimeo/psalm/issues/1758 but signals
that https://github.com/psalm/phar/issues/1 was never really fixed.
2019-06-08 16:59:53 -04:00
Barney Laurance
811cc08948 Don't allow installation of psalm/phar and vimeo/psalm in the same project
The scoped and non-scoped code don't work together.
2019-06-07 17:06:00 -04:00
Barney Laurance
34f152e82a Update PHP version req in phar to match non-phar requirement
I'm guessing there's no difference between the two which means one needs 7.1 and the other only needs 7.0

Co-Authored-By: Bruce Weirdan <weirdan@gmail.com>
2019-06-07 06:52:07 -04:00
Barney Laurance
eecd21a7d5 Add executable PHP files to PHAR distribution
Previously a user of the phar distribution would have to invoke psalm as
`vendor/bin/psalm.phar`. This is different to the command given in
the psalm documentation, `vendor/bin/psalm`

I also copied all files from the psalm/phar repo into
assets/psalm-phar, so that development can be concentrated in this repo.

The travis-deploy-phar.sh should copy any changes made back into the
psalm/phar.git repo.
2019-06-07 06:52:07 -04:00
Brown
30cbcb6c36 Add ImplementedParamTypeMismatch issue
Fixes #1633
2019-05-14 15:44:46 -04:00
Matthew Brown
472ab29d74 Add PossiblyInvalidCast for more refined checks 2019-03-17 17:10:51 -04:00
Matthew Brown
bd9f2ec546 Add separate issue type for undefined interface method 2019-01-13 13:07:53 -05:00
Matthew Brown
f9753e1517 Add internal methods to default ignored 2018-12-10 23:20:46 -05:00
Brown
dc834fdb01 Default allowStringToStandInForClass to true and fix errors found 2018-11-12 12:03:55 -05:00
Matt Brown
cb63f4f70f Add support for checking DeprecatedTrait and DeprecatedConstant 2018-08-10 13:25:25 -04:00
Matthew Brown
b6372f8342 Analyse SimpleNameResolver too 2018-07-22 18:00:08 -04:00
Matthew Brown
dc9e8e7916 Fix #872 - ignore vendor dir in default config 2018-07-08 08:38:27 -04:00
Matthew Brown
d078ce7a26 Move RedundantCondition to level 3 2018-05-12 01:00:10 -04:00
Gabriel Ostrolucký
6c03be3193 #597 adjust XSD too and use more proper XML namespace 2018-04-21 18:55:42 -04:00
Matthew Brown
f6356d96bd Fix #597 add namespace to XML schema urls 2018-04-21 18:11:17 -04:00
Matthew Brown
2b34c1d315 Add extra level 8 containing PHP autoload landmines 2018-04-19 01:03:28 -04:00
Matt Brown
aa3ea9c14c Add a 7th level with even more permissive checks 2018-04-18 15:31:00 -04:00
Matt Brown
5a2f6ff0e0 Fix #624 - change some innaccurate issue names 2018-04-17 14:07:02 -04:00
Matthew Brown
69479f9f6e Refine 4,5 and 6 defaults 2018-03-20 23:06:17 -04:00
Matthew Brown
072df9e9d8 Add Possibly InvalidIterator levels to defaults 2018-03-20 23:02:10 -04:00
Matthew Brown
f5b94dfcff Don’t error on deprecated by default 2018-03-18 18:48:43 -04:00
Matthew Brown
545a23c5f9 Info more Possibly issues 2018-03-18 18:47:18 -04:00
Matthew Brown
d7a585160f Add more granular error messages for invalid operands 2018-03-18 16:39:34 -04:00
Matthew Brown
a668cfd78b Add schema locations to generated XML
Fixes #583
2018-03-17 22:33:25 -04:00
Matthew Brown
7f4e234def Suppress NullableReturnStatement at level 6 2018-03-16 21:56:56 -04:00
Matthew Brown
8da762d97d Add RawObjectIteration to level 3 config 2018-03-16 21:52:27 -04:00
Matthew Brown
bf45ef04ea Add SOLID violation to level 6 default 2018-03-16 21:47:30 -04:00
Matt Brown
39cdd00094 Add extra level for starter configs 2018-02-22 12:25:05 -05:00
Matt Brown
da5ee15b40 Add new issue ignored in default config 2018-02-07 15:27:25 -05:00
Matt Brown
1df4c3d196 Add DocblockTypeContradiction to find possible issues with docblock types
Fixes #491
2018-02-06 18:44:53 -05:00
Matthew Brown
3482ee3b39 Split UntypedParam into MissingParamType and MissingClosureParamType 2018-01-28 20:03:47 -05:00
Matt Brown
b0f3992f36 Remove stopOnFirstError config option, because it hasn’t worked for a while
Fixes #248
2018-01-24 16:22:54 -05:00
Matt Brown
e679c9fb84 Fix XML formatting for example files 2018-01-10 11:01:32 -05:00
Matt Brown
72848477c2 Add all Possibly* issues to more lenient config
And add granularity to InvalidPropertyAssignment* issues
2018-01-10 10:56:43 -05:00
Matthew Brown
875bb8c072 Improve dead code detection, reducing false positives for params 2017-12-29 17:27:16 -05:00
Matthew Brown
f27bd50abe
Add RedundantCondition issue, replacing FailedTypeResolution (#344)
* Group changes

* Don’t worry about vars defined before exiting

* Fix issues with vars defined in conditionals

* Add failing test

* Only add failed reconciliation flag if nothing could be salvaged

* Avoid notice when removing clauses

* Improve handling of loops

* Fix evaluation of binary op expressions

* Remove unset vars from outer context after loop

* Ignore RedundantCondition in some more configs
2017-11-28 00:46:41 -05:00
Matthew Brown
8aabcbce35 Introduce UntypedParam warnings when functions are missing param types 2017-09-02 11:18:56 -04:00
Matthew Brown
d2124a426c Add LessSpecificReturnType as info at all levels 2017-03-18 12:25:42 -04:00