Download the PHP package drupal/drupal-driver without Composer
On this page you can find all versions of the php package drupal/drupal-driver. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download drupal/drupal-driver
More information about drupal/drupal-driver
Files in drupal/drupal-driver
Package drupal-driver
Short Description A collection of reusable Drupal drivers
License GPL-2.0-or-later
Homepage http://github.com/jhedstrom/DrupalDriver
Informations about the package drupal-driver
Drupal Driver
[](https://packagist.org/packages/drupal/drupal-driver)
[](https://packagist.org/packages/drupal/drupal-driver)
[](https://packagist.org/packages/drupal/drupal-driver)
[](https://github.com/jhedstrom/DrupalDriver/actions/workflows/ci.yml)
[](https://github.com/jhedstrom/DrupalDriver/issues)
[](https://github.com/jhedstrom/DrupalDriver/pulls)
[](https://drupal.slack.com/archives/C4T2JHG9K)
A collection of lightweight drivers with a common interface for interacting with Drupal. These are generally intended for testing and are not meant to be API-complete.
Note: v3 supports Drupal 10 and 11 on PHP 8.2+. Sites that need Drupal 7 or PHP 8.1 should pin to the
2.xbranch. See UPGRADING.md for the v2 to v3 migration guide.
Drivers
| Driver | Description |
|---|---|
| Blackbox | No Drupal bootstrap. Interacts only through HTTP. |
| Drupal API | Bootstraps Drupal directly in PHP for programmatic access to entities, fields, users, and configuration. |
| Drush | Interacts with Drupal through the Drush command line tool. |
Installation
Usage
Extending
The driver lets consumer projects override two things without forking: individual field handlers and the top-level Core implementation.
Custom field handler
Implement Drupal\Driver\Core\Field\FieldHandlerInterface (extending
AbstractHandler is the usual path):
Register it on the active Core instance, typically in a test bootstrap:
Consumer registrations win over the handlers this project ships for the
same field type. Registration order at runtime is: driver default
handlers (populated by Core::registerDefaultFieldHandlers() at
construction) → consumer registrations → registry lookup at expand()
time, with a fall-through to DefaultHandler for field types no handler
claims.
Custom Core
Implement Drupal\Driver\Core\CoreInterface. The class name and
namespace do not matter. The easiest path is to extend
Drupal\Driver\Core\Core and add version-specific field handlers by
re-scanning your own Field/ directory:
Inject it with $driver->setCore($core):
Credits
- Originally developed by Jonathan Hedstrom
- Maintainers
- All contributors
Release notes
See GitHub Releases.
Contributing
Features and bug fixes are welcome!
See CONTRIBUTING.md for more information.
All versions of drupal-driver with dependencies
drupal/core-utility Version ^10 || ^11
symfony/dependency-injection Version ^6.4 || ^7
symfony/process Version ^6.4 || ^7