|
1 | | -bitrix24-php-sdk [](https://travis-ci.org/mesilov/bitrix24-php-sdk) |
| 1 | +bitrix24-php-sdk – Bitrix24 REST API PHP SDK |
2 | 2 | ================ |
3 | 3 | [](https://packagist.org/packages/mesilov/bitrix24-php-sdk) [](https://packagist.org/packages/mesilov/bitrix24-php-sdk) |
| 4 | +[](https://packagist.org/packages/mesilov/bitrix24-php-sdk) |
4 | 5 |
|
5 | 6 | A powerful PHP library for the Bitrix24 REST API |
| 7 | + |
| 8 | +### Build status |
| 9 | + |
| 10 | +[](https://github.com/mesilov/bitrix24-php-sdk/actions/workflows/phpstan.yml) |
| 11 | +[](https://github.com/mesilov/bitrix24-php-sdk/actions/workflows/phpunit.yml) |
| 12 | + |
6 | 13 | ### BITRIX24-PHP-SDK Documentation |
7 | 14 |
|
8 | 15 | - [Russian](/docs/RU/documentation.md) |
@@ -42,23 +49,23 @@ Performance improvements 🚀 |
42 | 49 | ### Development principles |
43 | 50 |
|
44 | 51 | - 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 |
| 52 | + - auto-completion of methods at the IDE |
| 53 | + - typed method call signatures |
| 54 | + - typed results of method calls |
| 55 | + - helpers for typical operations |
49 | 56 | - 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 |
| 57 | + - documentation on the operation of a specific method containing a link to the official documentation |
| 58 | + - documentation for working with the SDK |
52 | 59 | - 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 |
| 60 | + - minimal impact on client code |
| 61 | + - ability to work with large amounts of data with constant memory consumption |
| 62 | + - efficient operation of the API using butch requests |
56 | 63 | - Modern technology stack |
57 | | - - based on [Symfony HttpClient](https://symfony.com/doc/current/http_client.html) |
58 | | - - actual PHP versions language features |
| 64 | + - based on [Symfony HttpClient](https://symfony.com/doc/current/http_client.html) |
| 65 | + - actual PHP versions language features |
59 | 66 | - Reliable: |
60 | | - - test coverage: unit, integration, contract |
61 | | - - typical examples typical for different modes of operation and they are optimized for memory \ performance |
| 67 | + - test coverage: unit, integration, contract |
| 68 | + - typical examples typical for different modes of operation and they are optimized for memory \ performance |
62 | 69 |
|
63 | 70 | ### Architecture |
64 | 71 |
|
@@ -107,47 +114,53 @@ Performance improvements 🚀 |
107 | 114 | Add `"mesilov/bitrix24-php-sdk": "2.x"` to `composer.json` of your application. Or clone repo to your project. |
108 | 115 |
|
109 | 116 | ### Tests |
| 117 | + |
110 | 118 | Tests locate in folder `tests` and we have two test types |
111 | 119 |
|
112 | 120 | #### Unit tests |
113 | | -**Fast**, in-memory tests without a network I\O |
114 | | -For run unit tests you must call in command line |
| 121 | + |
| 122 | +**Fast**, in-memory tests without a network I\O For run unit tests you must call in command line |
115 | 123 |
|
116 | 124 | ```shell |
117 | 125 | composer phpunit-run-unit-test |
118 | 126 | ``` |
119 | 127 |
|
120 | 128 | #### Integration tests |
| 129 | + |
121 | 130 | **Slow** tests with full lifecycle with your **test** Bitrix24 portal via webhook. |
122 | 131 |
|
123 | 132 | ❗️Do not run integration tests with production portals ❗️ |
124 | 133 |
|
125 | 134 | For run integration test you must: |
| 135 | + |
126 | 136 | 1. Create [new Bitrix24 portal](https://www.bitrix24.ru/create.php?p=255670) for development tests |
127 | 137 | 2. Go to left menu, click «Sitemap» |
128 | 138 | 3. Find menu item «Developer resources» |
129 | 139 | 4. Click on menu item «Other» |
130 | 140 | 5. Click on menu item «Inbound webhook» |
131 | 141 | 6. Assign all permisions with webhook and click «save» button |
132 | 142 | 7. Create file `/tests/.env.local` with same settings, see comments in `/tests/.env` file. |
| 143 | + |
133 | 144 | ```yaml |
134 | 145 | APP_ENV=dev |
135 | 146 | BITRIX24_WEBHOOK=https:// your portal webhook url |
136 | 147 | INTEGRATION_TEST_LOG_LEVEL=500 |
137 | 148 | ``` |
| 149 | + |
138 | 150 | 8. call in command line |
139 | 151 |
|
140 | 152 | ```shell |
141 | 153 | composer composer phpunit-run-integration-tests |
142 | 154 | ``` |
143 | 155 |
|
144 | 156 | #### PHP Static Analysis Tool – phpstan |
| 157 | + |
145 | 158 | Call in command line |
| 159 | + |
146 | 160 | ```shell |
147 | 161 | composer phpstan-analyse |
148 | 162 | ``` |
149 | 163 |
|
150 | | - |
151 | 164 | ### Submitting bugs and feature requests |
152 | 165 |
|
153 | 166 | Bugs and feature request are tracked on [GitHub](https://github.com/mesilov/bitrix24-php-sdk/issues) |
|
0 commit comments