1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
Go to file
Marco Pivetta ed2cde1b93 Mark Reflection(Method|Property)#setAccessible() as pure starting from PHP 8.1 onwards
This will highlight unused code.

Ref: https://github.com/php/php-src/pull/5412
Ref: https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
Ref: https://github.com/php/php-src/pull/5411

Example https://3v4l.org/PNeeZ

```php
<?php

class Foo {
    private $bar = 'baz';
    private function taz() { return 'waz'; }
}

//var_dump((new ReflectionProperty(Foo::class, 'bar'))->getValue(new Foo));
//var_dump((new ReflectionMethod(Foo::class, 'taz'))->invoke(new Foo));
```

Produces (starting from PHP 8.1):

```
string(3) "baz"
string(3) "waz"
```
2022-12-07 14:22:15 +01:00
.circleci Set vimeo/psalm version explicitly 2022-12-01 19:59:51 -04:00
.github Bump fkirc/skip-duplicate-actions from 4.0.0 to 5.3.0 2022-12-05 07:05:39 +00:00
assets/psalm-phar
bin Disable parallel PHAR build 2022-11-26 00:36:47 -04:00
build/phpunit
dictionaries mysqli_execute_query accepts any type of param 2022-12-04 17:29:50 +00:00
docs Remove unecassary subheadings in error levels documentation 2022-12-02 00:07:37 +00:00
examples Immutable unions (#8627) 2022-11-04 19:04:23 +01:00
src/Psalm Declaring more precise types and purity boundaries on ext-reflection symbols in .phpstub files 2022-12-06 11:08:30 +01:00
stubs Mark Reflection(Method|Property)#setAccessible() as pure starting from PHP 8.1 onwards 2022-12-07 14:22:15 +01:00
tests Allowed taints to pass through urlencode() 2022-12-05 17:25:36 -06:00
vendor-bin Update humbug/box 2022-11-25 23:58:41 -04:00
.appveyor.yml Fix namespaced min/max int range keyword issue introduced in #7775. 2022-04-27 01:44:57 -04:00
.editorconfig
.gitattributes Include docs with vendor dist 2022-11-08 20:35:26 -05:00
.gitignore Ignore phpenv file 2022-11-25 05:31:44 -04:00
box.json.dist Bake version data into PHAR file 2022-11-26 00:00:43 -04:00
CODE_OF_CONDUCT.md
composer.json Bump slevomat/coding-standard 2022-11-27 16:16:52 -04:00
config.xsd Merge remote-tracking branch 'origin/4.x' into HEAD 2022-10-16 13:41:27 +02:00
CONTRIBUTING.md
keys.asc.gpg
LICENSE
phpcs.xml Enforce arrow function formatting 2022-11-23 00:08:29 -04:00
phpunit.xml.dist wip: lots of fixes to the callmap 2022-06-14 15:16:13 +02:00
psalm Drop legacy procedural files 2022-01-03 12:04:35 +02:00
psalm-baseline.xml Immutable unions (#8627) 2022-11-04 19:04:23 +01:00
psalm-language-server Drop legacy procedural files 2022-01-03 12:04:35 +02:00
psalm-plugin Drop legacy procedural files 2022-01-03 12:04:35 +02:00
psalm-refactor Drop legacy procedural files 2022-01-03 12:04:35 +02:00
psalm.xml.dist Remove CallMapTest.php from Psalm self-analysis 2022-11-30 00:28:00 -05:00
PsalmLogo.png
psalter Drop legacy procedural files 2022-01-03 12:04:35 +02:00
README.md Add support for strict arrays, fix type alias intersection, fix array_is_list assertion on non-lists (#8395) 2022-11-05 22:34:42 +01:00
scoper.inc.php Update humbug/box 2022-11-25 23:58:41 -04:00
UPGRADING.md Document BC break 2022-11-29 04:29:26 -04:00

Psalm

Packagist Packagist Psalm coverage Psalm level

Psalm is a static analysis tool for finding errors in PHP applications.

Installation

To get started, check out the installation guide.

Live Demo

You can play around with Psalm on its website.

Documentation

Documentation is available on Psalms website, generated from the docs folder.

Interested in contributing?

Have a look at CONTRIBUTING.md.

Who made this

Built by Matt Brown (@muglug).

Maintained by Orklah (@orklah), Daniil Gentili (@danog), and Bruce Weirdan (@weirdan).

The engineering team at Vimeo have provided a lot encouragement, especially @nbeliard, @erunion and @nickyr.