Download the PHP package divineniiquaye/php-invoker without Composer

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

The PHP Invoker

Latest Version Workflow Status Code Maintainability Coverage Status Quality Score Sponsor development of this project

divineniiquaye/php-invoker is a php library that allows invoking callables with named parameters in a generic and extensible way for PHP 7.1+, based on reference implementation PHP-DI Invoker created by Matthieu Napoli. This library provides clear extension points to let frameworks/projects implement any kind of dependency injection support they want, but not limited to dependency injection. Again, any PSR-11 compliant container can be provided.

πŸ“¦ Installation & Basic Usage

This project requires PHP 7.1 or higher. The recommended way to install, is via Composer. Simply run:

Let's say you working on a project and want to invoke some named parameters in callables with whatever the order of parameters, but should be matched by their names or instance. Then we'll need an over-engineered call_user_func().

In short, this library is meant to be a base building block for calling a function with named parameters and/or dependency injection.

Using DivineNii\Invoker\Invoker class method call:

Using DivineNii\Invoker\ArgumentResolver class in DivineNii\Invoker\Invoker class:

Extending the behavior of the DivineNii\Invoker\Invoker is easy and is done by adding a callable to ArgumentResolver class:

An DivineNii\Invoker\Invoker can chain multiple parameter resolvers to mix behaviors, e.g. you can mix "named parameters" support with "dependency injection" support.

Here is an implementation example for dumb dependency injection that creates a new instance of the classes type-hinted:

To use it:

A new instance of ArticleManager will be created by our parameter resolver. The fun starts to happen when we want to add support for many things:

It allows to support even the weirdest use cases like:

Rather than have you re-implement support for dependency injection with different containers every time, this package ships with 2 optional resolvers:

The DivineNii\Invoker\Invoker can be wired to your DI container to resolve the callables, but can resolve all callables including invokable class or object.

For example with an invokable class:

The same works for a class method:

πŸ““ Documentation

For in-depth documentation before using this library. Full documentation on advanced usage, configuration, and customization can be found at docs.biurad.com.

⏫ Upgrading

Information on how to upgrade to newer versions of this library can be found in the UPGRADE.

🏷️ Changelog

SemVer is followed closely. Minor and patch releases should not introduce breaking changes to the codebase; See CHANGELOG for more information on what has changed recently.

Any classes or methods marked @internal are not intended for use outside of this library and are subject to breaking changes at any time, so please avoid using them.

πŸ› οΈ Maintenance & Support

When a new major version is released (1.0, 2.0, etc), the previous one (0.19.x) will receive bug fixes for at least 3 months and security updates for 6 months after that new release comes out.

(This policy may change in the future and exceptions may be made on a case-by-case basis.)

Professional support, including notification of new releases and security updates, is available at Biurad Commits.

πŸ‘·β€β™€οΈ Contributing

To report a security vulnerability, please use the Biurad Security. We will coordinate the fix and eventually commit the solution in this project.

Contributions to this library are welcome, especially ones that:

Please see CONTRIBUTING for additional details.

πŸ§ͺ Testing

This will tests divineniiquaye/php-invoker will run against PHP 7.2 version or higher.

πŸ‘₯ Credits & Acknowledgements

πŸ™Œ Sponsors

Are you interested in sponsoring development of this project? Reach out and support us on Patreon or see https://biurad.com/sponsor for a list of ways to contribute.

πŸ“„ License

divineniiquaye/php-invoker is licensed under the BSD-3 license. See the LICENSE file for more details.

πŸ›οΈ Governance

This project is primarily maintained by Divine Niiquaye Ibok. Members of the Biurad Lap Leadership Team may occasionally assist with some of these duties.

πŸ—ΊοΈ Who Uses It?

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us an https://patreons.biurad.com.

Check out the other cool things people are doing with divineniiquaye/php-invoker: https://packagist.org/packages/divineniiquaye/php-invoker/dependents


All versions of php-invoker with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1 || ^8.0
psr/container Version ^1.1|^2.0
symfony/polyfill-php80 Version ^1.20
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 divineniiquaye/php-invoker contains the following files

Loading the files please wait ....