1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00
Commit Graph

6436 Commits

Author SHA1 Message Date
Brown
110df3e4f1 Fix ProjectAnalyzer test 2020-04-12 12:02:19 -04:00
Brown
95ec189e0b Remove Amp stubs 2020-04-12 11:47:10 -04:00
Brown
370ffa28e4 Fix #3117 - invalidate all caches when composer lockfile changes 2020-04-12 11:41:37 -04:00
m0003r
77270dc9b7
Getters automagic (#3122)
* When method is a plain getter: (1) correct method return type if property type is known (2) auto assert-if-true that corresponding property is not falsy

* do not use getter automagic if getter is overridden somewhere
2020-04-12 08:40:24 -04:00
Brown
ee50542b8f Allow users to disable caching full files 2020-04-12 08:34:57 -04:00
Brown
9d2957d339 Fix a few more edge-cases 2020-04-12 01:26:11 -04:00
Brown
7dfa37beb2 Improve ergonomics of array assignment 2020-04-11 17:50:24 -04:00
Jose Maria Valera Reales
2fe8717639
Add missing output-format "text" to available formats examples (#3120) 2020-04-11 11:18:44 -04:00
Brown
d530fce4b3 Fall through with PossiblyInvalidIterator issue 2020-04-11 11:17:54 -04:00
Brown
739f2c7faf Fix array key type 2020-04-11 08:12:28 -04:00
Brown
308248e8b3 Ignore referencedMethod issues created by newest php-parser 2020-04-10 18:27:07 -04:00
Brown
db7447abd7 Make array coercion-to--mixed rules a little more lenient 2020-04-10 16:21:48 -04:00
Brown
672baea6fc Fix #3116 - allow class to be compared to a templated class-string 2020-04-10 00:26:11 -04:00
Brown
556d5625b5 Prevent Throwable being intersected with itself 2020-04-10 00:10:31 -04:00
Brown
fea1310d67 Fix #3092 - round always returns a float 2020-04-09 23:31:26 -04:00
Brown
f4a6b24e34 Fix style errors 2020-04-09 23:24:52 -04:00
m0003r
1749c19a29
Fix $assertion_var_id calculation in method calls (#3115) 2020-04-09 23:03:53 -04:00
Brown
09663b5938 Fix #3095 - allow intersection of arrays after assertions 2020-04-09 23:02:28 -04:00
Brown
13d9354cde Fix #3107 - prevent bad @method with dash 2020-04-09 12:16:58 -04:00
Brown
3a4dd70403 Prevent MixedMethodCall from generated array offsetGet calls 2020-04-09 11:45:15 -04:00
Brown
bd92ec6cd3 Detect nested issues 2020-04-09 10:42:54 -04:00
Brown
bd2104c5ba Merge with mixed in nested arrays 2020-04-09 09:27:21 -04:00
m0003r
4d1be3f0c4
Allow plain assertions (@psalm-assert) about $this (fixes #3105) (#3108)
* Allow plain assertions (@psalm-assert) about $this (fixes #3105)

* Fix multiple assertion combining

* Fix multiple assertion combining for $this again

* Add test for multiple assertion combining for $this again
2020-04-09 08:15:07 -04:00
Šimon Podlipský
2a7be233bb
Remove dead link (#3112)
* Remove dead link

* Fix typos
2020-04-09 08:14:43 -04:00
Mikko Pesari
184be78405
Update mysqli property maps (#3114)
From ca92e03c12/src/Phan/Language/Internal/PropertyMap.php
2020-04-09 08:14:09 -04:00
m0003r
28f740fddb
@psalm-trace is now a specific low-level issue, because plain debug print breaks structured output (after #3080) (#3106) 2020-04-08 21:03:05 -04:00
Brown
d868710b2b Fix handling of built arrays 2020-04-08 16:11:11 -04:00
Brown
43287812ce Suppress issue 2020-04-08 14:49:23 -04:00
Brown
b2e010b431 Fix #3102 - identify issues with possibly-mixed output 2020-04-08 14:07:09 -04:00
Brown
a117c48bb2 Add back nuance to error messages for conflicting type bounds 2020-04-08 12:37:46 -04:00
lhchavez
be87bb7300
Support intersection types for object-like arrays (#3064)
This change allows expressing the intersection of multiple object-like
arrays. The resulting type will contain the (merged via intersection)
properties of all the object-like arrays involved in the intersection.

This should allow to express the resulting type of an `array_merge()`
operation, which is tricky to do in the context of a templated type.
2020-04-08 09:35:53 -04:00
Bruce Weirdan
db3072d0ba
Suppress choco install progress (#3100)
This should make appveyor logs much more readable. Currently they have
thousands of lines like
```
Progress: Downloading php 7.4.3... 98%
Progress: Downloading php 7.4.3... 98%
Progress: Downloading php 7.4.3... 98%
```
2020-04-08 09:23:24 -04:00
Marco Pivetta
0d1e893151
Added ReflectionProperty#getType() to psalm type stubs for PHP 7.4+ (#3093) 2020-04-08 09:04:49 -04:00
Bruce Weirdan
fe1cd8ecf4
Use stable composer on Appveyor (#3097)
* Use stable composer on Appveyor

Composer now ships unstable 2.x version under old URL.
See https://twitter.com/seldaek/status/1247770566045491201

* Discard changes in vendor
2020-04-08 09:04:36 -04:00
Matthew Brown
1d91719ae8
Remove --no-suggest 2020-04-08 01:25:40 -04:00
Bruce Weirdan
0161f25ef6
Bump callmap version to 7.4 (#3094)
The content of the callmap corresponds to 7.4, but internally the
version was set to 7.3. This caused 7.4 delta to be ignored, and 7.4
types to be used for 7.3.
2020-04-08 01:04:34 -04:00
Brown
2d4381eb4e Fix #3096 - forget clauses in context after call 2020-04-08 01:03:37 -04:00
Brown
5db9f0e8c0 Fix #2722 - change behaviour to inherit params to match just on position
And not name + position
2020-04-08 00:54:17 -04:00
Brown
a79122256c Use conditional return type for range 2020-04-07 19:59:20 -04:00
Brown
69045daea9 Convert a bunch of custom-handled functions to conditional stubbed ones 2020-04-07 16:48:29 -04:00
Brown
550ba0a4c9 Compare to real outer context, not if one
Fixes #3091
2020-04-07 15:13:17 -04:00
Brown
61c979136f Fix #3091 - simplify elseif negated clauses where possible 2020-04-07 13:04:24 -04:00
Brown
41b165c096 Remove stray comma 2020-04-07 11:17:52 -04:00
Brown
067104e170 Fix #3084 - keep track of upper and lower bounds of inferred template types 2020-04-07 00:13:56 -04:00
Brown
99549871b6 Fix tests 2020-04-06 18:16:14 -04:00
m0003r
11edb22c72
Implement @psalm-trace annotation, fixes #3079 (#3080) 2020-04-06 12:42:22 -04:00
Brown
26fcde10fa Fix #3081 - use correct property type for ownerDocument 2020-04-06 12:41:18 -04:00
Brown
387bc02e71 Fix #3082 - merge intersection types when replacing template types 2020-04-06 10:19:36 -04:00
Matthew Brown
6ac6c54a34
Fix defaults 2020-04-06 09:28:49 -04:00
Brown
27032e875f Ensure Generator return types are enforced for a function using yield from 2020-04-06 09:23:13 -04:00