Download the PHP package bite/service-discovery without Composer

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

Service Discovery

Latest Stable Version License

Attribute-based service discovery for Nette DI Container.

Simplify your application configuration by automatically discovering and registering services based on:

Installation

Bootstrap Hook

Add this hook to your Nette Bootstrap.php:

Configuration

Register the extension in your common.neon file:

Service Discovery by Class Type

Define discovery rules in your service.neon:

All classes in %appDir%/Controls and %appDir%/Model matching these criteria will be automatically registered. Discovery by implementing interfaces is by design not possible.

Service Discovery by Attribute

Event Listener Discovery by Attribute

Require mildabre/event-dispatcher. package.

Services with this attribute are automatically tagged with event.listener tag and added by mildabre/event-dispatcher to EventDispatcher.

Exclude Service from Discovery

Class excluded from auto-registration can still be instantiated manually via constructor, without relying on setter injection.

Important: Manually-registered services in services.neon are not affected by the attribute!

Lazy Services

Native PHP 8.4 lazy services are supported and can be enabled per discovery configuration:

When disabled, lazy initialization is not used and PHP 8.1+ is sufficient:

Individual services registered via #[Service] attribute can override the global lazy setting:

Enable Inject mode by Class Type

Enable Inject mode by implementing interfaces is by design not possible.

Migration from Search Section

Before:

After:

Go Event-Driven

Service Discovery is a natural foundation for event-driven architecture. Pair it with mildabre/event-dispatcher - simple EventDispatcher that brings modern architecture possibilities.

A worthy plugin for modern Nette-based applications.

mildabre/event-dispatcher

Requirements

License

MIT License. See LICENSE file.


All versions of service-discovery with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
nette/di Version ^3.2
nette/schema Version ^1.3
nette/robot-loader Version ^4.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 bite/service-discovery contains the following files

Loading the files please wait ...