-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix PHP Deprecated: Calling get_class() without arguments #135
Conversation
Test failures unrelated. Tests on PHP 5.4 and 5.5 also fail in master. |
@ashnazg Can you advise what needs to be done about the failing tests? |
@mpdude , The test failures are part of me trying to figure out why Github's Ubuntu images for older PHP5 seem to behave differently than the Travis-CI images do, particularly around XML stuff. I've blown two weekends fighting these test failures only to discover in each case (so far) that they boil down to different error message wordings from XML activity. I've been hesitant to merge/release anything until I know these builds are good, since I cannot rely on Travis builds any longer since they dropped free builds for open source projects... $69/month out of my own pocket back in December did not prove to be worth it to me, since it only covered one build instance, and every code push ran 9 builds, each of which usually took 3min or more... thus one commit always took over 30min to fully build. You're welcome to have a look at the failing tests on the 5.4/5.5 builds to see if you can make any headway with them. Since I don't have an available local env to step-debug with, it's been a very slow slog leveraging the Github builds and printed outputs. |
Ok, so it’s not flaky tests. I’ll see if I can fork the repo, enable actions and investigate. |
XML error messages probably come directly from libxml. I don’t know if that’s linked statically (baked into PHP) or dynamically linked. In the latter case, the version of libxml installed on the Linux system might be relevant. |
@mpdude right, my hunch is that one of them (either Travis or Github) uses a base Ubuntu, and the second might use an Ubuntu with backported patches... and thus the same OS library giving different behaviors. My "remedy" for this discrepancy on the other tests I've fixed so far has been to tweak the logic in those PHPT tests to do version checks and adjust expectations accordingly... but I haven't done this with a given test until I knew for sure that the differing library behavior was indeed the culprit. |
See https://github.com/mpdude/pear-core/actions/runs/8024927894/job/21924484015?pr=1 PHP 5.4 and 5.5 are compiled with or against libxml 2.9.1, PHP 5.6 and above against libxml 2.9.14. |
I am not 💯 sure about this, but when I look at the
lines I'd say all tests run on the same OS with libxml 2.9.13 being installed as a dynamic library; and the different PHP versions have been compiled against different versions (2.9.1 and 2.9.14) but use 2.9.13 at runtime. Do the different error messages really come from libxml or some other library? Do you happen to have them at hand? |
Once again, this has only been a hunch of mine, mostly based on the other tests I've had to tweak since migrating from Travis-CI to Github Action builds. You can see where I left off on the current failures in my fork PR (ashnazg#2), but the last thing I remember is that what I saw last made me more confident that the different behavior was something to do with XML behavior in 5.4 & 5.5 that differed from 5.6 and up. |
Actually, I think in my last session, I had reached a point where I thought the multibyte character in Stig's name in the Archive_Tar tarball that's included for the testcases was the point of contention, in that the XML lib reading that was where the behavior acted differently... and that my next plan of attack was to remove that special character, recreate the tarball, and see how to tweak the tests to use that modified tarball. I might be able to resume this in the morning. |
There is so much error output that I do not see what to lookout for. So much noise dumped I don’t see a clear backtrace. Would it help if you could ssh into the GHA runner to investigate, or would you need a full fledged IDE setup with xDebug? |
Right, because it's PHPT output, and these are convoluted testcases, it's a mess. It never occurred to me that one could SSH into one of the runner agents... is there an info URL describing that? At any rate, I do want to pursue my adjust-the-tarball idea first, in case that's a quick fix (too late!) ... |
I use this: https://github.com/luchihoratiu/debug-via-ssh You need an ngrok token, which you can get for free. Does that help you or do you need more detailed explanations? You can also ssh into the runner and tunnel xDebug connections back to your machine, so you get remote debugging with you local IDE… but that’s a tad more work to set up. |
So I think my "backported" hunch was sort-of right... the Github builds for even old PHP5 are all using I'm resuming my troubleshooting of the last testcase failures now. |
Have you been able to confirm that the failures are in fact related to XML processing? |
@mpdude , I got three of the four failing tests fixed... root symptom seems to be a multibyte character in the Archive_Tar tarballs that are included in the testsuite. One to go, but ran out of time today. |
Regarding the failing test at (Don't ask me how I got there, I don't fully remember...)
|
Also:
|
@mpdude , that was exactly what I needed... the culprit was multibyte char in package.xml just like the other tests, but this time it was three tarballs instead of just one with the same issue. |
@alecpl can you fetch/rebase ? |
Quality Gate passedIssues Measures |
Chuck, sincere thanks for the effort and patience you put into this! This is not the first time your work makes my life easier. I still depend on PEAR and PEAR_DB in some applications and they process ten thousands of queries every day without complaining - now also with PHP 8.3. That’s also because of the work you put into it. |
Now what’s that - a new series of errors? |
v1.10.15 is released. |
Fixes pear/pear-core-minimal#16