Fix critical autoloading issue

This commit is contained in:
Daniel Winning 2025-04-24 16:00:42 +01:00
parent c1247f435c
commit 5d1525234e
4 changed files with 16 additions and 5 deletions

View file

@ -2,8 +2,12 @@
All notable changes to this project will be documented in this file. 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 ## [1.0.3] - 2025-04-24
## Fixed ### Fixed
- Fixed typo in `composer.json` description field. - Fixed typo in `composer.json` description field.
## [1.0.2] - 2025-04-24 ## [1.0.2] - 2025-04-24

View file

@ -5,7 +5,7 @@
# Loom Spinner CLI # Loom Spinner CLI
<p> <p>
<img src="https://img.shields.io/badge/Version-1.0.3-blue" alt="Version 1.0.3"> <img src="https://img.shields.io/badge/Version-1.1.0-blue" alt="Version 1.1.0">
</p> </p>
A streamlined environment management tool for PHP developers. A streamlined environment management tool for PHP developers.

View file

@ -7,7 +7,14 @@ use Loom\Spinner\Command\StartCommand;
use Loom\Spinner\Command\StopCommand; use Loom\Spinner\Command\StopCommand;
use Symfony\Component\Console\Application; 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'); $application = new Application('Loom Spinner');

View file

@ -1,7 +1,7 @@
{ {
"name": "loomlabs/loom-spinner-cli", "name": "loomlabs/loom-spinner-cli",
"description": "A simple command-line Docker environment spinner for PHP", "description": "A simple command-line Docker environment spinner for PHP.",
"version": "1.0.3", "version": "1.1.0",
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Loom\\Spinner\\": "src/" "Loom\\Spinner\\": "src/"