Download the PHP package humanmade/psalm-plugin-wordpress without Composer

On this page you can find all versions of the php package humanmade/psalm-plugin-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 psalm-plugin-wordpress

WordPress plugin for Psalm

Packagist Packagist

Write type-safe WordPress code.

This Psalm plugin provides all WordPress and WP CLI stubs, so your WordPress based project or plugin will have type information for calls to WordPress APIs. This ensures your WordPress plugin or theme has less bugs!

Installation

Please refer to the full Psalm documentation for a more detailed guide on introducing Psalm into your project.

After Psalm is installed, install this package and enable the plugin:

Configuration

If you follow the installation instructions, the psalm-plugin command will add this plugin configuration to the psalm.xml configuration file.

Further details about plugins can be found on Psalm's website.

Default WordPress stubs

If you do not want to use the default WordPress class/method/function stubs, which are part of this plugin, useDefaultStubs must be set to false:

Default WordPress hooks

If you do not want to use the default WordPress hooks, which are part of this plugin, useDefaultHooks must be set to false:

Custom hooks

You can also provide custom hooks:

If a directory is provided, the plugin will search for the following files:

The plugin expects a JSON representation of the hooks as per wp-hooks/generator.

Require passing all parameters

If you want to get an error if apply_filters and do_action do not have the same number of parameters in all cases, requireAllParams must be set to true:

WordPress paths

To help Psalm analyze your project you might need to define some of WordPress' default global constants such as those for paths.

The following example bootstrap file is for a Bedrock installation:

You could require WordPress' default constants functions but that requires a lot more boilerplating to allow those functions to effectively define constants.

Interested in contributing?

Feel free to open a PR to fix bugs or add features!

In addition, have a look at Psalm's contribution guidelines.

Who made this

Created by @joehoyle, maintained by the Psalm community.


All versions of psalm-plugin-wordpress with dependencies

PHP Build Version
Package Version
Requires ext-simplexml Version *
wp-hooks/wordpress-core Version ^1.3.0
php-stubs/wordpress-stubs Version ^6.0
php-stubs/wordpress-globals Version ^0.2.0
php-stubs/wp-cli-stubs Version ^2.7
vimeo/psalm Version ^5 || ^6
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 humanmade/psalm-plugin-wordpress contains the following files

Loading the files please wait ....