1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00
Commit Graph

13702 Commits

Author SHA1 Message Date
Bruce Weirdan
f782767438
Merge pull request #10186 from tscni/fix/referenced-function-ns 2023-09-09 16:55:23 +03:00
Tinjo Schöni
8fbe14a34b
Restore support for namespaced functions in referencedFunction config 2023-09-09 01:47:09 +02:00
Bruce Weirdan
8362cc6900
Merge pull request #10161 from weirdan/composer.json-tweaks 2023-09-03 23:06:57 +02:00
Bruce Weirdan
d7ba2cc5ee
Merge pull request #10176 from weirdan/flag-invalid-declares 2023-09-03 00:06:39 +02:00
Bruce Weirdan
cd8fc46554
Flag invalid declares 2023-09-02 23:41:50 +02:00
Bruce Weirdan
c0599975c6
Merge pull request #10169 from robchett/fix_InheritorViolation 2023-08-31 23:34:29 +02:00
robchett
d0c4d170b0
Apply psalm-inheritors to interfaces too 2023-08-31 23:12:10 +02:00
robchett
e23971ca29
InheritorViolation was only being triggered on grand-childen classes
Fixes #10167
2023-08-31 23:12:07 +02:00
Bruce Weirdan
ca967bc162
Added support links 2023-08-30 07:45:16 +02:00
Bruce Weirdan
791e5d65b5
composer.json tweaks
Psalm is not a library.

