Download the PHP package odinns/phpstan-pest-this without Composer

On this page you can find all versions of the php package odinns/phpstan-pest-this. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phpstan-pest-this

phpstan-pest-this

PHPStan extensions that infer Pest closure $this type from configurable test-path mappings.

Why

Pest binds test closures at runtime, while PHPStan analyzes code statically. Without extra help, closure $this is commonly inferred as PHPUnit\Framework\TestCase, which can produce false positives in Pest suites.

Installation

Quick setup

Add the extension to your PHPStan config:

The extension does not provide default test case mappings. Configure how file paths map to your Pest base test case classes:

This is the common Laravel/Pest setup where feature and unit tests share Tests\TestCase.

If your project uses separate base test cases, map the more specific paths explicitly:

pathContains is a substring match against the analyzed file path. The first matching mapping wins.

Supported Pest calls

Optional: Generate a PHPStan proxy test case

If your base test case has protected assertion helpers, PHPStan may flag visibility errors from Pest closures. Use the included generator to create a static-analysis-only proxy class with public wrappers.

After installation:

While developing this package locally:

Then map the relevant directory to the generated proxy:

This proxy only affects static analysis. It does not change Pest runtime behavior.

Limitations

Development

Troubleshooting

Versioning

This package follows SemVer from 1.0.0 onward. Composer versions come from Git tags, not a version field in composer.json.

Contributing

Keep changes narrow. This package teaches PHPStan about Pest closure $this; it should not grow runtime Pest behavior or framework glue.

Run composer check before opening a PR.

Security

Report security issues privately through GitHub Security Advisories:

https://github.com/odinns/phpstan-pest-this/security/advisories/new

Please do not open public issues for security reports.

Changelog

See CHANGELOG.md for release notes.

License

MIT


All versions of phpstan-pest-this with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
phpstan/phpstan Version ^2.1.38
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package odinns/phpstan-pest-this contains the following files

Loading the files please wait ...