From 3df6a826236636cb1d7330ebc8cbc4f466bfa296 Mon Sep 17 00:00:00 2001 From: Hayden Pierce Date: Sat, 4 Aug 2018 20:06:24 -0500 Subject: [PATCH] Add more helpful link to error explanation - missing composer config --- README.md | 1 + docs/exceptions/missingComposerConfig.md | 36 ++++++++++++++++++++++++ src/ClassFinder.php | 2 +- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 docs/exceptions/missingComposerConfig.md diff --git a/README.md b/README.md index 4d9534c..716502f 100644 --- a/README.md +++ b/README.md @@ -58,3 +58,4 @@ Documentation * [Unknown namespace - (Unregistered)](docs/exceptions/unregisteredRoot.md) * [Unknown namespace - (Registered)](docs/exceptions/unknownSubNamespace.md) +* [Missing composer.json](docs/exceptions/missingComposerConfig.md) diff --git a/docs/exceptions/missingComposerConfig.md b/docs/exceptions/missingComposerConfig.md new file mode 100644 index 0000000..4e035b4 --- /dev/null +++ b/docs/exceptions/missingComposerConfig.md @@ -0,0 +1,36 @@ +Missing composer.json +--------------------- + +Example PHP: +``` + Could not locate composer.json. You can get around this by setting ClassFinder::$appRoot manually. + +ClassFinder requires a composer.json to load autoloading settings. In this situation, ClassFinder wasn't able to +find it when recursively searching for it. You will need to tell ClassFinder where the root of your application is - this +is the directory that contains the composer.json configuration and where classes will be searched out of. + +``` +