Download the PHP package szepeviktor/phpstan-wordpress without Composer

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

[!IMPORTANT] Hello everyone! This is Viktor who runs this PHPStan extension. I am planning to stop contributing to the WordPress ecosystem because it is extremely difficult and no one asks me to join his team as I am a thinker, a devops person, a tool maker (not a builder).

Please support my work to avoid abandoning this package.

Sponsor

Thank you!

WordPress extensions for PHPStan

Packagist stats Packagist Tweet Build Status PHPStan

Static analysis for the WordPress ecosystem.

Installation

Add this package to your project.

Make PHPStan find it automatically using phpstan/extension-installer.

Or manually include it in your phpstan.neon.

Configuration

Needs no extra configuration. :smiley: Simply configure PHPStan - for example - this way.

Please read PHPStan Config Reference.

:bulb: Use Composer autoloader or a custom autoloader!

Usage

Just start the analysis: vendor/bin/phpstan analyze then fix an error and GOTO 10!

You find further information in the examples directory e.g. examples/phpstan.neon.dist

Usage in WooCommerce webshops

Please see WooCommerce Stubs

What this extension does

Usage of an apply_filters() docblock

WordPress core - and the wider WordPress ecosystem - uses PHPDoc docblocks in a non-standard manner to document the parameters passed to apply_filters(). Example:

This extension understands these docblocks when they're present in your code and uses them to instruct PHPStan to treat the return type of the filter as certain, according to the first @param tag. In the example above this means PHPStan treats the type of $title as string.

To make the best use of this feature, ensure that the type of the first @param tag in each of these such docblocks is accurate and correct.

Make your code testable

Dirty corner (FAQ)

WordPress uses conditional function and class definition for override purposes. Use sed command to exclude function stubs when they are previously defined.


All versions of phpstan-wordpress with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2 || ^8.0
php-stubs/wordpress-stubs Version ^4.7 || ^5.0 || ^6.0
phpstan/phpstan Version ^1.11.0
symfony/polyfill-php73 Version ^1.12.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 szepeviktor/phpstan-wordpress contains the following files

Loading the files please wait ....