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

6032 Commits

Author SHA1 Message Date
Brown
0a8bb32115 Fix #2866 - prevent use of impure __toString via concatenation in pure contexts 2020-02-24 14:50:34 -05:00
Brown
3f226e2e86 Fix #2867 - treat echo as impure 2020-02-24 14:38:05 -05:00
Matthew Brown
09427bfa14
Shortened the readme 2020-02-24 11:43:32 -05:00
Brown
388d46fc1e Update with link 2020-02-24 11:39:20 -05:00
Matthew Brown
6cb520d687
Run on pull_request too 2020-02-24 11:31:20 -05:00
Matthew Brown
f1a9b73a78 Fix message 2020-02-23 18:24:43 -05:00
Matthew Brown
ed4f4e35b8 Fix null checks 2020-02-23 18:20:59 -05:00
Matthew Brown
41e076e0ee Fix bad 2020-02-23 18:19:53 -05:00
Matthew Brown
618ae77846 Prevent implicit __toString method calls in a pure context 2020-02-23 18:18:25 -05:00
Matthew Brown
1abece4f7c Use more accurate types 2020-02-23 17:03:27 -05:00
Matthew Brown
d3f8e80c4a Move reference map generation into separate file 2020-02-23 14:53:31 -05:00
Matthew Brown
106102d0a5
Add line break 2020-02-23 00:41:19 -05:00
Matthew Brown
b01bc9ab12 Fix union-of-mixed array key creation 2020-02-22 21:13:14 -05:00
Matthew Brown
4dae5b3190 Prevent more mixed array keys 2020-02-22 20:52:39 -05:00
Matthew Brown
97a849b1be Fix #1311 - narrow scalar properly, exploding constituent types 2020-02-22 20:25:13 -05:00
Matthew Brown
2635e57cde Negation of numeric on array-key is fine too 2020-02-22 12:53:27 -05:00
Matthew Brown
6adf6a09f0 Explode array-key into int|numeric-string after test 2020-02-22 12:36:37 -05:00
Matthew Brown
ae1360a52f An array-key can be numeric 2020-02-22 12:34:27 -05:00
Matthew Brown
27fd76649c Prevent more array<mixed, ...> construction 2020-02-22 12:20:03 -05:00
Matthew Brown
6ad3d039df Prevent more array<mixed,...> creation 2020-02-22 12:12:40 -05:00
Matthew Brown
952045e2ba Fix return type checks 2020-02-22 11:28:24 -05:00
Matthew Brown
202fb7026a Convert explicit array<mixed, ...> to array<array-key, ...> 2020-02-22 11:04:58 -05:00
Matthew Brown
1a3129b0e0 Fix test condition 2020-02-22 10:53:30 -05:00
Matthew Brown
1c218c020e Fix #1684 - detect error in assertion on return type of direct call 2020-02-22 10:41:57 -05:00
Matthew Brown
a706f4d722 Fix #2242 - warn when using mutable dependencies 2020-02-22 10:04:46 -05:00
Orklah
a50826ddb0 drop unused file 2020-02-22 09:38:59 -05:00
Matthew Brown
3cc4c2b37e Fix #2721 - only warn about deprecated classes exactly where they are used 2020-02-22 01:12:19 -05:00
Matthew Brown
db17c85dd6 Fix #2787 - make accessing undefined objectlike key an error 2020-02-22 00:29:59 -05:00
Matthew Brown
9f13341ef9 Fix #2827 - detect literal numeric values 2020-02-22 00:16:15 -05:00
Matthew Brown
4707b21227 Fix tests 2020-02-21 22:15:25 -05:00
Brown
7d99a15072 Fix #2805 - forbid passing in mutable class to mutation-free context 2020-02-21 18:25:35 -05:00
Brown
f4485cc529 Fix #2847 - use fully-qualified function name 2020-02-21 16:44:31 -05:00
Brown
ae08552f40 Add null check 2020-02-21 16:04:18 -05:00
Brown
443558ca49 Fix #2844 - resolve constant offset references 2020-02-21 15:56:30 -05:00
Brown
292a2359b3 Add slash 2020-02-21 15:44:26 -05:00
Brown
b51863fc9b Fix #2848 - allow casting templated types 2020-02-21 15:17:35 -05:00
Brown
f44a0f9f4c Fix #2849 - allow object-like templated array comparison 2020-02-21 15:13:07 -05:00
Matthew Brown
a2fbfc1c9e Fix a couple of bugs 2020-02-21 01:32:22 -05:00
Matthew Brown
d8b6467b1a Fix #2852 - no duplicatearraykey warning for non string-keyed arrays 2020-02-21 01:27:42 -05:00
Matthew Brown
9bdca3c706 Forbid array<mixed, ...> 2020-02-21 01:26:51 -05:00
Matthew Brown
af2ea1732b Fix #2857 - use correct location for byref vars 2020-02-21 00:42:52 -05:00
Matthew Brown
e5c262d7dc Add docblock_start and docblock_end properties to CodeLocation 2020-02-20 22:56:03 -05:00
Matthew Brown
31399b9fd5 Fix dumb errors 2020-02-20 22:48:29 -05:00
Matthew Brown
3b2c9bbce5 Use simple (array) cast 2020-02-20 22:45:14 -05:00
Jared Broughton
86472de160 Correct return type of array_map closure 2020-02-20 22:45:14 -05:00
Jared Broughton
236e4d5e28 Prevent TypeError when generating XML reports
The XML generator currently in use (LSS\Array2XML) expects a nested array structure. However, due to the recent introduction of the IssueData type to replace what was previously shaped arrays, Array2XML was getting an array of objects instead. It then proceeds to crash from (eventually) passing null to DOMNode->appendChild(). This commit maps the IssueData array back into the array of shaped arrays that Array2XML knew and loved.
2020-02-20 22:45:14 -05:00
Tyson Andre
21b89629fc Bump minimum phpunit 8 version for development
This is in require-dev, so it hopefully should have limited impact.
The travis tests might pick up newer dependencies, though
2020-02-20 22:42:16 -05:00
Tyson Andre
088db2d36d Support using paratest for local development
https://phpunit.de/manual/6.5/en/appendixes.configuration.html#appendixes.configuration.testsuites
documents that `<testsuites>` should typically wrap `<testsuite>` in
phpunit.xml.

> The <testsuites> element and its one or more <testsuite> children can
> be used to compose a test suite out of test suites and test cases.

This project may get a small performance boost
running tests in CI with paratest(2 processes) instead of phpunit.
Paratest works locally, and supports php 7.1+.

See https://github.com/paratestphp/paratest/
2020-02-20 22:42:16 -05:00
Matthew Brown
2d69349cd4
Remove you-are-using-it-wrong test 2020-02-20 14:16:03 -05:00
Teemu Koskinen
1801420305 Most gd functions that output an image accept either a filename or a stream resource as the optional second parameter
The only exception is imagexbm, which only accepts a filename (and which is optional)
2020-02-20 13:47:47 -05:00