Closed tony2001 closed 3 years ago
Can confirm that this compiles on php 7.4, the function is available, it seems to write out to the stream, but it currently leads to a SIGSEGV.
Tried directly on a machine and not in docker this time and it also SIGSEGV's with the following command: php -r "meminfo_dump(fopen('/tmp/my_dump_file.json', 'w'));sleep(1);echo file_get_contents('/tmp/my_dump_file.json');"
Any idea how get it working on php 7.4, will it be difficult? We have been using this extension for discovering memory leaks in workers (great tool, big thanks to the makers!) and would like to continue using it on php 7.4.
Check out the latest version of this branch, plz. Let me know if you find any issues, I'll try to fix them ASAP.
Can confirm that building the extension into 7.4 Docker images now works again and the simple write check doesn't segfault anymore 👍
Just opened #103 to fix the failing test and also test PHP 7.4 on the CI
I can also confirm that it works mostly fine. I had an issue with FFI objects (see https://github.com/BitOne/php-meminfo/issues/104) and another issue with invalid JSON UTF-8 encoding that could be fixed with running the output through jq
.
Faced no issues when working with a quite big Symfony app and a functional test suite. Would be great to see this PR merged!
Got a compilation problem, replacing ulong
with zend_ulong
on line 180 fixed the issue.
Corrected and rebased version in my fork: https://github.com/vudaltsov/php-meminfo/tree/php74_support
In 7.4 the API was slightly changed, so meminfo now needs a small patch to support it.