Skip to content

Commit

Permalink
Obviate the need for autoload.php in establishing library base path (#65
Browse files Browse the repository at this point in the history
)

* Obviate the need for autoload.php in establishing library base path

* Avoid platform specific delimiters and .. references

---------

Co-authored-by: Tim Whitlock <[email protected]>
  • Loading branch information
timwhitlock and Tim Whitlock authored Aug 29, 2024
1 parent d613a0d commit d4c5959
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Utils/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ function getBoundingBox(array $box, bool $asInteger): array
*/
function basePath(string $dir = ""): string
{
$loader = require 'vendor/autoload.php';

$transformersClass = $loader->findFile(Transformers::class);

return joinPaths(dirname($transformersClass, 2), $dir);
return joinPaths(dirname(__DIR__,2), $dir);
}

0 comments on commit d4c5959

Please sign in to comment.