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

version properties #49

Merged
merged 6 commits into from
Jun 15, 2023
Merged

version properties #49

merged 6 commits into from
Jun 15, 2023

Conversation

remicollet
Copy link
Collaborator

The problem was about to be able to detect running server version to detect is json is available (the test is failing on RHEL-7 with libpq 9.2)

1st commit add 2 property to the Connection class

  • libraryVersion
  • protocolVersion
  • serverVersion

2nd commit use serverVersion to skip the new json test

@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Merging #49 (d7871d8) into master (b86e51c) will increase coverage by 0.10%.
The diff coverage is 95.23%.

@@            Coverage Diff             @@
##           master      #49      +/-   ##
==========================================
+ Coverage   76.72%   76.82%   +0.10%     
==========================================
  Files          17       17              
  Lines        3592     3612      +20     
==========================================
+ Hits         2756     2775      +19     
- Misses        836      837       +1     
Impacted Files Coverage Δ
src/php_pq_misc.c 72.68% <75.00%> (+0.04%) ⬆️
src/php_pq_module.c 100.00% <100.00%> (ø)
src/php_pqconn.c 67.77% <100.00%> (+0.56%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@remicollet
Copy link
Collaborator Author

Rewritten returning string instead of long, more readable and easy to compare in PHP

@remicollet
Copy link
Collaborator Author

remicollet commented Jun 13, 2023

  • PQlibVersion since 9.1
  • PQserverVersion since 8.0
  • PQprotocolVersion since 7.4

Perhaps time to raise minimal version ? to 9.1 ?
(since PHP 8.0, libpq >= 9.1 is required)

RHEL-7 has 9.2, is >9 years old, and is close to its EOL in <1 year (I don't think something older exists)
RHEL-8 was released with 10.5 but now has 13.5

@remicollet
Copy link
Collaborator Author

Added: factorization of version to string conversion (and fix from pr #48)

@remicollet remicollet changed the title Issue version properties (enhancement) Issue version properties Jun 13, 2023
@remicollet remicollet changed the title (enhancement) Issue version properties version properties Jun 13, 2023
@remicollet remicollet requested a review from m6w6 June 13, 2023 13:40
@remicollet
Copy link
Collaborator Author

Added: new properties are read only (PHP 8.1+)

TODO: review all existing properties (not in the scope of this PR, another will follow)

Copy link
Owner

@m6w6 m6w6 left a comment

Choose a reason for hiding this comment

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

Thank you Remi and sorry for my latency!

@remicollet remicollet merged commit fbbe06a into master Jun 15, 2023
28 checks passed
@remicollet remicollet deleted the issue-verprop branch June 15, 2023 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants