Skip to content

Commit

Permalink
Include TCPDF manually in vendor files, prefix the XML
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0ttkclark committed Oct 27, 2024
1 parent f2c451e commit cc9c388
Show file tree
Hide file tree
Showing 495 changed files with 57,268 additions and 994 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ $RECYCLE.BIN/
/composer.lock
/node_modules/
/vendor/*
!/vendor/composer/
!/vendor/tecnickcom/
!/vendor/autoload.php
!/vendor/vendor-prefixed/
npm-debug.log
pnpm-lock.yaml
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,12 @@
"constant_prefix": "EXPORTS_REPORTS_PREFIXED_",
"function_prefix": "exportreports_prefixed_",
"packages": [
"mk-j/php_xlsxwriter",
"tecnickcom/tcpdf"
"mk-j/php_xlsxwriter"
],
"exclude_from_prefix": {
"file_patterns": []
},
"delete_vendor_files": false
"delete_vendor_files": true
}
},
"config": {
Expand Down
4 changes: 4 additions & 0 deletions exports-and-reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@

add_action( 'wp_ajax_wp_admin_ui_export', 'exports_reports_wp_admin_ui_export' );

if ( ! class_exists( 'TCPDF' ) ) {
require_once EXPORTS_REPORTS_DIR . 'vendor/autoload.php';
}

require_once EXPORTS_REPORTS_DIR . 'vendor/vendor-prefixed/autoload.php';

/**
Expand Down
25 changes: 25 additions & 0 deletions vendor/autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

// autoload.php @generated by Composer

if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit728bcbb98610b27af983202f527efdf9::getLoader();
Loading

0 comments on commit cc9c388

Please sign in to comment.