Download the PHP package quellabs/discover without Composer

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

Quellabs Discover

PHP Version Latest Version on Packagist License

A lightweight, flexible service discovery component for PHP applications that automatically discovers service providers across your application and its dependencies with advanced caching and lazy loading capabilities.

Introduction

Quellabs Discover solves the common challenge of service discovery in PHP applications. It focuses solely on locating service providers defined in your application and its dependencies, giving you complete control over how to use these providers in your application architecture. Unlike other service discovery solutions that force specific patterns, Discover is framework-agnostic and can be integrated into any PHP application.

Key Features:

Installation

Install the package via Composer:

Quick Start

Here's how to quickly get started with Discover:

Service Providers

Creating a Service Provider

To create a discoverable service provider, implement the ProviderInterface:

Provider Interface

The core ProviderInterface separates discovery-time methods (static) from runtime methods (instance):

Static methods are called during discovery without instantiation; instance methods are used at runtime when providers are actually needed.

Discovery Methods

Quellabs Discover supports multiple methods to discover service providers:

Composer Configuration

Add service providers to your composer.json file using the nested structure where discover is always the top-level key:

Use the ComposerScanner to discover these providers:

Directory Scanning

Scan directories for provider classes:

Metadata Scanning

In addition to discovering service providers, Quellabs Discover can collect arbitrary key/value metadata that packages advertise in their composer.json. This is useful when packages need to expose configuration paths, resource directories, or other structured data to the host application — without registering a full service provider.

Provider scanning and metadata scanning are separate systems that run in the same discover() call. A single Discover instance can run both simultaneously.

How It Works

Metadata scanners read from the extra.discover.<family> section of every installed package's composer.json. Each package can declare any number of keys under the family. Values can be a scalar string or an array of strings — they are returned as-is without transformation.

MetadataScannerInterface

Custom metadata scanners implement MetadataScannerInterface, which requires two methods:

Unlike ScannerInterface (which produces ProviderDefinition objects), metadata scanners return raw values. Results are grouped by package name to preserve the relationship between keys declared together in the same composer.json.

Using MetadataCollector

MetadataCollector is the built-in implementation. Register it via the same addScanner() method used for provider scanners — Discover automatically routes it to the metadata pipeline based on the interface it implements:

The MetadataCollector constructor accepts a few optional parameters:

In strict mode, malformed entries (wrong types, non-array family blocks) throw a \RuntimeException instead of being silently skipped.

Retrieving Collected Metadata

After discover() runs, three methods are available for accessing collected metadata:

getAllMetadata(): array

Returns everything collected, nested as [family][package][key]:

getFamilyMetadata(string $familyName): array

Returns all metadata for a single family, grouped by package name. Useful when you need to know which package declared what — for example, to resolve paths relative to each package's install directory:

getFamilyValues(string $familyName, string $metadataKey): array

Returns a flat, deduplicated list of all values for a specific key across all packages. Handles both scalar values and arrays transparently. This is the most convenient method when you just need a merged list and don't care which package contributed each entry:

Strict Mode and Logging

By default, MetadataCollector silently skips malformed entries and logs a warning if a PSR-3 logger is provided. Enable strict mode to surface these issues as exceptions instead:

Warnings are emitted for:

Custom Metadata Scanners

For sources other than composer.json, implement MetadataScannerInterface directly:

The results are merged with any data collected from MetadataCollector under the same family name, so multiple scanners for the same family work transparently.

Querying Providers

Fluent Query Builder

The findProviders() method returns a query builder that allows you to chain filter methods for expressive, readable queries:

Query Methods

Method Description
withCapability(string $capability) Matches providers declaring the capability in their metadata['capabilities'] array
withMinPriority(int $priority) Matches providers with metadata['priority'] >= $priority
withFamily(string $family) Matches providers belonging to the named family
where(callable $fn) Custom filter receiving the provider's metadata array

Use get() to return all matches as an array, or lazy() to get a generator that instantiates providers one at a time — preferable for large result sets.

Direct Access Methods

For simple lookups without the query builder:

Caching and Performance

Provider definitions can be exported after discovery and re-imported on subsequent requests, bypassing the scanning process entirely.

Provider instances are cached after first instantiation, so repeated calls to get() or findProviders() for the same class never re-instantiate.

Provider Configuration

Quellabs Discover supports configuration files for providers registered through Composer.

Basic Configuration File

Create a configuration file that returns an array:

Registering Provider with Configuration

Specify a configuration file in your composer.json:

Using Configuration in Providers

Configuration is loaded and merged with defaults when providers are instantiated:

Provider Families

Provider families organize service providers into logical groups. Families are determined by the composer.json structure, not by the provider classes themselves.

Defining Provider Families

Define providers in different families in your composer.json:

Using Multiple Family Scanners

Create scanners for each family:

Extending Discover

Creating Custom Scanners

Implement the ScannerInterface to create custom scanners:

License

The Quellabs Discover package is open-sourced software licensed under the MIT license.


All versions of discover with dependencies

PHP Build Version
Package Version
Requires ext-ctype Version *
quellabs/support Version ^1.
quellabs/contracts Version ^1.
composer-plugin-api Version ^2.0
monolog/monolog Version *
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 quellabs/discover contains the following files

Loading the files please wait ...