Download the PHP package jeroen-g/autowire without Composer

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

🔌 Autowire for Laravel

Latest Version on Packagist CI

Autowire and configure using PHP 8 Attributes in Laravel.

Installation

Via Composer

You will need the configuration file to change where it should look:

Usage

Autowiring

Are you tired of binding abstract interfaces to concrete classes all the time?

Use the PHP 8 attribute of this package to autowire any of your interfaces:

The class that implements that interface does not need any changes:

The Autowire package will crawl through the classes and bind the abstract interface to the concrete class. If there already is a binding in the container it will skip the autowiring.

Tagging

If you quickly want to tag all implementations of an interface, simply add the Tag attribute to the interface:

All implementations will now be available under the 'myTag' tag:

If no tag value is specified in the attribute, the fully-namespaced name of the class will be used as the tag:

Configure

Personally I like injection of dependencies over resolving them using make() helpers. However, that means writing binding definitions such as:

Not anymore with the Configure attribute! Here is the WorldClass example again:

In this example message is a simple string. However, it can be a reference to a configuration value or other class too! The notations of config and service definitions is the same as used in Symfony.

Listen to events

If you use a lot of events, the EventServiceProvider will very likely become long and messy:

With the PHP 8 attribute of this package you can define the events for a listener alongside each other:

The package will crawl through the classes and bind the listeners to the event classes.

Caching

The autowiring, configuration and listeners can be cached with the command php artisan autowire:cache. In a similar fashion it can be cleared with php artisan autowire:clear. Keep in mind that caching means that it won't crawl all the classes and changes to the annotations will not be loaded.

Configuration

The package's configuration can be found in config/autowire.php. It should contain the list of directories where Autowire should look for both interfaces and implementations.

Custom attributes

It is possible to use custom Attribute classes for either or both the autowiring or configuration functionality:

Changelog

Please see the changelog for more information on what has changed recently.

Credits

License

MIT. Please see the license file for more information.


All versions of autowire with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ergebnis/classy Version ^1.3
illuminate/support Version ~8.0||~9.0||~10.0||~11.0||~12.0
illuminate/console Version ~8.0||~9.0||~10.0||~11.0||~12.0
webmozart/assert Version ^1.10
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 jeroen-g/autowire contains the following files

Loading the files please wait ....