Some recent change of the xparse package or of the LaTeX3 fundament seems to yield some changed behaviour regarding parameter processing. In some situations, at least one character is gobbled where it should not.
The following MWE shows a rather harmless situation, but my real problem is that an enironment based on xparse with verbatim text removes the first character of this text, see https://github.com/T-F-S/tcolorbox/issues/43
The MWE constructs an environment myenv with one optional argument. If this argument is not used, the whitespace is gobbled. Used in a more complicated scenario, as mentioned above, crucial stuff can be gobbled.
There is a second environment myENV without arguments to show the expected behaviour.
\documentclass{article}
\usepackage{xparse}
\NewDocumentEnvironment{myenv}{ O{} }{Alpha}{Omega}
\NewDocumentEnvironment{myENV}{}{Alpha}{Omega}
\begin{document}
\begin{myenv}[parameter]
Test
\end{myenv}
\begin{myenv}[]
Test
\end{myenv}
\begin{myenv}
Test
\end{myenv}
\begin{myENV}
Test
\end{myENV}
\end{document}
If this code is compiled against an installation of xparse (2018/02/21), the output is as expected:
But, if this code is compiled against an installation of xparse (2018/04/30) or xparse (2018/05/12), the output is:
I consider this to be a bug. But, if this is a feature, how can I get rid of it? Is there a way to have the old behaviour back with clean or dirty tricks which could help to solve my real problem (see above)?


!O{}as optional argument works. – Ulrike Fischer Jun 04 '18 at 14:57!gives back the old behaviour. Unfortunately, a lot of documents have to be changed now... – Thomas F. Sturm Jun 04 '18 at 15:02\begin{}else it would not be recognized as optional argument. The new behaviour by default relaxes this. But from far away it looks strange to make default the behaviour which will cause[]with a space before, which was not recognized as optional argument so far, be now recognized as optional argument. – Jun 04 '18 at 15:13\ignorespacesat the start ... in any case, we know we need to adjust a few things here – Joseph Wright Jun 04 '18 at 15:15xparse (2019-05-28), so I assume the bug is fixed and will vote to close this question. – schtandard Jul 24 '19 at 15:08