Install
Works with Drupal: ^9 || ^10 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
21.75 KB
MD5: ad12eca2102367b963205aef72e8dc29
SHA-1: 31bdd0115fc39ed8ff4b126061b31756b186ca40
SHA-256: 25a3855535ae8f6a4169d0a30359e90030e840ac79a3b3cbd048ac82cc0bc215
Download zip
30.41 KB
MD5: 5e022717baa8a0bad2599e41d0cc112e
SHA-1: c5a1871c9095eb2aae329a3ddef103959fd21265
SHA-256: 6aea4511aca7857cdeedac33ffd7bbc9a5269a6811b71a49000937d9b3b436d2
Release notes
Release 1.0.0-beta1
This release of the views_data_export_tcpdf module. It includes important compatibility updates, full modernization to PHP 8.1+, new features, and critical bug fixes.
Breaking Changes
- PHP 8.1+ Required: The module now requires PHP 8.1 or higher.
- Class Renamed:
src/Encoder/pdf.phprenamed tosrc/Encoder/Pdf.phpfollowing PSR-4 standards. - Updated method signature of
buildResponse()inPdfDataExportto match the parent class. - CustomPdf Extraction:
CustomPdfmoved tosrc/Pdf/CustomPdf.php.
Fixed
- Critical Bug Fix: Resolved a fatal error caused by an incompatible method signature in
PdfDataExport::buildResponse(). - Removed invalid parameter
&$viewthat caused compatibility issues. - PHPCS Compliance: Full cleanup of Drupal coding standard violations.
- Replaced static calls such as
File::load()and\Drupal::entityTypeManager()with proper dependency injection. - Added
phpcs:ignoreannotations forHeader()andFooter()(required by TCPDF). - Minor CSS fixes in
views_data_export.css. - Updated service definitions to inject all required dependencies.
Added
- Logo Support: New managed file field in the PDF settings to upload a logo.
- Supports PNG, JPG, JPEG, and GIF formats (up to 500x500px).
- All PDF metadata fields are now properly used: author, title, subject, keywords, description, category, manager, company, last modified by, and more.
Changed
- PHP 8 Modernization: Typed properties, constructor property promotion,
readonly, attributes, and match expressions. - Dependency Injection: Implemented across all services, plugins, forms, and the encoder.
- Updated
views_data_export_tcpdf.services.ymlto include new dependencies. - File Upload Handling: Deprecated
file_save_upload()replaced withFileUploadHandler. - File System: Hardcoded paths replaced with Drupal's
temporary://stream wrapper. - General code quality improvements: cleaner structure, removed unused comments, and improved maintainability.
- Drupal Compatibility: Updated
composer.jsonto support Drupal 9, 10, and 11, with explicit PHP 8.1+ requirement.
Removed
- Static
\Drupal::service()calls. - Deprecated
file_save_upload()usage. - Hardcoded paths (including old logo path).
- Redundant comments and outdated documentation.
Upgrade Path (1.x → 1.0.0-beta1)
- Ensure your server is running PHP 8.1 or higher.
- Run
drush crafter updating. - Run
composer updatedue to class renaming. - (Optional) Configure the new logo field in the PDF format settings.
- Review and update your PDF metadata settings.
Potential Issues
- Any custom code referencing the old
pdfclass must be updated to usePdf. - Custom implementations extending this module may require updates to match new method signatures.
- Logo functionality is now fully configurable via the UI; hardcoded logo paths are no longer supported.
Development Notes
This release focuses on fully modernizing the module according to current Drupal and PHP 8 best practices. Critical issues were resolved, the internal architecture was improved, and the foundation is now more robust for upcoming features.
Contact
You can report issues or send feedback at: https://git.drupalcode.org/project/views_data_export_tcpdf