Comments (3)
Feature released with v1.2.0
from tombstone.
@scheb I've tried to use this the other day and I found an issue that makes this unusable. The custom analyzer is initialised through the constructor $logReader = $reflectionClass->newInstance();
instead of static create
function that is used to initialise built in AnalyzerLogProvider
. The issue is that this way the custom analyzer does not have access to the output writer or the config, making it, I think, impossible to create any reports. I suggest the following change to resolve this issue.
private function createLogCollector(array $config, VampireIndex $vampireIndex): LogCollector
{
$logProviders = [];
if (isset($config['logs']['directory'])) {
$logProviders[] = AnalyzerLogProvider::create($config, $this->output);
}
if (isset($config['logs']['custom'])) {
if (isset($config['logs']['custom']['file'])) {
/** @psalm-suppress UnresolvableInclude */
require_once $config['logs']['custom']['file'];
}
$className = $config['logs']['custom']['class'];
$reflectionClass = new \ReflectionClass($className);
if (!$reflectionClass->implementsInterface(LogProviderInterface::class)) {
throw new \Exception(sprintf('Class %s must implement %s', $className, LogProviderInterface::class));
}
/** @var LogProviderInterface $logReader */
$logReader = $className::create($config, $this->output);
$logProviders[] = $logReader;
}
return new LogCollector($logProviders, $vampireIndex);
}
from tombstone.
My bad, I reused some older code and didn't realize the class was instantiated differently. Fix released as v1.2.1.
from tombstone.
Related Issues (18)
- Having a gravedigger ? HOT 1
- Custom matching strategies
- Automation to Place Tombstones and Clean-Up Dead Code HOT 2
- Report Generation for krakjoe/tombs
- Support class methods as tombstone functions HOT 5
- Remove sebastian/finder-facade dependency HOT 2
- Remove line from crc32 to be able to track functions in changed files HOT 2
- HTML report with wrong bootstrap version HOT 3
- HTML report missing figures on "Source" and "Dashboard" pages HOT 1
- Failing test ensureDirectoryCreated_directoryAlreadyCreated_doNothing
- Psalm violition
- Dependency Conflict Issue HOT 3
- StackTraceFrame->getLine returns the last line on multi-line method calls HOT 2
- Configurable tombstone function name HOT 1
- Custom tombstone extractors
- Checkstyle report
- Compatibility with PHPUnit 9 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tombstone.