Install
Works with Drupal: ^10.4 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
88.17 KB
MD5: 487f269300d1e30cca93e551c83cac3c
SHA-1: 34e6451247d5bda9efb093e82eaf9d377015d271
SHA-256: 67fcf2c7af229f8de52df2b44e0d91bf3995515bb7a3db2fdaa87dd47f0773d3
Download zip
160.45 KB
MD5: 18059f784a08e97633616fb8bd8e2a57
SHA-1: 91827206b2712a985788857c22d400fa5b74650d
SHA-256: 58189dabc734ee1b591e39e27a6a344759e58a5549437a53c94f7196c51cdc36
Release notes
New Features
Hook Refactoring & Backward Compatibility (#3579852, #3578534)
- Moved hook implementations from .module into a dedicated DocumentLoaderHooks class (src/Hook/)
- Added #[LegacyHook] attribute for backward compatibility with Drupal 10 hook dispatch
- Cleaned up document_loader.module and settings form; removed legacy inline hook code
- Updated document_loader.services.yml to register the hooks class as a service
Field Widget Action Support (#3577606)
- Added document_loader_fwa submodule integrating with the Field Widget Actions module
- Enables field-level document loading directly from entity edit forms
Tool API Integration (#3573322)
- Added document_loader_tool submodule for AI tool integration (requires drupal/tool)
- DocumentLoaderToolDeriver automatically derives one AI tool per source category - no manual registration needed
- Added cloud/SaaS source types: S3, GitHub, Slack, Notion, SharePoint, OneDrive
Drush Commands (#3575375)
- document-loader:list - lists all registered loaders with filters for type, input, and output format
- document-loader:inputs <type_id> - displays the full input schema for any registered type
- document-loader:load - loads a document from the CLI by passing key=value input pairs
New Input Types
- File-based: PDF, Word, spreadsheet, image, text, markdown, presentations
- URL-based: API endpoints (REST/HTTP), website scraping
- Cloud/SaaS: Amazon S3, GitHub, Slack, Notion, SharePoint, OneDrive
Document Loader Explorer
- Added admin UI for interactively testing loaders across different input types and output formats
Architecture
Two-Layer Plugin System (#3574454)
- DocumentLoaderType plugins (Layer 1) map source categories to Input classes via the #[DocumentLoaderType] attribute
- DocumentLoader plugins (Layer 2) implement load() and declare supported types and output formats
- DocumentLoaderTypeFactory service constructs Input/Output objects dynamically - no hardcoded class lists
Manager Service (#3574446)
- DocumentLoaderManager registered as a proper service with full dependency injection
- loadFromInput() and loadFromData() enforce the full validate -> access check -> load -> truncate pipeline
- DocumentLoaderResult value object carries content, format, loaderLabel, originalBytes, metadata, source
Interface Enhancements
- UrlInputInterface added for all URL-based inputs (#3575329)
- isAvailable() support on Input classes (#3574450)
- Inputs and outputs are fully extendable by contributed/custom modules
Bug Fixes
- Fixed user permission configuration and access checks (#3576008)
- Fixed getSupportedOutputTypes() implementation (#3574448)
- Fixed missing DocumentLoaderTypePluginManager functionality (#3574544)
- Cleaned up exception message usage and removed unwanted markup from metadata (#3576615)
- Removed problematic output format handling (#3575650)
Code Quality
- Zero PHPStan errors (level 3, bleedingEdge config)
- Full PHPCS compliance (Drupal + DrupalPractice rulesets)
- Comprehensive unit and kernel tests for Tool API and core functionality
- Fixed CI/CD pipeline (#3577188)
Documentation
- Added AGENTS.md - comprehensive guide for coding assistants and contributors
- Updated README.md to Drupal.org project template
- Added annotated usage examples in /examples