chore: Update copyright year from 2025 to 2026 across core files
- Updated copyright headers in 3,055 core application files - Changed 'Copyright (C) 2014-2025' to 'Copyright (C) 2014-2026' - Added 123 new files from EspoCRM core updates - Removed 4 deprecated files - Total changes: 61,637 insertions, 54,283 deletions This is a routine maintenance update for the new year 2026.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -37,7 +37,7 @@ use Espo\ORM\Query\Part\Expression as Expr;
|
||||
use Espo\ORM\Query\Part\Where\Comparison;
|
||||
use Espo\ORM\Query\Part\WhereClause;
|
||||
use Espo\ORM\Query\Part\WhereItem;
|
||||
use Espo\ORM\Query\SelectBuilder as QueryBuilder;
|
||||
use Espo\ORM\Query\SelectBuilder;
|
||||
use InvalidArgumentException;
|
||||
use RuntimeException;
|
||||
|
||||
@@ -54,7 +54,7 @@ class Converter
|
||||
/**
|
||||
* @throws BadRequest
|
||||
*/
|
||||
public function convert(QueryBuilder $queryBuilder, Item $item, ?Converter\Params $params = null): WhereItem
|
||||
public function convert(SelectBuilder $queryBuilder, Item $item, ?Converter\Params $params = null): WhereItem
|
||||
{
|
||||
if ($params && $params->useSubQueryIfMany() && $this->hasRelatedMany($queryBuilder, $item)) {
|
||||
return $this->convertSubQuery($queryBuilder, $item);
|
||||
@@ -83,7 +83,7 @@ class Converter
|
||||
return WhereClause::fromRaw($whereClause);
|
||||
}
|
||||
|
||||
private function hasRelatedMany(QueryBuilder $queryBuilder, Item $item): bool
|
||||
private function hasRelatedMany(SelectBuilder $queryBuilder, Item $item): bool
|
||||
{
|
||||
$entityType = $queryBuilder->build()->getFrom();
|
||||
|
||||
@@ -119,7 +119,7 @@ class Converter
|
||||
* @return array<int|string, mixed>
|
||||
* @throws BadRequest
|
||||
*/
|
||||
private function processItem(QueryBuilder $queryBuilder, Item $item): array
|
||||
private function processItem(SelectBuilder $queryBuilder, Item $item): array
|
||||
{
|
||||
return $this->itemConverter->convert($queryBuilder, $item)->getRaw();
|
||||
}
|
||||
@@ -127,11 +127,11 @@ class Converter
|
||||
/**
|
||||
* @throws BadRequest
|
||||
*/
|
||||
private function convertSubQuery(QueryBuilder $queryBuilder, Item $item): Comparison
|
||||
private function convertSubQuery(SelectBuilder $queryBuilder, Item $item): Comparison
|
||||
{
|
||||
$entityType = $queryBuilder->build()->getFrom() ?? throw new RuntimeException();
|
||||
|
||||
$subQueryBuilder = QueryBuilder::create()
|
||||
$subQueryBuilder = SelectBuilder::create()
|
||||
->from($entityType)
|
||||
->select(Attribute::ID);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -31,7 +31,7 @@ namespace Espo\Core\Select\Where;
|
||||
|
||||
use Espo\Core\Exceptions\BadRequest;
|
||||
use Espo\ORM\Query\Part\WhereItem as WhereClauseItem;
|
||||
use Espo\ORM\Query\SelectBuilder as QueryBuilder;
|
||||
use Espo\ORM\Query\SelectBuilder;
|
||||
|
||||
/**
|
||||
* Converts a where item to a where clause item (for ORM).
|
||||
@@ -41,5 +41,5 @@ interface ItemConverter
|
||||
/**
|
||||
* @throws BadRequest
|
||||
*/
|
||||
public function convert(QueryBuilder $queryBuilder, Item $item): WhereClauseItem;
|
||||
public function convert(SelectBuilder $queryBuilder, Item $item): WhereClauseItem;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -49,7 +49,7 @@ use Espo\ORM\Query\Part\Join;
|
||||
use Espo\ORM\Query\Part\WhereClause;
|
||||
use Espo\ORM\Query\Part\WhereItem as WhereClauseItem;
|
||||
use Espo\ORM\Query\Select;
|
||||
use Espo\ORM\Query\SelectBuilder as QueryBuilder;
|
||||
use Espo\ORM\Query\SelectBuilder;
|
||||
|
||||
use Exception;
|
||||
use RuntimeException;
|
||||
@@ -75,7 +75,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
/**
|
||||
* @throws BadRequest
|
||||
*/
|
||||
public function convert(QueryBuilder $queryBuilder, Item $item): WhereClauseItem
|
||||
public function convert(SelectBuilder $queryBuilder, Item $item): WhereClauseItem
|
||||
{
|
||||
$type = $item->getType();
|
||||
$value = $item->getValue();
|
||||
@@ -360,7 +360,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
* @return array<string|int, mixed>
|
||||
* @throws BadRequest
|
||||
*/
|
||||
private function groupProcessAndOr(QueryBuilder $queryBuilder, string $type, $value): array
|
||||
private function groupProcessAndOr(SelectBuilder $queryBuilder, string $type, $value): array
|
||||
{
|
||||
if (!is_array($value)) {
|
||||
throw new BadRequest("Bad where item.");
|
||||
@@ -396,7 +396,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
throw new BadRequest("Bad where item.");
|
||||
}
|
||||
|
||||
$sqQueryBuilder = QueryBuilder::create()
|
||||
$sqQueryBuilder = SelectBuilder::create()
|
||||
->from($this->entityType);
|
||||
|
||||
$whereItem = Item::fromRaw([
|
||||
@@ -440,7 +440,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
throw new BadRequest("Bad where item 'column'.");
|
||||
}
|
||||
|
||||
$subQueryBuilder = QueryBuilder::create()
|
||||
$subQueryBuilder = SelectBuilder::create()
|
||||
->from($this->entityType)
|
||||
->select(Attribute::ID)
|
||||
->leftJoin($link);
|
||||
@@ -480,7 +480,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
* @throws BadRequest
|
||||
*/
|
||||
private function groupProcessArray(
|
||||
QueryBuilder $queryBuilder,
|
||||
SelectBuilder $queryBuilder,
|
||||
string $type,
|
||||
string $attribute,
|
||||
$value
|
||||
@@ -540,7 +540,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
throw new BadRequest("Bad where item. No value.");
|
||||
}
|
||||
|
||||
$subQuery = QueryBuilder::create()
|
||||
$subQuery = SelectBuilder::create()
|
||||
->select('entityId')
|
||||
->from(ArrayValue::ENTITY_TYPE)
|
||||
->where([
|
||||
@@ -560,7 +560,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
|
||||
return Cond::not(
|
||||
Cond::exists(
|
||||
QueryBuilder::create()
|
||||
SelectBuilder::create()
|
||||
->select('entityId')
|
||||
->from(ArrayValue::ENTITY_TYPE)
|
||||
->where([
|
||||
@@ -577,7 +577,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
if ($type === Type::ARRAY_IS_EMPTY) {
|
||||
return Cond::not(
|
||||
Cond::exists(
|
||||
QueryBuilder::create()
|
||||
SelectBuilder::create()
|
||||
->select('entityId')
|
||||
->from(ArrayValue::ENTITY_TYPE)
|
||||
->where([
|
||||
@@ -591,7 +591,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
}
|
||||
|
||||
if ($type === Type::ARRAY_IS_NOT_EMPTY) {
|
||||
$subQuery = QueryBuilder::create()
|
||||
$subQuery = SelectBuilder::create()
|
||||
->select('entityId')
|
||||
->from(ArrayValue::ENTITY_TYPE)
|
||||
->where([
|
||||
@@ -616,7 +616,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
|
||||
foreach ($value as $arrayValue) {
|
||||
$whereList[] = [
|
||||
$idPart .'=s' => QueryBuilder::create()
|
||||
$idPart .'=s' => SelectBuilder::create()
|
||||
->from(ArrayValue::ENTITY_TYPE)
|
||||
->select('entityId')
|
||||
->where([
|
||||
@@ -1370,7 +1370,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
// The foreign table is not joined as it would perform much slower.
|
||||
// Trade off is that if a foreign record is deleted but the middle table
|
||||
// is not yet deleted, it will give a non-actual result.
|
||||
$subQuery = QueryBuilder::create()
|
||||
$subQuery = SelectBuilder::create()
|
||||
->select(Attribute::ID)
|
||||
->from($this->entityType)
|
||||
->leftJoin($middleEntityType, $alias, $conditions)
|
||||
@@ -1386,7 +1386,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
$relationType == Entity::BELONGS_TO ||
|
||||
$relationType === Entity::HAS_CHILDREN
|
||||
) {
|
||||
$subQuery = QueryBuilder::create()
|
||||
$subQuery = SelectBuilder::create()
|
||||
->select(Attribute::ID)
|
||||
->from($this->entityType)
|
||||
->leftJoin($link, $alias)
|
||||
@@ -1428,7 +1428,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
// The foreign table is not joined as it would perform much slower.
|
||||
// Trade off is that if a foreign record is deleted but the middle table
|
||||
// is not yet deleted, it will give a non-actual result.
|
||||
$subQuery = QueryBuilder::create()
|
||||
$subQuery = SelectBuilder::create()
|
||||
->select(Attribute::ID)
|
||||
->from($this->entityType)
|
||||
->leftJoin($middleEntityType, $alias, $conditions)
|
||||
@@ -1444,7 +1444,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
$relationType == Entity::BELONGS_TO ||
|
||||
$relationType == Entity::HAS_CHILDREN
|
||||
) {
|
||||
$subQuery = QueryBuilder::create()
|
||||
$subQuery = SelectBuilder::create()
|
||||
->select(Attribute::ID)
|
||||
->from($this->entityType)
|
||||
->leftJoin($link, $alias)
|
||||
@@ -1495,7 +1495,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
// MariaDB and PostgreSQL perform fast, MySQL – slow.
|
||||
return Cond::in(
|
||||
Cond::column(Attribute::ID),
|
||||
QueryBuilder::create()
|
||||
SelectBuilder::create()
|
||||
->select(Attribute::ID)
|
||||
->from($this->entityType)
|
||||
->leftJoin(
|
||||
@@ -1511,7 +1511,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
$relationType == Entity::HAS_MANY ||
|
||||
$relationType == Entity::HAS_ONE
|
||||
) {
|
||||
$subQuery = QueryBuilder::create()
|
||||
$subQuery = SelectBuilder::create()
|
||||
->select(Attribute::ID)
|
||||
->from($this->entityType)
|
||||
->leftJoin($link, $alias)
|
||||
@@ -1565,7 +1565,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
// MariaDB and MySQL perform slow, PostgreSQL – fast.
|
||||
return Cond::not(
|
||||
Cond::exists(
|
||||
QueryBuilder::create()
|
||||
SelectBuilder::create()
|
||||
->from($this->entityType, 'sq')
|
||||
->join(
|
||||
Join::create($link, $alias)
|
||||
@@ -1589,7 +1589,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
) {
|
||||
return Cond::not(
|
||||
Cond::exists(
|
||||
QueryBuilder::create()
|
||||
SelectBuilder::create()
|
||||
->select(Attribute::ID)
|
||||
->from($this->entityType, 'sq')
|
||||
->join($link, $alias)
|
||||
@@ -1647,7 +1647,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
|
||||
foreach ($value as $targetId) {
|
||||
// Only-middle join performs slower on MariaDB.
|
||||
$sq = QueryBuilder::create()
|
||||
$sq = SelectBuilder::create()
|
||||
->from($this->entityType)
|
||||
->select(Attribute::ID)
|
||||
->leftJoin($link)
|
||||
@@ -1666,7 +1666,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
$whereList = [];
|
||||
|
||||
foreach ($value as $targetId) {
|
||||
$sq = QueryBuilder::create()
|
||||
$sq = SelectBuilder::create()
|
||||
->from($this->entityType)
|
||||
->select(Attribute::ID)
|
||||
->leftJoin($link)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
Reference in New Issue
Block a user