Closed
Description
Symfony version(s) affected: >=4.4.12
Description
I'm trying to exclude a directory and its content. I have a configuration similar to the one described in #37560. I'm trying to keep all the content in /example/test/
.
/example/**
!/example/example.txt
!/example/packages
!/example/packages/example.yaml
!/example/test/
This configuration will only retain the /example/test
directory, but not its content. If I try a .gitignore
like the one below, PCRE breaks completely:
/example/**
!/example/example.txt
!/example/packages
!/example/packages/example.yaml
!/example/test*
PCRE doesn't handle lookbehind that don't have a fixed length. So the above .gitignore
file will cause preg_match(): Compilation failed: lookbehind assertion is not fixed length
warnings. This, in turn, causes the whole .gitignore
regex to not work and none of the rules get enforced.