Skip to content

Refactor AgentHeaderDescriptor#206

Merged
michaelbausor merged 4 commits intogoogleapis:masterfrom
michaelbausor:header-refactor
Aug 15, 2018
Merged

Refactor AgentHeaderDescriptor#206
michaelbausor merged 4 commits intogoogleapis:masterfrom
michaelbausor:header-refactor

Conversation

@michaelbausor
Copy link
Copy Markdown
Contributor

  • Replace AgentHeaderDescriptor with AgentHeader, a class with only static methods
  • In GapicClientTrait, cache only the gapic version loaded from file
  • Remove AgentHeaderMiddleware and use FixedHeaderMiddleware in its place

* @return string
*/
public static function getApiCoreVersion()
public static function readGapicVersionFromFile($callingClass)

This comment was marked as spam.

This comment was marked as spam.

public static function readVersionFile($file)
{
$versionString = @file_get_contents($file) ?: "";
return trim($versionString);

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@tmatsuo
Copy link
Copy Markdown
Contributor

tmatsuo commented Aug 15, 2018

Looks like there's a cs error, feel free to merge once it's fixed

@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 15, 2018

Codecov Report

Merging #206 into master will increase coverage by 0.66%.
The diff coverage is 96.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #206      +/-   ##
==========================================
+ Coverage   84.14%   84.81%   +0.66%     
==========================================
  Files          63       62       -1     
  Lines        2826     2838      +12     
==========================================
+ Hits         2378     2407      +29     
+ Misses        448      431      -17
Impacted Files Coverage Δ
src/ApiCore/AgentHeader.php 100% <100%> (ø)
src/ApiCore/Middleware/FixedHeaderMiddleware.php 100% <100%> (+100%) ⬆️
src/ApiCore/GapicClientTrait.php 88.88% <100%> (-0.44%) ⬇️
src/ApiCore/Version.php 66.66% <75%> (+23.8%) ⬆️
src/ApiCore/Serializer.php 91.89% <0%> (-1.05%) ⬇️
src/ApiCore/ApiException.php 90% <0%> (+15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4097cbe...e1638cc. Read the comment docs.

@michaelbausor michaelbausor merged commit f9a8568 into googleapis:master Aug 15, 2018
@michaelbausor michaelbausor deleted the header-refactor branch August 15, 2018 22:31
@michaelbausor michaelbausor mentioned this pull request Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants