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.php renamed to src/Encoder/Pdf.php following PSR-4 standards.
  • Updated method signature of buildResponse() in PdfDataExport to match the parent class.
  • CustomPdf Extraction: CustomPdf moved to src/Pdf/CustomPdf.php.

Fixed

  • Critical Bug Fix: Resolved a fatal error caused by an incompatible method signature in PdfDataExport::buildResponse().
  • Removed invalid parameter &$view that 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:ignore annotations for Header() and Footer() (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.yml to include new dependencies.
  • File Upload Handling: Deprecated file_save_upload() replaced with FileUploadHandler.
  • 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.json to 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)

  1. Ensure your server is running PHP 8.1 or higher.
  2. Run drush cr after updating.
  3. Run composer update due to class renaming.
  4. (Optional) Configure the new logo field in the PDF format settings.
  5. Review and update your PDF metadata settings.

Potential Issues

  • Any custom code referencing the old pdf class must be updated to use Pdf.
  • 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

VCS Label
1.0.0-beta1
Release type
Short description
Modernize module with PHP 8, fix buildResponse signature and add logo/metadata config
Packaged Git sha1
0c33d151e6b10cafcdc62d18efe73ee6164a5ad4
Release files