- Issue created by @FlutterStack
- Status changed to Needs review
9 months ago 6:53am 1 March 2024 - 🇮🇳India sarwan_verma
Hi @FlutterStack,
I have fixed this issue "PHP Fatal error: Traits cannot have constants in web/modules/contrib/re_mgr/src/Entity/EntityBaseDataTrait.php on line 13" and also attached patch,
please review and verify. - 🇮🇳India FlutterStack
Error: Undefined constant Drupal\re_mgr_visualization\Service\CoordinatesFieldService::ENTITY_LIST in Drupal\re_mgr_visualization\Service\CoordinatesFieldService->__construct() (line 67 of modules/contrib/re_mgr/modules/visualization/src/Service/CoordinatesFieldService.php).
- Assigned to Mattixonix
- Status changed to Fixed
9 months ago 1:15pm 4 March 2024 Hi @FlutterStack, thank you for reporting that issue. Problem happens on PHP lower than 8.2. My bad because i didn't tested lower PHP versions after adding trait to optimize code.
Thanks @sarwan_verma for your patch, however it's not working properly. By changing constants to static variables and changing their names You solved global PHP problem, but module will not work after that. With changing variables names you should also change each place where they were used in code. Despite that i'll grand you credit for good idea ;)
I've added new release to module here https://www.drupal.org/project/re_mgr/releases/1.0.6 → . It's fix this problem and also few smaller bugs.
Automatically closed - issue fixed for 2 weeks with no activity.