I’ve been following this guide to make customizable form templates for our site, but am getting an error whenever I go to install my package:
Declaration of Package\Attribute\Context\FrontendFormContext::setLocation(Package\Attribute\Context\TemplateLocator $locator) must be compatible with Concrete\Core\Form\Context\ContextInterface::setLocation(Concrete\Core\Filesystem\TemplateLocator $locator)
I’m no expert on Concrete’s systems and need guidance on why this would be failing. The code in question is this (Package is simply named “package”, naming the template files the same (package.php)):
namespace Package\Attribute\Context;
use Concrete\Core\Attribute\Context\FrontendFormContext as BaseFrontendFormContext;
class FrontendFormContext extends BaseFrontendFormContext
{
public function __construct()
{
parent::__construct();
$this->preferTemplateIfAvailable('package', 'package');
}
public function setLocation(TemplateLocator $locator)
{
$locator->setTemplate(['package', 'package']);
return $locator;
}
}
Running on 8.5.9. Guidance/assistance greatly appreciated.