Skip to content
Discussion options

You must be logged in to vote

@hantsy
https://github.com/hantsy/symfony-rest-sample/blob/15843a0c5b7a93b3d00a903045a434cd775ed636/src/Entity/Comment.php#L17
use Symfony\Component\Serializer\Annotation\Ignore;

doesn't exist anymore in 8.0
because they are not Annotations, but Attributes:

namespace Symfony\Component\Serializer\Attribute;
/**
* @author Kévin Dunglas <dunglas@gmail.com>
*/
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)]
class Ignore

in <= 7.4 there was a fallback from Annotation to Attributes that got removed with 8.0

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by hantsy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants