m6w6 / ext-pq

PostgreSQL client library (libpq) binding
BSD 2-Clause "Simplified" License
39 stars 7 forks source link

make version props typed #51

Open remicollet opened 1 year ago

remicollet commented 1 year ago

This also make them really readonly

        Property [ public readonly string $libraryVersion ]
        Property [ public readonly int $protocolVersion ]
        Property [ public readonly string $serverVersion ]

BUT it breaks because of call to "write" in the "read" function, which is commented out here Can you please explain why this (don't see anything similar in php-src) ?

codecov[bot] commented 1 year ago

Codecov Report

Merging #51 (2bd0c68) into master (fbbe06a) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
+ Coverage   76.82%   76.84%   +0.01%     
==========================================
  Files          17       17              
  Lines        3612     3615       +3     
==========================================
+ Hits         2775     2778       +3     
  Misses        837      837              
Impacted Files Coverage Δ
src/php_pq_object.c 94.28% <ø> (-0.16%) :arrow_down:
src/php_pqconn.c 67.97% <100.00%> (+0.20%) :arrow_up:

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

m6w6 commented 1 year ago

Can you please explain why this (don't see anything similar in php-src) ?

Well, duh... not really, except, using git blame: https://github.com/m6w6/ext-pq/commit/a3b5ed14b9166810f82cb4669529d7eaa5b88411

remicollet commented 1 year ago

In old v1.1.1, I don't see any "write" in the "read" method https://github.com/m6w6/ext-pq/blob/v1.1.1/src/php_pq_object.c#L121

Looks like it was added in big commit cb69b621