1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-14 10:17:33 +01:00
Commit Graph

56 Commits

Author SHA1 Message Date
Matt Brown
5f065d3d74 Turn template bound tuples into object
Ref #4714
2020-11-27 11:43:30 -05:00
Matt Brown
3bde327f1b Break up CommentAnalyzer 2020-11-04 23:25:08 -05:00
orklah
ceaaa39ec3
improve phpdoc (#4352) 2020-10-17 12:36:44 -04:00
orklah
ffe7874906
Misc improvements (#4314)
* extract the operation out of the loop when possible

* remove unnecessary interfaces when already inherited in parent

* simplify expressions

* avoid using alias functions

* redundant phpdoc

* unused imports
2020-10-15 13:23:35 -04:00
orklah
10f2966dcb
return types (#4311)
* return types

* remove willReturn for void methods
2020-10-12 15:02:52 -04:00
Matt Brown
464795d86c Fix #4309 - improve reuse of callmap callable inference 2020-10-12 13:46:43 -04:00
orklah
250fa8e42d
misc changes (#4227)
* misc changes

* misc changes
2020-09-22 00:44:31 -04:00
orklah
ead107fa9e
More return types (#4173)
* add native return types

* redundant phpdoc
2020-09-12 11:24:05 -04:00
orklah
8c7423505a
add native param types (#4137)
* add native param types

* redundant phpdoc

* add more param types and adds "?" to nullable types

* remove redundant phpdoc

* add more param types and remove redundant phpdoc

* add more param types and remove redundant phpdoc
2020-09-06 19:36:47 -04:00
orklah
f66d57f19d
add native return types (#4116)
* add native return types

* remove redundant phpdoc
2020-09-04 16:26:33 -04:00
Brown
98ce590e9d Remove some redundant calls 2020-08-28 12:48:33 -04:00
Brown
efe143a396 Fix #4077 - always track closure purity 2020-08-28 12:42:55 -04:00
Bruce Weirdan
7adc25c421
Improve import errors (#3997)
* Better errors for invalid type imports

Fixes vimeo/psalm#3885

* Finishing touches

Docs, schema, CS

* Drop unused import

* Drop more unused imports
2020-08-16 22:53:53 -04:00
lhchavez
ab3016af6e
Fix File-related analysis plugin hooks (#3970)
This change does a few things:

* Renames `BeforeAnalyzeFileInterface` to `BeforeFileAnalysisInterface`.
* Adds a few more parameters to `BeforeFileAnalysisInterface`.
* Since the analysis was never called due to a bug, the above two
  changes are safe to do.
* Fix the above-mentioned bug, and now adds the hooks to the config.
* Update the documentation about the File-related analysis plugin hooks.
* Add a test to ensure that this does not break again in the future.

Fixes: #3969
2020-08-10 10:49:53 -04:00
Brown
afce2dc66f Tighten up rules around instantiation a bit more 2020-08-06 10:18:55 -04:00
Brown
20a9b103ec Restrict narrowing fix 2020-08-03 02:20:58 -04:00
Matthew Brown
19ba53f28c Fix too-long line 2020-06-13 16:45:54 -04:00
Matthew Brown
edb2b4c5ef Get type of requires 2020-06-13 15:48:12 -04:00
Brown
0fc3398631 Move parsing methods into internal namespace 2020-05-13 19:12:45 -04:00
Matthew Brown
1b752d06ab Fix #3201 - add additional constraints on constructor initialisation 2020-04-21 00:04:47 -04:00
Matthew Brown
93735712f0 Fix #3032 - always replay docblock issues when analysing files 2020-03-28 19:54:55 -04:00
Matthew Brown
47c1470e3b Refactor reference checks to use more appropriate properties 2020-03-28 16:30:56 -04:00
Brown
971ae50bea Do prep work for #3024 - improve handling of absent class references 2020-03-26 12:35:27 -04:00
Matthew Brown
bfb919d26a Break out methods into their own classes 2020-03-11 23:04:52 -04:00
Matthew Brown
653353709a Use MethodIdentifier object instead of string 2020-02-14 20:54:26 -05:00
Brown
d8f5ad190b Improve invalidation of inherited properties 2020-02-10 17:03:51 -05:00
Matthew Brown
87fec3e6fe Fix #2505 - don’t attempt to analyse classes that weren‘t properly scanned 2019-12-31 08:04:51 -05:00
Brown
0bcb7863f3 Use better system for storing inferred types and assertions 2019-11-25 11:44:54 -05:00
Matthew Brown
9ad6c36d9b
Conditionally verify that array offsets exist (#2147)
* Check array offsets idea

* Clean up some issues

* Add a few light fixes

* Add docs
2019-09-18 14:21:06 -04:00
Matthew Brown
2146f73782 Prepare for tracking unused suppressions
Ref #1444
2019-08-18 12:25:48 -04:00
Tyson Andre
ce03be2dc0 Add BeforeAnalyzeFileInterface (#2034)
This is a prerequisite of the plugin I mentioned in #378

This may be useful for other types of plugins
(e.g. checking raw file contents or file names)
2019-08-18 10:40:07 -04:00
Tyson Andre
5d5a9c6eac Remove redundant casts and unused use statements (#1955)
* Remove redundant casts

(not sure about older versions of php-parser)

* Remove unused use statements
2019-07-18 23:37:36 -04:00
Matthew Brown
9ab3161675 Fix issues found by Psalm 2019-06-29 21:13:02 -04:00
Matthew Brown
6b7788b502 Fix FileAnalyzer memory leak 2019-06-29 21:06:21 -04:00
LeSuisse
f29826b958 Fully qualify constants and function calls (#1849)
This should give a small performance boost.
Part of #1837.

The change is enforced via phpcs and can be autofixed
with phpcbf.
2019-06-26 16:52:29 -04:00
Matthew Brown
4fc5d1d5c8 Rewrite use statements 2019-06-05 22:13:33 -04:00
Brown
3e15fa8bfe Fix bad namespacing 2019-06-05 11:15:52 -04:00
Brown
a060da95bf Allow MissingParamType alteration to be done in multithreaded mode 2019-05-31 11:55:24 -04:00
Matthew Brown
cd969c51e5 Generate missing param types from callers
Fixes #1707
2019-05-31 01:47:35 -04:00
Matthew Brown
790bc53bfd Fix #1681 - interpret parent annotation properly 2019-05-25 11:51:09 -04:00
Brown
0bd4dbcbc4 Bump to PHP 7.1
Fixes #1650
2019-05-16 18:36:36 -04:00
bugreportuser
1a4b9ab25f Allow suppressing exception issues inline 2019-03-31 14:22:19 -04:00
bugreportuser
4fc7e4affc Give errors for all uncaught exceptions 2019-03-31 14:22:19 -04:00
bugreportuser
976c2c5ef3 Add an error for throws in global scope 2019-03-24 23:03:37 -04:00
Brown
b9ba24929d Refactor storage of template names to prevent clashes 2019-03-22 15:59:10 -04:00
bugreportuser
0e9fb04f06 Define globals in more places 2019-03-11 15:53:21 -04:00
Matthew Brown
efbcf7dc5b Fix #1417 - store root file path when scanning for manipulations 2019-03-02 15:07:26 -05:00
Matthew Brown
5c76ab35c8 Allow properties to be set regardless of visibility 2019-03-01 17:30:55 -05:00
Matthew Brown
60088b1189 Fix #1215 - prevent bad code from crashing Psalm 2019-01-20 11:10:12 -05:00
Brown
b8d822cd26 Prohibit leaking of template params across class boundaries 2019-01-10 12:13:49 -05:00