1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-03 10:07:52 +01:00
Commit Graph

5843 Commits

Author SHA1 Message Date
Matthew Brown
023c4bcef0 Fix #2532 - fix templating inside class method when calling templated method 2019-12-30 07:25:36 -05:00
Bruce Weirdan
30d4ab5d62 Added spl_object_id polyfill to scoper whitelist (#2531)
Refs vimeo/psalm#2530
2019-12-29 21:12:03 -05:00
Matthew Brown
508c2e268a Process phpstan-template in class docblocks 2019-12-29 16:08:09 -05:00
Matthew Brown
2b88261ecd Fix templated assertion cc @vasily-kartashov
This is a good reason for you to skip 3.8.1
2019-12-29 11:57:54 -05:00
Matthew Brown
8e54e3aa06
Use forked collections for now 2019-12-29 11:11:07 -05:00
Bruce Weirdan
7d3dd47efa Added support for preg_grep (#2523) 2019-12-29 11:05:08 -05:00
Matthew Brown
b375ebf06f Fix test 2019-12-29 10:29:03 -05:00
Matthew Brown
26876b9a13 array_push shouldn’t change list type 2019-12-29 10:20:44 -05:00
Ruud Kamphuis
ca31931a53 Explain bool assertions (#2528) 2019-12-29 09:22:09 -05:00
Matthew Brown
d3fb0181cb Fix #2527 - no crash when template cannot be resolved 2019-12-29 08:45:42 -05:00
Matthew Brown
0c7851ae21 Fix #2526 - always check for array assignment in assignop 2019-12-29 08:36:46 -05:00
Bruce Weirdan
e3e3296dd9 Test doctrine collections (#2524)
* Added doctrine/collections to the list of real projects to test with

* Don't use phar version to check doctrine/collections
2019-12-28 20:51:39 -05:00
Matthew Brown
55c2f7faa2 Fix #2508 - don’t replace templated types with generic ones inside own function 2019-12-28 18:38:02 -05:00
SignpostMarv
37496e9569 amending travis config, 7.4snapshot > 7.4 (#2516) 2019-12-28 15:58:04 -05:00
Matthew Brown
ce9435da19 Fix #2521 - use correct context class when analysing trait 2019-12-28 15:56:26 -05:00
Bruce Weirdan
4110ec351b Make travis green again (#2518)
* Bumped phpspec/prophecy version to prevent 7.4 deprecations

* Fix DOMDocument::$config type

This property was documented as containing DOMConfiguration object, but
in fact always returned `null` (see [php source](ee80567a83/ext/dom/document.c (L542))).

DOMConfiguration class is removed in PHP 8.

* Dropped unused use

* Allow to set PHP 8.0 as current version

* Fix CallMap issues for PHP 8.0

- Use both major and minor version to load deltas
- Don't load non-existent deltas
- Stop at lowest possible delta
2019-12-27 19:06:09 -05:00
Matthew Brown
bdb2f3c2be Use fork for now 2019-12-27 17:10:16 -05:00
Matthew Brown
6a6a6ab2d7 Fix dumb 2019-12-27 16:51:49 -05:00
Matthew Brown
982fe627e0 Fix #2515 - allow chained assertions on @psalm-mutation-free methods 2019-12-27 16:44:55 -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
Matthew Brown
1d2fefd647 Preserve more information after removing types 2019-12-27 15:26:01 -05:00
Matthew Brown
9a04d93cf9 Fix #2352 - treat hexdec return type a bit better 2019-12-27 14:14:49 -05:00
Matthew Brown
4a28525275 Fix removal of traversable from iterable
Fixes #2509
2019-12-27 13:01:44 -05:00
Matthew Brown
068afa09d3 Add very basic implementation for class-string-map
Fixes #1969
2019-12-27 12:49:28 -05:00
Matthew Brown
b78f273ccf Improve handling of template params a smidge 2019-12-27 11:49:44 -05:00
Matthew Brown
2f2cd85a6a Identify invalid static property array assignment 2019-12-27 10:34:51 -05:00
Valentin Udaltsov
006f788d6a Added array_fill_keys support (#2512)
* Added array_fill_keys support

* Removed unnecessary array_fill_keys phpdoc
2019-12-27 13:30:42 +00:00
Matthew Brown
6b81f8c64a Fix #2506 - use correct flag when checking classes after analysis 2019-12-24 01:02:34 +00:00
Matthew Brown
ee35db5a3b Refine assignment somewhat 2019-12-22 12:43:57 +00:00
Matthew Brown
141bfd313f Improve handling of assignments in arrays 2019-12-22 12:36:16 +00:00
Matthew Brown
8bd68608fa Fix message 2019-12-22 11:08:47 +00:00
Matthew Brown
8fc3c3b8cd Improve removing types from callable 2019-12-22 10:29:00 +00:00
Matthew Brown
3be8e4c6ba Improve string comparison negation 2019-12-22 02:09:22 +00:00
Matthew Brown
4c8730c5a3 Improve handling of unset array, ensuring that keys don’t persevere 2019-12-22 01:42:39 +00:00
Matthew Brown
a2a2d8cd97
Delimit quotes 2019-12-21 14:15:02 +00:00
Aurélien Delogu
7d5c44ab60 Update composer.json (#2496) 2019-12-21 08:52:46 +00:00
Bruce Weirdan
ede1076039 Dropped unused use (#2495) 2019-12-21 00:58:05 +00:00
Matthew Brown
946b4f73e6 Fix #2493 - don’t crash when provided function doesn’t exist 2019-12-21 00:34:31 +00:00
Bruce Weirdan
7e8268fe94 Drop non-existent param from docblock (#2492)
I wonder why psalm didn't catch it.
2019-12-21 00:14:22 +00:00
Matthew Brown
59aeb6b6c3 Fix #2490 - allow overriding renamed trait methods in subclass 2019-12-20 20:11:27 +00:00
Matthew Brown
8c1638efc5 Fix tests once more 2019-12-20 19:37:36 +00:00
Matthew Brown
3d03da271d Fix tests to give more accurate locations 2019-12-20 18:18:26 +00:00
Matthew Brown
8bba5221b2 Remove dumb test 2019-12-20 18:09:26 +00:00
Matthew Brown
395cac0e0b Add specific exception 2019-12-20 18:08:53 +00:00
Matthew Brown
e475a1826c Issues with non-abstract methods should always be MethodSignatureMismatches 2019-12-20 18:08:35 +00:00
Matthew Brown
a5434aabfe Fix #2491 - report trait issues at the most local place 2019-12-20 17:57:31 +00:00
Matthew Brown
1b54d058aa Fix #2488 - add support for @phpstan- annotations 2019-12-20 10:49:10 +00:00
Matthew Brown
a4191171bf Fix #2483 - treat intersecting PHPDocs from interfaces better 2019-12-20 01:42:57 +00:00
Matthew Brown
d7b99148be Add support for JUnit report type
Fixes #2485
2019-12-19 20:18:09 +00:00
Matthew Brown
15cd62d332 Fix #2484 - add support for spaces in assert-if-true types 2019-12-19 19:24:26 +00:00