diff --git a/src/infrastructure/env/PhabricatorEnv.php b/src/infrastructure/env/PhabricatorEnv.php index 2dfe7d9c62..31fd116688 100644 --- a/src/infrastructure/env/PhabricatorEnv.php +++ b/src/infrastructure/env/PhabricatorEnv.php @@ -202,6 +202,12 @@ final class PhabricatorEnv extends Phobject { phutil_load_library($library); } + // Drop any class map caches, since they will have generated without + // any classes from libraries. Without this, preflight setup checks can + // cause generation of a setup check cache that omits checks defined in + // libraries, for example. + PhutilClassMapQuery::deleteCaches(); + // If custom libraries specify config options, they won't get default // values as the Default source has already been loaded, so we get it to // pull in all options from non-phabricator libraries now they are loaded.