Download the PHP package syntatis/phpstan-psr-11 without Composer

On this page you can find all versions of the php package syntatis/phpstan-psr-11. 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-psr-11

😶 PHPStan for PSR-11

ci Packagist Dependency Version

PHPStan rules for PSR-11 ContainerInterface.

The get method in the ContainerInterface interface return type is mixed. This is not really useful for static analysis tools like PHPStan. Since it cannot infer the type of the service. You will need to add a PHPDoc comment to the variable to help PHPStan infer the type or check the type of the service at runtime with is_a or instanceof or use assertion to narrow down the type.

For example:

This package adds a return type to the get method, based on the requested service. You do not need to add PHPDoc comments or check the type of the service at runtime.

For example:

Installation

Install the package with Composer:

Include extension.neon in your project's PHPStan config:

Or, use phpstan/extension-installer.

Configuration

By default, the rule will check Psr\Container\ContainerInterface. If you've scoped or prefixed the interface, you can configure the rule to check the interface by providing the interface name in the configuration. For example:


All versions of phpstan-psr-11 with dependencies

PHP Build Version
Package Version
Requires psr/container Version ^2.0
symfony/polyfill-php80 Version ^1.31
phpstan/phpstan Version ^2.1
php Version ^7.4 || ^8.0
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 syntatis/phpstan-psr-11 contains the following files

Loading the files please wait ....