From ed16cb63ad4daf4c83073e29230eaa57d79df3ad Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 23 May 2018 09:44:39 +0200 Subject: [PATCH] Example with a PHP constant --- Resources/doc/definitions/type-system/enum.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Resources/doc/definitions/type-system/enum.md b/Resources/doc/definitions/type-system/enum.md index ae8f1986d..66d1d3172 100644 --- a/Resources/doc/definitions/type-system/enum.md +++ b/Resources/doc/definitions/type-system/enum.md @@ -17,7 +17,8 @@ Episode: # to deprecate a value, only set the deprecation reason #deprecationReason: "Just because" EMPIRE: - value: 5 + # We can use a PHP constant to avoid a magic number + value: '@=constant("App\\StarWars\\Movies::MOVIE_EMPIRE")' description: "Released in 1980." JEDI: 6 # using the short syntax (JEDI value equal to 6) FORCEAWAKENS: # in this case FORCEAWAKENS value = FORCEAWAKENS