Skip to content

Commit c798015

Browse files
committed
Small build fixes
1 parent c145919 commit c798015

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
[![Code coverage](https://badgen.net/coveralls/c/github/FastyBird/json-api?cache=300&style=flast-square)](https://coveralls.io/r/FastyBird/json-api)
66

77
![PHP](https://badgen.net/packagist/php/FastyBird/json-api?cache=300&style=flast-square)
8-
[![Downloads total](https://badgen.net/packagist/dt/FastyBird/json-api?cache=300&style=flast-square)](https://packagist.org/packages/FastyBird/json-api)
98
[![Latest stable](https://badgen.net/packagist/v/FastyBird/json-api/latest?cache=300&style=flast-square)](https://packagist.org/packages/FastyBird/json-api)
9+
[![Downloads total](https://badgen.net/packagist/dt/FastyBird/json-api?cache=300&style=flast-square)](https://packagist.org/packages/FastyBird/json-api)
1010
[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat-square)](https://github.com/phpstan/phpstan)
1111

1212
## What is FastyBird {JSON:API} library?

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"consistence-community/consistence": "^2.1",
3838
"contributte/translation": "^0.8",
3939
"doctrine/orm": "^2.6",
40-
"fastybird/web-server": "^0.2",
40+
"fastybird/web-server": "^0.3",
4141
"ipub/json-api-document": "^0.2",
4242
"neomerx/json-api": "^4.0",
4343
"nette/bootstrap": "^3.1",

src/Hydrators/Hydrator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ protected function mapEntity(string $entityClassName): array
334334
$className = $mapping->targetEntity;
335335

336336
// Check if class is callable
337-
if (class_exists($className)) {
337+
if (is_string($className) && class_exists($className)) {
338338
$fields[] = new Hydrators\Fields\SingleEntityField($className, false, $mappedKey, $isRelationship, $fieldName, $isRequired, $isWritable);
339339
}
340340
} elseif (in_array(ORM\Mapping\OneToMany::class, $propertyAnnotations, true)) {
@@ -361,7 +361,7 @@ protected function mapEntity(string $entityClassName): array
361361
$className = $mapping->targetEntity;
362362

363363
// Check if class is callable
364-
if (class_exists($className)) {
364+
if (is_string($className) && class_exists($className)) {
365365
$fields[] = new Hydrators\Fields\SingleEntityField($className, false, $mappedKey, $isRelationship, $fieldName, $isRequired, $isWritable);
366366
}
367367
} else {

tests/common.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ contributteTranslation:
2727
dirs: []
2828

2929
contributteConsole:
30-
name: FastyBird:WebServer!
30+
name: FastyBird:JsonApi!
3131
version: '1.0'
3232
catchExceptions: true
3333
autoExit: true

0 commit comments

Comments
 (0)