v2.2.1
Fixes a regression in 2.2.0, reported by @dennismetz in #431.
ttl and max_tokens_per_user from an environment variable
gesdinet_jwt_refresh_token:
ttl: '%env(int:JWT_REFRESH_TOKEN_LIFETIME_IN_SECONDS)%'failed to compile with:
Invalid configuration for path "gesdinet_jwt_refresh_token.ttl":
The "ttl" must be a positive number of seconds, and 0 is not.
An environment variable is a placeholder at compile time, and Symfony compiles the configuration a second time with a sample value of the declared type in its place, to check it would be accepted. For an integer that sample is 0, and the check added in 2.2.0 rejects anything below 1 — so it rejected every integer environment variable, whatever the variable held.
NumericNode skips min() and max() while it is handling a placeholder. A validate() closure is not skipped, which is why the built-in constraint is now used for both nodes. The validation itself is unchanged: 0 and negative values are still rejected when written literally.
2.1.0 is not affected — the ttl check did not exist before 2.2.0.
Only ttl and max_tokens_per_user were affected. default_invalid_batch_size already used min(), and cookie.same_site was fixed for the same underlying reason in 2.2.0.