Skip to content

Commit

Permalink
Fix aliases when used with preloader (#27)
Browse files Browse the repository at this point in the history
Credit to @pbojan
  • Loading branch information
pbojan authored Jan 26, 2022
1 parent d64ec62 commit a39be45
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/aliasing.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
* @author Jack Wilkinson <[email protected]>
*/

// Only run the aliasing once - Fixes preloading support on PHP 7.4+
if (interface_exists(Assetic\Asset\AssetInterface::class, false)) {
return;
}

class_alias(
Assetic\Contracts\Asset\AssetInterface::class,
Assetic\Asset\AssetInterface::class
Expand Down

0 comments on commit a39be45

Please sign in to comment.