Update php version (#20)
This commit is contained in:
parent
c6a44ea2b3
commit
98563e2e60
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
php-version: ['7.1', '7.2', '7.3']
|
||||
php-version: ['7.2', '7.3', '7.4', '8.0']
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup PHP ${{ matrix.php-version }}
|
||||
|
@ -12,21 +12,22 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.1",
|
||||
"php": ">=7.2.5",
|
||||
"ext-curl": "*",
|
||||
"ext-json": "*",
|
||||
"jms/serializer": "1.14.*",
|
||||
"symfony/validator": "4.3.*",
|
||||
"doctrine/annotations": "1.12.*",
|
||||
"jms/serializer": "3.*",
|
||||
"symfony/validator": "5.4.*",
|
||||
"doctrine/annotations": "1.13.*",
|
||||
"doctrine/cache": "1.11.*",
|
||||
"guzzlehttp/guzzle": "6.*"
|
||||
"guzzlehttp/guzzle": "6.*",
|
||||
"symfony/intl": "^5.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpmd/phpmd": "2.*",
|
||||
"squizlabs/php_codesniffer": "3.4.*",
|
||||
"symfony/dotenv": "4.3.*",
|
||||
"phpunit/phpunit": "7.*",
|
||||
"phpstan/phpstan": "0.11.*"
|
||||
"symfony/dotenv": "5.4.*",
|
||||
"phpunit/phpunit": "8.5.*",
|
||||
"phpstan/phpstan": "0.12.*"
|
||||
},
|
||||
"support": {
|
||||
"email": "support@retailcrm.pro"
|
||||
|
3402
composer.lock
generated
3402
composer.lock
generated
File diff suppressed because it is too large
Load Diff
1917
phpstan-baseline.neon
Normal file
1917
phpstan-baseline.neon
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,7 @@
|
||||
includes:
|
||||
- phpstan-baseline.neon
|
||||
|
||||
parameters:
|
||||
autoload_files:
|
||||
- %currentWorkingDirectory%/vendor/autoload.php
|
||||
level: 7
|
||||
paths:
|
||||
- %currentWorkingDirectory%/src
|
||||
|
@ -232,7 +232,7 @@ class HttpClient
|
||||
$message = '';
|
||||
|
||||
foreach ($errors as $error) {
|
||||
$message .= (string)$error;
|
||||
$message .= $error->getMessage();
|
||||
}
|
||||
|
||||
throw new InvalidArgumentException($message);
|
||||
|
@ -233,7 +233,7 @@ class Channel implements ModelInterface
|
||||
/**
|
||||
* @param string $name
|
||||
*/
|
||||
public function setName(string $name)
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ class Serializer
|
||||
$serializer = SerializerBuilder::create()->build();
|
||||
$context = self::getContext(false);
|
||||
|
||||
if ($context instanceof SerializationContext) {
|
||||
switch ($serialize) {
|
||||
case self::S_ARRAY:
|
||||
$serialized = $serializer->toArray($request, $context);
|
||||
@ -49,6 +50,7 @@ class Serializer
|
||||
$serialized = $serializer->serialize($request, $serialize, $context);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $serialized;
|
||||
}
|
||||
@ -68,6 +70,7 @@ class Serializer
|
||||
$serializer = SerializerBuilder::create()->build();
|
||||
$context = self::getContext(true);
|
||||
|
||||
if ($context instanceof DeserializationContext) {
|
||||
switch ($from) {
|
||||
case self::S_ARRAY:
|
||||
$deserialized = $serializer
|
||||
@ -78,6 +81,7 @@ class Serializer
|
||||
->deserialize($data, self::normalizeNamespace($entityType), $from, $context);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $deserialized instanceof ModelInterface ? $deserialized : new ErrorOnlyResponse();
|
||||
}
|
||||
@ -93,9 +97,9 @@ class Serializer
|
||||
$context = new DeserializationContext();
|
||||
} else {
|
||||
$context = new SerializationContext();
|
||||
}
|
||||
|
||||
$context->setSerializeNull(false);
|
||||
}
|
||||
|
||||
return $context;
|
||||
}
|
||||
@ -103,7 +107,7 @@ class Serializer
|
||||
/**
|
||||
* @param string $namespace
|
||||
*
|
||||
* @return bool|string
|
||||
* @return string
|
||||
*/
|
||||
private static function normalizeNamespace(string $namespace)
|
||||
{
|
||||
|
@ -14,6 +14,7 @@ use Symfony\Component\Dotenv\Dotenv;
|
||||
$dotenv = new Dotenv();
|
||||
|
||||
try {
|
||||
$dotenv->usePutenv(true);
|
||||
$dotenv->load(__DIR__ . '/../.env');
|
||||
} catch (Exception $exception) {
|
||||
echo "WARNING: Can't load .env file. Using default environment.";
|
||||
|
Loading…
Reference in New Issue
Block a user