Is `blacklist` setting supposed to act as a pattern ?
Hello,
Working on my project https://github.com/llaville/php-compatinfo-db that use Doctrine, I've recently found a possible bug.
I wanted to have control on files/dirs included, so I've removed the force-autodiscovery setting (https://github.com/llaville/php-compatinfo-db/blob/6.12/box.json#L3), and replace it by :
{
"blacklist": [
"tests",
"Test",
"dist",
"doc",
"vendor-bin"
],
"directories": [
"bin",
"src",
"config",
"data",
"vendor"
],
"directories-bin": [
"resources"
],
"files": [
"autoload.php"
]
}
But with blacklist/doc it also excluded to add my vendor/doctrine folder with contains Doctrine DBAL and ORM dependencies.
So the question is : Is blacklist setting supposed to act as a pattern ? or is it a bug ?
If it's not a bug, the BOX documentation should explains it
According to this test it is: https://github.com/box-project/box/blob/main/tests/Configuration/ConfigurationFileTest.php#L39
I'm not sure having a cursory look at the code though.
So it should be clarified in the docs.
@theofidry I don't think the test match my context. I've added doc in blacklist setting (my goal is to avoid documentation folder to be included), but it excludes also part of directory that have the same entry.
doc exclude the vendor/doctrine folder
Ah ok I did not get that. Yes indeed it's 100% a bug then, possibly one that's always been there 😅
As a fallback: maybe using finders would be simpler in your case?
Alternative (I've adopted)
I've removed doc entry from blacklist, and I won't lost doctrine dependencies when I compile the PHAR with Box 4.6.2