File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7171 $ autoload_file = __DIR__ . '/build/vendor/autoload.php ' ;
7272
7373 $ is_build = true ;
74+ $ can_add_class_alias = ! defined ( 'GFEXCEL_AVOID_CLASS_ALIAS ' ) || ! GFEXCEL_AVOID_CLASS_ALIAS ;
7475 if ( ! file_exists ( $ autoload_file ) ) {
7576 $ autoload_file = __DIR__ . '/vendor/autoload.php ' ;
7677 $ is_build = false ;
7778 }
7879
7980 require_once $ autoload_file ;
8081
81- if ( $ is_build ) {
82+ if ( $ is_build && $ can_add_class_alias ) {
8283 // Make old class names available as aliases if possible.
8384 $ class_aliases = [
8485 'PhpOffice\PhpSpreadsheet\Document\Properties ' ,
Original file line number Diff line number Diff line change @@ -256,6 +256,10 @@ You can hide a row by adding a hook. Checkout this example:
256256
257257== Changelog ==
258258
259+ = develop =
260+
261+ * Enhancement: Defining a `GFEXCEL_AVOID_CLASS_ALIAS` constant as `true` will avoid registering PHPSpreadsheet class aliases.
262+
259263= 2.4.0 on July 10, 2025 =
260264
261265* Changed: Updated download link handling to allow future enhancements.
You can’t perform that action at this time.
0 commit comments