VOOZH about

URL: https://deepwiki.com/hypervel/api-client/2-installation

⇱ Installation | hypervel/api-client | DeepWiki


Loading...
Menu

Installation

This page documents how to install the hypervel/api-client package via Composer, including PHP version requirements and dependency installation. See Quick Start for usage examples after installation.


Requirements

The hypervel/api-client package has specific version requirements that must be met before installation.

PHP Version Requirement

The package requires PHP 8.2 or higher to support modern PHP features used throughout the codebase.

Dependency Requirements

The package depends on two sibling packages from the Hypervel ecosystem:

DependencyVersionPurpose
hypervel/support^0.3Provides utility components including the Pipeline class for middleware processing
hypervel/http-client^0.3Provides HTTP client functionality and PSR-7 compliant request/response base classes

Both dependencies are automatically installed by Composer during the package installation process.

Sources: composer.json23-26


Installation via Composer

The package is installed using Composer, the standard dependency manager for PHP.

Installation Command

To install hypervel/api-client in your project, run:


This command adds the package to your project's composer.json file and downloads the package along with its dependencies to the vendor/ directory.

Development Version

The package uses a minimum stability of "dev" as configured in composer.json41 This means Composer will consider development versions when resolving dependencies. If you need a specific version constraint, specify it in your installation command:


The current development branch (dev-main) is aliased to version 0.3-dev composer.json34-36

Installation Process


Sources: composer.json1-42


Package Dependencies

The following diagram shows the relationship between hypervel/api-client and its dependencies within the Hypervel ecosystem:


Sources: composer.json23-26

Dependency Roles

PackageRole in API Client
hypervel/supportProvides the Pipeline component used for middleware processing in both request and response phases
hypervel/http-clientProvides base HTTP functionality including HttpClientRequest and HttpClientResponse classes that ApiRequest and ApiResponse extend

For detailed information about how these dependencies integrate into the architecture, see Package Dependencies.

Sources: composer.json23-26


Autoloading Configuration

The package uses PSR-4 autoloading to map the namespace to the source directory.

Namespace Mapping

Hypervel\ApiClient\ → src/

This mapping is configured in composer.json28-31 and means:

  • The root namespace Hypervel\ApiClient maps to the src/ directory
  • Class Hypervel\ApiClient\ApiClient loads from src/ApiClient.php
  • Class Hypervel\ApiClient\ApiRequest loads from src/ApiRequest.php
  • Classes in sub-namespaces follow the same pattern (e.g., Hypervel\ApiClient\Traits\HasContext loads from src/Traits/HasContext.php)

After installation, Composer automatically registers this namespace mapping in vendor/autoload.php, making all classes available through the standard require 'vendor/autoload.php' statement.

PSR-4 Autoloading: Namespace to File Mapping


Sources: composer.json28-31


Verifying Installation

After installation completes, you can verify that the package is correctly installed and autoloaded.

Verify Package Installation

Check the package is installed:


Verify Autoloading

Test that classes are autoloadable:


Sources: composer.json1-42


Next Steps

After successful installation, see Quick Start for usage examples, Core Architecture for design details, and ApiClient for configuration options.


Package Metadata

The following table summarizes key metadata for the hypervel/api-client package:

PropertyValue
Package Namehypervel/api-client
LicenseMIT
PHP Version^8.2
Current Dev Branchdev-main (aliased as 0.3-dev)
NamespaceHypervel\ApiClient
Issue Trackerhttps://github.com/hypervel/components/issues
Source Repositoryhttps://github.com/hypervel/components
AuthorAlbert Chen (albert@hypervel.org)

Sources: composer.json1-22 composer.json33-36