Since Espo 7 has extensive changes/refactoring of the core there are changes that we need to make to our customizations, this post will chronicle our findings and solutions to hopefully help others going through this process.
It would be very helpful if other participants can also post in this thread the problems encountered AND the solutions found for them, please do not post questions only here, use a different thread to request help.
Issue: Error in declaration of custom Entry Points
In our installation we have several custom entry points that were extended from the deprecated class Espo\Core\EntryPoints\EntryPoint and were throwing the following error when running the command php preload.php from CLI:
Solution: Modify the custom EntryPoint class as follows:
BEFORE:
NOW:
BEFORE:
NOW:
It would be very helpful if other participants can also post in this thread the problems encountered AND the solutions found for them, please do not post questions only here, use a different thread to request help.
Issue: Error in declaration of custom Entry Points
In our installation we have several custom entry points that were extended from the deprecated class Espo\Core\EntryPoints\EntryPoint and were throwing the following error when running the command php preload.php from CLI:
Fatal error: Declaration of Espo\Modules\PropertyManagement\EntryPoints\Lease: :run(Espo\Core\Api\Request $request) must be compatible with Espo\Core\EntryPoint\EntryPoint::run(Espo\Core\Api \Request $request, Espo\Core\Api\Response $response): void in C:\xampp\htdocs\tenantfriendly\application\Espo\Mo dules\PropertyManagement\EntryPoints\Lease.php on line 61
BEFORE:
Code:
use Espo\Core\EntryPoints\{ EntryPoint }; use Espo\Core\EntryPoints\{ EntryPoint };
Code:
use Espo\Core\EntryPoint\{ EntryPoint }; use Espo\Core\{ Api\Request, Api\Response };
Code:
public function run(Request $request)
Code:
public function run(Request $request, Response $response): void
Comment