Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phpstan/phpstan-src
PHPStan's source code. This is where development happens. Check https://github.com/phpstan/phpstan for the distribution repository.
https://github.com/phpstan/phpstan-src
Last synced: about 10 hours ago
JSON representation
PHPStan's source code. This is where development happens. Check https://github.com/phpstan/phpstan for the distribution repository.
- Host: GitHub
- URL: https://github.com/phpstan/phpstan-src
- Owner: phpstan
- License: mit
- Created: 2019-11-03T16:55:20.000Z (about 5 years ago)
- Default Branch: 1.11.x
- Last Pushed: 2024-04-12T21:45:43.000Z (7 months ago)
- Last Synced: 2024-04-14T01:02:04.510Z (7 months ago)
- Language: PHP
- Homepage: https://phpstan.org/
- Size: 44.8 MB
- Stars: 298
- Watchers: 19
- Forks: 423
- Open Issues: 105
-
Metadata Files:
- Readme: README.md
- Changelog: changelog-generator/.gitignore
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# PHPStan - PHP Static Analysis Tool
[![Build](https://github.com/phpstan/phpstan-src/workflows/Tests/badge.svg)](https://github.com/phpstan/phpstan-src/actions)
[![PHPStan Enabled](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat)](https://github.com/phpstan/phpstan)---
This repository (`phpstan/phpstan-src`) is for PHPStan's development only. Head to [`phpstan/phpstan`](https://github.com/phpstan/phpstan) for the main README, or to [create an issue](https://github.com/phpstan/phpstan/issues/new/choose).
## Contributing
Any contributions are welcome.
### Installation
```bash
composer install
```If you encounter dependency problem, try using `export COMPOSER_ROOT_VERSION=1.11.x-dev`
If you are using macOS and are using an older version of `patch`, you may have problems with patch application failure during `composer install`. Try using `brew install gpatch` to install a newer and supported `patch` version.
### Building
PHPStan's source code is developed on PHP 8.1. For distribution in `phpstan/phpstan` package and as a PHAR file, the source code is transformed to run on PHP 7.2 and higher.
Initially you need to run `composer install` in case you aren't working in a directory which was built before.
Afterwards you can either run the whole build including linting and coding standards using
```bash
make
```### Running development version
You can also choose to run only part of the build. To analyse PHPStan by PHPStan itself, run:
```bash
make phpstan
```### Fixing code style
To detect code style issues, run:
```bash
make cs
```And then to fix code style, run:
```bash
make cs-fix
```### Running tests
Run:
```bash
make tests
```### Debugging
1. Make sure Xdebug is installed and configured.
2. Add `--xdebug` option when running PHPStan. Without it PHPStan turns the debugger off at runtime.
3. If you're not debugging the [result cache](https://phpstan.org/user-guide/result-cache), also add the `--debug` option.## Code of Conduct
This project adheres to a [Contributor Code of Conduct](https://github.com/phpstan/phpstan/blob/master/CODE_OF_CONDUCT.md).
By participating in this project and its community, you are expected to uphold this code.