Open aroly opened 5 years ago
It never occurred to me that the approach the current implementation takes - as in takeing the FQCN and basically mapping it 1:1 to a filename - might run over 255 chars. But of course that could easily happen and thus needs fixing.
The following solutions come to mind:
Merely cutting of after x
chars
This not really an option, given that that would eventually lead to collisions,
which in turn would be leading to duplicates and I'd be overwriting files.
Simply counting Also not nice since the code would need to keep track of used numbers and the name cannot be (easily) recreated.
Cut of after say 240 chars and append a short SHA
-hash
The assumption here is that using a shortened hash would be unique enough given we're talking about class names. The content of the class cannot be used for this as that would lead to changing hashes and thus changing filenames for the same class.
Unless somebody comes up with a better solution, I'll consider using the SHA-Approach.
Hi there,
I'm trying to generate doc for a PHP framework, and I'm facing the following issue:
The filename generated is indeed too long for my Linux system, the max size is 255. I know that such long names are unusual, but you may want to have a look.
By the way, is there a way to somehow limit the filename length ? Or to trim a part, or anything ? I'd like to be able to generate this doc...
Regards,
A