From 5fe37357a230a0b82c2f8b224bb71a1985e50240 Mon Sep 17 00:00:00 2001 From: Jonathan Eskew Date: Mon, 29 Jun 2015 14:44:28 -0700 Subject: [PATCH] Reiterate the disclaimer in the context of callbacks --- doc/articles/scripts.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/articles/scripts.md b/doc/articles/scripts.md index d7cdd7602..5ea5204f7 100644 --- a/doc/articles/scripts.md +++ b/doc/articles/scripts.md @@ -82,8 +82,11 @@ For any given event: and command-line executable commands. - PHP classes containing defined callbacks must be autoloadable via Composer's autoload functionality. -- If a defined callback relies on functions defined outside of a class, the callback -must explicitly require the composer autoloader. +- If a defined callback relies on functions defined outside of a class, the +callback must explicitly require the composer autoloader. If used in a +context where`vendor/autoload.php` might not yet exist (such as during a +`pre-install` or `pre-update` command), the callback should explicitly require +whatever files within your root package it needs to execute successfully. Script definition example: