Olá boa tarde
estou com o problema na hora de subir para a versão 9.0, aparece o seguinte erro Error: These classes should be fixed before upgrade. They extend classes that are removed in the next version.
Espo\Custom\Hooks\CEmbarque\Ticket is sub-class of Espo\Core\Hooks\Base
codigo:
<?php
namespace Espo\Custom\Hooks\CEmbarque;
use Espo\ORM\Entity;
class Ticket extends \Espo\Core\Hooks\Base
{
public function beforeSave(Entity $entity, array $options): void
{
//========================================= Extraindo dados da empresa =========================================//
$empresaCrm = $entity->get('cNPJ'); // CNPJ da empresa
if ($empresaCrm !== null) {
$entityManager = $this->getEntityManager();
$razaoSocialData = $entityManager->getRepository('Account')->where([
'deleted' => 0,
'sicCode' => $empresaCrm
])->findOne();
if ($razaoSocialData !== null) {
$entity->set('razaoSocial', $razaoSocialData->get('razaoSocial'));
$entity->set('empresa', $razaoSocialData->get('name'));
$entity->set('nContrato', $razaoSocialData->get('nContrato'));
$entity->set('tipoEmpresa', $razaoSocialData->get('type'));
}
}
}
}
estou com o problema na hora de subir para a versão 9.0, aparece o seguinte erro Error: These classes should be fixed before upgrade. They extend classes that are removed in the next version.
Espo\Custom\Hooks\CEmbarque\Ticket is sub-class of Espo\Core\Hooks\Base
codigo:
<?php
namespace Espo\Custom\Hooks\CEmbarque;
use Espo\ORM\Entity;
class Ticket extends \Espo\Core\Hooks\Base
{
public function beforeSave(Entity $entity, array $options): void
{
//========================================= Extraindo dados da empresa =========================================//
$empresaCrm = $entity->get('cNPJ'); // CNPJ da empresa
if ($empresaCrm !== null) {
$entityManager = $this->getEntityManager();
$razaoSocialData = $entityManager->getRepository('Account')->where([
'deleted' => 0,
'sicCode' => $empresaCrm
])->findOne();
if ($razaoSocialData !== null) {
$entity->set('razaoSocial', $razaoSocialData->get('razaoSocial'));
$entity->set('empresa', $razaoSocialData->get('name'));
$entity->set('nContrato', $razaoSocialData->get('nContrato'));
$entity->set('tipoEmpresa', $razaoSocialData->get('type'));
}
}
}
}
Comment