PHPackages                             mesilov/bitrix24-php-lib - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. mesilov/bitrix24-php-lib

ActiveLibrary[HTTP &amp; Networking](/categories/http)

mesilov/bitrix24-php-lib
========================

A powerful PHP library for rapid Bitrix24 application development

0.5.2(2mo ago)69023[18 issues](https://github.com/mesilov/bitrix24-php-lib/issues)[1 PRs](https://github.com/mesilov/bitrix24-php-lib/pulls)MITPHPPHP 8.4.\* || 8.5.\*CI passing

Since Aug 6Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/mesilov/bitrix24-php-lib)[ Packagist](https://packagist.org/packages/mesilov/bitrix24-php-lib)[ Docs](https://github.com/mesilov/bitrix24-php-lib)[ RSS](/packages/mesilov-bitrix24-php-lib/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (7)Dependencies (99)Versions (28)Used By (0)

bitrix24-php-lib
================

[](#bitrix24-php-lib)

PHP library for Bitrix24 application development.

Build status
------------

[](#build-status)

CI\\CD [status](https://github.com/mesilov/bitrix24-php-lib/actions) on `main`[![allowed licenses check](https://github.com/mesilov/bitrix24-php-lib/actions/workflows/license-check.yml/badge.svg)](https://github.com/mesilov/bitrix24-php-lib/actions/workflows/license-check.yml)[![php-cs-fixer check](https://github.com/mesilov/bitrix24-php-lib/actions/workflows/lint-cs-fixer.yml/badge.svg)](https://github.com/mesilov/bitrix24-php-lib/actions/workflows/lint-cs-fixer.yml)[![phpstan check](https://github.com/mesilov/bitrix24-php-lib/actions/workflows/lint-phpstan.yml/badge.svg)](https://github.com/mesilov/bitrix24-php-lib/actions/workflows/lint-phpstan.yml)[![rector check](https://github.com/mesilov/bitrix24-php-lib/actions/workflows/lint-rector.yml/badge.svg)](https://github.com/mesilov/bitrix24-php-lib/actions/workflows/lint-rector.yml)[![unit-tests status](https://github.com/mesilov/bitrix24-php-lib/actions/workflows/tests-unit.yml/badge.svg)](https://github.com/mesilov/bitrix24-php-lib/actions/workflows/tests-unit.yml)[![functional-tests status](https://github.com/mesilov/bitrix24-php-lib/actions/workflows/tests-functional.yml/badge.svg)](https://github.com/mesilov/bitrix24-php-lib/actions/workflows/tests-functional.yml)Application Domain
------------------

[](#application-domain)

The library is designed for rapid development of Bitrix24 applications. It provides a storage layer in [PostgreSQL](https://www.postgresql.org/) using [Doctrine ORM](https://www.doctrine-project.org/).

The package implements and extends [bitrix24-php-sdk application contracts](https://github.com/bitrix24/b24phpsdk/tree/main/src/Application/Contracts).

Supported Bounded Contexts
--------------------------

[](#supported-bounded-contexts)

### Bitrix24Accounts — ✅

[](#bitrix24accounts--)

Implements [Bitrix24Accounts contracts](https://github.com/bitrix24/b24phpsdk/tree/main/src/Application/Contracts/Bitrix24Accounts)for storing Bitrix24 portal accounts and access credentials.

Main entity:

- `Bitrix24Account`

Main use cases:

- `InstallStart`
- `InstallFinish`
- `RenewAuthToken`
- `ChangeDomainUrl`
- `UpdateVersion`
- `Uninstall`

### ApplicationInstallations — ✅

[](#applicationinstallations--)

Implements [ApplicationInstallations contracts](https://github.com/bitrix24/b24phpsdk/tree/main/src/Application/Contracts/ApplicationInstallations)for storing application installation facts and install lifecycle state.

Main entity:

- `ApplicationInstallation`

Main use cases:

- `Install`
- `OnAppInstall`
- `Uninstall`
- `InstallContactPerson`
- `UnlinkContactPerson`

Reference docs:

- `src/ApplicationInstallations/Docs/application-installations.md`

### ContactPersons — ✅

[](#contactpersons--)

Implements [ContactPersons contracts](https://github.com/bitrix24/b24phpsdk/tree/main/src/Application/Contracts/ContactPersons)for storing people related to application installation.

Main entity and enum:

- `ContactPerson`
- `ContactPersonType` (`personal` / `partner`)

Main use cases:

- `ChangeProfile`
- `MarkEmailAsVerified`
- `MarkMobilePhoneAsVerified`

### ApplicationSettings — ✅

[](#applicationsettings--)

Implements [ApplicationSettings contracts](https://github.com/bitrix24/b24phpsdk/tree/main/src/Application/Contracts/ApplicationSettings)for storing application settings per installation and per scope.

Main entity and enum:

- `ApplicationSettingsItem`
- `ApplicationSettingStatus`

Main services:

- `SettingsFetcher`
- `DefaultSettingsInstaller`

Main use cases:

- `Create`
- `Update`
- `Delete`
- `OnApplicationDelete`

Reference docs:

- `src/ApplicationSettings/Docs/application-settings.md`

### Journal — ✅

[](#journal--)

Library-specific bounded context for technical journal entries.

Main entity model:

- `JournalItem`
- `Context`
- `LogLevel`

Main services and infrastructure:

- `JournalLogger`
- `JournalItemRepositoryInterface`
- `DoctrineDbalJournalItemRepository`

Reference docs:

- `src/Journal/Docs/README.md`

### Shared Value Objects

[](#shared-value-objects)

- `Bitrix24\Lib\Common\ValueObjects\Domain`

### Not Implemented Yet

[](#not-implemented-yet)

- `Bitrix24Partners` contracts are not implemented in the current package version

Architecture
------------

[](#architecture)

### Layers and Abstraction Levels

[](#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

[](#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
-----------

[](#quick-start)

### Prerequisites

[](#prerequisites)

- Docker and Docker Compose
- Make

### MCP Servers

[](#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 at `https://mcp-dev.bitrix24.tech/mcp`

Recommended checks:

- ensure `.mcp.json` is 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

[](#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-down`
- `make doctrine-schema-drop`
- `make doctrine-schema-create`
- `make php-cli-bash`

### Database Configuration

[](#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
--------------

[](#infrastructure)

- library is cloud-agnostic

Development Rules
-----------------

[](#development-rules)

1. We use linters.
2. The library is covered with tests.
3. All work is organized through issues.
4. Development processes are remote-first.
5. Think and discuss, then write.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance64

Regular maintenance activity

Popularity26

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~41 days

Recently: every ~35 days

Total

7

Last Release

81d ago

PHP version history (4 changes)0.1.0PHP 8.3.\*

0.2.0PHP ^8.3

0.3.0PHP 8.3.\* || 8.4.\*

0.5.1PHP 8.4.\* || 8.5.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/f73ba25f28c6c24fa54e4d607e0a20800e29633f478eece904a62f5f863f72ed?d=identicon)[mesilov](/maintainers/mesilov)

---

Top Contributors

[![KarlsonComplete](https://avatars.githubusercontent.com/u/61900565?v=4)](https://github.com/KarlsonComplete "KarlsonComplete (195 commits)")[![mesilov](https://avatars.githubusercontent.com/u/1843965?v=4)](https://github.com/mesilov "mesilov (182 commits)")[![claude](https://avatars.githubusercontent.com/u/81847?v=4)](https://github.com/claude "claude (34 commits)")[![camaxtly](https://avatars.githubusercontent.com/u/11616039?v=4)](https://github.com/camaxtly "camaxtly (13 commits)")

---

Tags

bitrix24phpsaasphpapirestsaasBitrix24Bitrix24 Application

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mesilov-bitrix24-php-lib/health.svg)

```
[![Health](https://phpackages.com/badges/mesilov-bitrix24-php-lib/health.svg)](https://phpackages.com/packages/mesilov-bitrix24-php-lib)
```

###  Alternatives

[bitrix24/b24phpsdk

An official PHP library for the Bitrix24 REST API

10244.2k5](/packages/bitrix24-b24phpsdk)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M738](/packages/sylius-sylius)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
