perftools / xhgui

Web interface for XHProf profiling data can store data in MongoDB or PDO database
1.65k stars 342 forks source link

PHP 8.1 Support #434

Closed ahmeteminkocal closed 2 years ago

ahmeteminkocal commented 2 years ago

Are there any news about PHP 8.1 support?

markstory commented 2 years ago

Do the xhprof extensions support PHP8.1 yet? They have historically lagged behind new PHP for a few months.

glensc commented 2 years ago

depends on 7.4 support first. see pinned issue:

glensc commented 2 years ago

also, to profile an application, you don't need to run xhprof with latest and greatest, use provided docker image and you'll be fine.

what you need is the collector to be compatible:

glensc commented 2 years ago

Is anyone willing to update README.md, so people don't install xhgui with their application but use the profiler library?

The docs are there, apparently nobody reads that bottom of the page:

luzip665 commented 2 years ago

I would like to understand. Where is the advantage of running xhgui on a separate machine?

For me and my very personal workflow it is easier to have it in the same docker container because I'm dealing with many containers.

glensc commented 2 years ago

container, not the machine. but nevertheless, it's isolation and able to use docker image that this project provides. that is a tested combination that can be supported. the basic principle of containerization is isolation, not putting everything into single container. pet vs cattle based deployment. if you put everything in one place it's not much different from the pet deployment. and maintaining such pet deployment also difficult as updating one component could break the other component, which is why you are even here, wanting newer php runtime support. the project provided docker image running with 7.3 you need nothing else, just start the container.

the collector is written on purpose with minimal dependencies to be most portable.

luzip665 commented 2 years ago

From this point of view I agree with you totally.

My target is not the cloud. We want to provide one single image containing all tools external developers need to develop. We don't use xhgui or any collector in production.

And, why I am here, PHP7.3 reached end of life in december and we must upgrade.

glensc commented 2 years ago

But back to the issue, does 0.20.x branch work for PHP 8.0 and 8.1? can this be closed once I cut the release?

luzip665 commented 2 years ago

Tomorrow I will deploy 0.20 in our containers for testing. But as far as I see it works at least for PHP8. I can test PHP8.1 also tomorrow.

OT: Is is easily possible to upgrade PHPUnit?

glensc commented 2 years ago

And speaking of developer experience, you can provide example docker-compose config where MySQL, MongoDB, xhgui, whatever are provided as containers. the project provided docker compose does already that a xhgui container and using official MongoDB container.

luzip665 commented 2 years ago

AT: GUI runs here with PHP8 and PHP8.1 Test not running because of the outdated version of PHPUnit

glensc commented 2 years ago

Test not running because of the outdated version of PHPUnit

(next time) accompany your claims with errors! (read: show the error!) to avoid such long feedback loops: a: there's error b: show the error! a: the error is: "...."

newer PHPUnit fails and I can't figure out how to resolve this one:

luzip665 commented 2 years ago

Sorry, you are to fast for me. While I'm investigating the error in phpunit you're just upgrading the version. I was just busy with reading.... ;-)

glensc commented 2 years ago

Since you (still) didn't show the error, I have no opinion, but the error I pointed to is still there unresolved. neither have you given any versions you tested with.

glensc commented 2 years ago

https://github.com/perftools/xhgui/pull/457 is merged. should 8.1 be added to readme now as known to work?

luzip665 commented 2 years ago

Just for completeness the error:

There was 1 error:

1) XHGui\Test\Saver\MongoTest::testSave
ParseError: syntax error, unexpected token "??", expecting variable

/var/www/xhgui/tests/Saver/MongoTest.php:19

Test running using PHPUnit 6.5 on PHP8.0. Does not occur using PHPUnit8.5.

glensc commented 2 years ago

phpunit 6.5 no longer supported. phpunit 8.5 is used by the project now

glensc commented 2 years ago

documentation updated (0be12135, 5956e70f), closing

glensc commented 2 years ago

Is anyone willing to update README.md, so people don't install xhgui with their application but use the profiler library?

The docs are there, apparently, nobody reads that bottom of the page:

since nobody took action, here's my pr: