Use reflection to determine if parent class can be instantiated for php 5.6 compatibility
MODIFY
src/Annotator/ModelAnnotator.php
src/Annotator/ModelAnnotator.php
@@ -299,16 +299,17 @@ class ModelAnnotator extends AbstractAnnotator {
if (isset($this->_cache[$parentClass])) {
$parentBehaviors = $this->_cache[$parentClass];
} else {
- try {
+ $parentReflection = new \ReflectionClass($parentClass);
+ if (!$parentReflection->isInstantiable()) {
+ return $behaviors;
+ }
+
/** @var \Cake\ORM\Table $parent */
$parent = new $parentClass();
$object = $parent->behaviors();
$map = $this->_invokeProperty($object, '_loaded');
$this->_cache[$parentClass] = $parentBehaviors = $this->_extractBehaviors($map);
- } catch (Exception $e) {
- } catch (Throwable $e) {
- }
}
$result = array_diff_key($behaviors, $parentBehaviors);

Use reflection to determine if parent class can be instantiated for php 5.6 compatibility