Merge branch 'develop' into release

This commit is contained in:
2022-10-11 12:17:39 -03:00

View File

@ -70,7 +70,6 @@ abstract class Repository implements RepositoryInterface
return $this->properties ?? $this->getColumns(); return $this->properties ?? $this->getColumns();
} }
public function setConnection(Connection $connection): Repository public function setConnection(Connection $connection): Repository
{ {
$this->connection = $connection; $this->connection = $connection;
@ -228,10 +227,10 @@ abstract class Repository implements RepositoryInterface
try { try {
$value = $model->{$getter}(); $value = $model->{$getter}();
if ($this->validateDefaultProperty($value)) { if ($this->validateDefaultProperty($value)) {
trigger_error("{$property} has default value in " . get_called_class()); error_log("Notice: {$property} has default value in " . get_called_class());
} }
} catch (\Error | \Exception $e) { } catch (\Error | \Exception $e) {
trigger_error("Missing {$property} in data for " . get_called_class() . "::fillData", E_USER_WARNING); error_log("Warning: Missing {$property} in data for " . get_called_class() . "::fillData");
} }
} }
return $model; return $model;
@ -245,7 +244,7 @@ abstract class Repository implements RepositoryInterface
foreach ($this->getRequiredColumns() as $column) { foreach ($this->getRequiredColumns() as $column) {
$m = $this->getMethod($column); $m = $this->getMethod($column);
if (!method_exists($model, $m)) { if (!method_exists($model, $m)) {
trigger_error("Missing getter for {$column} in " . get_called_class() . "::mapArray", E_USER_WARNING); error_log("Warning: Missing getter for {$column} in " . get_called_class() . "::mapArray");
continue; continue;
} }
if (!isset($data[$column])) { if (!isset($data[$column])) {