Open
Description
When I attempt to extend class and set my own pattern, application crashes because:
- When trying to set string, setPattern declines the value because of invalid typehint.
- When I set the string value into array, application crashes further down as values in Finder::names should be string only. (they are later passed into preg_match function).
Invalid typehint:
JMSTranslationBundle/Translation/Extractor/FileExtractor.php
Lines 173 to 176 in c837dc6
Function call that expects string:
JMSTranslationBundle/Translation/Extractor/FileExtractor.php
Lines 201 to 203 in c837dc6
Function itself:
https://github.com/symfony/symfony/blob/9e82562948253bf547243aa1c4cf6ec734d608da/src/Symfony/Component/Finder/Finder.php#L150-L170
Solution:
- Change argument typehint to string
- Allow array, but iterate values on $finder::name call
Workaround:
Copy class but reimplement everything
Metadata
Metadata
Assignees
Labels
No labels