adrew
2355f1bcdb
Remove unused use
2021-12-30 22:46:18 +03:00
adrew
4a903c71a1
Checking psalm-if-this-is before applying psalm-this-out
2021-12-30 21:48:25 +03:00
Bruce Weirdan
03b7e94748
Merge pull request #7232 from trowski/issue-7196
2021-12-30 10:03:17 +02:00
orklah
0b3e1299de
overwritten properties
2021-12-27 23:46:23 +01:00
Aaron Piotrowski
e23a915bb1
Fix first-class callables when used with magic method, built-in, or undefined methods
...
Closes #7196 .
2021-12-27 14:29:33 -06:00
orklah
ca25b0f815
always unflag before leaving a analyzer
2021-12-21 18:30:29 +01:00
rarila
97e6511fab
Set number of lines before and after namespace.
2021-12-15 04:58:32 +01:00
ralila
19b2a64ce8
Conversion of Psalm\Internal\Analyzer\**\*Analyzer
2021-12-14 02:31:26 +01:00
rarila
1c298c4605
Conversion of Psalm\Type
2021-12-14 02:31:22 +01:00
ralila
e32af3c05a
Conversion of Psalm\Type\Atomic
2021-12-14 02:26:28 +01:00
Aaron Piotrowski
1f3a37ff02
Add support for first-class callables
2021-12-09 10:54:49 -06:00
rarila
39402c233d
Return type hints ( #7065 )
...
Co-authored-by: ralila <>
2021-12-05 19:51:26 +02:00
ralila
245920e53c
Import instead of using fqn
2021-12-03 20:11:20 +01:00
Matthew Brown
175ba83332
Migrate most IssueBuffer::accepts calls to IssueBuffer::maybeAdd ( #7020 )
2021-11-29 14:54:17 -05:00
Bruce Weirdan
0cdb0dc04a
Merge pull request #6768 from zoonru/psalm-self-out-templates
2021-11-02 21:41:16 +02:00
orklah
68a4f9e930
emit UnevaluatedCode after exit or never returning functionlike
2021-11-01 22:13:29 +01:00
5fae548e62
Add template support to @psalm-self-out
2021-10-28 10:44:37 +02:00
orklah
bee5b69f7f
use Attribute feature of PHP-Parser to avoid dealing with dynamic properties
2021-10-13 13:27:56 +02:00
orklah
870ee4ff93
->args to ->getArgs
2021-10-09 23:37:04 +02:00
orklah
8b07e69645
Merge pull request #6514 from zoonru/if-this-is
...
Add if-this-is
2021-10-04 09:49:26 +02:00
orklah
a92fee8ae3
better combining
2021-09-25 11:21:06 +02:00
741c9ee471
Fixes
2021-09-22 10:26:21 +02:00
f8a959c079
Fix silly bug
2021-09-21 14:11:33 +02:00
7e0b489efe
Merge remote-tracking branch 'origin/master' into if-this-is
2021-09-21 12:12:15 +02:00
Matt Brown
19cc4cb4ee
Simplify lots of usage checks
2021-06-25 10:14:49 -04:00
Matt Brown
67d68a5dc0
Use more accurate variable name
2021-06-25 09:54:39 -04:00
Bruce Weirdan
6abce3525a
Enforce use
sort ( #5900 )
2021-06-07 22:55:21 -04:00
Matt Brown
f3fc112bae
Fix #4523 - fix short-circuiting for properties and method calls
2021-06-01 16:06:12 -04:00
Matt Brown
44c6d3035b
Add more mixed origin information
2021-03-20 21:45:38 -04:00
Bruce Weirdan
71a0457284
Emit ImplicitToStringCast in more places ( #5344 )
...
* Emit ImplicitToStringCast in more places
Fixes vimeo/psalm#5320
`to_string_cast` is set on successful comparison, thus it needs to
always bubble up (it will be ignored in UnionTypeComparator if some part
does not match).
* Fix implicit casts
* Fix handling of string method references in self-out context
2021-03-11 00:07:39 -05:00
Matt Brown
524084a64c
Tighten up rules arouund when mutation-free methods get memoised
2020-12-08 16:39:06 -05:00
2e3s
e46c68b1e5
Overwrite memoized return type after sum-type candidate is calculated ( #4805 )
...
* Overwrite memoized return type after sum-type candidate is calculated
* Fix mismatched types
* Fix code style
2020-12-08 09:35:11 -05:00
Matt Brown
462f8ba32b
Fix #4397 - allow offsetGet on inside isset
2020-10-25 22:16:43 -04:00
Matt Brown
009b33b17d
Support @no-named-args when calling in PHP 8
2020-10-02 20:58:51 -04:00
Matt Brown
c9e47450a7
Fix #4266 - prevent OOM when analysing closure unioned with invokable class
2020-10-02 00:47:42 -04:00
Matt Brown
14efde286f
4.x - refactor unused variable detection
...
This turns unused variable detection into an explicit control-flow problem, where before we had a more simplistic mark-and-sweep algorithm
2020-09-30 12:28:13 -04:00
orklah
f66d57f19d
add native return types ( #4116 )
...
* add native return types
* remove redundant phpdoc
2020-09-04 16:26:33 -04:00
Olle
13fef43ec8
Use isContainedBy instead of equals
2020-07-12 11:04:28 +00:00
Olle
5566a87e0b
Break up long line
2020-07-08 21:41:58 +00:00
Olle
ba108543e1
Fix indentation
2020-07-08 20:17:24 +00:00
Olle
285348efe9
New annotation: @psalm-if-this-is
2020-07-08 19:51:02 +00:00
Olle Härstedt
d8e8ce428e
Add new annotation: @psalm-self-out ( #3650 )
...
* Add new config: sealAllMethods
* Add some more tests
* Fix codesniffer issue with preg_quote
* Fix missing method in test
* New tag @self-out (WIP)
* Add self_out_type to method storage
* Add some notes
* More work on self-out (WIP)
* More work on self-out (WIP)
* Use psalm-self-out instead of self-out
* Remove extra file
* Cleanup
* Wrap around try-catch - how to check if a method has/should have storage?
* New method hasStorage()
* Fix indentation
* Fix some errors
* Fix indentation
* Cast storage type to type
* Add proper use-statement in method storage
* Correct test class name
* Allow self_out to be null
* method_id can be string (why, when?)
Co-authored-by: Olle <noemail>
2020-07-01 18:10:24 -04:00
Olle
ee9a7c00fe
method_id can be string (why, when?)
2020-06-30 16:02:48 +00:00
Olle
111f4b4f6e
Add proper use-statement in method storage
2020-06-30 15:33:14 +00:00
Olle
4cd3c93d0d
Cast storage type to type
2020-06-30 15:22:55 +00:00
Olle
dbf5628683
Fix some errors
2020-06-24 22:46:09 +00:00
Olle
966479387f
Fix indentation
2020-06-24 20:36:04 +00:00
Olle
8831d54170
Wrap around try-catch - how to check if a method has/should have storage?
2020-06-23 19:01:32 +00:00
Olle
a615f4423b
More work on self-out (WIP)
2020-06-21 23:06:04 +00:00
Olle
fffbccdacb
More work on self-out (WIP)
2020-06-21 22:18:14 +00:00