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
Benjamin Morel
933714f6ad
Add ReflectionProperty properties
2022-06-24 18:47:49 +02:00
orklah
9b4c8cb53f
Merge pull request #8151 from othercorey/fix-array-sigs
...
Fix array_* function signatures
2022-06-24 18:43:00 +02:00
orklah
cd54574616
Merge pull request #8152 from othercorey/fix-filter-var
...
Fix filter_var and filter_var_array signatures
2022-06-24 18:42:31 +02:00
orklah
13100bb5e9
Merge pull request #8153 from othercorey/fix-datefmt
...
Fix datefmt_* function signatures
2022-06-24 18:41:54 +02:00
Corey Taylor
3297e35d9a
Fix datefmt_* function signatures
2022-06-23 22:55:29 -05:00
Corey Taylor
e1e858512d
Fix filter_var and filter_var_array signatures
2022-06-23 21:50:41 -05:00
Corey Taylor
417bf87df0
Fix array_* function signatures
2022-06-23 20:32:29 -05:00
orklah
6858fb60ce
Merge pull request #8147 from othercorey/fix-ldap
...
Fix signatures of ldap_* functions
2022-06-23 22:28:21 +02:00
Corey Taylor
b9cae01855
Remove ldap functions dropped in php 8.0
2022-06-23 15:06:09 -05:00
Corey Taylor
b053253513
Fix signatures of ldap_* functions
2022-06-23 04:21:56 -05:00
orklah
1f87a5056e
Merge pull request #8144 from SamMousa/feature-check-unused-callmap-ignore
...
Callmap validation ignore list cleanup
2022-06-22 19:19:57 +02:00
Sam
de8187d138
Update tests/Internal/Codebase/InternalCallMapHandlerTest.php
2022-06-22 19:04:28 +02:00
Sam Mousa
c393a20471
fix static analysis comments
2022-06-22 15:37:51 +02:00
Sam Mousa
ac091902c1
php version specific ignores
2022-06-22 15:32:35 +02:00
Sam Mousa
08aea9c8ca
remove debug code
2022-06-22 15:08:50 +02:00
Sam Mousa
f8e548e811
fix code style remove debug code
2022-06-22 15:05:24 +02:00
Sam Mousa
d13a428cb5
update ignores, cleanup test file
2022-06-22 14:57:40 +02:00
Sam Mousa
d2467cfb7e
sort ignore list add more functions to it
2022-06-22 13:28:17 +02:00
Sam Mousa
37549ee03c
add test for ignore list cleanup
2022-06-22 12:59:47 +02:00
sergkash7
ffe18296b0
Update phpredis.phpstub
2022-06-21 22:03:11 +03:00
orklah
be4d0ff082
Merge pull request #8126 from othercorey/patch-1
...
Add missing ldap_unbind mapping for php 8.1
2022-06-20 22:59:17 +02:00
Corey Taylor
07b335d068
Update ldap parameter to ldap_unbind in callmap
2022-06-20 06:59:36 -05:00
othercorey
9ce57e6c10
Add missing ldap_unbind mapping for php 8.1
2022-06-19 07:44:53 -05:00
orklah
00c0c0eaac
Merge pull request #8117 from BenMorel/reflectionclass_isenum
...
Add ReflectionClass & ReflectionObject::isEnum()
2022-06-18 13:48:04 +02:00
Benjamin Morel
d0cbf97e23
Add ReflectionClass::isEnum()
2022-06-17 16:42:21 +02:00
orklah
ad46fc0f92
Merge pull request #8114 from drealecs/fix_number_format_callmap
...
number_format: allow third and forth parameters to be nullable
2022-06-15 23:10:23 +02:00
orklah
9a64143125
Merge pull request #8104 from SamMousa/automated-callmap-validation
...
tests: add test that validates the callmap in the current runtime
2022-06-15 18:16:03 +02:00
Sam
db3447513e
Merge branch '4.x' into automated-callmap-validation
2022-06-15 16:06:36 +02:00
Sam Mousa
f6be3efa42
fix: added more type annotations
2022-06-15 15:05:06 +02:00
Sam Mousa
cc58fd9401
fix: add more typehints
2022-06-15 14:46:50 +02:00
Sam Mousa
df750709cc
fix: ignore last remaining failing function
2022-06-15 13:29:22 +02:00
Sam Mousa
b46f556662
chore: fix cs
2022-06-15 13:28:09 +02:00
Sam Mousa
0e7ea855d0
fix: ignore functions that fail on windows
2022-06-15 13:23:32 +02:00
orklah
c60e0a890c
Merge pull request #8056 from kkmuffme/phpdoc-false-positives-for-partially-invalid
...
fix false positives for partially invalid phpdoc
2022-06-15 13:21:26 +02:00