diff --git a/CHANGELOG.md b/CHANGELOG.md index b887f5d..70847d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,12 @@ All notable changes to this project will be documented in this file. +## [1.1.0] - 2025-04-24 +### Fixed +- Fixed a critical autoloading issue after the package is globally installed. + ## [1.0.3] - 2025-04-24 -## Fixed +### Fixed - Fixed typo in `composer.json` description field. ## [1.0.2] - 2025-04-24 diff --git a/README.md b/README.md index a662cd6..2a875fe 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ # Loom Spinner CLI

-Version 1.0.3 +Version 1.1.0

A streamlined environment management tool for PHP developers. diff --git a/bin/loom b/bin/loom index b3cae0d..5b66d58 100755 --- a/bin/loom +++ b/bin/loom @@ -7,7 +7,14 @@ use Loom\Spinner\Command\StartCommand; use Loom\Spinner\Command\StopCommand; use Symfony\Component\Console\Application; -require dirname(__DIR__) . '/vendor/autoload.php'; +$localAutoloadPath = sprintf('%s/vendor/autoload.php', dirname(__DIR__)); +$installedAutoloadPath = sprintf('%s/autoload.php', dirname(__DIR__, 3)); + +if (file_exists($localAutoloadPath)) { + require $localAutoloadPath; +} else { + require $installedAutoloadPath; +} $application = new Application('Loom Spinner'); diff --git a/composer.json b/composer.json index 1b0fd5b..eb6bd2e 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "loomlabs/loom-spinner-cli", - "description": "A simple command-line Docker environment spinner for PHP", - "version": "1.0.3", + "description": "A simple command-line Docker environment spinner for PHP.", + "version": "1.1.0", "autoload": { "psr-4": { "Loom\\Spinner\\": "src/"