Documenting APCu support
Opened this issue · 1 comments
Hi, I maintain the PHP ports in MacPorts and I just discovered that the zstd extension will check for the presence of the APCu extension at build time:
Lines 105 to 112 in 0bf5825
Now I have to decide how I should handle this in MacPorts and I didn't find any documentation about what the zstd extension does with APCu so I wanted to ask here if you could answer some questions or maybe document it.
What does the zstd extension do if it finds APCu at build time? How does it use it?
If the zstd extension finds APCu at build time, does it require it to be present at runtime? This would dictate whether I give the php-zstd port a dependency on the php-APCu port that is only needed at build time or also at runtime.
When the APCu code was first added to the zstd extension in 45c876a, the check for APCu in config.m4 was unconditional but all the uses of APCu-related code were guarded by PHP_MAJOR_VERSION >= 7. At that time the zstd extension still supported PHP 5. I believe the last version of the zstd extension that supported PHP 5 was 0.11.1 and the last version of APCu to do so was 4.0.11. If I have that version of APCu installed while building that version of the zstd extension with PHP 5, am I correct in assuming that it will find APCu at configure time but will do nothing with it at build time and that therefore no APCu dependency of any kind should be added for the PHP 5 case?
Thanks.
What does the zstd extension do if it finds APCu at build time? How does it use it?
zstd may be used as an APCu optional serializer (sic... not really a serializer)
At buildtime it will use the code from the header (inline function)
At runtime, it APCu is present, it will register the serializer