Also updated `composer lint` description.
2023-08-30 07:37:29 +02:00
Bruce Weirdan
cc7ed9586e
Merge pull request #10156 from boesing/bugfix/prevent-infinite-loop-in-type-parser 2023-08-28 12:06:45 +02:00
Bruce Weirdan
3814fbb231
Merge pull request #10157 from boesing/bugfix/assertions-from-inherited-docblock 2023-08-28 12:04:47 +02:00
Maximilian Bösing
66c01813c1
refactor: move assertion detection based on inherited classes/interfaces into internal resolver
This also enables `ExistingAtomicStaticCallAnalyzer` to detect those inherited assertions.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-28 11:09:23 +02:00
Bruce Weirdan
b29ea52dd9
Merge pull request #10159 from vimeo/fix-crash-on-property-access-with-missing-dependency 2023-08-28 02:10:39 +02:00
Bruce Weirdan
b3150d451a
Fix crash on property access to undefined property on a class with a missing dependncy 2023-08-28 01:58:02 +02:00
Maximilian Bösing
2a0ce2fecc
qa: add newlines to prevent exceeding 120 character line-length limit
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-28 01:15:49 +02:00
Maximilian Bösing
5e520e6bff
bugfix: properly inherit assertions from parents or implemented interfaces
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-28 01:12:28 +02:00
Maximilian Bösing
3fa5710400
qa: preserve already detected modifications
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-27 22:38:43 +02:00
Maximilian Bösing
d9ebab6b75
bugfix: prevent infinite-loop when resolving type-aliases
The type-expander returns the same `intersection_type` in case something is not properly expandable. To avoid infinite-loop, we do explicitly verify that the expanded  alias is actually resolved

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-27 17:08:55 +02:00
Bruce Weirdan
77436b1339
Merge pull request #10154 from cgocast/5.x 2023-08-27 05:27:41 +02:00
Bruce Weirdan
55fb26951a
Merge pull request #10155 from weirdan/update-mysqli-stub 2023-08-27 04:37:25 +02:00
Bruce Weirdan
23ad49cbe4
Update mysqli stub
Refs vimeo/psalm#9851
2023-08-27 04:17:23 +02:00
cgocast
bb902990f8 Sink for ReflectionFunction::__construct() 2023-08-26 22:09:27 +02:00
cgocast
c8b47b17bf Fix typo 2023-08-26 21:54:26 +02:00
cgocast
72c9bf8575 New sinks for TaintedCallable #10117 2023-08-26 19:29:00 +02:00
Bruce Weirdan
8bfcf473b9
Merge pull request #10151 from weirdan/strrchr-before_needle 2023-08-26 01:44:57 +02:00
Bruce Weirdan
9b6edffc44
Merge pull request #10150 from boesing/bugfix/enum-values 2023-08-26 01:43:07 +02:00
Bruce Weirdan
5332853f4f
Merge pull request #10149 from lens0021/master-1 2023-08-26 01:42:01 +02:00
Bruce Weirdan
b6ed045746
strrchr(): $before_needle parameter
Refs: php/php-src#11430
2023-08-26 01:36:05 +02:00
Bruce Weirdan
ad0a132d7f
Update src/Psalm/Type.php 2023-08-25 19:30:16 -04:00
Maximilian Bösing
e985e8aadb
qa: add proper parameter type-hint to suit psalm analysis
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-26 00:49:02 +02:00
Lens0021 / Leslie
5aac98b173
A semicolon expected 2023-08-26 07:44:24 +09:00
Maximilian Bösing
a6b646f0e3
qa: re-arrange code to avoid line-length limit of 120 chars
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-26 00:42:33 +02:00
Maximilian Bösing
a8bb8d38ea
qa: ensure that we do have at least one enum case extracted from the value-of<Enum> usage
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-26 00:41:06 +02:00
Maximilian Bösing
f93ac70a0a
qa: resolving psalm issues
- remove unused variable
- add assertion to reduce possible types from `TEnumCase`
- use `TypeCombiner` to provide proper `Union` containing all literals

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-26 00:36:20 +02:00
Maximilian Bösing
cd3e294bfd
bugfix: remove atomic type comparator regarding TEnumCase
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-26 00:15:53 +02:00
Maximilian Bösing
6c1899df13
qa: apply coding standard
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-26 00:08:14 +02:00
Maximilian Bösing
5948559a31
feature: introducing proper handling of value-of in combination with backed enums
This introduces both:
- a bugfix for a regression introduced by `31eaf83c4` which prevents backed enums are incorrectly identified as literals
- an additional feature so that `value-of` can be used with backed enums to assert any of the enum cases values

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-25 23:58:53 +02:00
Maximilian Bösing
31eaf83c49
bugfix: prevent enums from being detected as literals
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-25 23:54:31 +02:00
Maximilian Bösing
22bcd576d3
qa: add test to verify backed enums are no literals
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-25 23:53:58 +02:00
Bruce Weirdan
0160c469cd
Merge pull request #10145 from weirdan/show-success-message-with-github-formatter 2023-08-24 13:25:52 +02:00
Bruce Weirdan
b1c25fa30a
Show success message and type stats with GHA formatter 2023-08-24 03:32:18 +02:00
Bruce Weirdan
8f3b1b5c1d
Merge pull request #10128 from kkmuffme/add-exec-output-param-out
Add exec output param out
2023-08-22 16:18:04 +02:00
kkmuffme
4f87da19e2 stubs exec param-out for $output 2023-08-22 15:28:28 +02:00
Bruce Weirdan
c34d5132b5
Merge pull request #10115 from edsrzf/file-find-unused-baseline 2023-08-21 09:44:07 +02:00
Bruce Weirdan
0a9e647603
Do not change baseline when checking specific files 2023-08-21 09:25:37 +02:00
Bruce Weirdan
357a0a3324
Merge pull request #10136 from weirdan/extract-impure-functions-list 2023-08-21 08:04:57 +02:00
Bruce Weirdan
d39a103e60
Merge pull request #10138 from weirdan/more-gc_status-fields 2023-08-21 07:29:42 +02:00
Bruce Weirdan
97fc480aca
Added more gc_status return fields
Fixes vimeo/psalm#10022
2023-08-21 07:10:24 +02:00
Bruce Weirdan
e6aa3fd23c
Extract the list of impure functions into its own dictionary 2023-08-21 06:14:56 +02:00