Download the PHP package sematico/wp-phpscoper without Composer

On this page you can find all versions of the php package sematico/wp-phpscoper. 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 wp-phpscoper

ℹ️ WP-PHPScoper

This package provides an opinionated PHP-Scoper configuration for WordPress plugins. Built-in CLI commands are provided to generate exclusions and to install php-scoper.

The package has been built for my own projects and it has been open-sourced in the hope that it will be useful to others.

📦 Installation

Navigate to the folder of your WordPress plugin and run the following command:

This will install the package and add the php-scoper binary to your project's vendor/bin directory.

📝 Usage

Setup

To install php-scoper, run the following command:

This will run specific composer commands to install php-scoper.

Exclusions

To generate exclusions, run the following command:

This will generate a list of exclusions for php-scoper. Follow the prompts to select the types of exclusions you want to generate.

About the exclusions

Exclusions are generated inside the .phpscoper folder in your project's root directory. The exclusions files are JSON files that contain an array of classes, functions, and constants that should be excluded from being scoped.

The currently supported exclusions are:

WordPress

WordPress exclusions are generated by using the php-stubs/wordpress-globals and php-stubs/wordpress-stubs packages. Your plugin must have those packages installed in order for the exclusions to be generated.

Attempting to generate exclusions for a plugin that does not have those packages installed will result in an error.

⚙️ Scoper Configuration

The package provides a Configurator class that can be used to generate the scoper configuration file.

Note The Configurator class and it's dependencies must be manually required in order to use it.

Configurator::makeFinder()

The makeFinder() method takes an array of vendor paths and returns a Finder instance that can be used to find PHP files in the specified paths.

For more information on how to use the makeFinder() method, see the source code.

Configurator::addFinder()

The addFinder() method takes a Finder instance and adds it to the list of finders used to find PHP files.

Configurator::getScoperConfiguration()

The getScoperConfiguration() method returns an array that can be used to configure php-scoper. For more information on the configuration options, see the php-scoper documentation.

📄 Aknowledgements

❔ Support

Please note that this is a personal project and support will be limited to bug reports and minor issues only.

🚨 Security Issues

If you discover a security vulnerability, please email [email protected]. All security vulnerabilities will be promptly addressed.

🔖 License

Distributed under the MIT License. See LICENSE for more information.


All versions of wp-phpscoper with dependencies

PHP Build Version
Package Version
Requires symfony/console Version ^7.1
nikic/php-parser Version ^5.0
symfony/process Version ^7.1
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 sematico/wp-phpscoper contains the following files

Loading the files please wait ....