PHP Package: symfony/contracts

Symfony Contracts is a PHP library providing a set of abstractions extracted from the Symfony components, allowing for interoperability between libraries and frameworks.

Current Version: 3.5.2
Last Updated: Date not available
PHP Requirement: >=8.1
Dependencies:
symfony/polyfill-php80
php-fig/container
⚠️ To ensure full functionality, the above dependencies might be required.

Package Description

Symfony Contracts is a collection of abstractions that define common interfaces for libraries. By using these contracts, your libraries can communicate with each other using well-defined interfaces. This library promotes reusability, testability, and decoupling of components in your PHP applications.

🔗 View on GitHub

Download Latest Version: 3.6.0

Clock Coming soon

Previous Versions

Code Integration Example

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

<?php
// Example from PHPlibraries.com
require_once 'libs/symfony/contracts/3.6.0/loader.php';
require_once 'libs/symfony/polyfill-php80/1.32.0/loader.php';
require_once 'libs/php-fig/container/{lib_version}/loader.php';

use Symfony\Contracts\Service\ServiceSubscriberInterface;
use Symfony\Contracts\Service\ServiceLocatorTrait;

$obj = new ServiceSubscriberInterface();
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.