Skip to content
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

php-xhprof: Update to "revived" fork with version 2.3.9 (formerly 2.3.7) #16579

Closed
wants to merge 5 commits into from

Conversation

stronk7
Copy link
Contributor

@stronk7 stronk7 commented Nov 4, 2022

Description

Based on "official" fork that is used by PECL itself.

This has been tested with php72-php81 (self tests and some real apps) and it's working ok so far. Note it only includes the minimum changes required, not sure if there is anything else to modify (ports versions or things like that).

Note I'm not 100% sure about the declared incompatibility with the tideways-xhprof package, I borrowed it from other packages having incompatibilities. Maybe the opposite one should be added to the tideways one?

Also, note that this switch to the new package leaves PHP 5.x out from the equation.

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS 12.6.1 21G217 x86_64
Xcode 13.4.1 13F100

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • checked your Portfile with port lint --nitpick?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?

@macportsbot
Copy link

Notifying maintainers:
@ryandesign for port php-xhprof.

Copy link
Contributor

@ryandesign ryandesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This would resolve https://trac.macports.org/ticket/57340. I'll work on an update that keeps the old version for php 5.x and uses the new one for php >= 7.

php/php-xhprof/Portfile Outdated Show resolved Hide resolved
php/php-xhprof/Portfile Outdated Show resolved Hide resolved
php/php-xhprof/Portfile Outdated Show resolved Hide resolved
@stronk7
Copy link
Contributor Author

stronk7 commented Nov 5, 2022

New version pushed. Remaining points:

  • The doubles/split portfile, to keep the old version building for PHP 5.x
  • To add the counterpart conflicts in the php-tideways_xhprof port.

Ciao :-)

@stronk7
Copy link
Contributor Author

stronk7 commented Nov 5, 2022

Ah,

by coincidence I went to take a look to the php-xdebug port and just saw that it uses the if {[vercmp... to decide between versions. Should I apply for the same here in order to keep those old 0.9.4 builds for PHP 5.x ?

Side note, I've seen that the git repo doesn't have that version (0.9.4) tagged. I imagine this is not a problem and the package is downloaded from PECL (tgz). Correct? Noob question :-)

@stronk7
Copy link
Contributor Author

stronk7 commented Nov 5, 2022

I've added a second commit adding the conditional building of the old 0.9.4 version for PHP 5.x. Unfortunately, I cannot try it here (it seems that my Xcode doesn't allow to build such old PHP versions).

So, only remaining point is about to add the conflict counterpart in the php-tideways_xhprofpackage. Maybe that needs to be done in separate PR and only when/if this is merged?

diff --git a/php/php-tideways_xhprof/Portfile b/php/php-tideways_xhprof/Portfile
index aa8d59279d1..55e3689a7f9 100644
--- a/php/php-tideways_xhprof/Portfile
+++ b/php/php-tideways_xhprof/Portfile
@@ -31,3 +31,7 @@ if {[vercmp ${php.branch} 7.0] >= 0} {
 }
 
 github.tarball_from archive
+
+if {${name} ne ${subport}} {
+    conflicts       ${php}-xhprof
+}

And that's all, ciao :-)

@stronk7
Copy link
Contributor Author

stronk7 commented Nov 5, 2022

And one more little detail, I've added a 3rd commit, because a new 2.3.8 release has happened minutes ago, fixing an annoying bug (that was hitting us) with PHP 8.0 and up.

https://github.com/longxinH/xhprof/releases/tag/v2.3.8

BTW, feel free to squash the 3 commits or whatever, or ask me to do so. Just wanted to show the changes incrementally.

Ciao :-)

@stronk7 stronk7 changed the title php-xhprof: Update to "revived" fork with version 2.3.7 php-xhprof: Update to "revived" fork with version 2.3.8 (formerly 2.3.7) Nov 5, 2022
@stronk7 stronk7 changed the title php-xhprof: Update to "revived" fork with version 2.3.8 (formerly 2.3.7) php-xhprof: Update to "revived" fork with version 2.3.9 (formerly 2.3.7) Jan 16, 2023
@stronk7
Copy link
Contributor Author

stronk7 commented Sep 6, 2023

Added one more commit to support php82 too (seems to be working here).

@reneeotten
Copy link
Contributor

@ryandesign can you please decide what to do with this PR. If it has no path forward let's just close it.

@stronk7
Copy link
Contributor Author

stronk7 commented Nov 13, 2023

Hi,

all I can say is that I'm using it often, from 7.4 to 8.2 and it seems to be working ok. Problem with the tideways alternative reporting some stats with php80 and up made it basically unusable, and, unless I'm wrong, it has been archived recently.

That doesn't leave us with many options.

So only points to decide is how to specify the incompatibility with tideways and be able to test this PR with old (PHP 5, 7.0...) versions. I've not been able to test it there (no access to old system/xcode to do so).

So 🤞 and ciao :-)

Based on "official" fork that is used by PECL itself.

This has been tested with php72-php81 (self tests and some real apps)
and it's working ok so far. Note it only includes the minimum changes
required, not sure if there is anything else to modify (ports versions
or things like that).

TODO: Maybe the opposite conflict should be added to the tideways
package as part of this too?
It has been released minutes ago and fixes an issue that
was annoying us with some big/special scripts when using
PHP >= 8.0.

longxinH/xhprof#72
@ryandesign
Copy link
Contributor

Thank you, I've evidently forgotten about this PR.

Thanks for the information that tideways_xhprof has been archived. They recommend this fork now. Sounds like the simplest solution is to update php-xhprof as suggested and mark php*-tideways_xhprof replaced_by php*-xhprof.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

4 participants