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

10870 Commits

Author SHA1 Message Date
orklah
057d78dc41
Merge pull request #8214 from BenMorel/geos2
Fix GEOSGeometry stubs with default values
2022-07-11 18:52:08 +02:00
Benjamin Morel
bcf3c5153c Fix GEOSGeometry stubs with default values 2022-07-11 11:51:35 +02:00
orklah
ac39688d13
Merge pull request #8243 from kkmuffme/change-trigger-error-to-error-log
use error_log instead of trigger_error
2022-07-10 12:54:31 +02:00
kkmuffme
a77f6fca12 use error_log 2022-07-10 12:04:42 +02:00
orklah
ce7d4ee165
Merge pull request #8240 from kkmuffme/fix-cache-race-condition-multiple-psalm-instances
use lock to fix race condition in cache
2022-07-10 10:32:06 +02:00
kkmuffme
7742d8a903 use lock to fix race condition 2022-07-10 10:03:18 +02:00
orklah
6e27c236f3
Merge pull request #8219 from Tofandel/patch-2
fix: ltrim may return class-string #8218
2022-07-06 20:27:50 +02:00
orklah
65ffac249e
Merge pull request #8220 from othercorey/fix-codestyle
Fix codestyle errors in InternalCallMapHandlerTest
2022-07-06 20:24:00 +02:00
Corey Taylor
31bee0c845 Fix codestyle erors in InternalCallMapHandlerTest 2022-07-06 03:33:34 -05:00
orklah
e28cd128db
Merge pull request #8217 from othercorey/fix-callmap-funcs
Fix several CallMap function signatures
2022-07-06 07:16:13 +02:00
orklah
38443effb5
Merge pull request #8166 from othercorey/func-return-signatures
Allow testing expected CallMap return types
2022-07-06 07:14:15 +02:00
Adrien Foulon
6c49dad38c
fix: ltrim may return class-string #8218
Fixes #8218
2022-07-06 02:36:20 +02:00
Corey Taylor
b1e3094bae Allow testing expected CallMap return types and ignore functions that currently fail 2022-07-05 17:32:34 -05:00
Corey Taylor
e0ebfe19a2 Fix class functions CallMap signatures 2022-07-05 15:36:09 -05:00
Corey Taylor
2469b6222d Fix extract() CallMap signature 2022-07-05 15:36:09 -05:00
Corey Taylor
c71dcd581e Fix fputcsv() CallMap signature 2022-07-05 15:36:09 -05:00
Corey Taylor
d0dcd543e4 Fix count() CallMap signature 2022-07-05 15:36:06 -05:00
orklah
b1568920ee
Merge pull request #8210 from vimeo/dependabot/github_actions/actions/checkout-3
build(deps): bump actions/checkout from 2 to 3
2022-06-30 19:30:34 +02:00
orklah
fdb664fe1b
Merge pull request #8209 from vimeo/dependabot/github_actions/actions/cache-3
build(deps): bump actions/cache from 2 to 3
2022-06-30 19:18:33 +02:00
orklah
cf8f0a0734
Merge pull request #8208 from vimeo/dependabot/github_actions/fkirc/skip-duplicate-actions-4.0.0
build(deps): bump fkirc/skip-duplicate-actions from 3.4.0 to 4.0.0
2022-06-30 19:18:13 +02:00
orklah
a129decea5
Merge pull request #8207 from vimeo/dependabot/github_actions/mheap/github-action-required-labels-2
build(deps): bump mheap/github-action-required-labels from 1 to 2
2022-06-30 19:18:03 +02:00
dependabot[bot]
005d3e2f50
build(deps): bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-30 17:05:08 +00:00
dependabot[bot]
236c24faea
build(deps): bump actions/cache from 2 to 3
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-30 17:05:06 +00:00
dependabot[bot]
206a903e46
build(deps): bump fkirc/skip-duplicate-actions from 3.4.0 to 4.0.0
Bumps [fkirc/skip-duplicate-actions](https://github.com/fkirc/skip-duplicate-actions) from 3.4.0 to 4.0.0.
- [Release notes](https://github.com/fkirc/skip-duplicate-actions/releases)
- [Commits](https://github.com/fkirc/skip-duplicate-actions/compare/v3.4.0...v4.0.0)

---
updated-dependencies:
- dependency-name: fkirc/skip-duplicate-actions
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-30 17:05:02 +00:00
dependabot[bot]
f4e518c350
build(deps): bump mheap/github-action-required-labels from 1 to 2
Bumps [mheap/github-action-required-labels](https://github.com/mheap/github-action-required-labels) from 1 to 2.
- [Release notes](https://github.com/mheap/github-action-required-labels/releases)
- [Commits](https://github.com/mheap/github-action-required-labels/compare/v1...v2)

---
updated-dependencies:
- dependency-name: mheap/github-action-required-labels
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-30 17:04:59 +00:00
orklah
ebb2ca2b3b
Merge pull request #8203 from turrisxyz/Dependabot-GitHub-Actions
chore: Included githubactions in the dependabot config
2022-06-30 19:04:39 +02:00
naveen
4c9747203e chore: Included githubactions in the dependabot config
This should help with keeping the GitHub actions updated on new releases. This will also help with keeping it secure.

Dependabot helps in keeping the supply chain secure https://docs.github.com/en/code-security/dependabot

GitHub actions up to date https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot

https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool
Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-06-30 01:29:15 +00:00
orklah
1d32a47d9e
Merge pull request #8189 from turrisxyz/Pinned-Dependencies-GitHub
chore: Set permissions for GitHub actions
2022-06-29 18:54:52 +02:00
orklah
51c6e99377
Merge pull request #8201 from BenMorel/issue8167
Fix return type of ReflectionNamedType::getName()
2022-06-29 18:40:13 +02:00
Benjamin Morel
df6fdb99d7 Fix return type of ReflectionNamedType::getName()
Fixes #8167
2022-06-29 18:22:46 +02:00
orklah
4bc803dd8a
Merge pull request #8193 from kkmuffme/improve-psalm-performance
Various minor improvements to speed up by ~10%
2022-06-29 00:29:21 +02:00
kkmuffme
90586083e6 check if file in cache already before adding
* reduces I/O by 30%
* minimal performance improvement (<0.5%)
2022-06-28 20:46:23 +02:00
kkmuffme
9082eab915 improve cache hash performance
* do not concatenate with timestamp as this is slow, since $file_contents may be big
* use file contents not file path for cache hash only to ensure it works if file_path not set but file_content is
* improves performance by ~5%
2022-06-28 20:45:03 +02:00
kkmuffme
57239a7c8e assign keys to variable for better performance
improves performance by ~1-1.5%
2022-06-28 20:40:43 +02:00
kkmuffme
4048bb9d8b only sort when necessary and faster hash
* sort is much more expensive than count, so we only sort if we have something to sort
* could implement for ksort too, but advantage there is minimal since we almost always have more than 1 possibility
* use same hash algorithm as in other places (= faster)
* reduces runtime by 2-3%
2022-06-28 20:40:43 +02:00
kkmuffme
4db928e923 split loop for better performance
* check isset for all elements first, as array_diff is much more expensive
* Improves performance by 1%
2022-06-28 20:40:43 +02:00
naveen
bd50c4e7b0 chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-06-28 00:29:16 +00:00
Bruce Weirdan
d6624c500a
Merge pull request #8188 from TimWolla/patch-1 2022-06-28 01:29:16 +03:00
Tim Düsterhus
31ad16d29c
Stop using deprecated string interpolation syntax in StatementsProvider.php
This fixed the following PHP 8.2 deprecation:

> Uncaught RuntimeException: PHP Error: Using ${var} in strings is deprecated, use {$var} instead in …/vimeo/psalm/src/Psalm/Internal/Provider/StatementsProvider.php:140

see: https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation
2022-06-27 23:41:51 +02:00
orklah
06dd975cb5
Merge pull request #8174 from AndrolGenhald/fix-attribute-crash
Fix crash when redefining method with fewer params (fixes #8141).
2022-06-26 13:47:54 +02:00
AndrolGenhald
e751a27eaf Fix crash when redefining method with fewer params (fixes #8141). 2022-06-26 06:27:46 -05:00
orklah
b3038f0936
Merge pull request #8164 from AndrolGenhald/encapsed-literal-strings
Encapsed literal strings
2022-06-26 12:52:33 +02:00
orklah
a4ab664aee
Merge pull request #8165 from AndrolGenhald/stop-using-issuebuffer-add-😡
Improve @psalm-internal and prevent usage of IssueBuffer::add().
2022-06-25 10:12:10 +02:00
AndrolGenhald
b671117417 Improve @psalm-internal and prevent usage of IssueBuffer::add(). 2022-06-25 02:09:40 -05:00
AndrolGenhald
5ff54bce46 CS fix. 2022-06-24 21:03:33 -05:00
AndrolGenhald
3aea0987ef Fix non-empty encapsed string check. 2022-06-24 20:28:04 -05:00
AndrolGenhald
a804e459b6 PHP 7.1 compatibility. 2022-06-24 19:29:12 -05:00
AndrolGenhald
2559222f67 More interpolation and concatenation improvements. 2022-06-24 19:22:59 -05:00
orklah
d626d24241
Merge pull request #8148 from BenMorel/reflectionproperty
Add ReflectionProperty properties
2022-06-25 01:29:09 +02:00
AndrolGenhald
450409f045 Infer literal string from encapsed (interpolated) string. 2022-06-24 17:24:34 -05:00