markhuot / craft-pest

https://craft-pest.com
Other
38 stars 11 forks source link

Calling unknown method: craft\fields\PlainText::factoryTypeHint() #76

Closed myleshyson closed 1 year ago

myleshyson commented 1 year ago

Ever since the compiled classes update, I can't run tests because of the following error.

'Calling unknown method: craft\fields\PlainText::factoryTypeHint() in "__string_template__2feea56560234f273691feaa93ef7d61"

Not really sure where to start with this one. For now I'm just commenting out line 22 in TestCase.php so the tests run. Have you run into anything like this?

markhuot commented 1 year ago

Do you have the Plugin installed in Craft? It'll run Pest by composer installing it but to get all the features it needs to hook in to Craft's bootstrap lifecycle so it needs to be registered in the plugin DB table.

myleshyson commented 1 year ago

Alright found the issue. I had the plugin installed and enabled, but in our project there was a function in one of our modules that retrieved the field service and all the fields during init. It basically called crafts core events earlier than it should have and so there were some fields that weren't getting that behavior attached.

Anyways, closing this!