├── .github └── workflows │ ├── lint.yml │ └── phpunit.yml ├── .gitignore ├── .php-cs-fixer.dist.php ├── LICENSE ├── README.md ├── composer.json ├── composer.lock ├── phpunit.xml.dist ├── src └── OData │ ├── Client.php │ ├── Exception.php │ └── Response.php └── tests ├── Bootstrap.php └── OData └── Tests └── ClientTest.php /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: PHP-CS-FIXER 2 | on: [push, pull_request] 3 | jobs: 4 | php-cs-fixer: 5 | name: PHP-CS-Fixer 6 | runs-on: ubuntu-latest 7 | steps: 8 | - name: Checking out repo 9 | uses: actions/checkout@v2 10 | 11 | - name: PHP-CS-Fixer 12 | uses: docker://oskarstark/php-cs-fixer-ga 13 | 14 | - name: Autocommiting php-cs-fixer fixes 15 | uses: stefanzweifel/git-auto-commit-action@v4 16 | with: 17 | commit_message: "fix(style): PHP-CS-Fixer changes" 18 | -------------------------------------------------------------------------------- /.github/workflows/phpunit.yml: -------------------------------------------------------------------------------- 1 | name: PHPUNIT 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | phpunit: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Setup PHP with gd and imagick 10 | uses: shivammathur/setup-php@v2 11 | with: 12 | php-version: '7.4' 13 | extensions: dom 14 | 15 | - name: Checking out repo 16 | uses: actions/checkout@v2 17 | 18 | - name: Add HTTP basic auth credentials 19 | run: echo '${{ secrets.COMPOSER_AUTH_JSON }}' > $GITHUB_WORKSPACE/auth.json 20 | 21 | - name: Installing composer with deps 22 | uses: "ramsey/composer-install@v1" 23 | 24 | - name: Running PHPUNIT 25 | run: ./vendor/bin/phpunit 26 | 27 | - name: Remove auth.json file 28 | run: rm -f $GITHUB_WORKSPACE/auth.json 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /phpunit.xml 3 | /get.php 4 | /package.json 5 | /package-lock* 6 | /.phpunit.result.cache 7 | -------------------------------------------------------------------------------- /.php-cs-fixer.dist.php: -------------------------------------------------------------------------------- 1 | exclude(array('.git', '.github', 'vendor')) 5 | ->in(__DIR__) 6 | ; 7 | 8 | $config = new PhpCsFixer\Config(); 9 | $config->setRules([ 10 | '@PSR12' => true, 11 | //'strict_param' => true, 12 | 'array_syntax' => ['syntax' => 'short'], 13 | ]) 14 | ->setFinder($finder) 15 | ; 16 | return $config->setUsingCache(false); 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Kily Labs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # odata-1c 2 | OData клиент для 1C 3 | 4 | Документация 1С для интерфейса OData: https://its.1c.ru/db/v838doc#bookmark:dev:TI000001358 5 | 6 | Установка 7 | ------------ 8 | 9 | Рекомендуемый способ установки через 10 | [Composer](http://getcomposer.org): 11 | 12 | ``` 13 | $ composer require kilylabs/odata-1c 14 | ``` 15 | 16 | Использование 17 | ----- 18 | #### Инициализация 19 | ```php 20 | [ 28 | 'YOUR LOGIN', 29 | 'YOUR PASSWORD' 30 | ], 31 | 'timeout' => 300, 32 | ]); 33 | ``` 34 | 35 | #### Получение объектов из 1С 36 | ```php 37 | {'Catalog_Номенклатура'}->get()->values(); 41 | var_dump($data); 42 | /* 43 | array(1) { 44 | [0]=> 45 | array(105) { 46 | ["Ref_Key"]=> 47 | string(36) "3ca886b6-aabd-11e7-1a8d-021c5dd9fc20" 48 | ["Description"]=> 49 | string(51) "ПАЛЬТО ПУХ ЖЕН HATANGA V2 БОРДО 46" 50 | ,,, 51 | */ 52 | 53 | // Получение всех объектов с проверкой ошибок 54 | $data = $client->{'Catalog_Номенклатура'}->get(); 55 | if(!$client->isOk()) { 56 | var_dump('Something went wrong: ',$client->getHttpErrorCode(),$client->getHttpErrorMessage(),$client->getErrorCode(),$client->getErrorMessage(),$data->toArray()); 57 | die(); 58 | } 59 | var_dump($data->values()); 60 | 61 | // Получение по UUID (ID или Ref_Key) 62 | $data = $client->{'Catalog_Номенклатура'}->get("40366f94-cded-11e6-e880-00155dd9fc47")->first(); 63 | $data = $client->{'Catalog_Номенклатура'}->id("40366f94-cded-11e6-e880-00155dd9fc47")->get()->first(); 64 | 65 | // Получение по фильтру 66 | $data = $client->{'Catalog_Номенклатура'}->get("Артикул eq 'АРТ-1'")->values(); 67 | $data = $client->{'Catalog_Номенклатура'}->filter("Артикул eq 'АРТ-1'")->get()->values(); 68 | 69 | // Получение вместе с дополнительной информацией 70 | $data = $client->{'Catalog_Номенклатура'}->expand('Производитель,Марка')->get()->values(); 71 | $data = $client->{'Catalog_Номенклатура'}->expand('ВидНоменклатуры')->get()->values(); 72 | 73 | // Ограничение по количеству в запросе 74 | $data = $client->{'Catalog_Номенклатура'}->top(10)->get()->values(); 75 | ``` 76 | #### Создание объектов в 1С 77 | ```php 78 | {'Catalog_Номенклатура'}->create([ 82 | 'Артикул'=>'CERTANLY_NONEXISTENT', 83 | 'Description'=>'test test test nonexistent', 84 | ]); 85 | 86 | // Получение ID созданного объекта 87 | echo $data->getLastId() 88 | ``` 89 | 90 | #### Обновление объектов в 1С 91 | ```php 92 | {'Catalog_Номенклатура'}->update('40366f94-cded-11e6-e880-00155dd9fc47',[ 96 | 'Description'=>'Test description', 97 | ]); 98 | ``` 99 | #### Удаление объектов из 1С 100 | ```php 101 | {'Catalog_Номенклатура'}->update('40366f94-cded-11e6-e880-00155dd9fc47',{ 104 | 'DeletionMark'=>true, 105 | }); 106 | 107 | // Полное удаление объека из 1С (я бы не стал использовать...) 108 | $data = $client->{'Catalog_Номенклатура'}->delete('40366f94-cded-11e6-e880-00155dd9fc47'); 109 | ``` 110 | 111 | #### Проведение и отмена проведения документов 112 | ```php 113 | {'Document_АктВыполненныхРабот'}->id("40366f94-cded-11e6-e880-00155dd9fc47")->post(); 116 | 117 | // Отмена проведения документа 118 | $data = $client->{'Document_АктВыполненныхРабот'}->id("40366f94-cded-11e6-e880-00155dd9fc47")->unpost(); 119 | ``` 120 | TODO 121 | ----- 122 | - ~~сделать метод getLastId();~~ 123 | - ~~fluent интерфейс~~ 124 | - поддержка XML? 125 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kilylabs/odata-1c", 3 | "description": "ODATA protocol client adopted to use with 1C", 4 | "keywords": [ 5 | "1c", 6 | "1с", 7 | "odata", 8 | "1c enterprise", 9 | "8.3", 10 | "1с enterprise 8.3" 11 | ], 12 | "type": "library", 13 | "license": "MIT", 14 | "autoload": { 15 | "psr-4": { 16 | "Kily\\Tools1C\\OData\\": "src/OData" 17 | } 18 | }, 19 | "autoload-dev": { 20 | "psr-4": { 21 | "Kily\\Tools1C\\OData\\Tests\\": "tests/OData/Tests" 22 | } 23 | }, 24 | "authors": [ 25 | { 26 | "name": "Alexander Bogdanov", 27 | "email": "ab@dev.kily.ru" 28 | } 29 | ], 30 | "require": { 31 | "guzzlehttp/guzzle": "^7.2" 32 | }, 33 | "require-dev": { 34 | "phpunit/phpunit": "^8.1" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "0add7b6f754fe9bd27635f8bfc6d3ba3", 8 | "packages": [ 9 | { 10 | "name": "guzzlehttp/guzzle", 11 | "version": "7.4.0", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/guzzle/guzzle.git", 15 | "reference": "868b3571a039f0ebc11ac8f344f4080babe2cb94" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/guzzle/guzzle/zipball/868b3571a039f0ebc11ac8f344f4080babe2cb94", 20 | "reference": "868b3571a039f0ebc11ac8f344f4080babe2cb94", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "ext-json": "*", 25 | "guzzlehttp/promises": "^1.5", 26 | "guzzlehttp/psr7": "^1.8.3 || ^2.1", 27 | "php": "^7.2.5 || ^8.0", 28 | "psr/http-client": "^1.0", 29 | "symfony/deprecation-contracts": "^2.2" 30 | }, 31 | "provide": { 32 | "psr/http-client-implementation": "1.0" 33 | }, 34 | "require-dev": { 35 | "bamarni/composer-bin-plugin": "^1.4.1", 36 | "ext-curl": "*", 37 | "php-http/client-integration-tests": "^3.0", 38 | "phpunit/phpunit": "^8.5.5 || ^9.3.5", 39 | "psr/log": "^1.1 || ^2.0 || ^3.0" 40 | }, 41 | "suggest": { 42 | "ext-curl": "Required for CURL handler support", 43 | "ext-intl": "Required for Internationalized Domain Name (IDN) support", 44 | "psr/log": "Required for using the Log middleware" 45 | }, 46 | "type": "library", 47 | "extra": { 48 | "branch-alias": { 49 | "dev-master": "7.4-dev" 50 | } 51 | }, 52 | "autoload": { 53 | "psr-4": { 54 | "GuzzleHttp\\": "src/" 55 | }, 56 | "files": [ 57 | "src/functions_include.php" 58 | ] 59 | }, 60 | "notification-url": "https://packagist.org/downloads/", 61 | "license": [ 62 | "MIT" 63 | ], 64 | "authors": [ 65 | { 66 | "name": "Graham Campbell", 67 | "email": "hello@gjcampbell.co.uk", 68 | "homepage": "https://github.com/GrahamCampbell" 69 | }, 70 | { 71 | "name": "Michael Dowling", 72 | "email": "mtdowling@gmail.com", 73 | "homepage": "https://github.com/mtdowling" 74 | }, 75 | { 76 | "name": "Jeremy Lindblom", 77 | "email": "jeremeamia@gmail.com", 78 | "homepage": "https://github.com/jeremeamia" 79 | }, 80 | { 81 | "name": "George Mponos", 82 | "email": "gmponos@gmail.com", 83 | "homepage": "https://github.com/gmponos" 84 | }, 85 | { 86 | "name": "Tobias Nyholm", 87 | "email": "tobias.nyholm@gmail.com", 88 | "homepage": "https://github.com/Nyholm" 89 | }, 90 | { 91 | "name": "Márk Sági-Kazár", 92 | "email": "mark.sagikazar@gmail.com", 93 | "homepage": "https://github.com/sagikazarmark" 94 | }, 95 | { 96 | "name": "Tobias Schultze", 97 | "email": "webmaster@tubo-world.de", 98 | "homepage": "https://github.com/Tobion" 99 | } 100 | ], 101 | "description": "Guzzle is a PHP HTTP client library", 102 | "keywords": [ 103 | "client", 104 | "curl", 105 | "framework", 106 | "http", 107 | "http client", 108 | "psr-18", 109 | "psr-7", 110 | "rest", 111 | "web service" 112 | ], 113 | "support": { 114 | "issues": "https://github.com/guzzle/guzzle/issues", 115 | "source": "https://github.com/guzzle/guzzle/tree/7.4.0" 116 | }, 117 | "funding": [ 118 | { 119 | "url": "https://github.com/GrahamCampbell", 120 | "type": "github" 121 | }, 122 | { 123 | "url": "https://github.com/Nyholm", 124 | "type": "github" 125 | }, 126 | { 127 | "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", 128 | "type": "tidelift" 129 | } 130 | ], 131 | "time": "2021-10-18T09:52:00+00:00" 132 | }, 133 | { 134 | "name": "guzzlehttp/promises", 135 | "version": "1.5.1", 136 | "source": { 137 | "type": "git", 138 | "url": "https://github.com/guzzle/promises.git", 139 | "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" 140 | }, 141 | "dist": { 142 | "type": "zip", 143 | "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", 144 | "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", 145 | "shasum": "" 146 | }, 147 | "require": { 148 | "php": ">=5.5" 149 | }, 150 | "require-dev": { 151 | "symfony/phpunit-bridge": "^4.4 || ^5.1" 152 | }, 153 | "type": "library", 154 | "extra": { 155 | "branch-alias": { 156 | "dev-master": "1.5-dev" 157 | } 158 | }, 159 | "autoload": { 160 | "psr-4": { 161 | "GuzzleHttp\\Promise\\": "src/" 162 | }, 163 | "files": [ 164 | "src/functions_include.php" 165 | ] 166 | }, 167 | "notification-url": "https://packagist.org/downloads/", 168 | "license": [ 169 | "MIT" 170 | ], 171 | "authors": [ 172 | { 173 | "name": "Graham Campbell", 174 | "email": "hello@gjcampbell.co.uk", 175 | "homepage": "https://github.com/GrahamCampbell" 176 | }, 177 | { 178 | "name": "Michael Dowling", 179 | "email": "mtdowling@gmail.com", 180 | "homepage": "https://github.com/mtdowling" 181 | }, 182 | { 183 | "name": "Tobias Nyholm", 184 | "email": "tobias.nyholm@gmail.com", 185 | "homepage": "https://github.com/Nyholm" 186 | }, 187 | { 188 | "name": "Tobias Schultze", 189 | "email": "webmaster@tubo-world.de", 190 | "homepage": "https://github.com/Tobion" 191 | } 192 | ], 193 | "description": "Guzzle promises library", 194 | "keywords": [ 195 | "promise" 196 | ], 197 | "support": { 198 | "issues": "https://github.com/guzzle/promises/issues", 199 | "source": "https://github.com/guzzle/promises/tree/1.5.1" 200 | }, 201 | "funding": [ 202 | { 203 | "url": "https://github.com/GrahamCampbell", 204 | "type": "github" 205 | }, 206 | { 207 | "url": "https://github.com/Nyholm", 208 | "type": "github" 209 | }, 210 | { 211 | "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", 212 | "type": "tidelift" 213 | } 214 | ], 215 | "time": "2021-10-22T20:56:57+00:00" 216 | }, 217 | { 218 | "name": "guzzlehttp/psr7", 219 | "version": "2.1.0", 220 | "source": { 221 | "type": "git", 222 | "url": "https://github.com/guzzle/psr7.git", 223 | "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72" 224 | }, 225 | "dist": { 226 | "type": "zip", 227 | "url": "https://api.github.com/repos/guzzle/psr7/zipball/089edd38f5b8abba6cb01567c2a8aaa47cec4c72", 228 | "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72", 229 | "shasum": "" 230 | }, 231 | "require": { 232 | "php": "^7.2.5 || ^8.0", 233 | "psr/http-factory": "^1.0", 234 | "psr/http-message": "^1.0", 235 | "ralouphie/getallheaders": "^3.0" 236 | }, 237 | "provide": { 238 | "psr/http-factory-implementation": "1.0", 239 | "psr/http-message-implementation": "1.0" 240 | }, 241 | "require-dev": { 242 | "bamarni/composer-bin-plugin": "^1.4.1", 243 | "http-interop/http-factory-tests": "^0.9", 244 | "phpunit/phpunit": "^8.5.8 || ^9.3.10" 245 | }, 246 | "suggest": { 247 | "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" 248 | }, 249 | "type": "library", 250 | "extra": { 251 | "branch-alias": { 252 | "dev-master": "2.1-dev" 253 | } 254 | }, 255 | "autoload": { 256 | "psr-4": { 257 | "GuzzleHttp\\Psr7\\": "src/" 258 | } 259 | }, 260 | "notification-url": "https://packagist.org/downloads/", 261 | "license": [ 262 | "MIT" 263 | ], 264 | "authors": [ 265 | { 266 | "name": "Graham Campbell", 267 | "email": "hello@gjcampbell.co.uk", 268 | "homepage": "https://github.com/GrahamCampbell" 269 | }, 270 | { 271 | "name": "Michael Dowling", 272 | "email": "mtdowling@gmail.com", 273 | "homepage": "https://github.com/mtdowling" 274 | }, 275 | { 276 | "name": "George Mponos", 277 | "email": "gmponos@gmail.com", 278 | "homepage": "https://github.com/gmponos" 279 | }, 280 | { 281 | "name": "Tobias Nyholm", 282 | "email": "tobias.nyholm@gmail.com", 283 | "homepage": "https://github.com/Nyholm" 284 | }, 285 | { 286 | "name": "Márk Sági-Kazár", 287 | "email": "mark.sagikazar@gmail.com", 288 | "homepage": "https://github.com/sagikazarmark" 289 | }, 290 | { 291 | "name": "Tobias Schultze", 292 | "email": "webmaster@tubo-world.de", 293 | "homepage": "https://github.com/Tobion" 294 | }, 295 | { 296 | "name": "Márk Sági-Kazár", 297 | "email": "mark.sagikazar@gmail.com", 298 | "homepage": "https://sagikazarmark.hu" 299 | } 300 | ], 301 | "description": "PSR-7 message implementation that also provides common utility methods", 302 | "keywords": [ 303 | "http", 304 | "message", 305 | "psr-7", 306 | "request", 307 | "response", 308 | "stream", 309 | "uri", 310 | "url" 311 | ], 312 | "support": { 313 | "issues": "https://github.com/guzzle/psr7/issues", 314 | "source": "https://github.com/guzzle/psr7/tree/2.1.0" 315 | }, 316 | "funding": [ 317 | { 318 | "url": "https://github.com/GrahamCampbell", 319 | "type": "github" 320 | }, 321 | { 322 | "url": "https://github.com/Nyholm", 323 | "type": "github" 324 | }, 325 | { 326 | "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", 327 | "type": "tidelift" 328 | } 329 | ], 330 | "time": "2021-10-06T17:43:30+00:00" 331 | }, 332 | { 333 | "name": "psr/http-client", 334 | "version": "1.0.1", 335 | "source": { 336 | "type": "git", 337 | "url": "https://github.com/php-fig/http-client.git", 338 | "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" 339 | }, 340 | "dist": { 341 | "type": "zip", 342 | "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", 343 | "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", 344 | "shasum": "" 345 | }, 346 | "require": { 347 | "php": "^7.0 || ^8.0", 348 | "psr/http-message": "^1.0" 349 | }, 350 | "type": "library", 351 | "extra": { 352 | "branch-alias": { 353 | "dev-master": "1.0.x-dev" 354 | } 355 | }, 356 | "autoload": { 357 | "psr-4": { 358 | "Psr\\Http\\Client\\": "src/" 359 | } 360 | }, 361 | "notification-url": "https://packagist.org/downloads/", 362 | "license": [ 363 | "MIT" 364 | ], 365 | "authors": [ 366 | { 367 | "name": "PHP-FIG", 368 | "homepage": "http://www.php-fig.org/" 369 | } 370 | ], 371 | "description": "Common interface for HTTP clients", 372 | "homepage": "https://github.com/php-fig/http-client", 373 | "keywords": [ 374 | "http", 375 | "http-client", 376 | "psr", 377 | "psr-18" 378 | ], 379 | "support": { 380 | "source": "https://github.com/php-fig/http-client/tree/master" 381 | }, 382 | "time": "2020-06-29T06:28:15+00:00" 383 | }, 384 | { 385 | "name": "psr/http-factory", 386 | "version": "1.0.1", 387 | "source": { 388 | "type": "git", 389 | "url": "https://github.com/php-fig/http-factory.git", 390 | "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" 391 | }, 392 | "dist": { 393 | "type": "zip", 394 | "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", 395 | "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", 396 | "shasum": "" 397 | }, 398 | "require": { 399 | "php": ">=7.0.0", 400 | "psr/http-message": "^1.0" 401 | }, 402 | "type": "library", 403 | "extra": { 404 | "branch-alias": { 405 | "dev-master": "1.0.x-dev" 406 | } 407 | }, 408 | "autoload": { 409 | "psr-4": { 410 | "Psr\\Http\\Message\\": "src/" 411 | } 412 | }, 413 | "notification-url": "https://packagist.org/downloads/", 414 | "license": [ 415 | "MIT" 416 | ], 417 | "authors": [ 418 | { 419 | "name": "PHP-FIG", 420 | "homepage": "http://www.php-fig.org/" 421 | } 422 | ], 423 | "description": "Common interfaces for PSR-7 HTTP message factories", 424 | "keywords": [ 425 | "factory", 426 | "http", 427 | "message", 428 | "psr", 429 | "psr-17", 430 | "psr-7", 431 | "request", 432 | "response" 433 | ], 434 | "support": { 435 | "source": "https://github.com/php-fig/http-factory/tree/master" 436 | }, 437 | "time": "2019-04-30T12:38:16+00:00" 438 | }, 439 | { 440 | "name": "psr/http-message", 441 | "version": "1.0.1", 442 | "source": { 443 | "type": "git", 444 | "url": "https://github.com/php-fig/http-message.git", 445 | "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" 446 | }, 447 | "dist": { 448 | "type": "zip", 449 | "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", 450 | "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", 451 | "shasum": "" 452 | }, 453 | "require": { 454 | "php": ">=5.3.0" 455 | }, 456 | "type": "library", 457 | "extra": { 458 | "branch-alias": { 459 | "dev-master": "1.0.x-dev" 460 | } 461 | }, 462 | "autoload": { 463 | "psr-4": { 464 | "Psr\\Http\\Message\\": "src/" 465 | } 466 | }, 467 | "notification-url": "https://packagist.org/downloads/", 468 | "license": [ 469 | "MIT" 470 | ], 471 | "authors": [ 472 | { 473 | "name": "PHP-FIG", 474 | "homepage": "http://www.php-fig.org/" 475 | } 476 | ], 477 | "description": "Common interface for HTTP messages", 478 | "homepage": "https://github.com/php-fig/http-message", 479 | "keywords": [ 480 | "http", 481 | "http-message", 482 | "psr", 483 | "psr-7", 484 | "request", 485 | "response" 486 | ], 487 | "support": { 488 | "source": "https://github.com/php-fig/http-message/tree/master" 489 | }, 490 | "time": "2016-08-06T14:39:51+00:00" 491 | }, 492 | { 493 | "name": "ralouphie/getallheaders", 494 | "version": "3.0.3", 495 | "source": { 496 | "type": "git", 497 | "url": "https://github.com/ralouphie/getallheaders.git", 498 | "reference": "120b605dfeb996808c31b6477290a714d356e822" 499 | }, 500 | "dist": { 501 | "type": "zip", 502 | "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", 503 | "reference": "120b605dfeb996808c31b6477290a714d356e822", 504 | "shasum": "" 505 | }, 506 | "require": { 507 | "php": ">=5.6" 508 | }, 509 | "require-dev": { 510 | "php-coveralls/php-coveralls": "^2.1", 511 | "phpunit/phpunit": "^5 || ^6.5" 512 | }, 513 | "type": "library", 514 | "autoload": { 515 | "files": [ 516 | "src/getallheaders.php" 517 | ] 518 | }, 519 | "notification-url": "https://packagist.org/downloads/", 520 | "license": [ 521 | "MIT" 522 | ], 523 | "authors": [ 524 | { 525 | "name": "Ralph Khattar", 526 | "email": "ralph.khattar@gmail.com" 527 | } 528 | ], 529 | "description": "A polyfill for getallheaders.", 530 | "support": { 531 | "issues": "https://github.com/ralouphie/getallheaders/issues", 532 | "source": "https://github.com/ralouphie/getallheaders/tree/develop" 533 | }, 534 | "time": "2019-03-08T08:55:37+00:00" 535 | }, 536 | { 537 | "name": "symfony/deprecation-contracts", 538 | "version": "v2.4.0", 539 | "source": { 540 | "type": "git", 541 | "url": "https://github.com/symfony/deprecation-contracts.git", 542 | "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" 543 | }, 544 | "dist": { 545 | "type": "zip", 546 | "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", 547 | "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", 548 | "shasum": "" 549 | }, 550 | "require": { 551 | "php": ">=7.1" 552 | }, 553 | "type": "library", 554 | "extra": { 555 | "branch-alias": { 556 | "dev-main": "2.4-dev" 557 | }, 558 | "thanks": { 559 | "name": "symfony/contracts", 560 | "url": "https://github.com/symfony/contracts" 561 | } 562 | }, 563 | "autoload": { 564 | "files": [ 565 | "function.php" 566 | ] 567 | }, 568 | "notification-url": "https://packagist.org/downloads/", 569 | "license": [ 570 | "MIT" 571 | ], 572 | "authors": [ 573 | { 574 | "name": "Nicolas Grekas", 575 | "email": "p@tchwork.com" 576 | }, 577 | { 578 | "name": "Symfony Community", 579 | "homepage": "https://symfony.com/contributors" 580 | } 581 | ], 582 | "description": "A generic function and convention to trigger deprecation notices", 583 | "homepage": "https://symfony.com", 584 | "support": { 585 | "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" 586 | }, 587 | "funding": [ 588 | { 589 | "url": "https://symfony.com/sponsor", 590 | "type": "custom" 591 | }, 592 | { 593 | "url": "https://github.com/fabpot", 594 | "type": "github" 595 | }, 596 | { 597 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 598 | "type": "tidelift" 599 | } 600 | ], 601 | "time": "2021-03-23T23:28:01+00:00" 602 | } 603 | ], 604 | "packages-dev": [ 605 | { 606 | "name": "doctrine/instantiator", 607 | "version": "1.4.0", 608 | "source": { 609 | "type": "git", 610 | "url": "https://github.com/doctrine/instantiator.git", 611 | "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" 612 | }, 613 | "dist": { 614 | "type": "zip", 615 | "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", 616 | "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", 617 | "shasum": "" 618 | }, 619 | "require": { 620 | "php": "^7.1 || ^8.0" 621 | }, 622 | "require-dev": { 623 | "doctrine/coding-standard": "^8.0", 624 | "ext-pdo": "*", 625 | "ext-phar": "*", 626 | "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", 627 | "phpstan/phpstan": "^0.12", 628 | "phpstan/phpstan-phpunit": "^0.12", 629 | "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" 630 | }, 631 | "type": "library", 632 | "autoload": { 633 | "psr-4": { 634 | "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" 635 | } 636 | }, 637 | "notification-url": "https://packagist.org/downloads/", 638 | "license": [ 639 | "MIT" 640 | ], 641 | "authors": [ 642 | { 643 | "name": "Marco Pivetta", 644 | "email": "ocramius@gmail.com", 645 | "homepage": "https://ocramius.github.io/" 646 | } 647 | ], 648 | "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", 649 | "homepage": "https://www.doctrine-project.org/projects/instantiator.html", 650 | "keywords": [ 651 | "constructor", 652 | "instantiate" 653 | ], 654 | "support": { 655 | "issues": "https://github.com/doctrine/instantiator/issues", 656 | "source": "https://github.com/doctrine/instantiator/tree/1.4.0" 657 | }, 658 | "funding": [ 659 | { 660 | "url": "https://www.doctrine-project.org/sponsorship.html", 661 | "type": "custom" 662 | }, 663 | { 664 | "url": "https://www.patreon.com/phpdoctrine", 665 | "type": "patreon" 666 | }, 667 | { 668 | "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", 669 | "type": "tidelift" 670 | } 671 | ], 672 | "time": "2020-11-10T18:47:58+00:00" 673 | }, 674 | { 675 | "name": "myclabs/deep-copy", 676 | "version": "1.10.2", 677 | "source": { 678 | "type": "git", 679 | "url": "https://github.com/myclabs/DeepCopy.git", 680 | "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" 681 | }, 682 | "dist": { 683 | "type": "zip", 684 | "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", 685 | "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", 686 | "shasum": "" 687 | }, 688 | "require": { 689 | "php": "^7.1 || ^8.0" 690 | }, 691 | "replace": { 692 | "myclabs/deep-copy": "self.version" 693 | }, 694 | "require-dev": { 695 | "doctrine/collections": "^1.0", 696 | "doctrine/common": "^2.6", 697 | "phpunit/phpunit": "^7.1" 698 | }, 699 | "type": "library", 700 | "autoload": { 701 | "psr-4": { 702 | "DeepCopy\\": "src/DeepCopy/" 703 | }, 704 | "files": [ 705 | "src/DeepCopy/deep_copy.php" 706 | ] 707 | }, 708 | "notification-url": "https://packagist.org/downloads/", 709 | "license": [ 710 | "MIT" 711 | ], 712 | "description": "Create deep copies (clones) of your objects", 713 | "keywords": [ 714 | "clone", 715 | "copy", 716 | "duplicate", 717 | "object", 718 | "object graph" 719 | ], 720 | "support": { 721 | "issues": "https://github.com/myclabs/DeepCopy/issues", 722 | "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" 723 | }, 724 | "funding": [ 725 | { 726 | "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", 727 | "type": "tidelift" 728 | } 729 | ], 730 | "time": "2020-11-13T09:40:50+00:00" 731 | }, 732 | { 733 | "name": "phar-io/manifest", 734 | "version": "2.0.3", 735 | "source": { 736 | "type": "git", 737 | "url": "https://github.com/phar-io/manifest.git", 738 | "reference": "97803eca37d319dfa7826cc2437fc020857acb53" 739 | }, 740 | "dist": { 741 | "type": "zip", 742 | "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", 743 | "reference": "97803eca37d319dfa7826cc2437fc020857acb53", 744 | "shasum": "" 745 | }, 746 | "require": { 747 | "ext-dom": "*", 748 | "ext-phar": "*", 749 | "ext-xmlwriter": "*", 750 | "phar-io/version": "^3.0.1", 751 | "php": "^7.2 || ^8.0" 752 | }, 753 | "type": "library", 754 | "extra": { 755 | "branch-alias": { 756 | "dev-master": "2.0.x-dev" 757 | } 758 | }, 759 | "autoload": { 760 | "classmap": [ 761 | "src/" 762 | ] 763 | }, 764 | "notification-url": "https://packagist.org/downloads/", 765 | "license": [ 766 | "BSD-3-Clause" 767 | ], 768 | "authors": [ 769 | { 770 | "name": "Arne Blankerts", 771 | "email": "arne@blankerts.de", 772 | "role": "Developer" 773 | }, 774 | { 775 | "name": "Sebastian Heuer", 776 | "email": "sebastian@phpeople.de", 777 | "role": "Developer" 778 | }, 779 | { 780 | "name": "Sebastian Bergmann", 781 | "email": "sebastian@phpunit.de", 782 | "role": "Developer" 783 | } 784 | ], 785 | "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", 786 | "support": { 787 | "issues": "https://github.com/phar-io/manifest/issues", 788 | "source": "https://github.com/phar-io/manifest/tree/2.0.3" 789 | }, 790 | "time": "2021-07-20T11:28:43+00:00" 791 | }, 792 | { 793 | "name": "phar-io/version", 794 | "version": "3.1.0", 795 | "source": { 796 | "type": "git", 797 | "url": "https://github.com/phar-io/version.git", 798 | "reference": "bae7c545bef187884426f042434e561ab1ddb182" 799 | }, 800 | "dist": { 801 | "type": "zip", 802 | "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", 803 | "reference": "bae7c545bef187884426f042434e561ab1ddb182", 804 | "shasum": "" 805 | }, 806 | "require": { 807 | "php": "^7.2 || ^8.0" 808 | }, 809 | "type": "library", 810 | "autoload": { 811 | "classmap": [ 812 | "src/" 813 | ] 814 | }, 815 | "notification-url": "https://packagist.org/downloads/", 816 | "license": [ 817 | "BSD-3-Clause" 818 | ], 819 | "authors": [ 820 | { 821 | "name": "Arne Blankerts", 822 | "email": "arne@blankerts.de", 823 | "role": "Developer" 824 | }, 825 | { 826 | "name": "Sebastian Heuer", 827 | "email": "sebastian@phpeople.de", 828 | "role": "Developer" 829 | }, 830 | { 831 | "name": "Sebastian Bergmann", 832 | "email": "sebastian@phpunit.de", 833 | "role": "Developer" 834 | } 835 | ], 836 | "description": "Library for handling version information and constraints", 837 | "support": { 838 | "issues": "https://github.com/phar-io/version/issues", 839 | "source": "https://github.com/phar-io/version/tree/3.1.0" 840 | }, 841 | "time": "2021-02-23T14:00:09+00:00" 842 | }, 843 | { 844 | "name": "phpdocumentor/reflection-common", 845 | "version": "2.2.0", 846 | "source": { 847 | "type": "git", 848 | "url": "https://github.com/phpDocumentor/ReflectionCommon.git", 849 | "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" 850 | }, 851 | "dist": { 852 | "type": "zip", 853 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", 854 | "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", 855 | "shasum": "" 856 | }, 857 | "require": { 858 | "php": "^7.2 || ^8.0" 859 | }, 860 | "type": "library", 861 | "extra": { 862 | "branch-alias": { 863 | "dev-2.x": "2.x-dev" 864 | } 865 | }, 866 | "autoload": { 867 | "psr-4": { 868 | "phpDocumentor\\Reflection\\": "src/" 869 | } 870 | }, 871 | "notification-url": "https://packagist.org/downloads/", 872 | "license": [ 873 | "MIT" 874 | ], 875 | "authors": [ 876 | { 877 | "name": "Jaap van Otterdijk", 878 | "email": "opensource@ijaap.nl" 879 | } 880 | ], 881 | "description": "Common reflection classes used by phpdocumentor to reflect the code structure", 882 | "homepage": "http://www.phpdoc.org", 883 | "keywords": [ 884 | "FQSEN", 885 | "phpDocumentor", 886 | "phpdoc", 887 | "reflection", 888 | "static analysis" 889 | ], 890 | "support": { 891 | "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", 892 | "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" 893 | }, 894 | "time": "2020-06-27T09:03:43+00:00" 895 | }, 896 | { 897 | "name": "phpdocumentor/reflection-docblock", 898 | "version": "5.3.0", 899 | "source": { 900 | "type": "git", 901 | "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", 902 | "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" 903 | }, 904 | "dist": { 905 | "type": "zip", 906 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", 907 | "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", 908 | "shasum": "" 909 | }, 910 | "require": { 911 | "ext-filter": "*", 912 | "php": "^7.2 || ^8.0", 913 | "phpdocumentor/reflection-common": "^2.2", 914 | "phpdocumentor/type-resolver": "^1.3", 915 | "webmozart/assert": "^1.9.1" 916 | }, 917 | "require-dev": { 918 | "mockery/mockery": "~1.3.2", 919 | "psalm/phar": "^4.8" 920 | }, 921 | "type": "library", 922 | "extra": { 923 | "branch-alias": { 924 | "dev-master": "5.x-dev" 925 | } 926 | }, 927 | "autoload": { 928 | "psr-4": { 929 | "phpDocumentor\\Reflection\\": "src" 930 | } 931 | }, 932 | "notification-url": "https://packagist.org/downloads/", 933 | "license": [ 934 | "MIT" 935 | ], 936 | "authors": [ 937 | { 938 | "name": "Mike van Riel", 939 | "email": "me@mikevanriel.com" 940 | }, 941 | { 942 | "name": "Jaap van Otterdijk", 943 | "email": "account@ijaap.nl" 944 | } 945 | ], 946 | "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", 947 | "support": { 948 | "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", 949 | "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" 950 | }, 951 | "time": "2021-10-19T17:43:47+00:00" 952 | }, 953 | { 954 | "name": "phpdocumentor/type-resolver", 955 | "version": "1.5.1", 956 | "source": { 957 | "type": "git", 958 | "url": "https://github.com/phpDocumentor/TypeResolver.git", 959 | "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" 960 | }, 961 | "dist": { 962 | "type": "zip", 963 | "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", 964 | "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", 965 | "shasum": "" 966 | }, 967 | "require": { 968 | "php": "^7.2 || ^8.0", 969 | "phpdocumentor/reflection-common": "^2.0" 970 | }, 971 | "require-dev": { 972 | "ext-tokenizer": "*", 973 | "psalm/phar": "^4.8" 974 | }, 975 | "type": "library", 976 | "extra": { 977 | "branch-alias": { 978 | "dev-1.x": "1.x-dev" 979 | } 980 | }, 981 | "autoload": { 982 | "psr-4": { 983 | "phpDocumentor\\Reflection\\": "src" 984 | } 985 | }, 986 | "notification-url": "https://packagist.org/downloads/", 987 | "license": [ 988 | "MIT" 989 | ], 990 | "authors": [ 991 | { 992 | "name": "Mike van Riel", 993 | "email": "me@mikevanriel.com" 994 | } 995 | ], 996 | "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", 997 | "support": { 998 | "issues": "https://github.com/phpDocumentor/TypeResolver/issues", 999 | "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" 1000 | }, 1001 | "time": "2021-10-02T14:08:47+00:00" 1002 | }, 1003 | { 1004 | "name": "phpspec/prophecy", 1005 | "version": "1.14.0", 1006 | "source": { 1007 | "type": "git", 1008 | "url": "https://github.com/phpspec/prophecy.git", 1009 | "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" 1010 | }, 1011 | "dist": { 1012 | "type": "zip", 1013 | "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", 1014 | "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", 1015 | "shasum": "" 1016 | }, 1017 | "require": { 1018 | "doctrine/instantiator": "^1.2", 1019 | "php": "^7.2 || ~8.0, <8.2", 1020 | "phpdocumentor/reflection-docblock": "^5.2", 1021 | "sebastian/comparator": "^3.0 || ^4.0", 1022 | "sebastian/recursion-context": "^3.0 || ^4.0" 1023 | }, 1024 | "require-dev": { 1025 | "phpspec/phpspec": "^6.0 || ^7.0", 1026 | "phpunit/phpunit": "^8.0 || ^9.0" 1027 | }, 1028 | "type": "library", 1029 | "extra": { 1030 | "branch-alias": { 1031 | "dev-master": "1.x-dev" 1032 | } 1033 | }, 1034 | "autoload": { 1035 | "psr-4": { 1036 | "Prophecy\\": "src/Prophecy" 1037 | } 1038 | }, 1039 | "notification-url": "https://packagist.org/downloads/", 1040 | "license": [ 1041 | "MIT" 1042 | ], 1043 | "authors": [ 1044 | { 1045 | "name": "Konstantin Kudryashov", 1046 | "email": "ever.zet@gmail.com", 1047 | "homepage": "http://everzet.com" 1048 | }, 1049 | { 1050 | "name": "Marcello Duarte", 1051 | "email": "marcello.duarte@gmail.com" 1052 | } 1053 | ], 1054 | "description": "Highly opinionated mocking framework for PHP 5.3+", 1055 | "homepage": "https://github.com/phpspec/prophecy", 1056 | "keywords": [ 1057 | "Double", 1058 | "Dummy", 1059 | "fake", 1060 | "mock", 1061 | "spy", 1062 | "stub" 1063 | ], 1064 | "support": { 1065 | "issues": "https://github.com/phpspec/prophecy/issues", 1066 | "source": "https://github.com/phpspec/prophecy/tree/1.14.0" 1067 | }, 1068 | "time": "2021-09-10T09:02:12+00:00" 1069 | }, 1070 | { 1071 | "name": "phpunit/php-code-coverage", 1072 | "version": "7.0.15", 1073 | "source": { 1074 | "type": "git", 1075 | "url": "https://github.com/sebastianbergmann/php-code-coverage.git", 1076 | "reference": "819f92bba8b001d4363065928088de22f25a3a48" 1077 | }, 1078 | "dist": { 1079 | "type": "zip", 1080 | "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", 1081 | "reference": "819f92bba8b001d4363065928088de22f25a3a48", 1082 | "shasum": "" 1083 | }, 1084 | "require": { 1085 | "ext-dom": "*", 1086 | "ext-xmlwriter": "*", 1087 | "php": ">=7.2", 1088 | "phpunit/php-file-iterator": "^2.0.2", 1089 | "phpunit/php-text-template": "^1.2.1", 1090 | "phpunit/php-token-stream": "^3.1.3 || ^4.0", 1091 | "sebastian/code-unit-reverse-lookup": "^1.0.1", 1092 | "sebastian/environment": "^4.2.2", 1093 | "sebastian/version": "^2.0.1", 1094 | "theseer/tokenizer": "^1.1.3" 1095 | }, 1096 | "require-dev": { 1097 | "phpunit/phpunit": "^8.2.2" 1098 | }, 1099 | "suggest": { 1100 | "ext-xdebug": "^2.7.2" 1101 | }, 1102 | "type": "library", 1103 | "extra": { 1104 | "branch-alias": { 1105 | "dev-master": "7.0-dev" 1106 | } 1107 | }, 1108 | "autoload": { 1109 | "classmap": [ 1110 | "src/" 1111 | ] 1112 | }, 1113 | "notification-url": "https://packagist.org/downloads/", 1114 | "license": [ 1115 | "BSD-3-Clause" 1116 | ], 1117 | "authors": [ 1118 | { 1119 | "name": "Sebastian Bergmann", 1120 | "email": "sebastian@phpunit.de", 1121 | "role": "lead" 1122 | } 1123 | ], 1124 | "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", 1125 | "homepage": "https://github.com/sebastianbergmann/php-code-coverage", 1126 | "keywords": [ 1127 | "coverage", 1128 | "testing", 1129 | "xunit" 1130 | ], 1131 | "support": { 1132 | "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", 1133 | "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15" 1134 | }, 1135 | "funding": [ 1136 | { 1137 | "url": "https://github.com/sebastianbergmann", 1138 | "type": "github" 1139 | } 1140 | ], 1141 | "time": "2021-07-26T12:20:09+00:00" 1142 | }, 1143 | { 1144 | "name": "phpunit/php-file-iterator", 1145 | "version": "2.0.4", 1146 | "source": { 1147 | "type": "git", 1148 | "url": "https://github.com/sebastianbergmann/php-file-iterator.git", 1149 | "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05" 1150 | }, 1151 | "dist": { 1152 | "type": "zip", 1153 | "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/28af674ff175d0768a5a978e6de83f697d4a7f05", 1154 | "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05", 1155 | "shasum": "" 1156 | }, 1157 | "require": { 1158 | "php": ">=7.1" 1159 | }, 1160 | "require-dev": { 1161 | "phpunit/phpunit": "^8.5" 1162 | }, 1163 | "type": "library", 1164 | "extra": { 1165 | "branch-alias": { 1166 | "dev-master": "2.0.x-dev" 1167 | } 1168 | }, 1169 | "autoload": { 1170 | "classmap": [ 1171 | "src/" 1172 | ] 1173 | }, 1174 | "notification-url": "https://packagist.org/downloads/", 1175 | "license": [ 1176 | "BSD-3-Clause" 1177 | ], 1178 | "authors": [ 1179 | { 1180 | "name": "Sebastian Bergmann", 1181 | "email": "sebastian@phpunit.de", 1182 | "role": "lead" 1183 | } 1184 | ], 1185 | "description": "FilterIterator implementation that filters files based on a list of suffixes.", 1186 | "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", 1187 | "keywords": [ 1188 | "filesystem", 1189 | "iterator" 1190 | ], 1191 | "support": { 1192 | "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", 1193 | "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.4" 1194 | }, 1195 | "funding": [ 1196 | { 1197 | "url": "https://github.com/sebastianbergmann", 1198 | "type": "github" 1199 | } 1200 | ], 1201 | "time": "2021-07-19T06:46:01+00:00" 1202 | }, 1203 | { 1204 | "name": "phpunit/php-text-template", 1205 | "version": "1.2.1", 1206 | "source": { 1207 | "type": "git", 1208 | "url": "https://github.com/sebastianbergmann/php-text-template.git", 1209 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" 1210 | }, 1211 | "dist": { 1212 | "type": "zip", 1213 | "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 1214 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 1215 | "shasum": "" 1216 | }, 1217 | "require": { 1218 | "php": ">=5.3.3" 1219 | }, 1220 | "type": "library", 1221 | "autoload": { 1222 | "classmap": [ 1223 | "src/" 1224 | ] 1225 | }, 1226 | "notification-url": "https://packagist.org/downloads/", 1227 | "license": [ 1228 | "BSD-3-Clause" 1229 | ], 1230 | "authors": [ 1231 | { 1232 | "name": "Sebastian Bergmann", 1233 | "email": "sebastian@phpunit.de", 1234 | "role": "lead" 1235 | } 1236 | ], 1237 | "description": "Simple template engine.", 1238 | "homepage": "https://github.com/sebastianbergmann/php-text-template/", 1239 | "keywords": [ 1240 | "template" 1241 | ], 1242 | "support": { 1243 | "issues": "https://github.com/sebastianbergmann/php-text-template/issues", 1244 | "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" 1245 | }, 1246 | "time": "2015-06-21T13:50:34+00:00" 1247 | }, 1248 | { 1249 | "name": "phpunit/php-timer", 1250 | "version": "2.1.3", 1251 | "source": { 1252 | "type": "git", 1253 | "url": "https://github.com/sebastianbergmann/php-timer.git", 1254 | "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" 1255 | }, 1256 | "dist": { 1257 | "type": "zip", 1258 | "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", 1259 | "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", 1260 | "shasum": "" 1261 | }, 1262 | "require": { 1263 | "php": ">=7.1" 1264 | }, 1265 | "require-dev": { 1266 | "phpunit/phpunit": "^8.5" 1267 | }, 1268 | "type": "library", 1269 | "extra": { 1270 | "branch-alias": { 1271 | "dev-master": "2.1-dev" 1272 | } 1273 | }, 1274 | "autoload": { 1275 | "classmap": [ 1276 | "src/" 1277 | ] 1278 | }, 1279 | "notification-url": "https://packagist.org/downloads/", 1280 | "license": [ 1281 | "BSD-3-Clause" 1282 | ], 1283 | "authors": [ 1284 | { 1285 | "name": "Sebastian Bergmann", 1286 | "email": "sebastian@phpunit.de", 1287 | "role": "lead" 1288 | } 1289 | ], 1290 | "description": "Utility class for timing", 1291 | "homepage": "https://github.com/sebastianbergmann/php-timer/", 1292 | "keywords": [ 1293 | "timer" 1294 | ], 1295 | "support": { 1296 | "issues": "https://github.com/sebastianbergmann/php-timer/issues", 1297 | "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" 1298 | }, 1299 | "funding": [ 1300 | { 1301 | "url": "https://github.com/sebastianbergmann", 1302 | "type": "github" 1303 | } 1304 | ], 1305 | "time": "2020-11-30T08:20:02+00:00" 1306 | }, 1307 | { 1308 | "name": "phpunit/php-token-stream", 1309 | "version": "4.0.4", 1310 | "source": { 1311 | "type": "git", 1312 | "url": "https://github.com/sebastianbergmann/php-token-stream.git", 1313 | "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" 1314 | }, 1315 | "dist": { 1316 | "type": "zip", 1317 | "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", 1318 | "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", 1319 | "shasum": "" 1320 | }, 1321 | "require": { 1322 | "ext-tokenizer": "*", 1323 | "php": "^7.3 || ^8.0" 1324 | }, 1325 | "require-dev": { 1326 | "phpunit/phpunit": "^9.0" 1327 | }, 1328 | "type": "library", 1329 | "extra": { 1330 | "branch-alias": { 1331 | "dev-master": "4.0-dev" 1332 | } 1333 | }, 1334 | "autoload": { 1335 | "classmap": [ 1336 | "src/" 1337 | ] 1338 | }, 1339 | "notification-url": "https://packagist.org/downloads/", 1340 | "license": [ 1341 | "BSD-3-Clause" 1342 | ], 1343 | "authors": [ 1344 | { 1345 | "name": "Sebastian Bergmann", 1346 | "email": "sebastian@phpunit.de" 1347 | } 1348 | ], 1349 | "description": "Wrapper around PHP's tokenizer extension.", 1350 | "homepage": "https://github.com/sebastianbergmann/php-token-stream/", 1351 | "keywords": [ 1352 | "tokenizer" 1353 | ], 1354 | "support": { 1355 | "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", 1356 | "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" 1357 | }, 1358 | "funding": [ 1359 | { 1360 | "url": "https://github.com/sebastianbergmann", 1361 | "type": "github" 1362 | } 1363 | ], 1364 | "abandoned": true, 1365 | "time": "2020-08-04T08:28:15+00:00" 1366 | }, 1367 | { 1368 | "name": "phpunit/phpunit", 1369 | "version": "8.5.21", 1370 | "source": { 1371 | "type": "git", 1372 | "url": "https://github.com/sebastianbergmann/phpunit.git", 1373 | "reference": "50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984" 1374 | }, 1375 | "dist": { 1376 | "type": "zip", 1377 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984", 1378 | "reference": "50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984", 1379 | "shasum": "" 1380 | }, 1381 | "require": { 1382 | "doctrine/instantiator": "^1.3.1", 1383 | "ext-dom": "*", 1384 | "ext-json": "*", 1385 | "ext-libxml": "*", 1386 | "ext-mbstring": "*", 1387 | "ext-xml": "*", 1388 | "ext-xmlwriter": "*", 1389 | "myclabs/deep-copy": "^1.10.0", 1390 | "phar-io/manifest": "^2.0.3", 1391 | "phar-io/version": "^3.0.2", 1392 | "php": ">=7.2", 1393 | "phpspec/prophecy": "^1.10.3", 1394 | "phpunit/php-code-coverage": "^7.0.12", 1395 | "phpunit/php-file-iterator": "^2.0.4", 1396 | "phpunit/php-text-template": "^1.2.1", 1397 | "phpunit/php-timer": "^2.1.2", 1398 | "sebastian/comparator": "^3.0.2", 1399 | "sebastian/diff": "^3.0.2", 1400 | "sebastian/environment": "^4.2.3", 1401 | "sebastian/exporter": "^3.1.2", 1402 | "sebastian/global-state": "^3.0.0", 1403 | "sebastian/object-enumerator": "^3.0.3", 1404 | "sebastian/resource-operations": "^2.0.1", 1405 | "sebastian/type": "^1.1.3", 1406 | "sebastian/version": "^2.0.1" 1407 | }, 1408 | "require-dev": { 1409 | "ext-pdo": "*" 1410 | }, 1411 | "suggest": { 1412 | "ext-soap": "*", 1413 | "ext-xdebug": "*", 1414 | "phpunit/php-invoker": "^2.0.0" 1415 | }, 1416 | "bin": [ 1417 | "phpunit" 1418 | ], 1419 | "type": "library", 1420 | "extra": { 1421 | "branch-alias": { 1422 | "dev-master": "8.5-dev" 1423 | } 1424 | }, 1425 | "autoload": { 1426 | "classmap": [ 1427 | "src/" 1428 | ] 1429 | }, 1430 | "notification-url": "https://packagist.org/downloads/", 1431 | "license": [ 1432 | "BSD-3-Clause" 1433 | ], 1434 | "authors": [ 1435 | { 1436 | "name": "Sebastian Bergmann", 1437 | "email": "sebastian@phpunit.de", 1438 | "role": "lead" 1439 | } 1440 | ], 1441 | "description": "The PHP Unit Testing framework.", 1442 | "homepage": "https://phpunit.de/", 1443 | "keywords": [ 1444 | "phpunit", 1445 | "testing", 1446 | "xunit" 1447 | ], 1448 | "support": { 1449 | "issues": "https://github.com/sebastianbergmann/phpunit/issues", 1450 | "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.21" 1451 | }, 1452 | "funding": [ 1453 | { 1454 | "url": "https://phpunit.de/donate.html", 1455 | "type": "custom" 1456 | }, 1457 | { 1458 | "url": "https://github.com/sebastianbergmann", 1459 | "type": "github" 1460 | } 1461 | ], 1462 | "time": "2021-09-25T07:37:20+00:00" 1463 | }, 1464 | { 1465 | "name": "sebastian/code-unit-reverse-lookup", 1466 | "version": "1.0.2", 1467 | "source": { 1468 | "type": "git", 1469 | "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", 1470 | "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" 1471 | }, 1472 | "dist": { 1473 | "type": "zip", 1474 | "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", 1475 | "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", 1476 | "shasum": "" 1477 | }, 1478 | "require": { 1479 | "php": ">=5.6" 1480 | }, 1481 | "require-dev": { 1482 | "phpunit/phpunit": "^8.5" 1483 | }, 1484 | "type": "library", 1485 | "extra": { 1486 | "branch-alias": { 1487 | "dev-master": "1.0.x-dev" 1488 | } 1489 | }, 1490 | "autoload": { 1491 | "classmap": [ 1492 | "src/" 1493 | ] 1494 | }, 1495 | "notification-url": "https://packagist.org/downloads/", 1496 | "license": [ 1497 | "BSD-3-Clause" 1498 | ], 1499 | "authors": [ 1500 | { 1501 | "name": "Sebastian Bergmann", 1502 | "email": "sebastian@phpunit.de" 1503 | } 1504 | ], 1505 | "description": "Looks up which function or method a line of code belongs to", 1506 | "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", 1507 | "support": { 1508 | "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", 1509 | "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" 1510 | }, 1511 | "funding": [ 1512 | { 1513 | "url": "https://github.com/sebastianbergmann", 1514 | "type": "github" 1515 | } 1516 | ], 1517 | "time": "2020-11-30T08:15:22+00:00" 1518 | }, 1519 | { 1520 | "name": "sebastian/comparator", 1521 | "version": "3.0.3", 1522 | "source": { 1523 | "type": "git", 1524 | "url": "https://github.com/sebastianbergmann/comparator.git", 1525 | "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" 1526 | }, 1527 | "dist": { 1528 | "type": "zip", 1529 | "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", 1530 | "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", 1531 | "shasum": "" 1532 | }, 1533 | "require": { 1534 | "php": ">=7.1", 1535 | "sebastian/diff": "^3.0", 1536 | "sebastian/exporter": "^3.1" 1537 | }, 1538 | "require-dev": { 1539 | "phpunit/phpunit": "^8.5" 1540 | }, 1541 | "type": "library", 1542 | "extra": { 1543 | "branch-alias": { 1544 | "dev-master": "3.0-dev" 1545 | } 1546 | }, 1547 | "autoload": { 1548 | "classmap": [ 1549 | "src/" 1550 | ] 1551 | }, 1552 | "notification-url": "https://packagist.org/downloads/", 1553 | "license": [ 1554 | "BSD-3-Clause" 1555 | ], 1556 | "authors": [ 1557 | { 1558 | "name": "Sebastian Bergmann", 1559 | "email": "sebastian@phpunit.de" 1560 | }, 1561 | { 1562 | "name": "Jeff Welch", 1563 | "email": "whatthejeff@gmail.com" 1564 | }, 1565 | { 1566 | "name": "Volker Dusch", 1567 | "email": "github@wallbash.com" 1568 | }, 1569 | { 1570 | "name": "Bernhard Schussek", 1571 | "email": "bschussek@2bepublished.at" 1572 | } 1573 | ], 1574 | "description": "Provides the functionality to compare PHP values for equality", 1575 | "homepage": "https://github.com/sebastianbergmann/comparator", 1576 | "keywords": [ 1577 | "comparator", 1578 | "compare", 1579 | "equality" 1580 | ], 1581 | "support": { 1582 | "issues": "https://github.com/sebastianbergmann/comparator/issues", 1583 | "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" 1584 | }, 1585 | "funding": [ 1586 | { 1587 | "url": "https://github.com/sebastianbergmann", 1588 | "type": "github" 1589 | } 1590 | ], 1591 | "time": "2020-11-30T08:04:30+00:00" 1592 | }, 1593 | { 1594 | "name": "sebastian/diff", 1595 | "version": "3.0.3", 1596 | "source": { 1597 | "type": "git", 1598 | "url": "https://github.com/sebastianbergmann/diff.git", 1599 | "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" 1600 | }, 1601 | "dist": { 1602 | "type": "zip", 1603 | "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", 1604 | "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", 1605 | "shasum": "" 1606 | }, 1607 | "require": { 1608 | "php": ">=7.1" 1609 | }, 1610 | "require-dev": { 1611 | "phpunit/phpunit": "^7.5 || ^8.0", 1612 | "symfony/process": "^2 || ^3.3 || ^4" 1613 | }, 1614 | "type": "library", 1615 | "extra": { 1616 | "branch-alias": { 1617 | "dev-master": "3.0-dev" 1618 | } 1619 | }, 1620 | "autoload": { 1621 | "classmap": [ 1622 | "src/" 1623 | ] 1624 | }, 1625 | "notification-url": "https://packagist.org/downloads/", 1626 | "license": [ 1627 | "BSD-3-Clause" 1628 | ], 1629 | "authors": [ 1630 | { 1631 | "name": "Sebastian Bergmann", 1632 | "email": "sebastian@phpunit.de" 1633 | }, 1634 | { 1635 | "name": "Kore Nordmann", 1636 | "email": "mail@kore-nordmann.de" 1637 | } 1638 | ], 1639 | "description": "Diff implementation", 1640 | "homepage": "https://github.com/sebastianbergmann/diff", 1641 | "keywords": [ 1642 | "diff", 1643 | "udiff", 1644 | "unidiff", 1645 | "unified diff" 1646 | ], 1647 | "support": { 1648 | "issues": "https://github.com/sebastianbergmann/diff/issues", 1649 | "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" 1650 | }, 1651 | "funding": [ 1652 | { 1653 | "url": "https://github.com/sebastianbergmann", 1654 | "type": "github" 1655 | } 1656 | ], 1657 | "time": "2020-11-30T07:59:04+00:00" 1658 | }, 1659 | { 1660 | "name": "sebastian/environment", 1661 | "version": "4.2.4", 1662 | "source": { 1663 | "type": "git", 1664 | "url": "https://github.com/sebastianbergmann/environment.git", 1665 | "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" 1666 | }, 1667 | "dist": { 1668 | "type": "zip", 1669 | "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", 1670 | "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", 1671 | "shasum": "" 1672 | }, 1673 | "require": { 1674 | "php": ">=7.1" 1675 | }, 1676 | "require-dev": { 1677 | "phpunit/phpunit": "^7.5" 1678 | }, 1679 | "suggest": { 1680 | "ext-posix": "*" 1681 | }, 1682 | "type": "library", 1683 | "extra": { 1684 | "branch-alias": { 1685 | "dev-master": "4.2-dev" 1686 | } 1687 | }, 1688 | "autoload": { 1689 | "classmap": [ 1690 | "src/" 1691 | ] 1692 | }, 1693 | "notification-url": "https://packagist.org/downloads/", 1694 | "license": [ 1695 | "BSD-3-Clause" 1696 | ], 1697 | "authors": [ 1698 | { 1699 | "name": "Sebastian Bergmann", 1700 | "email": "sebastian@phpunit.de" 1701 | } 1702 | ], 1703 | "description": "Provides functionality to handle HHVM/PHP environments", 1704 | "homepage": "http://www.github.com/sebastianbergmann/environment", 1705 | "keywords": [ 1706 | "Xdebug", 1707 | "environment", 1708 | "hhvm" 1709 | ], 1710 | "support": { 1711 | "issues": "https://github.com/sebastianbergmann/environment/issues", 1712 | "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" 1713 | }, 1714 | "funding": [ 1715 | { 1716 | "url": "https://github.com/sebastianbergmann", 1717 | "type": "github" 1718 | } 1719 | ], 1720 | "time": "2020-11-30T07:53:42+00:00" 1721 | }, 1722 | { 1723 | "name": "sebastian/exporter", 1724 | "version": "3.1.3", 1725 | "source": { 1726 | "type": "git", 1727 | "url": "https://github.com/sebastianbergmann/exporter.git", 1728 | "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" 1729 | }, 1730 | "dist": { 1731 | "type": "zip", 1732 | "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", 1733 | "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", 1734 | "shasum": "" 1735 | }, 1736 | "require": { 1737 | "php": ">=7.0", 1738 | "sebastian/recursion-context": "^3.0" 1739 | }, 1740 | "require-dev": { 1741 | "ext-mbstring": "*", 1742 | "phpunit/phpunit": "^6.0" 1743 | }, 1744 | "type": "library", 1745 | "extra": { 1746 | "branch-alias": { 1747 | "dev-master": "3.1.x-dev" 1748 | } 1749 | }, 1750 | "autoload": { 1751 | "classmap": [ 1752 | "src/" 1753 | ] 1754 | }, 1755 | "notification-url": "https://packagist.org/downloads/", 1756 | "license": [ 1757 | "BSD-3-Clause" 1758 | ], 1759 | "authors": [ 1760 | { 1761 | "name": "Sebastian Bergmann", 1762 | "email": "sebastian@phpunit.de" 1763 | }, 1764 | { 1765 | "name": "Jeff Welch", 1766 | "email": "whatthejeff@gmail.com" 1767 | }, 1768 | { 1769 | "name": "Volker Dusch", 1770 | "email": "github@wallbash.com" 1771 | }, 1772 | { 1773 | "name": "Adam Harvey", 1774 | "email": "aharvey@php.net" 1775 | }, 1776 | { 1777 | "name": "Bernhard Schussek", 1778 | "email": "bschussek@gmail.com" 1779 | } 1780 | ], 1781 | "description": "Provides the functionality to export PHP variables for visualization", 1782 | "homepage": "http://www.github.com/sebastianbergmann/exporter", 1783 | "keywords": [ 1784 | "export", 1785 | "exporter" 1786 | ], 1787 | "support": { 1788 | "issues": "https://github.com/sebastianbergmann/exporter/issues", 1789 | "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3" 1790 | }, 1791 | "funding": [ 1792 | { 1793 | "url": "https://github.com/sebastianbergmann", 1794 | "type": "github" 1795 | } 1796 | ], 1797 | "time": "2020-11-30T07:47:53+00:00" 1798 | }, 1799 | { 1800 | "name": "sebastian/global-state", 1801 | "version": "3.0.1", 1802 | "source": { 1803 | "type": "git", 1804 | "url": "https://github.com/sebastianbergmann/global-state.git", 1805 | "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" 1806 | }, 1807 | "dist": { 1808 | "type": "zip", 1809 | "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b", 1810 | "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b", 1811 | "shasum": "" 1812 | }, 1813 | "require": { 1814 | "php": ">=7.2", 1815 | "sebastian/object-reflector": "^1.1.1", 1816 | "sebastian/recursion-context": "^3.0" 1817 | }, 1818 | "require-dev": { 1819 | "ext-dom": "*", 1820 | "phpunit/phpunit": "^8.0" 1821 | }, 1822 | "suggest": { 1823 | "ext-uopz": "*" 1824 | }, 1825 | "type": "library", 1826 | "extra": { 1827 | "branch-alias": { 1828 | "dev-master": "3.0-dev" 1829 | } 1830 | }, 1831 | "autoload": { 1832 | "classmap": [ 1833 | "src/" 1834 | ] 1835 | }, 1836 | "notification-url": "https://packagist.org/downloads/", 1837 | "license": [ 1838 | "BSD-3-Clause" 1839 | ], 1840 | "authors": [ 1841 | { 1842 | "name": "Sebastian Bergmann", 1843 | "email": "sebastian@phpunit.de" 1844 | } 1845 | ], 1846 | "description": "Snapshotting of global state", 1847 | "homepage": "http://www.github.com/sebastianbergmann/global-state", 1848 | "keywords": [ 1849 | "global state" 1850 | ], 1851 | "support": { 1852 | "issues": "https://github.com/sebastianbergmann/global-state/issues", 1853 | "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.1" 1854 | }, 1855 | "funding": [ 1856 | { 1857 | "url": "https://github.com/sebastianbergmann", 1858 | "type": "github" 1859 | } 1860 | ], 1861 | "time": "2020-11-30T07:43:24+00:00" 1862 | }, 1863 | { 1864 | "name": "sebastian/object-enumerator", 1865 | "version": "3.0.4", 1866 | "source": { 1867 | "type": "git", 1868 | "url": "https://github.com/sebastianbergmann/object-enumerator.git", 1869 | "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" 1870 | }, 1871 | "dist": { 1872 | "type": "zip", 1873 | "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", 1874 | "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", 1875 | "shasum": "" 1876 | }, 1877 | "require": { 1878 | "php": ">=7.0", 1879 | "sebastian/object-reflector": "^1.1.1", 1880 | "sebastian/recursion-context": "^3.0" 1881 | }, 1882 | "require-dev": { 1883 | "phpunit/phpunit": "^6.0" 1884 | }, 1885 | "type": "library", 1886 | "extra": { 1887 | "branch-alias": { 1888 | "dev-master": "3.0.x-dev" 1889 | } 1890 | }, 1891 | "autoload": { 1892 | "classmap": [ 1893 | "src/" 1894 | ] 1895 | }, 1896 | "notification-url": "https://packagist.org/downloads/", 1897 | "license": [ 1898 | "BSD-3-Clause" 1899 | ], 1900 | "authors": [ 1901 | { 1902 | "name": "Sebastian Bergmann", 1903 | "email": "sebastian@phpunit.de" 1904 | } 1905 | ], 1906 | "description": "Traverses array structures and object graphs to enumerate all referenced objects", 1907 | "homepage": "https://github.com/sebastianbergmann/object-enumerator/", 1908 | "support": { 1909 | "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", 1910 | "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" 1911 | }, 1912 | "funding": [ 1913 | { 1914 | "url": "https://github.com/sebastianbergmann", 1915 | "type": "github" 1916 | } 1917 | ], 1918 | "time": "2020-11-30T07:40:27+00:00" 1919 | }, 1920 | { 1921 | "name": "sebastian/object-reflector", 1922 | "version": "1.1.2", 1923 | "source": { 1924 | "type": "git", 1925 | "url": "https://github.com/sebastianbergmann/object-reflector.git", 1926 | "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" 1927 | }, 1928 | "dist": { 1929 | "type": "zip", 1930 | "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", 1931 | "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", 1932 | "shasum": "" 1933 | }, 1934 | "require": { 1935 | "php": ">=7.0" 1936 | }, 1937 | "require-dev": { 1938 | "phpunit/phpunit": "^6.0" 1939 | }, 1940 | "type": "library", 1941 | "extra": { 1942 | "branch-alias": { 1943 | "dev-master": "1.1-dev" 1944 | } 1945 | }, 1946 | "autoload": { 1947 | "classmap": [ 1948 | "src/" 1949 | ] 1950 | }, 1951 | "notification-url": "https://packagist.org/downloads/", 1952 | "license": [ 1953 | "BSD-3-Clause" 1954 | ], 1955 | "authors": [ 1956 | { 1957 | "name": "Sebastian Bergmann", 1958 | "email": "sebastian@phpunit.de" 1959 | } 1960 | ], 1961 | "description": "Allows reflection of object attributes, including inherited and non-public ones", 1962 | "homepage": "https://github.com/sebastianbergmann/object-reflector/", 1963 | "support": { 1964 | "issues": "https://github.com/sebastianbergmann/object-reflector/issues", 1965 | "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" 1966 | }, 1967 | "funding": [ 1968 | { 1969 | "url": "https://github.com/sebastianbergmann", 1970 | "type": "github" 1971 | } 1972 | ], 1973 | "time": "2020-11-30T07:37:18+00:00" 1974 | }, 1975 | { 1976 | "name": "sebastian/recursion-context", 1977 | "version": "3.0.1", 1978 | "source": { 1979 | "type": "git", 1980 | "url": "https://github.com/sebastianbergmann/recursion-context.git", 1981 | "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" 1982 | }, 1983 | "dist": { 1984 | "type": "zip", 1985 | "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", 1986 | "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", 1987 | "shasum": "" 1988 | }, 1989 | "require": { 1990 | "php": ">=7.0" 1991 | }, 1992 | "require-dev": { 1993 | "phpunit/phpunit": "^6.0" 1994 | }, 1995 | "type": "library", 1996 | "extra": { 1997 | "branch-alias": { 1998 | "dev-master": "3.0.x-dev" 1999 | } 2000 | }, 2001 | "autoload": { 2002 | "classmap": [ 2003 | "src/" 2004 | ] 2005 | }, 2006 | "notification-url": "https://packagist.org/downloads/", 2007 | "license": [ 2008 | "BSD-3-Clause" 2009 | ], 2010 | "authors": [ 2011 | { 2012 | "name": "Sebastian Bergmann", 2013 | "email": "sebastian@phpunit.de" 2014 | }, 2015 | { 2016 | "name": "Jeff Welch", 2017 | "email": "whatthejeff@gmail.com" 2018 | }, 2019 | { 2020 | "name": "Adam Harvey", 2021 | "email": "aharvey@php.net" 2022 | } 2023 | ], 2024 | "description": "Provides functionality to recursively process PHP variables", 2025 | "homepage": "http://www.github.com/sebastianbergmann/recursion-context", 2026 | "support": { 2027 | "issues": "https://github.com/sebastianbergmann/recursion-context/issues", 2028 | "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" 2029 | }, 2030 | "funding": [ 2031 | { 2032 | "url": "https://github.com/sebastianbergmann", 2033 | "type": "github" 2034 | } 2035 | ], 2036 | "time": "2020-11-30T07:34:24+00:00" 2037 | }, 2038 | { 2039 | "name": "sebastian/resource-operations", 2040 | "version": "2.0.2", 2041 | "source": { 2042 | "type": "git", 2043 | "url": "https://github.com/sebastianbergmann/resource-operations.git", 2044 | "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" 2045 | }, 2046 | "dist": { 2047 | "type": "zip", 2048 | "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", 2049 | "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", 2050 | "shasum": "" 2051 | }, 2052 | "require": { 2053 | "php": ">=7.1" 2054 | }, 2055 | "type": "library", 2056 | "extra": { 2057 | "branch-alias": { 2058 | "dev-master": "2.0-dev" 2059 | } 2060 | }, 2061 | "autoload": { 2062 | "classmap": [ 2063 | "src/" 2064 | ] 2065 | }, 2066 | "notification-url": "https://packagist.org/downloads/", 2067 | "license": [ 2068 | "BSD-3-Clause" 2069 | ], 2070 | "authors": [ 2071 | { 2072 | "name": "Sebastian Bergmann", 2073 | "email": "sebastian@phpunit.de" 2074 | } 2075 | ], 2076 | "description": "Provides a list of PHP built-in functions that operate on resources", 2077 | "homepage": "https://www.github.com/sebastianbergmann/resource-operations", 2078 | "support": { 2079 | "issues": "https://github.com/sebastianbergmann/resource-operations/issues", 2080 | "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" 2081 | }, 2082 | "funding": [ 2083 | { 2084 | "url": "https://github.com/sebastianbergmann", 2085 | "type": "github" 2086 | } 2087 | ], 2088 | "time": "2020-11-30T07:30:19+00:00" 2089 | }, 2090 | { 2091 | "name": "sebastian/type", 2092 | "version": "1.1.4", 2093 | "source": { 2094 | "type": "git", 2095 | "url": "https://github.com/sebastianbergmann/type.git", 2096 | "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" 2097 | }, 2098 | "dist": { 2099 | "type": "zip", 2100 | "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", 2101 | "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", 2102 | "shasum": "" 2103 | }, 2104 | "require": { 2105 | "php": ">=7.2" 2106 | }, 2107 | "require-dev": { 2108 | "phpunit/phpunit": "^8.2" 2109 | }, 2110 | "type": "library", 2111 | "extra": { 2112 | "branch-alias": { 2113 | "dev-master": "1.1-dev" 2114 | } 2115 | }, 2116 | "autoload": { 2117 | "classmap": [ 2118 | "src/" 2119 | ] 2120 | }, 2121 | "notification-url": "https://packagist.org/downloads/", 2122 | "license": [ 2123 | "BSD-3-Clause" 2124 | ], 2125 | "authors": [ 2126 | { 2127 | "name": "Sebastian Bergmann", 2128 | "email": "sebastian@phpunit.de", 2129 | "role": "lead" 2130 | } 2131 | ], 2132 | "description": "Collection of value objects that represent the types of the PHP type system", 2133 | "homepage": "https://github.com/sebastianbergmann/type", 2134 | "support": { 2135 | "issues": "https://github.com/sebastianbergmann/type/issues", 2136 | "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" 2137 | }, 2138 | "funding": [ 2139 | { 2140 | "url": "https://github.com/sebastianbergmann", 2141 | "type": "github" 2142 | } 2143 | ], 2144 | "time": "2020-11-30T07:25:11+00:00" 2145 | }, 2146 | { 2147 | "name": "sebastian/version", 2148 | "version": "2.0.1", 2149 | "source": { 2150 | "type": "git", 2151 | "url": "https://github.com/sebastianbergmann/version.git", 2152 | "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" 2153 | }, 2154 | "dist": { 2155 | "type": "zip", 2156 | "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", 2157 | "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", 2158 | "shasum": "" 2159 | }, 2160 | "require": { 2161 | "php": ">=5.6" 2162 | }, 2163 | "type": "library", 2164 | "extra": { 2165 | "branch-alias": { 2166 | "dev-master": "2.0.x-dev" 2167 | } 2168 | }, 2169 | "autoload": { 2170 | "classmap": [ 2171 | "src/" 2172 | ] 2173 | }, 2174 | "notification-url": "https://packagist.org/downloads/", 2175 | "license": [ 2176 | "BSD-3-Clause" 2177 | ], 2178 | "authors": [ 2179 | { 2180 | "name": "Sebastian Bergmann", 2181 | "email": "sebastian@phpunit.de", 2182 | "role": "lead" 2183 | } 2184 | ], 2185 | "description": "Library that helps with managing the version number of Git-hosted PHP projects", 2186 | "homepage": "https://github.com/sebastianbergmann/version", 2187 | "support": { 2188 | "issues": "https://github.com/sebastianbergmann/version/issues", 2189 | "source": "https://github.com/sebastianbergmann/version/tree/master" 2190 | }, 2191 | "time": "2016-10-03T07:35:21+00:00" 2192 | }, 2193 | { 2194 | "name": "symfony/polyfill-ctype", 2195 | "version": "v1.23.0", 2196 | "source": { 2197 | "type": "git", 2198 | "url": "https://github.com/symfony/polyfill-ctype.git", 2199 | "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" 2200 | }, 2201 | "dist": { 2202 | "type": "zip", 2203 | "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", 2204 | "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", 2205 | "shasum": "" 2206 | }, 2207 | "require": { 2208 | "php": ">=7.1" 2209 | }, 2210 | "suggest": { 2211 | "ext-ctype": "For best performance" 2212 | }, 2213 | "type": "library", 2214 | "extra": { 2215 | "branch-alias": { 2216 | "dev-main": "1.23-dev" 2217 | }, 2218 | "thanks": { 2219 | "name": "symfony/polyfill", 2220 | "url": "https://github.com/symfony/polyfill" 2221 | } 2222 | }, 2223 | "autoload": { 2224 | "psr-4": { 2225 | "Symfony\\Polyfill\\Ctype\\": "" 2226 | }, 2227 | "files": [ 2228 | "bootstrap.php" 2229 | ] 2230 | }, 2231 | "notification-url": "https://packagist.org/downloads/", 2232 | "license": [ 2233 | "MIT" 2234 | ], 2235 | "authors": [ 2236 | { 2237 | "name": "Gert de Pagter", 2238 | "email": "BackEndTea@gmail.com" 2239 | }, 2240 | { 2241 | "name": "Symfony Community", 2242 | "homepage": "https://symfony.com/contributors" 2243 | } 2244 | ], 2245 | "description": "Symfony polyfill for ctype functions", 2246 | "homepage": "https://symfony.com", 2247 | "keywords": [ 2248 | "compatibility", 2249 | "ctype", 2250 | "polyfill", 2251 | "portable" 2252 | ], 2253 | "support": { 2254 | "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" 2255 | }, 2256 | "funding": [ 2257 | { 2258 | "url": "https://symfony.com/sponsor", 2259 | "type": "custom" 2260 | }, 2261 | { 2262 | "url": "https://github.com/fabpot", 2263 | "type": "github" 2264 | }, 2265 | { 2266 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 2267 | "type": "tidelift" 2268 | } 2269 | ], 2270 | "time": "2021-02-19T12:13:01+00:00" 2271 | }, 2272 | { 2273 | "name": "theseer/tokenizer", 2274 | "version": "1.2.1", 2275 | "source": { 2276 | "type": "git", 2277 | "url": "https://github.com/theseer/tokenizer.git", 2278 | "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" 2279 | }, 2280 | "dist": { 2281 | "type": "zip", 2282 | "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", 2283 | "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", 2284 | "shasum": "" 2285 | }, 2286 | "require": { 2287 | "ext-dom": "*", 2288 | "ext-tokenizer": "*", 2289 | "ext-xmlwriter": "*", 2290 | "php": "^7.2 || ^8.0" 2291 | }, 2292 | "type": "library", 2293 | "autoload": { 2294 | "classmap": [ 2295 | "src/" 2296 | ] 2297 | }, 2298 | "notification-url": "https://packagist.org/downloads/", 2299 | "license": [ 2300 | "BSD-3-Clause" 2301 | ], 2302 | "authors": [ 2303 | { 2304 | "name": "Arne Blankerts", 2305 | "email": "arne@blankerts.de", 2306 | "role": "Developer" 2307 | } 2308 | ], 2309 | "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", 2310 | "support": { 2311 | "issues": "https://github.com/theseer/tokenizer/issues", 2312 | "source": "https://github.com/theseer/tokenizer/tree/1.2.1" 2313 | }, 2314 | "funding": [ 2315 | { 2316 | "url": "https://github.com/theseer", 2317 | "type": "github" 2318 | } 2319 | ], 2320 | "time": "2021-07-28T10:34:58+00:00" 2321 | }, 2322 | { 2323 | "name": "webmozart/assert", 2324 | "version": "1.10.0", 2325 | "source": { 2326 | "type": "git", 2327 | "url": "https://github.com/webmozarts/assert.git", 2328 | "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" 2329 | }, 2330 | "dist": { 2331 | "type": "zip", 2332 | "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", 2333 | "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", 2334 | "shasum": "" 2335 | }, 2336 | "require": { 2337 | "php": "^7.2 || ^8.0", 2338 | "symfony/polyfill-ctype": "^1.8" 2339 | }, 2340 | "conflict": { 2341 | "phpstan/phpstan": "<0.12.20", 2342 | "vimeo/psalm": "<4.6.1 || 4.6.2" 2343 | }, 2344 | "require-dev": { 2345 | "phpunit/phpunit": "^8.5.13" 2346 | }, 2347 | "type": "library", 2348 | "extra": { 2349 | "branch-alias": { 2350 | "dev-master": "1.10-dev" 2351 | } 2352 | }, 2353 | "autoload": { 2354 | "psr-4": { 2355 | "Webmozart\\Assert\\": "src/" 2356 | } 2357 | }, 2358 | "notification-url": "https://packagist.org/downloads/", 2359 | "license": [ 2360 | "MIT" 2361 | ], 2362 | "authors": [ 2363 | { 2364 | "name": "Bernhard Schussek", 2365 | "email": "bschussek@gmail.com" 2366 | } 2367 | ], 2368 | "description": "Assertions to validate method input/output with nice error messages.", 2369 | "keywords": [ 2370 | "assert", 2371 | "check", 2372 | "validate" 2373 | ], 2374 | "support": { 2375 | "issues": "https://github.com/webmozarts/assert/issues", 2376 | "source": "https://github.com/webmozarts/assert/tree/1.10.0" 2377 | }, 2378 | "time": "2021-03-09T10:59:23+00:00" 2379 | } 2380 | ], 2381 | "aliases": [], 2382 | "minimum-stability": "stable", 2383 | "stability-flags": [], 2384 | "prefer-stable": false, 2385 | "prefer-lowest": false, 2386 | "platform": [], 2387 | "platform-dev": [], 2388 | "plugin-api-version": "2.0.0" 2389 | } 2390 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | tests/OData/Tests 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/OData/Client.php: -------------------------------------------------------------------------------- 1 | client = new Guzzle(array_replace_recursive([ 31 | 'base_uri'=>$url, 32 | 'timeout'=>'300', 33 | 'headers'=>[ 34 | 'Accept'=>'application/json', 35 | ], 36 | ], $options)); 37 | } 38 | 39 | public function id($id=null) 40 | { 41 | if ($id === null) { 42 | return $this->getLastId(); 43 | } 44 | $this->id = $id; 45 | return $this; 46 | } 47 | 48 | public function create(array $data, $options=[]) 49 | { 50 | return $this->update(false, $data, $options); 51 | } 52 | 53 | public function expand($name) 54 | { 55 | $this->request_options['query']['$expand'] = $name; 56 | return $this; 57 | } 58 | 59 | public function top($cnt) 60 | { 61 | $this->request_options['query']['$top'] = $cnt; 62 | return $this; 63 | } 64 | 65 | public function filter($name) 66 | { 67 | $this->request_options['query']['$filter'] = $name; 68 | return $this; 69 | } 70 | 71 | public function get($id=null, $filter=null, $options=[]) 72 | { 73 | $query = null; 74 | if ($id === null) { 75 | $id = $this->id; 76 | } elseif (is_array($id)) { 77 | $query = []; 78 | foreach ($id as $k=>$v) { 79 | if (preg_match('/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i', $v)) { 80 | $v = "guid'{$v}'"; 81 | } 82 | $query[] = $k.'='.$v; 83 | } 84 | $query = '('.implode(',', $query).')'; 85 | } elseif (!preg_match('/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i', $id)) { 86 | $options = $filter; 87 | $filter = $id; 88 | $id = null; 89 | } 90 | 91 | if ($id && !is_array($id)) { 92 | $query .= "(guid'{$id}')"; 93 | } 94 | if ($filter) { 95 | $this->filter($filter); 96 | } 97 | if ($query) { 98 | $this->requested[] = $query; 99 | } 100 | 101 | return $this->request('GET', $options); 102 | } 103 | 104 | public function update($id=null, $data=[], $options=[]) 105 | { 106 | if ($id === null) { 107 | $id = $this->id; 108 | } elseif (is_array($id)) { 109 | $options = $data; 110 | $data = $id; 111 | $id = $this->id; 112 | if (!$this->id) { 113 | $id = $this->getLastId(); 114 | } 115 | } 116 | 117 | $method = 'PATCH'; 118 | if (!$id) { 119 | $method = 'POST'; 120 | } 121 | 122 | $query = null; 123 | if ($id) { 124 | $query .= "(guid'{$id}')"; 125 | } 126 | $this->requested[] = $query; 127 | 128 | if ($data) { 129 | $options['json'] = $data; 130 | } 131 | 132 | return $this->request($method, $options); 133 | } 134 | 135 | public function delete($id=null, $filter=null, $options=[]) 136 | { 137 | $query = null; 138 | 139 | if ($id === null) { 140 | $id = $this->id; 141 | } elseif (is_array($id)) { 142 | $query = []; 143 | foreach ($id as $k=>$v) { 144 | if (preg_match('/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i', $v)) { 145 | $v = "guid'{$v}'"; 146 | } 147 | $query[] = $k.'='.$v; 148 | } 149 | $query = '('.implode(',', $query).')'; 150 | } elseif (is_array($filter)) { 151 | $options = $filter; 152 | } 153 | 154 | if ($id && !is_array($id)) { 155 | $query .= "(guid'{$id}')"; 156 | } 157 | if ($filter) { 158 | $this->filter($filter); 159 | } 160 | if ($query) { 161 | $this->requested[] = $query; 162 | } 163 | 164 | return $this->request('DELETE', $options); 165 | } 166 | 167 | public function __get($name) 168 | { 169 | $this->requested = []; 170 | 171 | @list($type, $objname) = explode('_', $name, 2); 172 | /* 173 | if(!$objname) 174 | throw new Exception('Bad request: '.$name); 175 | if(!in_array($type,$this->objects())) { 176 | throw new Exception('Object of type '.$type.' not supported'); 177 | } 178 | */ 179 | 180 | if ($this->requested && is_array($this->requested) && (count($this->requested) > 0)) { 181 | $tmp = implode('', $this->requested); 182 | if (strrpos($tmp, '/') !== (count($tmp)-1)) { 183 | $name = '/'.$name; 184 | } 185 | } 186 | 187 | $this->requested[] = $name; 188 | 189 | return $this; 190 | } 191 | 192 | public function request($method, $options=[]) 193 | { 194 | $resp = null; 195 | 196 | $this->http_code = null; 197 | $this->http_message = null; 198 | $this->odata_code = null; 199 | $this->odata_message = null; 200 | 201 | $this->request_ok = false; 202 | $options = array_replace_recursive($this->request_options, $options!==null ? $options : []); 203 | $this->request_options = []; 204 | 205 | $request_str = implode('', $this->requested); 206 | if ($this->is_called) { 207 | array_splice($this->requested, $this->id ? -3 : -2); 208 | $this->is_called = false; 209 | } elseif ($this->id) { 210 | array_splice($this->requested, -1); 211 | } 212 | 213 | try { 214 | $resp = $this->client->request($method, $request_str, $options); 215 | $this->request_ok = true; 216 | } catch (BadResponseException $e) { 217 | if ($e instanceof BadResponseException) { 218 | if ($e->hasResponse() && ($resp = $e->getResponse())) { 219 | $this->http_code = $resp->getStatusCode(); 220 | $this->http_message = $resp->getReasonPhrase(); 221 | } else { 222 | $this->http_code = $e->getCode(); 223 | $this->http_message = $e->getMessage(); 224 | } 225 | } else { 226 | $this->http_code = $e->getCode(); 227 | $this->http_message = $e->getMessage(); 228 | } 229 | return null; 230 | } 231 | if (!$resp) { 232 | throw new Exception('No response found: '.print_r([$this->http_code,$this->http_message], true)); 233 | } 234 | $this->parseMetadata($resp); 235 | $this->response = new Response($this, $resp); 236 | 237 | return $this; 238 | } 239 | 240 | public function getHttpErrorMessage() 241 | { 242 | return $this->http_message; 243 | } 244 | 245 | public function getHttpErrorCode() 246 | { 247 | return $this->http_code; 248 | } 249 | 250 | public function getErrorMessage() 251 | { 252 | return $this->odata_message; 253 | } 254 | 255 | public function getErrorCode() 256 | { 257 | return $this->odata_code; 258 | } 259 | 260 | public function isOk() 261 | { 262 | return $this->request_ok; 263 | } 264 | 265 | public function getLastId() 266 | { 267 | return !empty($this->_metadata['last_id']) 268 | ? $this->_metadata['last_id'] 269 | : (isset($this->response->values()[0]['Ref_Key']) ? $this->response->values()[0]['Ref_Key'] : null); 270 | } 271 | 272 | protected function parseMetadata(ResponseInterface $resp) 273 | { 274 | if ($body = $resp->getBody()) { 275 | $this->_metadata['body'] = $body->__toString(); 276 | if ($data = json_decode($this->_metadata['body'], true)) { 277 | if (isset($data['odata.error'])) { 278 | if (isset($data['odata.error']['code'])) { 279 | $this->odata_code = $data['odata.error']['code']; 280 | } 281 | if (isset($data['odata.error']['message']['value'])) { 282 | $this->odata_message = $data['odata.error']['message']['value']; 283 | } 284 | } 285 | } 286 | } 287 | if ($resp->hasHeader('Location')) { 288 | preg_match("/guid'(.*?)'/", implode(' ', $resp->getHeader('Location')), $matches); 289 | if ($matches) { 290 | $this->_metadata['last_id'] = $matches[1]; 291 | } 292 | } 293 | } 294 | 295 | public function getMetadata($name=null) 296 | { 297 | if ($name === null) { 298 | return $this->_metadata; 299 | } 300 | return isset($this->_metadata[$name]) ? $this->_metadata[$name] : null; 301 | } 302 | 303 | protected function objects() 304 | { 305 | return [ 306 | 'Справочник'=>'Catalog', 307 | 'Документ'=>'Document', 308 | 'Журнал документов'=>'DocumentJournal', 309 | 'Константа'=>'Constant', 310 | 'План обмена'=>'ExchangePlan', 311 | 'План счетов'=>'ChartOfAccounts', 312 | 'План видов расчета'=>'ChartOfCalculationTypes', 313 | 'План видов характеристик'=>'ChartOfCharacteristicTypes', 314 | 'Регистр сведений'=>'InformationRegisters', 315 | 'Регистр накопления'=>'AccumulationRegister', 316 | 'Регистр расчета'=>'CalculationRegister', 317 | 'Регистр бухгалтерии'=>'AccountingRegister', 318 | 'Бизнес-процесс'=>'BusinessProcess', 319 | 'Задача'=>'Task', 320 | 'Перечисления'=>'Enum', 321 | ]; 322 | } 323 | 324 | public function __call($name, $arguments=[]) 325 | { 326 | $this->is_called = true; 327 | if ($this->id) { 328 | $this->requested[] = "(guid'{$this->id}')"; 329 | } 330 | $this->requested[] = "/"; 331 | $this->requested[] = ucfirst($name); 332 | return $this->request('POST', []); 333 | } 334 | 335 | public function offsetSet($offset, $value) 336 | { 337 | throw new Exception('You\'re trying to write protected object'); 338 | } 339 | 340 | public function offsetExists($offset) 341 | { 342 | return $this->response && isset($this->response->toArray()[$offset]); 343 | } 344 | 345 | public function offsetUnset($offset) 346 | { 347 | } 348 | 349 | public function offsetGet($offset) 350 | { 351 | return $this->response && isset($this->response->toArray()[$offset]) ? $this->response->toArray()[$offset] : null; 352 | } 353 | 354 | public function getResponse() 355 | { 356 | return $this->response; 357 | } 358 | 359 | public function toArray() 360 | { 361 | return $this->response ? $this->response->toArray() : []; 362 | } 363 | 364 | public function values() 365 | { 366 | return $this->response ? $this->response->values() : []; 367 | } 368 | 369 | public function first() 370 | { 371 | return $this->response ? $this->response->first() : []; 372 | } 373 | } 374 | -------------------------------------------------------------------------------- /src/OData/Exception.php: -------------------------------------------------------------------------------- 1 | client = $clnt; 17 | $this->response = $resp; 18 | } 19 | 20 | public function __toString() 21 | { 22 | return $this->response->getBody(); 23 | } 24 | 25 | public function toArray() 26 | { 27 | if (!$this->arr) { 28 | $this->arr = json_decode($this->response->getBody(), true); 29 | } 30 | return $this->arr; 31 | } 32 | 33 | public function values() 34 | { 35 | $arr = $this->toArray(); 36 | return isset($arr['value']) ? $arr['value'] : (isset($arr['Ref_Key']) ? [$arr] : []); 37 | } 38 | 39 | public function first() 40 | { 41 | $vals = $this->values(); 42 | return isset($vals[0]) ? $vals[0] : null; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /tests/Bootstrap.php: -------------------------------------------------------------------------------- 1 | markTestSkipped( 27 | 'You should define ODATA_URL_1C in phpunit.xml to pass this test' 28 | ); 29 | } 30 | if (isset($_SERVER['LOGIN']) && isset($_SERVER['PASSWORD'])) { 31 | $auth = [ 32 | $_SERVER['LOGIN'], 33 | $_SERVER['PASSWORD'], 34 | ]; 35 | } 36 | 37 | $this->object = new Client($_SERVER['URL_ODATA_1C'], array_filter([ 38 | 'auth' => $auth, 39 | 'timeout' => 300, 40 | ])); 41 | } 42 | 43 | /** 44 | * @covers Kily\Tools1C\OData\Client::__construct 45 | */ 46 | public function test__construct() 47 | { 48 | $client = new Client('http://1c.kily.ru/ut/odata/standard.odata/', [ 49 | 'auth' => [ 50 | 'login', 51 | 'password', 52 | ], 53 | 'timeout' => 300, 54 | ]); 55 | 56 | $this->assertTrue(is_object($client)); 57 | } 58 | 59 | /** 60 | * @covers Kily\Tools1C\OData\Client::get 61 | */ 62 | public function testGet() 63 | { 64 | // test list 65 | $data = $this->object->{'Catalog_Номенклатура'}->top(1)->get(); 66 | $this->assertTrue(is_object($data)); 67 | $this->assertTrue(is_array($data->toArray())); 68 | $this->assertTrue(isset($data['value'])); 69 | 70 | if (!isset($data['value']) || !count($data['value'])) { 71 | $this->markTestSkipped( 72 | 'There is no active Catalog_Номенклатура items, so we cant complete the test' 73 | ); 74 | } 75 | $this->assertGreaterThan(0, count($data->values())); 76 | 77 | // test getting by Ref_Key 78 | $id = $data->values()[0]['Ref_Key']; 79 | $data = $this->object->{'Catalog_Номенклатура'}->top(1)->get($id); 80 | $this->assertTrue(is_object($data)); 81 | $this->assertTrue(is_array($data->toArray())); 82 | $this->assertTrue(isset($data['Ref_Key'])); 83 | $this->assertTrue($data['Ref_Key'] === $id); 84 | 85 | //test filter 86 | $data = $this->object->{'Catalog_Номенклатура'}->top(1)->get(null, "НаименованиеПолное ne '".addslashes($data->values()[0]['НаименованиеПолное'])."'"); 87 | $this->assertTrue(is_object($data)); 88 | $this->assertTrue(is_array($data->toArray())); 89 | $this->assertTrue(isset($data['value'][0]['Ref_Key'])); 90 | } 91 | 92 | /** 93 | * @covers Kily\Tools1C\OData\Client::create 94 | */ 95 | public function testCreate() 96 | { 97 | if (!isset($_SERVER['ALLOW_UNSAFE_OPERATIONS']) || !$_SERVER['ALLOW_UNSAFE_OPERATIONS']) { 98 | $this->markTestSkipped( 99 | 'You should explictly allow tests with create,update and delete operations' 100 | ); 101 | } 102 | 103 | $product_data = [ 104 | 'Артикул'=>'CERTANLY_NONEXISTENT_123', 105 | 'Description'=>'test test test nonexistent', 106 | ]; 107 | 108 | $data = $this->object->{'Catalog_Номенклатура'}->create($product_data); 109 | $this->assertTrue($this->object->isOk()); 110 | } 111 | 112 | 113 | /** 114 | * @covers Kily\Tools1C\OData\Client::update 115 | */ 116 | public function testUpdate() 117 | { 118 | if (!isset($_SERVER['ALLOW_UNSAFE_OPERATIONS']) || !$_SERVER['ALLOW_UNSAFE_OPERATIONS']) { 119 | $this->markTestSkipped( 120 | 'You should explictly allow tests with update operations' 121 | ); 122 | } 123 | 124 | $data = $this->object->{'Catalog_Номенклатура'}->get(null, "Артикул eq 'CERTANLY_NONEXISTENT_123'"); 125 | if (!$data->values()) { 126 | $this->markTestSkipped( 127 | 'It seems there is no such SKU: CERTANLY_NONEXISTENT_123. Skipping test', 128 | ); 129 | return; 130 | } 131 | $this->assertTrue($this->object->isOk()); 132 | 133 | $id = $data['value'][0]['Ref_Key']; 134 | 135 | $data = $this->object->{'Catalog_Номенклатура'}->update($id, [ 136 | 'Description'=>'Test description 321', 137 | ]); 138 | $this->assertTrue($this->object->isOk()); 139 | } 140 | 141 | /** 142 | * @covers Kily\Tools1C\OData\Client::delete 143 | */ 144 | public function testDelete() 145 | { 146 | if (!isset($_SERVER['ALLOW_UNSAFE_OPERATIONS']) || !$_SERVER['ALLOW_UNSAFE_OPERATIONS']) { 147 | $this->markTestSkipped( 148 | 'You should explictly allow tests with delete operations. WARNING! It could be DANGEROUS! Use it at your own risk!' 149 | ); 150 | } 151 | 152 | $data = $this->object->{'Catalog_Номенклатура'}->get(null, "Артикул eq 'CERTANLY_NONEXISTENT_123'"); 153 | $this->assertTrue($this->object->isOk()); 154 | $id = $data['value'][0]['Ref_Key']; 155 | $data = $this->object->{'Catalog_Номенклатура'}->delete($id); 156 | $this->assertTrue($this->object->isOk()); 157 | } 158 | 159 | 160 | /** 161 | * @covers Kily\Tools1C\OData\Client::request 162 | */ 163 | public function testRequest() 164 | { 165 | $this->object->{'Catalog_Номенклатура'}; 166 | $data = $this->object->top(1)->request("GET"); 167 | $this->assertTrue(is_object($data)); 168 | $this->assertTrue(is_array($data->toArray())); 169 | } 170 | 171 | /** 172 | * @covers Kily\Tools1C\OData\Client::getErrorMessage 173 | */ 174 | public function testGetErrorMessage() 175 | { 176 | $data = $this->object->{'Catalog_Номенклатураa'}->top(1)->get(); 177 | $this->assertEquals('Not found', $this->object->getHttpErrorMessage()); 178 | 179 | $data = $this->object->{'Catalog_Номенклатура'}->top(1)->get(); 180 | $this->assertEquals('', $this->object->getErrorMessage()); 181 | } 182 | 183 | /** 184 | * @covers Kily\Tools1C\OData\Client::getErrorCode 185 | */ 186 | public function testGetErrorCode() 187 | { 188 | $data = $this->object->{'Catalog_Номенклатураa'}->top(1)->get(); 189 | $this->assertEquals('404', $this->object->getHttpErrorCode()); 190 | 191 | $data = $this->object->{'Catalog_Номенклатура'}->top(1)->get(); 192 | $this->assertEquals('', $this->object->getErrorCode()); 193 | } 194 | 195 | /** 196 | * @covers Kily\Tools1C\OData\Client::isOk 197 | */ 198 | public function testIsOk() 199 | { 200 | $data = $this->object->{'Catalog_Номенклатураa'}->top(1)->get(); 201 | $this->assertFalse($this->object->isOk()); 202 | 203 | $data = $this->object->{'Catalog_Номенклатура'}->top(1)->get(); 204 | $this->assertTrue($this->object->isOk()); 205 | } 206 | } 207 | --------------------------------------------------------------------------------