Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9855a00451 | ||
|
|
9507a1e596 |
No files matched your search
@@ -79,7 +79,7 @@ class MySQL implements AdapterInterface, MigrateInterface, SqlAdapterInterface {
|
|||||||
$pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);
|
$pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);
|
||||||
$pdo->setAttribute(\PDO::ATTR_AUTOCOMMIT, false);
|
$pdo->setAttribute(\PDO::ATTR_AUTOCOMMIT, false);
|
||||||
$pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);
|
$pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);
|
||||||
$pdo->setAttribute(\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);
|
$pdo->setAttribute(\Pdo\Mysql::ATTR_USE_BUFFERED_QUERY, false);
|
||||||
}
|
}
|
||||||
catch(\PDOException $ex){
|
catch(\PDOException $ex){
|
||||||
throw $ex;
|
throw $ex;
|
||||||
|
|||||||
+1
-1
@@ -59,7 +59,7 @@ trait CacheTrait
|
|||||||
$this->eventRegister(new class($this->cache, $this->entityCacheKey()) implements Event\Query\Update {
|
$this->eventRegister(new class($this->cache, $this->entityCacheKey()) implements Event\Query\Update {
|
||||||
use Cache\CacheEventTrait;
|
use Cache\CacheEventTrait;
|
||||||
|
|
||||||
public function execute(RepositoryInterface $repository, object|array $entity, ?array $dataset = null, bool $replace = false): void
|
public function execute(RepositoryInterface $repository, object|array $entity, array $dataset, array $diff, bool $replace = false): void
|
||||||
{
|
{
|
||||||
$this->purgeCache();
|
$this->purgeCache();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ class EntityCollection extends \ArrayObject implements \JsonSerializable {
|
|||||||
case is_string($value):
|
case is_string($value):
|
||||||
$value = (string) $value;
|
$value = (string) $value;
|
||||||
|
|
||||||
$list[$key] = $item->$value;
|
$list[(string) $key] = $item->$value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ trait JoinBuilderTrait
|
|||||||
|
|
||||||
$fields = (array) $fields;
|
$fields = (array) $fields;
|
||||||
|
|
||||||
usort($fields, fn($e1, $e2) => str_contains($e1, '.') <=> str_contains($e2, '.'));
|
usort($fields, fn($e1, $e2) => str_contains((string) $e1, '.') <=> str_contains((string) $e2, '.'));
|
||||||
|
|
||||||
# @TODO Apply fff annotation to this too !
|
# @TODO Apply fff annotation to this too !
|
||||||
foreach(array_filter($fields, fn($e) => $e && ! isset($this->joined[$e]) ) as $item) {
|
foreach(array_filter($fields, fn($e) => $e && ! isset($this->joined[$e]) ) as $item) {
|
||||||
@@ -127,7 +127,7 @@ trait JoinBuilderTrait
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function joinFieldObject(mixed $field, string $entityClass, string $alias = null) : \Stringable
|
protected function joinFieldObject(mixed $field, string $entityClass, ?string $alias = null) : \Stringable
|
||||||
{
|
{
|
||||||
if ( ! is_object($field) ) {
|
if ( ! is_object($field) ) {
|
||||||
return $entityClass::field($field, $alias);
|
return $entityClass::field($field, $alias);
|
||||||
@@ -138,7 +138,7 @@ trait JoinBuilderTrait
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected function joinFieldValue(mixed $value, string $alias = null) : mixed
|
protected function joinFieldValue(mixed $value, ?string $alias = null) : mixed
|
||||||
{
|
{
|
||||||
if ( $value instanceof EntityField ) {
|
if ( $value instanceof EntityField ) {
|
||||||
$value = clone $value;
|
$value = clone $value;
|
||||||
|
|||||||
Reference in new issue
Block a user