docs
This commit is contained in:
@@ -355,7 +355,7 @@ class Acl
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated Use `checkUserPermission` instead.
|
||||
*/
|
||||
public function checkUser(string $permission, User $entity): bool
|
||||
{
|
||||
|
||||
@@ -724,7 +724,7 @@ class AclManager
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated User `checkOwnershipOwn`.
|
||||
* @deprecated Use `checkOwnershipOwn`.
|
||||
*/
|
||||
public function checkIsOwner(User $user, Entity $entity): bool
|
||||
{
|
||||
@@ -732,7 +732,7 @@ class AclManager
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated User `checkOwnershipTeam`.
|
||||
* @deprecated Use `checkOwnershipTeam`.
|
||||
*/
|
||||
public function checkInTeam(User $user, Entity $entity): bool
|
||||
{
|
||||
@@ -740,7 +740,7 @@ class AclManager
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v7.0. Access checkers not to be exposed.
|
||||
*/
|
||||
public function getImplementation(string $scope): object
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@ class RequestWrapper implements ApiRequest
|
||||
* Get a route or query parameter. Route params have a higher priority.
|
||||
*
|
||||
* @todo Don't support NULL $name.
|
||||
* @deprecated For backward compatibility.
|
||||
* @deprecated As of v6.0. Use getQueryParam & getRouteParam. Left for backward compatibility.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,9 @@ namespace Espo\Core\Hooks;
|
||||
|
||||
use Espo\Core\Interfaces\Injectable;
|
||||
|
||||
/** @deprecated */
|
||||
/**
|
||||
* @deprecated As of v6.0. Not to be extended. Create plain classes with needed dependencies.
|
||||
*/
|
||||
abstract class Base implements Injectable
|
||||
{
|
||||
protected $injections = []; /** @phpstan-ignore-line */
|
||||
|
||||
@@ -29,7 +29,9 @@
|
||||
|
||||
namespace Espo\Core;
|
||||
|
||||
/** @deprecated */
|
||||
/**
|
||||
* @deprecated As of v6.0. Use the dependency injection framework.
|
||||
*/
|
||||
abstract class Injectable implements \Espo\Core\Interfaces\Injectable
|
||||
{
|
||||
protected $dependencyList = []; /** @phpstan-ignore-line */
|
||||
|
||||
@@ -464,7 +464,7 @@ class InjectableFactory
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use create or createWith methods instead.
|
||||
* @deprecated As of v6.0. Use create or createWith methods instead.
|
||||
*
|
||||
* @template T of object
|
||||
* @param class-string<T> $className
|
||||
|
||||
@@ -32,7 +32,8 @@ namespace Espo\Core\Jobs;
|
||||
use Espo\Core\Container;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v7.0. Create classes that implement Espo\Core\Job\Job and Espo\Core\Job\JobDataLess
|
||||
* interfaces. Pass needed dependencies via a constructor.
|
||||
*/
|
||||
abstract class Base
|
||||
{
|
||||
|
||||
@@ -102,7 +102,8 @@ class Sender
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of 6.0. EmailSender should be used as an access point
|
||||
* for email sending functionality. Sender instances are not meant to be reused.
|
||||
*/
|
||||
public function resetParams(): self
|
||||
{
|
||||
@@ -118,7 +119,7 @@ class Sender
|
||||
/**
|
||||
* With parameters.
|
||||
*
|
||||
* @param SenderParams|array<string,mixed> $params
|
||||
* @param SenderParams|array<string, mixed> $params
|
||||
*/
|
||||
public function withParams($params): self
|
||||
{
|
||||
@@ -179,7 +180,7 @@ class Sender
|
||||
/**
|
||||
* With envelope options.
|
||||
*
|
||||
* @param array<string,mixed> $options
|
||||
* @param array<string, mixed> $options
|
||||
*/
|
||||
public function withEnvelopeOptions(array $options): self
|
||||
{
|
||||
@@ -197,8 +198,8 @@ class Sender
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param array<string,mixed> $params
|
||||
* @deprecated As of v6.0. Use withParams.
|
||||
* @param array<string, mixed> $params
|
||||
*/
|
||||
public function setParams(array $params = []): self
|
||||
{
|
||||
@@ -209,7 +210,7 @@ class Sender
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of 6.0. Use withSmtpParams.
|
||||
* @param array<string,mixed> $params
|
||||
*/
|
||||
public function useSmtp(array $params = []): self
|
||||
@@ -222,7 +223,8 @@ class Sender
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Sender class not meant to be reused. Global params is applied by default.
|
||||
* No need to reset it back.
|
||||
*/
|
||||
public function useGlobal(): self
|
||||
{
|
||||
@@ -234,7 +236,7 @@ class Sender
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string,mixed> $params
|
||||
* @param array<string, mixed> $params
|
||||
*/
|
||||
private function applySmtp(array $params = []): void
|
||||
{
|
||||
@@ -328,7 +330,7 @@ class Sender
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Use EmailSender::hasSystemSmtp.
|
||||
*/
|
||||
public function hasSystemSmtp(): bool
|
||||
{
|
||||
@@ -346,9 +348,9 @@ class Sender
|
||||
/**
|
||||
* Send an email.
|
||||
*
|
||||
* @param ?array<string,mixed> $params @deprecated
|
||||
* @param ?Message $message @deprecated
|
||||
* @param iterable<Attachment> $attachmentList @deprecated
|
||||
* @param ?array<string, mixed> $params @deprecated As of v6.0. Use withParams.
|
||||
* @param ?Message $message @deprecated As of v6.0. Use withMessage.
|
||||
* @param iterable<Attachment> $attachmentList @deprecated As of v6.0. Use withAttachments.
|
||||
* @throws SendingError
|
||||
*/
|
||||
public function send(
|
||||
@@ -694,9 +696,9 @@ class Sender
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Use withEnvelopeOptions.
|
||||
*
|
||||
* @param array<string,mixed> $options
|
||||
* @param array<string, mixed> $options
|
||||
*/
|
||||
public function setEnvelopeOptions(array $options): self
|
||||
{
|
||||
|
||||
@@ -88,7 +88,7 @@ class MassActionFactory
|
||||
* @param array<string,mixed> $with
|
||||
* @throws NotFound
|
||||
* @todo Remove.
|
||||
* @deprecated
|
||||
* @deprecated As of v7.1. Use create.
|
||||
*/
|
||||
public function createWith(string $action, string $entityType, array $with): MassAction
|
||||
{
|
||||
|
||||
@@ -41,7 +41,10 @@ use Espo\Core\{
|
||||
Utils\Id\RecordIdGenerator,
|
||||
};
|
||||
|
||||
/** @deprecated */
|
||||
/**
|
||||
* @deprecated As of v6.0. Not to be extended. Extend Espo\Core\Repositories\Database, or better
|
||||
* don't extend repositories at all. Use hooks.
|
||||
*/
|
||||
class RDB extends \Espo\Core\Repositories\Database implements Injectable /** @phpstan-ignore-line */
|
||||
{
|
||||
protected $dependencyList = [ /** @phpstan-ignore-line */
|
||||
|
||||
@@ -37,7 +37,8 @@ use Espo\ORM\{
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Not to be extended. Extend Espo\Core\Repositories\Database, or better
|
||||
* don't extend repositories at all. Use hooks.
|
||||
* @extends RDBRepository<Entity>
|
||||
*/
|
||||
abstract class Repository extends RDBRepository implements Injectable
|
||||
|
||||
@@ -492,7 +492,8 @@ class Service implements Crud,
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v7.0. Use filterCreateInput or filterUpdateInput. Or better don't extend the class.
|
||||
* Use entityAcl, app > acl, roles to restrict write access for specific fields.
|
||||
* @param stdClass $data
|
||||
* @return void
|
||||
*/
|
||||
@@ -501,7 +502,8 @@ class Service implements Crud,
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v7.0. Use filterCreateInput or filterUpdateInput. Or better don't extend the class.
|
||||
* Use entityAcl, app > acl, roles to restrict write access for specific fields.
|
||||
* @param stdClass $data
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -59,7 +59,7 @@ use DateInterval;
|
||||
use ReflectionMethod;
|
||||
|
||||
/**
|
||||
* @deprecated Since v7.0. Use SelectBuilder instead.
|
||||
* @deprecated As of v7.0. Use SelectBuilder instead.
|
||||
*
|
||||
* Used for generating and managing select parameters which subsequently will be feed to ORM.
|
||||
*/
|
||||
@@ -846,9 +846,6 @@ class SelectManager
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public function getAclParams() : array
|
||||
{
|
||||
$result = [];
|
||||
|
||||
@@ -189,7 +189,7 @@ class Config
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Since v7.0.
|
||||
* @deprecated As of v7.0. Use ConfigWriter instead.
|
||||
*
|
||||
* @param string|array<string,mixed>|\stdClass $name
|
||||
* @param mixed $value
|
||||
@@ -218,7 +218,7 @@ class Config
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Since v7.0.
|
||||
* @deprecated As of v7.0. Use ConfigWriter instead.
|
||||
*/
|
||||
public function remove(string $name): bool
|
||||
{
|
||||
@@ -236,8 +236,7 @@ class Config
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Since v7.0.
|
||||
*
|
||||
* @deprecated As of v7.0. Use ConfigWriter instead.
|
||||
* @return bool
|
||||
*/
|
||||
public function save()
|
||||
@@ -301,7 +300,7 @@ class Config
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string,mixed>
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
private function getData(): array
|
||||
{
|
||||
@@ -364,7 +363,7 @@ class Config
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of 7.0. Use ConfigWriter instead.
|
||||
* @param array<string,mixed> $data
|
||||
* @return void
|
||||
*/
|
||||
@@ -378,9 +377,7 @@ class Config
|
||||
}
|
||||
|
||||
/**
|
||||
* Update cache timestamp.
|
||||
*
|
||||
* @deprecated
|
||||
* @deprecated As of 7.0. Use ConfigWriter instead.
|
||||
* @return ?array<string,int>
|
||||
*/
|
||||
public function updateCacheTimestamp(bool $returnOnlyValue = false)
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
namespace Espo\Core\Utils;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @todo Remove in 6.4.
|
||||
* @deprecated As of v6.0. Use FieldUtil.
|
||||
* @todo Remove in 8.0.
|
||||
*/
|
||||
class FieldManagerUtil extends FieldUtil
|
||||
{
|
||||
|
||||
@@ -41,75 +41,68 @@ use RuntimeException;
|
||||
class BaseEntity implements Entity
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
* @deprecated
|
||||
* @deprecated As of v7.0. Use `getId`. To be changed to protected.
|
||||
* @todo Change to protected in v8.0.
|
||||
* @var ?string
|
||||
*/
|
||||
public $id = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
/** @var string */
|
||||
protected $entityType;
|
||||
|
||||
private bool $isNotNew = false;
|
||||
|
||||
private bool $isSaved = false;
|
||||
|
||||
private bool $isFetched = false;
|
||||
|
||||
private bool $isBeingSaved = false;
|
||||
|
||||
/**
|
||||
* @todo Make private. Rename to `attributes`.
|
||||
* @deprecated
|
||||
* @var array<string,array<string,mixed>>
|
||||
* @todo Make private, rename to `attributes` in v8.0. .
|
||||
* @deprecated As of v6.0. Use getAttributeList, getAttributeParam, ORM\Defs.
|
||||
* @var array<string, array<string, mixed>>
|
||||
*/
|
||||
public array $fields = [];
|
||||
|
||||
/**
|
||||
* @var array<string,array<string,mixed>>
|
||||
* @var array<string, array<string, mixed>>
|
||||
*/
|
||||
private array $attributes = [];
|
||||
|
||||
/**
|
||||
* @todo Make private.
|
||||
* @deprecated
|
||||
* @var array<string,array<string,mixed>>
|
||||
* @todo Make private in v8.0.
|
||||
* @deprecated As of v6.0. Use getRelationList, getRelationParam, ORM\Defs.
|
||||
* @var array<string, array<string, mixed>>
|
||||
*/
|
||||
protected array $relations = [];
|
||||
|
||||
/**
|
||||
* An attribute-value map.
|
||||
*
|
||||
* @deprecated
|
||||
* @todo Make private.
|
||||
* @var array<string,mixed>
|
||||
* @deprecated As of v7.0. `setInContainer`, `hasInContainer`, `getFromContainer`.
|
||||
* @todo Make private in v8.0.
|
||||
* @var array<string, mixed>
|
||||
*/
|
||||
protected array $valuesContainer = [];
|
||||
|
||||
/**
|
||||
* An attribute-value map of values fetched from DB (before changed).
|
||||
*
|
||||
* @deprecated
|
||||
* @deprecated As of v7.0. `getFromFetchedContainer`, `hasInFetchedContainer`.
|
||||
* @todo Make private.
|
||||
* @var array<string,mixed>
|
||||
*/
|
||||
private array $fetchedValuesContainer = [];
|
||||
|
||||
protected ?EntityManager $entityManager;
|
||||
|
||||
private ?ValueAccessor $valueAccessor = null;
|
||||
|
||||
/**
|
||||
* @var array<string,bool>
|
||||
*/
|
||||
/** @var array<string, bool> */
|
||||
private array $writtenMap = [];
|
||||
|
||||
/**
|
||||
* @param array{
|
||||
* attributes?: array<string,array<string,mixed>>,
|
||||
* relations?: array<string,array<string,mixed>>,
|
||||
* fields?: array<string,array<string,mixed>>
|
||||
* attributes?: array<string, array<string, mixed>>,
|
||||
* relations?: array<string, array<string, mixed>>,
|
||||
* fields?: array<string, array<string, mixed>>
|
||||
* } $defs
|
||||
*/
|
||||
public function __construct(
|
||||
@@ -124,7 +117,6 @@ class BaseEntity implements Entity
|
||||
|
||||
$this->attributes = $defs['attributes'] ?? $defs['fields'] ?? $this->attributes;
|
||||
$this->relations = $defs['relations'] ?? $this->relations;
|
||||
|
||||
$this->fields = $this->attributes;
|
||||
|
||||
if ($valueAccessorFactory) {
|
||||
@@ -173,7 +165,7 @@ class BaseEntity implements Entity
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use `setInContainer` method.
|
||||
* @deprecated As of v7.0. Use `setInContainer` method.
|
||||
*
|
||||
* @param string $attribute
|
||||
* @param mixed $value
|
||||
@@ -257,7 +249,7 @@ class BaseEntity implements Entity
|
||||
/**
|
||||
* Get an attribute value.
|
||||
*
|
||||
* @param array<string,mixed> $params @deprecated
|
||||
* @param array<string, mixed> $params @deprecated
|
||||
* @retrun mixed
|
||||
*/
|
||||
public function get(string $attribute, $params = [])
|
||||
@@ -448,7 +440,7 @@ class BaseEntity implements Entity
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v7.0. Use set instead.
|
||||
* @todo Make protected.
|
||||
* @param array<string,mixed> $data
|
||||
*/
|
||||
@@ -681,7 +673,7 @@ class BaseEntity implements Entity
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Use `getEntityType`.
|
||||
* @return string
|
||||
*/
|
||||
public function getEntityName()
|
||||
@@ -698,7 +690,7 @@ class BaseEntity implements Entity
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Use `hasAttribute`.
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
@@ -710,9 +702,9 @@ class BaseEntity implements Entity
|
||||
/**
|
||||
* Whether an entity type has an attribute defined.
|
||||
*/
|
||||
public function hasAttribute(string $attibute): bool
|
||||
public function hasAttribute(string $attribute): bool
|
||||
{
|
||||
return isset($this->attributes[$attibute]);
|
||||
return isset($this->attributes[$attribute]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -740,7 +732,7 @@ class BaseEntity implements Entity
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use `getValueMap`.
|
||||
* @deprecated As of v6.0. Use `getValueMap`.
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
public function getValues()
|
||||
@@ -749,7 +741,7 @@ class BaseEntity implements Entity
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use `getValueMap`.
|
||||
* @deprecated As of v6.0. Use `getValueMap`.
|
||||
* @todo Make protected.
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
@@ -785,8 +777,8 @@ class BaseEntity implements Entity
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @return array<string,mixed>
|
||||
* @deprecated As of v6.0. Use ORM\Defs instead.
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function getFields()
|
||||
{
|
||||
@@ -794,8 +786,8 @@ class BaseEntity implements Entity
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @return array<string,mixed>
|
||||
* @deprecated As of v7.0. Use ORM\Defs instead.
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function getAttributes()
|
||||
{
|
||||
@@ -803,7 +795,7 @@ class BaseEntity implements Entity
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v7.0. Use ORM\Defs instead.
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
public function getRelations()
|
||||
@@ -872,8 +864,7 @@ class BaseEntity implements Entity
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Use `isAttributeChanged`.
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
@@ -932,15 +923,15 @@ class BaseEntity implements Entity
|
||||
}
|
||||
|
||||
foreach ($v1 as $i => $itemValue) {
|
||||
if (is_object($v1[$i]) && is_object($v2[$i])) {
|
||||
if (!self::areValuesEqual(self::JSON_OBJECT, $v1[$i], $v2[$i])) {
|
||||
if (is_object($itemValue) && is_object($v2[$i])) {
|
||||
if (!self::areValuesEqual(self::JSON_OBJECT, $itemValue, $v2[$i])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($v1[$i] !== $v2[$i]) {
|
||||
if ($itemValue !== $v2[$i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1095,7 +1086,7 @@ class BaseEntity implements Entity
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use `$this->entityManager`.
|
||||
* @deprecated As of v6.0. Access `entityManager` property.
|
||||
*/
|
||||
protected function getEntityManager(): EntityManager
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
namespace Espo\ORM\DB\Query;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Not to be used directly.
|
||||
*/
|
||||
abstract class Base extends \Espo\ORM\QueryComposer\BaseQueryComposer
|
||||
{
|
||||
|
||||
@@ -269,7 +269,7 @@ class EntityCollection implements Collection, Iterator, Countable, ArrayAccess,
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Use `getEntityType`.
|
||||
* @return ?string
|
||||
*/
|
||||
public function getEntityName()
|
||||
@@ -278,7 +278,7 @@ class EntityCollection implements Collection, Iterator, Countable, ArrayAccess,
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<TEntity|array<string,mixed>>
|
||||
* @return array<TEntity|array<string, mixed>>
|
||||
*/
|
||||
public function getDataList(): array
|
||||
{
|
||||
@@ -360,8 +360,8 @@ class EntityCollection implements Collection, Iterator, Countable, ArrayAccess,
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use `getValueMapList`.
|
||||
* @return array<array<string,mixed>>|\stdClass[]
|
||||
* @deprecated As of v6.0. Use `getValueMapList`.
|
||||
* @return array<array<string, mixed>>|\stdClass[]
|
||||
*/
|
||||
public function toArray(bool $itemsAsObjects = false): array
|
||||
{
|
||||
|
||||
@@ -156,8 +156,8 @@ class EntityManager
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo Remove in v7.4.
|
||||
* @deprecated
|
||||
* @todo Remove in v6.0.
|
||||
* @deprecated As of v6.0. Use `getQueryComposer`.
|
||||
*/
|
||||
public function getQuery(): QueryComposer
|
||||
{
|
||||
@@ -419,7 +419,7 @@ class EntityManager
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v7.0. Use the Query Builder instead. Otherwise, code will be not portable.
|
||||
*/
|
||||
public function getPDO(): PDO
|
||||
{
|
||||
@@ -427,9 +427,8 @@ class EntityManager
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use `getCollectionFactory`.
|
||||
* @deprecated As of v7.0. Use `getCollectionFactory`.
|
||||
* @param array<string, mixed> $data
|
||||
*
|
||||
* @return EntityCollection<Entity>
|
||||
*/
|
||||
public function createCollection(?string $entityType = null, array $data = []): EntityCollection
|
||||
|
||||
@@ -196,7 +196,7 @@ abstract class BaseQueryComposer implements QueryComposer
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use wrapper or methods directly.
|
||||
* @deprecated As of v7.2. Use the wrapper or methods directly.
|
||||
*/
|
||||
public function compose(Query $query): string
|
||||
{
|
||||
@@ -269,8 +269,8 @@ abstract class BaseQueryComposer implements QueryComposer
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @todo Remove in v7.3.
|
||||
* @deprecated As of v6.0. Use `composeSelect`.
|
||||
* @todo Remove in v8.0.
|
||||
* @param array<string, mixed>|null $params
|
||||
*/
|
||||
public function createSelectQuery(string $entityType, ?array $params = null): string
|
||||
@@ -1256,8 +1256,8 @@ abstract class BaseQueryComposer implements QueryComposer
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of v6.0. Use `Util::getAllAttributesFromComplexExpression`.
|
||||
* @return string[]
|
||||
* @deprecated
|
||||
*/
|
||||
public static function getAllAttributesFromComplexExpression(string $expression): array
|
||||
{
|
||||
@@ -2257,8 +2257,9 @@ abstract class BaseQueryComposer implements QueryComposer
|
||||
|
||||
/**
|
||||
* Quote a value (if needed).
|
||||
* @deprecated
|
||||
* @todo Make protected in 6.5.
|
||||
* @deprecated As of v6.0. Not meant to be used outside as Query Builder should be used to
|
||||
* build queries.
|
||||
* @todo Make protected in 8.0.
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function quote($value): string
|
||||
@@ -2890,8 +2891,8 @@ abstract class BaseQueryComposer implements QueryComposer
|
||||
|
||||
/**
|
||||
* Sanitize a string.
|
||||
* @todo Make protected in 6.5.
|
||||
* @deprecated
|
||||
* @todo Make protected in 8.0.
|
||||
* @deprecated As of v6.0. Not to be used outside.
|
||||
*/
|
||||
public function sanitize(string $string): string
|
||||
{
|
||||
@@ -2901,7 +2902,7 @@ abstract class BaseQueryComposer implements QueryComposer
|
||||
/**
|
||||
* Sanitize an alias for a SELECT statement.
|
||||
* @todo Make protected in 6.5.
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Not to be used outside.
|
||||
*/
|
||||
public function sanitizeSelectAlias(string $string): string
|
||||
{
|
||||
|
||||
@@ -50,6 +50,8 @@ use RuntimeException;
|
||||
use PDO;
|
||||
|
||||
/**
|
||||
* A relation database repository.
|
||||
*
|
||||
* @template TEntity of Entity
|
||||
* @implements Repository<TEntity>
|
||||
*/
|
||||
@@ -251,7 +253,7 @@ class RDBRepository implements Repository
|
||||
/**
|
||||
* Find records.
|
||||
*
|
||||
* @param ?array<string,mixed> $params @deprecated
|
||||
* @param ?array<string, mixed> $params @deprecated As of v6.0. Use query building.
|
||||
* @return Collection<TEntity>
|
||||
*/
|
||||
public function find(?array $params = []): Collection
|
||||
@@ -262,7 +264,7 @@ class RDBRepository implements Repository
|
||||
/**
|
||||
* Find one record.
|
||||
*
|
||||
* @param ?array<string,mixed> $params @deprecated
|
||||
* @param ?array<string,mixed> $params @deprecated As of v6.0. Use query building.
|
||||
*/
|
||||
public function findOne(?array $params = []): ?Entity
|
||||
{
|
||||
@@ -293,7 +295,7 @@ class RDBRepository implements Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Use `getRelation(...)->find()`.
|
||||
* @param ?array<string,mixed> $params
|
||||
* @return Collection<TEntity>|TEntity|null
|
||||
*/
|
||||
@@ -360,8 +362,7 @@ class RDBRepository implements Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*
|
||||
* @deprecated As of v6.0. Use `getRelation(...)->count()`.
|
||||
* @param ?array<string,mixed> $params
|
||||
*/
|
||||
public function countRelated(Entity $entity, string $relationName, ?array $params = null): int
|
||||
@@ -478,7 +479,7 @@ class RDBRepository implements Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Use `getRelation(...)->isRelated(...)`.
|
||||
* @param TEntity|string $foreign
|
||||
*/
|
||||
public function isRelated(Entity $entity, string $relationName, $foreign): bool
|
||||
@@ -533,7 +534,7 @@ class RDBRepository implements Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Use `getRelation(...)->relate(...)`.
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
public function relate(Entity $entity, string $relationName, $foreign, $columnData = null, array $options = [])
|
||||
@@ -596,7 +597,7 @@ class RDBRepository implements Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Use `getRelation(...)->unrelate(...)`.
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
public function unrelate(Entity $entity, string $relationName, $foreign, array $options = [])
|
||||
@@ -651,7 +652,7 @@ class RDBRepository implements Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Use `getRelation(...)->getColumn(...)`.
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
public function getRelationColumn(Entity $entity, string $relationName, string $foreignId, string $column)
|
||||
@@ -660,7 +661,7 @@ class RDBRepository implements Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0.
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
protected function beforeRelate(Entity $entity, $relationName, $foreign, $data = null, array $options = [])
|
||||
@@ -668,7 +669,7 @@ class RDBRepository implements Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0.
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
protected function afterRelate(Entity $entity, $relationName, $foreign, $data = null, array $options = [])
|
||||
@@ -676,7 +677,7 @@ class RDBRepository implements Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0.
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
protected function beforeUnrelate(Entity $entity, $relationName, $foreign, array $options = [])
|
||||
@@ -684,7 +685,7 @@ class RDBRepository implements Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0.
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
protected function afterUnrelate(Entity $entity, $relationName, $foreign, array $options = [])
|
||||
@@ -692,7 +693,7 @@ class RDBRepository implements Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0.
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
protected function beforeMassRelate(Entity $entity, $relationName, array $params = [], array $options = [])
|
||||
@@ -700,7 +701,7 @@ class RDBRepository implements Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0.
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
protected function afterMassRelate(Entity $entity, $relationName, array $params = [], array $options = [])
|
||||
@@ -708,7 +709,7 @@ class RDBRepository implements Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Use `getRelation(...)->updateColumns(...)`.
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
public function updateRelation(Entity $entity, string $relationName, $foreign, $columnData)
|
||||
@@ -741,7 +742,7 @@ class RDBRepository implements Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Use `getRelation(...)->massRelate(...)`.
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
public function massRelate(Entity $entity, string $relationName, array $params = [], array $options = [])
|
||||
@@ -760,7 +761,7 @@ class RDBRepository implements Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string,mixed> $params @deprecated Omit it.
|
||||
* @param array<string,mixed> $params @deprecated Use query building.
|
||||
*/
|
||||
public function count(array $params = []): int
|
||||
{
|
||||
@@ -821,7 +822,6 @@ class RDBRepository implements Repository
|
||||
* A relation name or table. A relation name should be in camelCase, a table in CamelCase.
|
||||
* @param string|null $alias An alias.
|
||||
* @param WhereItem|array<scalar,mixed>|null $conditions Join conditions.
|
||||
*
|
||||
* @return RDBSelectBuilder<TEntity>
|
||||
*/
|
||||
public function join($target, ?string $alias = null, $conditions = null): RDBSelectBuilder
|
||||
@@ -836,7 +836,6 @@ class RDBRepository implements Repository
|
||||
* A relation name or table. A relation name should be in camelCase, a table in CamelCase.
|
||||
* @param string|null $alias An alias.
|
||||
* @param WhereItem|array<scalar,mixed>|null $conditions Join conditions.
|
||||
*
|
||||
* @return RDBSelectBuilder<TEntity>
|
||||
*/
|
||||
public function leftJoin($target, ?string $alias = null, $conditions = null): RDBSelectBuilder
|
||||
@@ -986,7 +985,7 @@ class RDBRepository implements Repository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v7.0. Use the Query Builder instead. Otherwise, code will be not portable.
|
||||
*/
|
||||
protected function getPDO(): PDO
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Espo\ORM\Repository;
|
||||
use Espo\ORM\Entity;
|
||||
|
||||
/**
|
||||
* An access point for fetching and storing records.
|
||||
* An access point for record fetching and storing.
|
||||
*
|
||||
* @template TEntity of Entity
|
||||
*/
|
||||
|
||||
@@ -166,7 +166,7 @@ class SthCollection implements Collection, IteratorAggregate, Countable
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated As of v6.0. Use `getValueMapList`.
|
||||
* @return array<int,array<string,mixed>>|\stdClass[]
|
||||
*/
|
||||
public function toArray(bool $itemsAsObjects = false): array
|
||||
|
||||
@@ -109,7 +109,7 @@ class EmailAccount extends Record implements
|
||||
* @throws Error
|
||||
* @throws NoSmtp
|
||||
* @internal Left for bc.
|
||||
* @deprecated
|
||||
* @deprecated As of v7.3. Use Espo\Core\Mail\Account\PersonalAccount.
|
||||
*/
|
||||
public function getSmtpParamsFromAccount(EmailAccountEntity $emailAccount): ?array
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user