Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"php": "^7.4|^8.0",
"ext-json": "*",
"doctrine/doctrine-bundle": "^2.4",
"meilisearch/meilisearch-php": "^0.27.0",
"meilisearch/meilisearch-php": "^1.0.0",
"symfony/filesystem": "^4.4 || ^5.0 || ^6.0",
"symfony/property-access": "^4.4 || ^5.0 || ^6.0",
"symfony/serializer": "^4.4 || ^5.0 || ^6.0"
Expand Down
7 changes: 7 additions & 0 deletions tests/Entity/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,25 @@

/**
* @ORM\Entity
*
* @ORM\Table(name="comments")
*/
class Comment
{
/**
* @ORM\Id
*
* @ORM\GeneratedValue
*
* @ORM\Column(type="integer", nullable=true)
*
* @Groups({"searchable"})
*/
private ?int $id = null;

/**
* @ORM\ManyToOne(targetEntity="Post", inversedBy="comments")
*
* @ORM\JoinColumn(nullable=false)
*/
private ?Post $post = null;
Expand All @@ -36,6 +41,7 @@ class Comment
* max=10000,
* maxMessage="comment.too_long"
* )
*
* @Groups({"searchable"})
*/
private $content;
Expand All @@ -44,6 +50,7 @@ class Comment
* @var \DateTime
*
* @ORM\Column(type="datetime")
*
* @Groups({"searchable"})
*/
private $publishedAt;
Expand Down
2 changes: 2 additions & 0 deletions tests/Entity/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class Image
{
/**
* @ORM\Id
*
* @ORM\GeneratedValue
*
* @ORM\Column(type="integer")
*/
private ?int $id;
Expand Down
1 change: 1 addition & 0 deletions tests/Entity/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Link implements NormalizableInterface
{
/**
* @ORM\Id
*
* @ORM\Column(type="integer")
*/
private int $id;
Expand Down
5 changes: 5 additions & 0 deletions tests/Entity/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,30 @@

/**
* @ORM\Entity
*
* @ORM\Table(name="pages")
*/
class Page
{
/**
* @ORM\Id
*
* @ORM\GeneratedValue(strategy="NONE")
*
* @ORM\Column(type="object")
*/
private $id = null;

/**
* @ORM\Column(type="string", nullable=true)
*
* @Groups({"searchable"})
*/
private ?string $title = null;

/**
* @ORM\Column(type="text", nullable=true)
*
* @Groups({"searchable"})
*/
private ?string $content = null;
Expand Down
9 changes: 9 additions & 0 deletions tests/Entity/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,41 @@

/**
* @ORM\Entity
*
* @ORM\Table(name="posts")
*/
class Post
{
/**
* @ORM\Id
*
* @ORM\GeneratedValue
*
* @ORM\Column(type="integer")
*
* @Groups({"searchable"})
* ^ Note that Groups work on private properties
*/
private ?int $id = null;

/**
* @ORM\Column(type="string", nullable=true)
*
* @Groups({"searchable"})
* ^ Note that Groups work on private properties
*/
private ?string $title = null;

/**
* @ORM\Column(type="text", nullable=true)
*
* @Groups({"searchable"})
*/
private ?string $content = null;

/**
* @ORM\Column(type="datetime")
*
* @Groups({"searchable"})
*/
private ?\DateTime $publishedAt = null;
Expand All @@ -51,7 +58,9 @@ class Post
* mappedBy="post",
* orphanRemoval=true
* )
*
* @ORM\OrderBy({"publishedAt": "DESC"})
*
* @Groups({"searchable"})
*/
private $comments;
Expand Down
1 change: 1 addition & 0 deletions tests/Entity/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class Tag implements NormalizableInterface
{
/**
* @ORM\Id
*
* @ORM\Column(type="integer", nullable=true)
*/
private ?int $id;
Expand Down