From cd0f3b70d28cf5d891394be360d2bc7e30884470 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Thu, 31 Mar 2022 05:11:13 -0700 Subject: [PATCH] Get PHPStan working when Craft isn't installed yet Now only requires `codecept build` --- .gitattributes | 1 + lib/craft/behaviors/CustomFieldBehavior.php | 33 +++++++++++++++++++++ phpstan.neon | 3 +- src/Craft.php | 5 ++++ 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 lib/craft/behaviors/CustomFieldBehavior.php diff --git a/.gitattributes b/.gitattributes index 1383480de9b..bbb990fb1c7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -16,6 +16,7 @@ /ecs.php export-ignore /gulpfile.js export-ignore /lerna.json export-ignore +/lib/craft/behaviors/CustomFieldBehavior.php export-ignore /package-lock.json export-ignore /package.json export-ignore /packages/ export-ignore diff --git a/lib/craft/behaviors/CustomFieldBehavior.php b/lib/craft/behaviors/CustomFieldBehavior.php new file mode 100644 index 00000000000..265833980db --- /dev/null +++ b/lib/craft/behaviors/CustomFieldBehavior.php @@ -0,0 +1,33 @@ +getIsInstalled()) { // Just load an empty CustomFieldBehavior into memory self::_generateCustomFieldBehavior([], null, false, true);