Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: null iterable field should be resolved directly
- Loading branch information
1 parent
ff248ae
commit bc1b959
Showing
7 changed files
with
141 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the API Platform project. | ||
* | ||
* (c) Kévin Dunglas <dunglas@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ApiPlatform\Core\Tests\Fixtures\TestBundle\Document; | ||
|
||
use ApiPlatform\Core\Annotation\ApiResource; | ||
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM; | ||
|
||
/** | ||
* @ApiResource | ||
* @ODM\Document | ||
*/ | ||
class WithJsonDummy | ||
{ | ||
/** | ||
* @var int | ||
* | ||
* @ODM\Id(strategy="INCREMENT", type="int", nullable=true) | ||
*/ | ||
private $id; | ||
|
||
/** | ||
* @var ?array | ||
* | ||
* @ODM\Field(type="hash", nullable=true) | ||
*/ | ||
public $json; | ||
|
||
public function getId(): int | ||
{ | ||
return $this->id; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the API Platform project. | ||
* | ||
* (c) Kévin Dunglas <dunglas@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity; | ||
|
||
use ApiPlatform\Core\Annotation\ApiResource; | ||
use Doctrine\ORM\Mapping as ORM; | ||
|
||
/** | ||
* @ApiResource | ||
* @ORM\Entity | ||
*/ | ||
class WithJsonDummy | ||
{ | ||
/** | ||
* @var int | ||
* | ||
* @ORM\Column(type="integer", nullable=true) | ||
* @ORM\Id | ||
* @ORM\GeneratedValue(strategy="AUTO") | ||
*/ | ||
private $id; | ||
|
||
/** | ||
* @var ?array | ||
* | ||
* @ORM\Column(type="json", nullable=true) | ||
*/ | ||
public $json; | ||
|
||
public function getId(): int | ||
{ | ||
return $this->id; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters