iviphp/contracts

Shared interfaces and contracts for the IviPHP ecosystem.

Maintainers

Package info

github.com/iviphp/contracts

pkg:composer/iviphp/contracts

Transparency log

Statistics

Installs: 4

Dependents: 4

Suggesters: 0

Stars: 1

Open Issues: 0

v0.1.0 2026-07-21 10:38 UTC

This package is not auto-updated.

Last update: 2026-07-21 14:05:28 UTC


README

Shared interfaces and contracts for the IviPHP ecosystem.

Overview

iviphp/contracts provides the stable interfaces shared across official IviPHP packages.

The package contains only abstractions and must remain lightweight, predictable, and independent from the framework implementation.

Installation

composer require iviphp/contracts

Requirements

  • PHP 8.2 or later
  • Composer

Available contracts

ServiceProviderInterface

Defines the lifecycle used by Ivi service providers.

<?php

declare(strict_types=1);

use Ivi\Contracts\ServiceProviderInterface;

final class AppServiceProvider implements ServiceProviderInterface
{
    public function register(): void
    {
        // Register services, bindings, factories, or configuration.
    }

    public function boot(): void
    {
        // Boot services after all providers have been registered.
    }
}

A service provider has two phases:

  • register() declares services and dependencies.
  • boot() initializes features after registration is complete.

Design principles

  • No framework implementation
  • No external dependencies
  • Small and stable public API
  • Independent contracts
  • Backward compatibility whenever possible

New interfaces are added only when a real shared contract is required by multiple IviPHP packages.

Ecosystem

This package is part of the IviPHP ecosystem:

  • iviphp/framework
  • iviphp/container
  • iviphp/http
  • iviphp/database
  • iviphp/validation
  • iviphp/config
  • iviphp/cache
  • iviphp/view
  • iviphp/admin

Contributing

Contributions should preserve the minimal scope of this package.

Before introducing a new contract, it should:

  • represent a stable abstraction;
  • be required by multiple packages;
  • avoid depending on implementation details;
  • remain usable outside the full Ivi framework.

Security

Please report security issues privately to the Softadastra maintainers instead of opening a public issue.

License

This project is licensed under the MIT License.

Maintainer

Created and maintained by Softadastra.