From a084e3e944d37a6cde6193e53292f3a6818db775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Thu, 5 Mar 2026 11:17:38 +0100 Subject: [PATCH 1/2] chore(tests-application): Use custom metatags --- assets/images/favicon.ico | Bin 0 -> 32038 bytes config/reference.php | 93 ++++++++++++----------- config/sylius/twig_hooks/common/base.php | 8 ++ templates/base/favicon.html.twig | 1 + templates/base/seo_metatags.html.twig | 1 + 5 files changed, 58 insertions(+), 45 deletions(-) create mode 100644 assets/images/favicon.ico create mode 100644 templates/base/favicon.html.twig create mode 100644 templates/base/seo_metatags.html.twig diff --git a/assets/images/favicon.ico b/assets/images/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..592f7a8e45d5ef6fe2a3c0426b5276e463480ba5 GIT binary patch literal 32038 zcmeHQ4NO#5+NN=dA;z$#F^w_CnoZLsP17~T#Xl;F2&jmH2&jNc5hrj3LAj!gs&t%y8h&WqvL*7f{zp z4)@%9&(C|_bMAZI^S;kHI5@oL@H>a!|K0(=4;>Ev&cR_LiG66eFU9i;Jp0q1M(;mz zaM(HD!NJ|#aR0~k4i5jf%E94}xFtn=i142NFVY|%_s1~Id)y#t`KwdG&99urH=>+# z8zP)V^?RLjYQvl_)rZgFrsdveR0cX9m#)4WFIhPpFIh1ben9+e?fNHI+JYBw^RVwv z$lN49NL(3iI4)hmWHxVPa+I4(*y-8vlO^lIx%tRF$$R#iJCmjKB4H#?9pJ~#N8+dD z-XDYJmo)#0(p5}K_1cm14I8_1+x!n@DZPhA^D~#*wjE;U&#c_xlqg%H>Y*8O4jwIBRhZLjaaALh67Ft-CvemR&6_6*bz3L zzAx79bIw-!JTv6?etD%m_#^s`&sC(_8b|9!*-?D*&@{ze`<${{H$5WxL3f?;aJF1?zbuz`L-`v?sX(Vy86}eVs==C`|%K8 zyz&(d39?nMvTpj8)#&2Q_A%eOA-mmB?f{j6e6GnAZp_6NuMu%u&~Co~N8G?`BJNao=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-tVyeB|XILYp z%NhG+tvOnz`+4*I#6LjS1wPcez61T4oKxpA-84>ReZ`#-M{-(ytoA+5=z9uWY~WPV zGTmikAJhlX+pXI-TD+Npj$pyp^wZs5ZhhFp#>>7TZVzf~{`ul!ZvHp|UANU!2`2@9P*+a9Cd8>NA^8{wgtbHR# zwS}zdUkf~wknJXA#mC3b!oC*lKQ*uCld*yQ3~$Yvp3TEjUCc5|_6_JlJvF!gzKos6 zS{(aAXW#yHO|j2E7a~j#5d1Oro;ZpqghzPnd*OX78vmx z;{PY4@}W_xjSPUC(B`!TO5cPzvix@JBAj_(@@yyK6Q+AfPsr9j6xHvuFz?A{VNY)y zupRin9f9|-Cw46#e$8~6J9p%>u@5;O`vRY``=5+^f`4H77MXLEez^?%DqNbC4=*kd zw+E-d_BVtz(=co%Z=7z3eb9lJ`&D$WB*6p_i~zg+z>q$}o&ZmF`>T5Xz8tnuDZw=m z{$VWT_CF~y=`&~NdmZCAhyByMwgAz^n?A#d@>ND{r+hfA@XjS;hS0C*{?ZTgqKb|i z_=b9jpWtHU1v# zgI)*htODm>P8bL0>wWIR?qh`gz?w0a=sSG*{3fI$n5tC8=7hwOwR-G0!Fh7=?PTmj z-gnjgc=C-N_m=ttd&z@R%e}QkCUWsJIFDcen3-@(`QL_j*o%(!!M1$-Urr-E3G-ft z(gIfKZD>1f1J-`?^4oVG10Nobj(ausvjZ!|AD{X*qy_eKJ7j&W?AC$Mx1l|@v;k)U dEVL!xyFC9{-^#oGwy(dr=K;LC|IgyU{{uV>Qo;ZL literal 0 HcmV?d00001 diff --git a/config/reference.php b/config/reference.php index b0452a24..28286634 100644 --- a/config/reference.php +++ b/config/reference.php @@ -208,29 +208,29 @@ * initial_marking?: list, * events_to_dispatch?: list|null, * places?: list, + * name?: scalar|Param|null, + * metadata?: array, * }>, - * transitions: list, * to?: list, * weight?: int|Param, // Default: 1 - * metadata?: list, + * metadata?: array, * }>, - * metadata?: list, + * metadata?: array, * }>, * }, * router?: bool|array{ // Router configuration * enabled?: bool|Param, // Default: false - * resource: scalar|Param|null, + * resource?: scalar|Param|null, * type?: scalar|Param|null, * default_uri?: scalar|Param|null, // The default URI used to generate URLs in a non-HTTP context. // Default: null * http_port?: scalar|Param|null, // Default: 80 @@ -353,10 +353,10 @@ * mapping?: array{ * paths?: list, * }, - * default_context?: list, + * default_context?: array, * named_serializers?: array, + * default_context?: array, * include_built_in_normalizers?: bool|Param, // Whether to include the built-in normalizers // Default: true * include_built_in_encoders?: bool|Param, // Whether to include the built-in encoders // Default: true * }>, @@ -420,7 +420,7 @@ * }, * messenger?: bool|array{ // Messenger configuration * enabled?: bool|Param, // Default: false - * routing?: array, * }>, * serializer?: array{ @@ -433,7 +433,7 @@ * transports?: array, + * options?: array, * failure_transport?: scalar|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null * retry_strategy?: string|array{ * service?: scalar|Param|null, // Service id to override the retry strategy entirely. // Default: null @@ -455,7 +455,7 @@ * allow_no_senders?: bool|Param, // Default: true * }, * middleware?: list, * }>, * }>, @@ -627,7 +627,7 @@ * lock_factory?: scalar|Param|null, // The service ID of the lock factory used by this limiter (or null to disable locking). // Default: "auto" * cache_pool?: scalar|Param|null, // The cache pool to use for storing the current limiter state. // Default: "cache.rate_limiter" * storage_service?: scalar|Param|null, // The service ID of a custom storage implementation, this precedes any configured "cache_pool". // Default: null - * policy: "fixed_window"|"token_bucket"|"sliding_window"|"compound"|"no_limit"|Param, // The algorithm to be used by this limiter. + * policy?: "fixed_window"|"token_bucket"|"sliding_window"|"compound"|"no_limit"|Param, // The algorithm to be used by this limiter. * limiters?: list, * limit?: int|Param, // The maximum allowed hits in a fixed interval or burst. * interval?: scalar|Param|null, // Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent). @@ -672,7 +672,7 @@ * enabled?: bool|Param, // Default: false * message_bus?: scalar|Param|null, // The message bus to use. // Default: "messenger.default_bus" * routing?: array, * }, @@ -776,7 +776,7 @@ * dbal?: array{ * default_connection?: scalar|Param|null, * types?: array, * driver_schemes?: array, * connections?: array, * }, * filters?: array, * }>, @@ -970,8 +970,8 @@ * options?: mixed, // Deprecated: The "options" node at "sylius_resource.resources..options" is deprecated and will be removed in 2.0. * templates?: scalar|Param|null, * state_machine_component?: scalar|Param|null, // Default: null - * classes: array{ - * model: scalar|Param|null, + * classes?: array{ + * model?: scalar|Param|null, * interface?: scalar|Param|null, * controller?: scalar|Param|null, // Default: "Sylius\\Bundle\\ResourceBundle\\Controller\\ResourceController" * repository?: scalar|Param|null, @@ -980,8 +980,8 @@ * }, * translation?: array{ * options?: mixed, // Deprecated: The "options" node at "sylius_resource.resources..translation.options" is deprecated and will be removed in 2.0. - * classes: array{ - * model: scalar|Param|null, + * classes?: array{ + * model?: scalar|Param|null, * interface?: scalar|Param|null, * controller?: scalar|Param|null, // Default: "Sylius\\Bundle\\ResourceBundle\\Controller\\ResourceController" * repository?: scalar|Param|null, @@ -1086,7 +1086,7 @@ * sorting?: array, * limits?: list, * fields?: array, * }>, * filters?: array, * actions?: array, * }, @@ -1190,7 +1190,7 @@ * providers?: list, * }, * entity?: array{ - * class: scalar|Param|null, // The full entity class name of your user class. + * class?: scalar|Param|null, // The full entity class name of your user class. * property?: scalar|Param|null, // Default: null * manager_name?: scalar|Param|null, // Default: null * }, @@ -1201,8 +1201,8 @@ * }>, * }, * ldap?: array{ - * service: scalar|Param|null, - * base_dn: scalar|Param|null, + * service?: scalar|Param|null, + * base_dn?: scalar|Param|null, * search_dn?: scalar|Param|null, // Default: null * search_password?: scalar|Param|null, // Default: null * extra_fields?: list, @@ -1213,7 +1213,7 @@ * password_attribute?: scalar|Param|null, // Default: null * }, * }>, - * firewalls: array, @@ -1271,9 +1271,9 @@ * user?: scalar|Param|null, // Default: "REMOTE_USER" * }, * login_link?: array{ - * check_route: scalar|Param|null, // Route that will validate the login link - e.g. "app_login_link_verify". + * check_route?: scalar|Param|null, // Route that will validate the login link - e.g. "app_login_link_verify". * check_post_only?: scalar|Param|null, // If true, only HTTP POST requests to "check_route" will be handled by the authenticator. // Default: false - * signature_properties: list, + * signature_properties?: list, * lifetime?: int|Param, // The lifetime of the login link in seconds. // Default: 600 * max_uses?: int|Param, // Max number of times a login link can be used - null means unlimited within lifetime. // Default: null * used_link_cache?: scalar|Param|null, // Cache service id used to expired links of max_uses is set. @@ -1375,13 +1375,13 @@ * failure_handler?: scalar|Param|null, * realm?: scalar|Param|null, // Default: null * token_extractors?: list, - * token_handler: string|array{ + * token_handler?: string|array{ * id?: scalar|Param|null, * oidc_user_info?: string|array{ - * base_uri: scalar|Param|null, // Base URI of the userinfo endpoint on the OIDC server, or the OIDC server URI to use the discovery (require "discovery" to be configured). + * base_uri?: scalar|Param|null, // Base URI of the userinfo endpoint on the OIDC server, or the OIDC server URI to use the discovery (require "discovery" to be configured). * discovery?: array{ // Enable the OIDC discovery. * cache?: array{ - * id: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration. + * id?: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration. * }, * }, * claim?: scalar|Param|null, // Claim which contains the user identifier (e.g. sub, email, etc.). // Default: "sub" @@ -1389,25 +1389,25 @@ * }, * oidc?: array{ * discovery?: array{ // Enable the OIDC discovery. - * base_uri: list, + * base_uri?: list, * cache?: array{ - * id: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration. + * id?: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration. * }, * }, * claim?: scalar|Param|null, // Claim which contains the user identifier (e.g.: sub, email..). // Default: "sub" - * audience: scalar|Param|null, // Audience set in the token, for validation purpose. - * issuers: list, - * algorithms: list, + * audience?: scalar|Param|null, // Audience set in the token, for validation purpose. + * issuers?: list, + * algorithms?: list, * keyset?: scalar|Param|null, // JSON-encoded JWKSet used to sign the token (must contain a list of valid public keys). * encryption?: bool|array{ * enabled?: bool|Param, // Default: false * enforce?: bool|Param, // When enabled, the token shall be encrypted. // Default: false - * algorithms: list, - * keyset: scalar|Param|null, // JSON-encoded JWKSet used to decrypt the token (must contain a list of valid private keys). + * algorithms?: list, + * keyset?: scalar|Param|null, // JSON-encoded JWKSet used to decrypt the token (must contain a list of valid private keys). * }, * }, * cas?: array{ - * validation_url: scalar|Param|null, // CAS server validation URL + * validation_url?: scalar|Param|null, // CAS server validation URL * prefix?: scalar|Param|null, // CAS prefix // Default: "cas" * http_client?: scalar|Param|null, // HTTP Client service // Default: null * }, @@ -1597,7 +1597,10 @@ final class App */ public static function config(array $config): array { - return AppReference::config($config); + /** @var ConfigType $config */ + $config = AppReference::config($config); + + return $config; } } diff --git a/config/sylius/twig_hooks/common/base.php b/config/sylius/twig_hooks/common/base.php index 801ae11f..1f2ac439 100644 --- a/config/sylius/twig_hooks/common/base.php +++ b/config/sylius/twig_hooks/common/base.php @@ -22,6 +22,14 @@ 'template' => 'base/javascripts/app.html.twig', ], ], + 'sylius_admin.base#metatags' => [ + 'favicon' => [ + 'template' => 'base/favicon.html.twig', + ], + 'seo_metatags' => [ + 'template' => 'base/seo_metatags.html.twig', + ], + ], ], ]); }; diff --git a/templates/base/favicon.html.twig b/templates/base/favicon.html.twig new file mode 100644 index 00000000..319e9257 --- /dev/null +++ b/templates/base/favicon.html.twig @@ -0,0 +1 @@ + diff --git a/templates/base/seo_metatags.html.twig b/templates/base/seo_metatags.html.twig new file mode 100644 index 00000000..9406ee4e --- /dev/null +++ b/templates/base/seo_metatags.html.twig @@ -0,0 +1 @@ + From a3a78629e3d162c3ef3e197c07ca3b3596cc7f8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Thu, 5 Mar 2026 11:22:57 +0100 Subject: [PATCH 2/2] Upgrade the documentation with example of metatags --- docs/cookbook/admin_panel/metatags.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/cookbook/admin_panel/metatags.md b/docs/cookbook/admin_panel/metatags.md index c5daba1c..efbc85ce 100644 --- a/docs/cookbook/admin_panel/metatags.md +++ b/docs/cookbook/admin_panel/metatags.md @@ -49,3 +49,15 @@ return static function (ContainerConfigurator $containerConfigurator): void { {% endcode %} {% endtab %} {% endtabs %} + +{% code title="templates/favicon.html.twig" %} +```twig + +``` +{% endcode %} + +{% code title="templates/seo_metatags.html.twig" %} +```twig + +``` +{% endcode %}