diff --git a/src/Test/DoctrineMongoDbOdmTestCase.php b/src/Test/DoctrineMongoDbOdmTestCase.php index 6d63d70b87f..53198ecb9bc 100644 --- a/src/Test/DoctrineMongoDbOdmTestCase.php +++ b/src/Test/DoctrineMongoDbOdmTestCase.php @@ -30,8 +30,8 @@ public static function createTestDocumentManager($paths = []): DocumentManager { $config = new Configuration(); $config->setAutoGenerateProxyClasses(Configuration::AUTOGENERATE_FILE_NOT_EXISTS); - $config->setProxyDir(\sys_get_temp_dir()); - $config->setHydratorDir(\sys_get_temp_dir()); + $config->setProxyDir(sys_get_temp_dir()); + $config->setHydratorDir(sys_get_temp_dir()); $config->setProxyNamespace('SymfonyTests\Doctrine'); $config->setHydratorNamespace('SymfonyTests\Doctrine'); $config->setMetadataDriverImpl(new AttributeDriver($paths, new AttributeReader())); // @phpstan-ignore-line diff --git a/tests/Fixtures/TestBundle/Entity/DummyToUpgradeProduct.php b/tests/Fixtures/TestBundle/Entity/DummyToUpgradeProduct.php deleted file mode 100644 index cabc7a4352c..00000000000 --- a/tests/Fixtures/TestBundle/Entity/DummyToUpgradeProduct.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * 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\Tests\Fixtures\TestBundle\Entity; - -use ApiPlatform\Core\Annotation\ApiResource; -use Doctrine\Common\Collections\Collection; -use Doctrine\ORM\Mapping as ORM; - -/** - * @ORM\Entity - * - * @ApiResource - */ -class DummyToUpgradeProduct -{ - /** - * @var int - * - * @ORM\Id - * @ORM\GeneratedValue - * @ORM\Column(type="integer") - */ - private $id; - - /** - * @var Collection - * - * @ORM\OneToMany(mappedBy="dummyToUpgradeProduct", targetEntity=DummyToUpgradeWithOnlyAnnotation::class) - */ - private $dummysToUpgradeWithOnlyAnnotation; - - /** - * @var Collection - * - * @ORM\OneToMany(mappedBy="dummyToUpgradeProduct", targetEntity=DummyToUpgradeWithOnlyAttribute::class) - */ - private $dummysToUpgradeWithOnlyAttribute; -} diff --git a/tests/Fixtures/TestBundle/Entity/DummyToUpgradeWithOnlyAnnotation.php b/tests/Fixtures/TestBundle/Entity/DummyToUpgradeWithOnlyAnnotation.php deleted file mode 100644 index 576ca2a55f0..00000000000 --- a/tests/Fixtures/TestBundle/Entity/DummyToUpgradeWithOnlyAnnotation.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * 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\Tests\Fixtures\TestBundle\Entity; - -use ApiPlatform\Core\Annotation\ApiFilter; -use ApiPlatform\Core\Annotation\ApiProperty; -use ApiPlatform\Core\Annotation\ApiResource; -use ApiPlatform\Core\Annotation\ApiSubresource; -use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\DateFilter; -use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\ExistsFilter; -use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter; -use Doctrine\ORM\Mapping as ORM; -use Symfony\Component\Serializer\Annotation\Groups; - -/** - * @ORM\Entity - * - * @ApiResource - * - * @ApiFilter(SearchFilter::class, properties={"id"}) - */ -class DummyToUpgradeWithOnlyAnnotation -{ - /** - * @var int - * - * @ORM\Id - * @ORM\GeneratedValue - * @ORM\Column(type="integer") - * @Groups({"chicago", "friends"}) - * @ApiProperty(writable=false) - * @ApiFilter(DateFilter::class) - */ - private $id; - - /** - * @var DummyToUpgradeProduct - * - * @ORM\ManyToOne(targetEntity="DummyToUpgradeProduct", cascade={"persist"}, inversedBy="dummysToUpgradeWithOnlyAnnotation") - * @ORM\JoinColumn(nullable=false) - * @Groups({"barcelona", "chicago", "friends"}) - * - * @ApiSubresource - * - * @ApiProperty(iri="DummyToUpgradeWithOnlyAnnotation.dummyToUpgradeProduct") - * @ApiFilter(SearchFilter::class) - * @ApiFilter(ExistsFilter::class) - */ - private $dummyToUpgradeProduct; -} diff --git a/tests/Fixtures/TestBundle/Entity/DummyToUpgradeWithOnlyAttribute.php b/tests/Fixtures/TestBundle/Entity/DummyToUpgradeWithOnlyAttribute.php deleted file mode 100644 index f9a1fd1f592..00000000000 --- a/tests/Fixtures/TestBundle/Entity/DummyToUpgradeWithOnlyAttribute.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * 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\Tests\Fixtures\TestBundle\Entity; - -use ApiPlatform\Core\Annotation\ApiProperty; -use ApiPlatform\Core\Annotation\ApiResource; -use ApiPlatform\Core\Annotation\ApiSubresource; -use Doctrine\ORM\Mapping as ORM; -use Symfony\Component\Serializer\Annotation\Groups; - -/** - * @ORM\Entity - */ -#[ApiResource()] -class DummyToUpgradeWithOnlyAttribute -{ - /** - * @var int - * - * @ORM\Id - * @ORM\GeneratedValue - * @ORM\Column(type="integer") - */ - #[Groups(['chicago', 'friends'])] - #[ApiProperty(writable: false)] - private $id; - - /** - * @var DummyToUpgradeProduct - * - * @ORM\ManyToOne(targetEntity="DummyToUpgradeProduct", inversedBy="dummysToUpgradeWithOnlyAttribute") - * @ORM\JoinColumn(nullable=false) - */ - #[Groups(['barcelona', 'chicago', 'friends'])] - #[ApiSubresource] - #[ApiProperty(iri: 'DummyToUpgradeWithOnlyAttribute.dummyToUpgradeProduct')] - private $dummyToUpgradeProduct; -}