@@ -3,49 +3,62 @@ bitrix24-php-sdk [] ( https://packagist.org/packages/mesilov/bitrix24-php-sdk ) [ ![ Total Downloads] ( https://poser.pugx.org/mesilov/bitrix24-php-sdk/downloads.svg )] ( https://packagist.org/packages/mesilov/bitrix24-php-sdk )
44
55A powerful PHP library for the Bitrix24 REST API
6+ ### BITRIX24-PHP-SDK Documentation
67
7- [ Bitrix24 API documentation - Russian] ( http://dev.1c-bitrix.ru/rest_help/ ) <br />
8- [ Bitrix24 API documentation - English] ( https://training.bitrix24.com/rest_help/ ) <br />
9- [ Register new Bitrix24 account] ( https://www.bitrix24.ru/create.php?p=255670 ) <br />
8+ - [ Russian] ( /docs/RU/documentation.md )
9+ - [ English] ( /docs/EN/documentation.md )
1010
11- ### SDK 2.0 core features
11+ ### BITRIX24-PHP- SDK ✨FEATURES✨
1212
13- Bitrix24 auth features
13+ Support both auth modes:
1414
15- - ~~ work with auth tokens~~
16- - ~~ work with incoming webhooks~~
15+ - [x] work with auth tokens for Bitrix24 applications in marketplace
16+ - [x] work with incoming webhooks for simple integration projects for current portal
1717
18- add low -level tools to devs:
18+ Low -level tools to devs:
1919
20- - ~~ 2.1 events (token expired, domain url changed)~~
21- - 2.2 rate-limiter - wait for symfony/symfony #37471
22- - 2.3 RetryHttpClient - symfony/symfony #38182
20+ - Domain core events:
21+ - [x] Access Token expired
22+ - [ ] Bitrix24 portal domain url changed
23+ - [ ] Rate-limit strategy
24+ - [ ] Retry strategy for safe methods
2325
2426API - level features
2527
26- - ~~ 3.1 auto renew access tokens~~
27- - 3.2 batch queries (work in progress)
28- - ~~ 3.2.1 read~~
29- - ~~ 3.2.2 write~~
30- - 3.2.3 read + write
31- - 3.2.4 read without count flag
32- - 3.3 list queries with «start=-1» support
33- - 3.4 offline queues
34- - 3.5 add change domain URL support
35-
36- Core DTO
37-
38- - ~~ Response~~
39- - ~~ Scope~~
40- - ~~ Time~~
41- - ~~ OAuthToken~~
42- - ~~ ApplicationProfile~~
43- - ~~ Pagination~~
44-
45- ### SDK Documentation
46-
47- - [ Russian] ( /docs/RU/documentation.md )
48- - [ English] ( /docs/EN/documentation.md )
28+ - [x] Auto renew access tokens
29+ - [ ] List queries with «start=-1» support
30+ - [ ] offline queues
31+
32+ Performance improvements 🚀
33+
34+ - Batch queries implemented with [ PHP Generators] ( https://www.php.net/manual/en/language.generators.overview.php ) – constant low memory and
35+ low CPI usage
36+ - [x] batch read data from bitrix24
37+ - [x] batch write data to bitrix24
38+ - [ ] write and read in one batch package
39+ - [ ] composite batch queries to many entities (work in progress)
40+ - [ ] read without count flag
41+
42+ ### Development principles
43+
44+ - Good developer experience
45+ - auto-completion of methods at the IDE
46+ - typed method call signatures
47+ - typed results of method calls
48+ - helpers for typical operations
49+ - Good documentation
50+ - documentation on the operation of a specific method containing a link to the official documentation
51+ - documentation for working with the SDK
52+ - Performance first:
53+ - minimal impact on client code
54+ - ability to work with large amounts of data with constant memory consumption
55+ - efficient operation of the API using butch requests
56+ - Modern technology stack
57+ - based on [ Symfony HttpClient] ( https://symfony.com/doc/current/http_client.html )
58+ - actual PHP versions language features
59+ - Reliable:
60+ - test coverage: unit, integration, contract
61+ - typical examples typical for different modes of operation and they are optimized for memory \ performance
4962
5063### Architecture
5164
@@ -94,11 +107,46 @@ Core DTO
94107Add ` "mesilov/bitrix24-php-sdk": "2.x" ` to ` composer.json ` of your application. Or clone repo to your project.
95108
96109### Tests
110+ Tests locate in folder ` tests ` and we have two test types
111+
112+ #### Unit tests
113+ ** Fast** , in-memory tests without a network I\O
114+ For run unit tests you must call in command line
115+
116+ ``` shell
117+ composer phpunit-run-unit-test
118+ ```
119+
120+ #### Integration tests
121+ ** Slow** tests with full lifecycle with your ** test** Bitrix24 portal via webhook.
122+
123+ ❗️Do not run integration tests with production portals ❗️
124+
125+ For run integration test you must:
126+ 1 . Create [ new Bitrix24 portal] ( https://www.bitrix24.ru/create.php?p=255670 ) for development tests
127+ 2 . Go to left menu, click «Sitemap»
128+ 3 . Find menu item «Developer resources»
129+ 4 . Click on menu item «Other»
130+ 5 . Click on menu item «Inbound webhook»
131+ 6 . Assign all permisions with webhook and click «save» button
132+ 7 . Create file ` /tests/.env.local ` with same settings, see comments in ` /tests/.env ` file.
133+ ``` yaml
134+ APP_ENV=dev
135+ BITRIX24_WEBHOOK=https:// your portal webhook url
136+ INTEGRATION_TEST_LOG_LEVEL=500
137+ ```
138+ 8 . call in command line
139+
140+ ``` shell
141+ composer composer phpunit-run-integration-tests
142+ ```
97143
98- SDK test locate in folder ` tests ` and we have two test types
144+ #### PHP Static Analysis Tool – phpstan
145+ Call in command line
146+ ``` shell
147+ composer phpstan-analyse
148+ ```
99149
100- - Unit: ** fast** , in-memory tests without a network I\O
101- - Integration: ** slow** tests with full lifecycle with test Bitrix24 portal via webhook
102150
103151### Submitting bugs and feature requests
104152
@@ -119,6 +167,14 @@ email: <mesilov.maxim@gmail.com>
119167
120168### Sponsors
121169
170+ ### Documentation
171+
172+ [ Bitrix24 API documentation - Russian] ( http://dev.1c-bitrix.ru/rest_help/ )
173+
174+ [ Bitrix24 API documentation - English] ( https://training.bitrix24.com/rest_help/ )
175+
176+ [ Register new Bitrix24 account] ( https://www.bitrix24.ru/create.php?p=255670 )
177+
122178## Русский
123179
124180### Принципы по которым ведётся разработка
0 commit comments