Simon André
Simon André
> @smnandre the common use case is to use this `cycle` inside the body of a loop, using `loop.index` as position. The cycle function is not the one controlling the...
With `loop.` yep ! And i really like this DX :) Maybe this is something to highlight in the doc ? Or even deprecate the cycle function ?
## Usage / syntax examples | Langage | Code example | |------------------------------------------------------------------------------------------|-----------------------------------------------------------------| | [**PHP**](https://www.php.net/manual/en/function.assert.php) | `assert(in_array($size, ['sm', 'md']));` | | [**Python**](https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement) | `assert size in ['sm', 'md']` | | [**Java**](https://docs.oracle.com/javase/8/docs/technotes/guides/language/assert.html)...
> Now that we have the `types` tag, can we close this one? In the end, i think this "assert" would be more related to assertions / tests than strict...
Only handled in the Escaper would lead to many frustrations/incomprehensions and a weird DX, as it won't work for filters for instance... and that would require a lot of code...
We probably could do something like this to remove the definiton / disable the package in those scenarios.. https://github.com/symfony/symfony/blob/7.2/src/Symfony/Component/Translation/DependencyInjection/DataCollectorTranslatorPass.php But you won't be able to use UX Translator at all...
If you're ok with the "disable" thing, would you try writing a PR about this ?
> In this case, I verify whether the translator is a subclass of the TranslatorBag, as that is actually the element that is required. Yes, this is what i had...
`withEach` ? Or maybe even `eachWith` ?
Maybe then it would be better to use the same signature as `array_map` (the variadic values) ? ```php * * @return self */ function map(callable $callback, array... $arguments): self ```...