PHP Package: stellarwp/container-contract

The StellarWP Container Contract library simplifies dependency injection in PHP applications by defining a set of interfaces and contracts for container implementations.

Current Version: 1.1.1
Last Updated: 2023-09-05
PHP Requirement: >=7.0.0
Dependencies:
php-fig/container
phpunit/phpunit
⚠️ To ensure full functionality, the above dependencies might be required.

Package Description

The StellarWP Container Contract library provides a standardized way to manage dependencies within your PHP projects. By adhering to the defined contracts, developers can easily swap out concrete implementations, facilitating code reuse and testing. This library promotes clean, decoupled code design and ensures flexibility when scaling your applications.

📦 Show all available classes🔗 View on GitHub

Download Latest Version: 1.1.1

Download Download v1.1.1

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php
// Example from PHPlibraries.com
require_once 'libs/stellarwp/container-contract/1.1.1/loader.php';
require_once 'libs/php-fig/container/{lib_version}/loader.php';
require_once 'libs/sebastianbergmann/phpunit/12.4.1/loader.php';

use StellarWP\ContainerContract\ContainerInterface;
use Psr\Container\ContainerInterface;
use PHPUnit\Framework\TestCase;

$obj = new ContainerInterface();
echo '✅ Test OK: ' . get_class($obj);
?>

We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.

Community Discussion

Ask questions, share tips, or report issues below.