Breaking: #105733 - FileNameValidator no longer accepts custom regex in __construct()
See forge#105733
Description
The class
File no
longer accepts a custom file deny pattern in
__. The service
is now stateless and can be injected without side effects.
Impact
A custom partial regex passed as the first constructor argument when
instantiating the service is now ignored. The service relies on
$GLOBALS configuration and a
hard-coded constant as a fallback.
Affected installations
Instances with custom extensions using
General
are affected. This is expected to be a very rare case.
Migration
Extensions that need to be tested with custom patterns that cannot be declared
globally using
$GLOBALS
should implement their own service for this purpose or inline the necessary
code. The core implementation performing the check is only a few lines long.