mesilov / bitrix24-php-lib
A powerful PHP library for rapid Bitrix24 application development
Requires
- php: 8.4.* || 8.5.*
- ext-bcmath: *
- ext-curl: *
- ext-intl: *
- ext-json: *
- bitrix24/b24phpsdk: dev-v3-dev
- darsyn/ip: ^6
- darsyn/ip-doctrine: ^6
- doctrine/doctrine-bundle: ^3.2.2 || ^3.3@dev
- doctrine/doctrine-migrations-bundle: 4.0.0
- doctrine/orm: ^3
- fig/http-message-util: ^1
- giggsey/libphonenumber-for-php: ^8 || ^9
- knplabs/knp-paginator-bundle: ^6
- moneyphp/money: ^4
- nesbot/carbon: ^3
- odolbeau/phone-number-bundle: ^4
- psr/log: ^3
- symfony/cache: ^7||^8
- symfony/console: ^7||^8
- symfony/dotenv: ^7||^8
- symfony/event-dispatcher: ^7||^8
- symfony/serializer: ^7||^8
- symfony/uid: ^7||^8
- symfony/yaml: ^7||^8
Requires (Dev)
- doctrine/migrations: ^3
- fakerphp/faker: ^1
- friendsofphp/php-cs-fixer: ^3.64
- lendable/composer-license-checker: ^1.2
- monolog/monolog: ^3
- phpstan/phpstan: ^2
- phpunit/phpunit: ^13
- psalm/phar: ^6
- rector/rector: ^2
- roave/security-advisories: dev-master
- symfony/debug-bundle: ^7 || ^8
- symfony/property-access: ^7 || ^8
- symfony/stopwatch: ^7 || ^8
- symfony/var-exporter: ^7 || ^8
This package is auto-updated.
Last update: 2026-04-18 14:37:53 UTC
README
PHP library for Bitrix24 application development.
Build status
CI\CD status on main |
|---|
Application Domain
The library is designed for rapid development of Bitrix24 applications. It provides a storage layer in PostgreSQL using Doctrine ORM.
The package implements and extends bitrix24-php-sdk application contracts.
Supported Bounded Contexts
Bitrix24Accounts — ✅
Implements Bitrix24Accounts contracts for storing Bitrix24 portal accounts and access credentials.
Main entity:
Bitrix24Account
Main use cases:
InstallStartInstallFinishRenewAuthTokenChangeDomainUrlUpdateVersionUninstall
ApplicationInstallations — ✅
Implements ApplicationInstallations contracts for storing application installation facts and install lifecycle state.
Main entity:
ApplicationInstallation
Main use cases:
InstallOnAppInstallUninstallInstallContactPersonUnlinkContactPerson
Reference docs:
src/ApplicationInstallations/Docs/application-installations.md
ContactPersons — ✅
Implements ContactPersons contracts for storing people related to application installation.
Main entity and enum:
ContactPersonContactPersonType(personal/partner)
Main use cases:
ChangeProfileMarkEmailAsVerifiedMarkMobilePhoneAsVerified
ApplicationSettings — ✅
Implements ApplicationSettings contracts for storing application settings per installation and per scope.
Main entity and enum:
ApplicationSettingsItemApplicationSettingStatus
Main services:
SettingsFetcherDefaultSettingsInstaller
Main use cases:
CreateUpdateDeleteOnApplicationDelete
Reference docs:
src/ApplicationSettings/Docs/application-settings.md
Journal — ✅
Library-specific bounded context for technical journal entries.
Main entity model:
JournalItemContextLogLevel
Main services and infrastructure:
JournalLoggerJournalItemRepositoryInterfaceDoctrineDbalJournalItemRepository
Reference docs:
src/Journal/Docs/README.md
Shared Value Objects
Bitrix24\Lib\Common\ValueObjects\Domain
Not Implemented Yet
Bitrix24Partnerscontracts are not implemented in the current package version
Architecture
Layers and Abstraction Levels
bitrix24-app-laravel-skeleton - Laravel application template
bitrix24-app-symfony-skeleton - Symfony application template
bitrix24-php-lib - domain entities, use cases, services, and persistence
bitrix24-php-sdk - transport layer and transport events
Current Source Tree
src/
ApplicationInstallations/
Docs/
Entity/
Infrastructure/
UseCase/
ApplicationSettings/
Docs/
Entity/
Events/
Infrastructure/
Services/
UseCase/
Bitrix24Accounts/
Entity/
Infrastructure/
UseCase/
Common/
ValueObjects/
ContactPersons/
Entity/
Enum/
Infrastructure/
UseCase/
Journal/
Docs/
Entity/
Infrastructure/
Services/
Services/
Quick Start
Prerequisites
- Docker and Docker Compose
- Make
MCP Servers
The project contains project-level MCP server configuration in .mcp.json.
Developers using Claude Code or Codex must verify the MCP configuration before starting work on the repository.
Configured servers:
bitrix24-dev- HTTP MCP server athttps://mcp-dev.bitrix24.tech/mcp
Recommended checks:
- ensure
.mcp.jsonis present and contains the expected server list - restart the client after pulling changes to
.mcp.json - verify server availability in the client before work starts
Running Tests And Linters
Use only Makefile entrypoints.
# First-time setup make docker-init # Start containers make docker-up # Run tests make test-unit make test-functional # Run all linters make lint-all
Useful additional targets:
make docker-downmake doctrine-schema-dropmake doctrine-schema-createmake php-cli-bash
Database Configuration
Default database credentials are pre-configured in .env:
- Host:
database - Database:
b24phpLibTest - User:
b24phpLibTest - Password:
b24phpLibTest
No additional configuration is needed for the default local test run.
Infrastructure
- library is cloud-agnostic
Development Rules
- We use linters.
- The library is covered with tests.
- All work is organized through issues.
- Development processes are remote-first.
- Think and discuss, then write.