Added
API v3 support: Tasks & EventLog
- Added support for Bitrix24 API v3
- Added REST 3.0 API version support:
Core\Contracts\ApiVersion- enum for API version support (v1,v3) with helper methodsisV3()andisV1()Core\EndpointUrlFormatter- formats API request URLs based on API version, handles V3 API prefix/rest/api, manages case-sensitive method handling, and request ID parameter placement for strict methods
- Switched Task domain methods to Bitrix24 API v3 and documented services/methods currently using v3:
Services\Task\Service\Task:get(tasks.task.get),add(tasks.task.add),delete(tasks.task.delete),update(tasks.task.update)Services\Task\Service\TaskChat:sendMessage(tasks.task.chat.message.send)Services\Task\Service\TaskFile:attachExists(tasks.task.file.attach)Services\Main\Service\Documentation:getSchema(documentation)
- Added type-safe filter builder system for REST 3.0 filtering (#338):
FilterBuilderInterface- contract for all filter buildersAbstractFilterBuilder- base implementation with AND/OR logic supportFieldConditionBuilder- provides all 8 REST 3.0 operators:=,!=,>,>=,<,<=,in,betweenTaskFilter- type-safe filter for Task entity with 30 field accessors- Fluent API with method chaining:
->title()->eq('ASAP') - OR logic support with callback pattern:
->or(function(TaskFilter $f) {...}) - User field support:
->userField('UF_CRM_TASK')->eq('value') - Raw array fallback:
->raw([['field', 'operator', 'value']]) - Backward compatible with existing array-based filters
- Updated
Task::list()to acceptTaskFilteror array via union type - Comprehensive unit tests with 54 test cases covering all operators and features
- Added select builder infrastructure for type-safe field selection:
Core\Contracts\SelectBuilderInterface- contract withbuildSelect()andwithUserFields()methodsServices\AbstractSelectBuilder- base implementation for select buildersServices\Task\Service\TaskItemSelectBuilder- type-safe select builder for Task entity with field methods:title(),description(),creatorId(),creator(),created(),chat()
- Added comprehensive filter documentation:
src/Filters/docs/README.md- unified guide covering REST 3.0 filtering principles, type-safe filter builders, all 8 operators, field type mapping, usage examples with TaskFilter, and complete migration guide from generic to type-safe approach
- Added OpenAPI schema infrastructure (#338):
Services\Main\Service\Documentation- new service withgetSchema()method for retrieving OpenAPI documentation from REST 3.0/documentationendpointOpenApi\Infrastructure\Console\SchemaBuilder- console commandb24-dev:build-schemafor fetching and saving OpenAPI schema todocs/open-api/openapi.jsonDocumentationResult- DTO returning raw OpenAPI payload as string- Integration test:
tests/Integration/Services/Main/Service/DocumentationTest.php
- Added
Core\Contracts\SortOrderenum (Ascending = 'ASC',Descending = 'DESC') —
type-safe sort direction for use across all REST v3 API calls. - Added service
Services\Main\Service\EventLogwith REST v3 event log methods
(scope:main, requires administrator access),
see main.eventlog.* methods:get(int $id, array|EventLogSelectBuilder $select)— returns a single event log entry by ID
(main.eventlog.get)list(array|EventLogSelectBuilder $select, array|EventLogFilter $filter, array $order, array $pagination)— returns a list of entries with filtering and pagination
(main.eventlog.list)tail(array|EventLogSelectBuilder $select, array|EventLogFilter $filter, EventLogTailCursor $cursor)— returns new entries after a cursor point for polling/sync scenarios
(main.eventlog.tail)
- Added
Services\Main\Service\EventLogSelectBuilder— fluent select builder for event log fields - Added
Services\Main\Service\EventLogFilter— type-safe filter builder with typed condition builders
per field (IntFieldConditionBuilder,DateTimeFieldConditionBuilder,StringFieldConditionBuilder) - Added
Services\Main\Service\EventLogTailCursor— immutable value object for the tail cursor
(field,order: SortOrder,value,limit), serialized viatoArray() - Typed
EventLogItemResult::$remoteAddrasDarsyn\IP\Version\Multi|nullinstead ofstring|null.
darsyn/ipwas already a dependency but unused in result items.
Multi::factory()auto-detects IPv4/IPv6 and returns a value object supporting CIDR range checks,
protocol-appropriate string representation, and strict typing.
Applies the same null/empty-string guard used by$timestampXto handle absent API fields safely.
Everything else
- Added
deptrac/deptrac(^3.0) as a dev dependency — architectural layer enforcement tool.
Rules are declared indeptrac.yaml; run viamake lint-deptrac(also part ofmake lint-all).
Layer boundaries:Core→ nothing;Application→Core,Services;Infrastructure→Core,Services;
Services→Core,Application,Legacy;Legacy→Core,Application,Services.
22 pre-existing violations are recorded inskip_violationswithTODOcomments tracking required refactoring. - Added
Services\AbstractSelectBuilder::allSystemFields()— convenience method that uses reflection
to discover and call all public zero-parameter field methods declared in the concrete subclass,
collecting all available system fields in a single call. Supports chaining withwithUserFields().
Works automatically for any existing or futureAbstractSelectBuilderdescendant without any changes to them. - Added
src/Legacy/namespace withLegacyServiceBuilderandLegacyTaskServiceBuilder,
accessible via$serviceBuilder->getLegacyServiceBuilder()->getTaskScope()->task().
Preserves access to all Bitrix24 REST API v1 task methods (list,fields,delegate,
start,pause,defer,complete, etc.) for users migrating to the v3 SDK.
All classes underBitrix24\SDK\Legacy\are marked@deprecatedand will be removed
once v3 reaches feature parity with v1. - Added
OpenApi\Domain\OpenApiSchemaReaderfor programmatic reading and navigation of the OpenAPI specification,
with support for component schemas, field type extraction,$refresolution, and request/response schema access - Added service
Services\Lists\Lists\Service\Listswith support methods,
see lists.* methods:addcreates a universal list, with batch calls supportupdateupdates a universal list, with batch calls supportgetreturns data of a universal list or an array of lists, with batch calls supportdeletedeletes a universal list, with batch calls supportgetIBlockTypeIdreturns the identifier of the information block type
- Added service
Services\Lists\Field\Service\Fieldwith support methods,
see lists.field.* methods:addcreates a field for the universal list, with batch calls supportupdateupdates a field of the universal list, with batch calls supportgetreturns data about a field or list of fieldsdeletedeletes a field from the universal list, with batch calls supporttypesreturns a list of available field types for the listaddByCodehelper method to create field by iblock codeupdateByCodehelper method to update field by iblock codegetByCodehelper method to get field(s) by iblock codedeleteByCodehelper method to delete field by iblock code
- Added service
Services\Lists\Section\Service\Sectionwith support methods,
see lists.section.* methods:addcreates a section for the universal list, with batch calls supportupdateupdates a section of the universal list, with batch calls supportgetreturns data about a section or list of sectionsdeletedeletes a section from the universal list, with batch calls support
- Added service
Services\Lists\Element\Service\Elementwith support methods,
see lists.element.* methods:addcreates an element for the universal list, with batch calls supportupdateupdates an element of the universal list, with batch calls supportgetreturns data about an element or list of elements, with batch calls supportdeletedeletes an element from the universal list, with batch calls supportgetFileUrlreturns file URL from element field
- Added service
Services\Landing\Site\Service\Sitewith support methods,
see landing.site.* methods:addadds a sitegetListretrieves a list of sitesupdateupdates site parametersdeletedeletes a sitegetPublicUrlreturns the full URL of the site(s)getPreviewreturns the preview image URL of the sitepublicationpublishes the site and all its pagesunpublicunpublishes the site and all its pagesmarkDeletemarks the site as deletedmarkUnDeleterestores the site from the trashgetAdditionalFieldsreturns additional fields of the sitefullExportexports the site to ZIP archivegetFoldersretrieves the site foldersaddFolderadds a folder to the siteupdateFolderupdates folder parameterspublicationFolderpublishes the site's folderunPublicFolderunpublishes the site's foldermarkFolderDeletemarks the folder as deletedmarkFolderUnDeleterestores the folder from the trashgetRightsreturns access permissions of the current user for the specified sitesetRightssets access permissions for the site
- Added service
Services\Landing\SysPage\Service\SysPagewith support methods,
see landing.syspage.* methods:setsets a special page for the sitegetretrieves the list of special pages
- Added service
Services\Landing\Role\Service\Rolewith support methods,
see landing.role.* methods:isEnabledchecks if role model is enabledenableenables or disables the role modelgetListretrieves a list of available rolesgetRightsgets role rights for sitessetRightssets role rights for sitessetAccessCodessets access codes for a rolegetSpecialPageretrieves the address of the special page on the sitedeleteForLandingdeletes all mentions of the page as a special onedeleteForSitedeletes all special pages of the site
- Added service
Services\Landing\Page\Service\Pagewith support methods,
see landing.landing.* methods:addadds a pageaddByTemplatecreates a page from a templatecopycopies a pagedeletedeletes a pageupdateupdates page parametersgetListretrieves a list of pagesgetAdditionalFieldsreturns additional fields of the pagegetPreviewreturns the preview image URL of the pagegetPublicUrlreturns the full URL of the pageresolveIdByPublicUrlresolves page ID by its public URLpublishpublishes the pageunpublishunpublishes the pagemarkDeletedmarks the page as deletedmarkUnDeletedrestores the page from the trashmovemoves a page to another site or folderremoveEntitiesremoves entities from the pageaddBlockadds a block to the pagecopyBlockcopies a block within the pagedeleteBlockdeletes a block by its identifiermoveBlockDownmoves a block down on the pagemoveBlockUpmoves a block up on the pagemoveBlockmoves a block to a specific positionhideBlockhides a block on the pageshowBlockshows a block on the pagemarkBlockDeletedmarks a block as deletedmarkBlockUnDeletedrestores a block from the trashaddBlockToFavoritesadds a block to favoritesremoveBlockFromFavoritesremoves a block from favorites
- Added service
Services\Landing\Block\Service\Blockwith support methods,
see landing.block.* methods:listretrieves a list of page blocksgetByIdretrieves a block by its identifiergetContentretrieves the content of a blockgetManifestretrieves the manifest of a blockgetRepositoryretrieves blocks from the repositorygetManifestFileretrieves block manifest from repositorygetContentFromRepositoryretrieves block content from repositoryupdateNodesupdates block contentupdateAttrsupdates block node attributesupdateStylesupdates block stylesupdateContentupdates block content with arbitrary contentupdateCardsbulk updates block cardscloneCardclones a block cardaddCardadds a card with modified contentremoveCardremoves a block carduploadFileuploads and attaches image to blockchangeAnchorchanges anchor symbol codechangeNodeNamechanges tag name
- Added service
Services\Landing\Template\Service\Templatewith support methods,
see landing.template.* methods:getListretrieves a list of templatesgetLandingRefretrieves a list of included areas for the pagegetSiteRefretrieves a list of included areas for the sitesetLandingRefsets the included areas for the pagesetSiteRefsets the included areas for the site
- Added service
Services\Landing\Repo\Service\Repowith support methods,
see landing.repo.* methods:getListretrieves a list of blocks from the current applicationregisteradds a block to the repositoryunregisterdeletes a block from the repositorycheckContentchecks the content for dangerous substrings
- Added service
Services\Landing\Demos\Service\Demoswith support methods,
see landing.demos.* methods:registerregisters a template in the site and page creation wizardunregisterdeletes the registered partner templategetListretrieves a list of available partner templates for the current applicationgetSiteListretrieves a list of available templates for creating sitesgetPageListretrieves a list of available templates for creating pages
- Added service
Services\IMOpenLines\Connector\Service\Connectorwith support methods,
see imconnector.* methods:listmethod returns a list of available connectorsregistermethod registers a new connectoractivatemethod activates or deactivates a connectorunregistermethod unregisters a connectorstatusmethod retrieves connector status informationsetDatamethod sets connector datasendMessagesmethod sends messages through the connectorupdateMessagesmethod updates messagesdeleteMessagesmethod deletes messagessendStatusDeliverymethod sends message delivery statussendStatusReadingmethod sends message reading statussetChatNamemethod sets chat name
- Added service
Services\IMOpenLines\Config\Service\Configwith support methods,
see imopenlines.config.*:addadds a new open linedeletedeletes an open linegetretrieves an open line by IdgetListretrieves a list of open linesgetPathgets a link to the public page of open lines in the accountupdatemodifies an open linejoinNetworkconnects an external open line to the accountgetRevisionretrieves information about API revisions
- Added service
Services\IMOpenLines\CRMChat\Service\Chatwith support methods,
see imopenlines.crm.chat.*:getretrieves chats for a CRM objectgetLastIdretrieves the ID of the last chat associated with a CRM entityaddUseradds a user to a CRM entity chatdeleteUserremoves a user from the CRM entity chat
- Added service
Services\IMOpenLines\Message\Service\Messagewith support methods,
see imopenlines.crm.message., imopenlines.message.:addCrmMessagesends a message to the open line on behalf of an employee or bot in a chat linked to a CRM entityquickSavesaves a message from the open line chat to the list of quick answerssessionStartstarts a new dialogue session based on a message
- Added service
Services\IMOpenLines\Bot\Service\Botwith support methods,
see imopenlines.bot.*:sendMessagesends an automatic message via the chatbottransferToOperatorswitches the conversation to a free operatortransferToUsertransfers the conversation to a specific operator by user IDtransferToQueuetransfers the conversation to another open line queuefinishSessionends the current session
- Added service
Services\IMOpenLines\Operator\Service\Operatorwith support methods,
see imopenlines.operator.*:answertakes the dialog for the current operatorfinishends the dialogue by the current operatoranotherFinishfinishes the dialog of another operatorskipskips the dialog for the current operatorspammarks the conversation as "spam" by the current operatortransfertransfers the dialogue to another operator or line
- Added service
Services\IMOpenLines\Session\Service\Sessionwith support methods,
see imopenlines.session.*:createCrmLeadcreates a lead based on the dialoguegetDialogretrieves information about the operator's dialogue (chat) in the open linestartMessageSessionstarts a new dialogue session based on a messagevoteHeadvotes for the session headgetHistorygets session historyinterceptintercepts the sessionjoinjoins the sessionpinAllpins all sessionspinpins a specific sessionsetSilentsets silent mode for sessionunpinAllunpins all sessionsopenopens a sessionstartstarts a session
- Added service
Services\SonetGroup\Service\SonetGroupwith support methods,
see sonet_group.* methods:createcreates a social network group/projectupdatemodifies group parametersdeletedeletes a social network groupgetgets detailed information about a specific workgrouplistgets list of workgroups with filteringgetGroupsgets list of social network groups (simpler version)getUserGroupsgets list of current user's groupsaddUseradds users to group without invitation processdeleteUserremoves users from groupsetOwnerchanges group owner
- Added
isPartner(): boolmethod toContactPersonInterfaceto check if the contact person is a partner employee,
see details:- Returns
trueif the contact person has a Bitrix24 partner ID set - Returns
falseif no partner ID is associated with the contact person - Provides a convenience method instead of checking
getBitrix24PartnerId() !== null
- Returns
Changed
-
Removed deprecated
RemoteEventsFabrictest file (tests/Unit/Services/RemoteEventsFabricTest.php);
RemoteEventsFactoryTestalready provides full coverage of the replacement class -
Removed unused
use Bitrix24\SDK\Services\RemoteEventsFabricimports from
CRMServiceBuilderTest,IMServiceBuilderTest, andMainServiceBuilderTest -
Fixed PHPUnit 12 deprecations in
RemoteEventsFactoryTest: replacedcreateStub()+->with()
(no-op combination) withcreateStub()+->willReturn()only -
Breaking changes in
Bitrix24PartnerInterfaceandBitrix24PartnerRepositoryInterface,
see details:- Renamed
getBitrix24PartnerId(): inttogetBitrix24PartnerNumber(): intinBitrix24PartnerInterfaceto clarify that this method returns the partner's external vendor site number (visible on bitrix24.com/partners/), not an internal database ID - Renamed
findByBitrix24PartnerId(int $bitrix24PartnerId)tofindByBitrix24PartnerNumber(int $bitrix24PartnerNumber)inBitrix24PartnerRepositoryInterface - Migration: Replace all calls to
getBitrix24PartnerId()withgetBitrix24PartnerNumber()andfindByBitrix24PartnerId()withfindByBitrix24PartnerNumber()inBitrix24PartnerInterfaceimplementations
- Renamed
-
Updated
Task::list()method to acceptTaskFilter|arrayvia union type - backward compatible with existing array-based filters while supporting new type-safe TaskFilter instances -
Updated Symfony dependencies to support OpenAPI schema builder infrastructure
-
Refactored integration tests: renamed
Fabric.phptoFactory.phpfor consistency -
ContactPersonInterface::markMobilePhoneAsVerified()now accepts an optional?CarbonImmutable $verifiedAt = null
parameter. When omitted, the behaviour is identical to before (defaults to the current timestamp).
Allows callers to supply a specific verification time (e.g. historical imports). -
ContactPersonInterface::markEmailAsVerified()now accepts an optional
?CarbonImmutable $verifiedAt = nullparameter.
Whennull(default), the current timestamp is used — fully backward-compatible.
Callers may supply an explicit date when restoring state from persistence or syncing external data.
Updated:ContactPersonInterface,ContactPersonReferenceEntityImplementation,
ContactPersons.mddocumentation, addedtestMarkEmailAsVerifiedWithSpecificDateunit test.
Fixed
- Fixed handling of
scopeandlicence_familyfields.