Skip to content

Support for simple cache #75

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

Merged
merged 8 commits into from
Jul 30, 2017
Merged

Support for simple cache #75

merged 8 commits into from
Jul 30, 2017

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Jul 16, 2017

Introducing the support for cache proxies instead for messing around with different types of recording pools like we did.

This will create a proxy file that extends the original pool. It is only used in development of course.

@codecov-io
Copy link

codecov-io commented Jul 16, 2017

Codecov Report

Merging #75 into master will decrease coverage by 4.2%.
The diff coverage is 33.72%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #75      +/-   ##
============================================
- Coverage      41.6%   37.39%   -4.21%     
  Complexity      183      183              
============================================
  Files            20       20              
  Lines           762      821      +59     
============================================
- Hits            317      307      -10     
- Misses          445      514      +69
Impacted Files Coverage Δ Complexity Δ
src/DataCollector/CacheDataCollector.php 0% <0%> (ø) 22 <1> (ø) ⬇️
src/Resources/proxy/template.php 0% <0%> (ø) 21 <5> (?)
src/DataCollector/DecoratingFactory.php 0% <0%> (ø) 3 <3> (?)
...cyInjection/Compiler/DataCollectorCompilerPass.php 66.66% <50%> (-33.34%) 4 <0> (ø)
src/DataCollector/ProxyFactory.php 95.65% <95.65%> (ø) 6 <6> (?)

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 3a0f534...88d5e01. Read the comment docs.

@Nyholm Nyholm requested a review from prisis July 16, 2017 19:10
Copy link
Member Author

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

What happened with logging support?

}
}

protected function getProxyClass($namespace)
Copy link
Member Author

Choose a reason for hiding this comment

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

Should be private

$this->originalObject = $originalObject;
}

public function create()
Copy link
Member Author

Choose a reason for hiding this comment

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

Use $originalObject as a function parameter and register the factory in the service.yml

* Create a proxy that handles logging better.
*
* @param string $class
* @param string $file where we store the proxy class
Copy link
Member Author

Choose a reason for hiding this comment

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

Wrong variable name

return $proxyClass;
}

$content = <<<PROXY
Copy link
Member Author

Choose a reason for hiding this comment

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

Could we get_file_contents() this file instead? It will be easier to change and review.

@Nyholm Nyholm merged commit 56ae528 into master Jul 30, 2017
@prisis
Copy link

prisis commented Jul 31, 2017

sorry had no time for a review -.-

@Nyholm Nyholm deleted the simple-cache branch July 31, 2017 09:12
@Nyholm
Copy link
Member Author

Nyholm commented Jul 31, 2017

No worries. I have 2 PRs open now. After that I think we should release a new version. What do you think?

@@ -27,14 +27,15 @@
"php": "^5.6 || ^7.0",
"symfony/framework-bundle": "^2.7 || ^3.0",
"cache/taggable-cache": "^0.5",
"cache/session-handler": "^0.2"
"cache/session-handler": "^0.2",
Copy link

Choose a reason for hiding this comment

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

we have stable version, why dont use them?

Copy link
Member Author

Choose a reason for hiding this comment

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

It was not a part of this PR.

But here: #76

@prisis
Copy link

prisis commented Jul 31, 2017

Sounds like a good idea

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