1
0
Fork 0
mirror of synced 2025-04-10 04:20:55 +00:00

Compare commits

...

8 commits

Author SHA1 Message Date
Ichern
0adfb9edda
Merge pull request #18 from retailcrm/resolve-logger-version-conflict
Resolve conflict with psr/log
2024-07-17 12:44:28 +03:00
Nikolay Parshakov
aecbdeafcc Resolve conflict with psr/log 2024-07-17 12:12:51 +03:00
Ilyas Salikhov
a857ba561a
Merge pull request #17 from retailcrm/sf6
compability with symfony 6
2024-06-17 18:29:03 +03:00
Ilyas Salikhov
f570c20839 compability with symfony 6 2024-06-17 18:28:35 +03:00
Ilyas Salikhov
726b51151c Check deprecations in tests 2024-01-27 19:40:29 +03:00
Ilyas Salikhov
1b75a04cf9 Compability with guzzlehttp/guzzle:^7.0 2024-01-27 19:37:04 +03:00
Ilyas Salikhov
68df0e1f49 Environment to run test locally 2024-01-27 19:36:37 +03:00
Alexey
5158cf22b3
bump "symfony/validator" version in composer.json (#16)
* bump "symfony/validator" version in composer.json
2022-09-05 13:45:33 +03:00
8 changed files with 40 additions and 15 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@
/vendor
composer.lock
.phpunit.result.cache
.env

6
Dockerfile Normal file
View file

@ -0,0 +1,6 @@
ARG PHP_IMAGE_TAG
FROM php:${PHP_IMAGE_TAG}-cli-alpine
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
WORKDIR /opt/test

16
Makefile Normal file
View file

@ -0,0 +1,16 @@
ifneq (,$(shell (type docker-compose 2>&1 >/dev/null && echo 1) || true))
PHP=docker-compose run --rm --no-deps php
else
PHP=php
endif
PHP_CONSOLE_DEPS=vendor
vendor: composer.json
@$(PHP) composer install -o -n --no-ansi
@touch vendor || true
phpunit: $(PHP_CONSOLE_DEPS)
@$(PHP) vendor/bin/phpunit --color=always
check: phpunit

View file

@ -13,11 +13,11 @@
"php": ">=7.2",
"ext-curl": "*",
"ext-json": "*",
"guzzlehttp/guzzle": "~6.3",
"guzzlehttp/guzzle": "~6.3|^7.0",
"jms/serializer": "^0.12|^1.0|^2.0|^3.0",
"symfony/validator": "~2.8|~3.0|~4.0",
"symfony/validator": "~2.8|~3.0|~4.0|^5.0|^6.0",
"doctrine/cache": "~1.6",
"psr/log": "~1.0"
"psr/log": "~1.0|^2.0|^3.0"
},
"require-dev": {
"phpunit/phpunit": "~8.0"

11
docker-compose.yml Normal file
View file

@ -0,0 +1,11 @@
version: '3.4'
services:
php:
build:
context: .
args:
PHP_IMAGE_TAG: ${PHP_IMAGE_TAG:-7.4}
volumes:
- "./:/opt/test"

View file

@ -8,6 +8,7 @@
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
convertDeprecationsToExceptions="true"
processIsolation="false"
stopOnFailure="false">

View file

@ -143,7 +143,7 @@ class AtolOnlineApiTest extends TestCase
*/
public function testGetTokenBadResponse(): void
{
$api = $this->getApi([new BadResponseException('', new Request('GET', 'test'))]);
$api = $this->getApi([new BadResponseException('', new Request('GET', 'test'), new Response())]);
$this->assertFalse($this->callMethod($api, 'getToken'));
}

View file

@ -1,13 +1,3 @@
<?php
use Composer\Autoload\ClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;
/**
* @var ClassLoader $loader
*/
$loader = require __DIR__.'/../vendor/autoload.php';
AnnotationRegistry::registerLoader('class_exists');
return $loader;
return require __DIR__.'/../vendor/autoload.php';