-
Notifications
You must be signed in to change notification settings - Fork 40
Added a html output option #58
Added a html output option #58
Conversation
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>SensioLabs DeprecationDetector</title> | ||
|
||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forcing the user to have Internet access to see the HTML report correctly seems strange.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, this should work offline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I will look into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the markup, I'd say that the report should display fine offline, just the bootstrap style will be missing.
Inlining 120 KB bootstrap code probably isn't they way to go either. Maybe we should replace it with a few lines of good old handcrafted CSS? 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes... bonus points for the same theme as the SF2.8+ debug toolbar/profiler ;) Any takers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, here it is the needed CSS and HTML: https://gist.github.com/javiereguiluz/8ef2512c805e1b73db30 Feel free to ask me anything you may need. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 looks amazing. Good work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, I will start implementation on the weekend.
ping @datenbrille |
I will check the conflicts |
Rebased to current master |
/** @var $renderer HtmlOutputRenderer */ | ||
$renderer = $container['violation.renderer.html']->createHtmlOutputRenderer($htmlOutputPath); | ||
$renderer->renderViolations($violations); | ||
$output->writeln(sprintf('Rendered HTML report to %s', $htmlOutputPath)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Rendered HTML report to %s."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
Does the status of the code match the requirements? Do I need to change something? |
There are still some comments unfixed |
use Prophecy\Argument; | ||
use SensioLabs\DeprecationDetector\Violation\Renderer\Html\HtmlRenderer; | ||
|
||
class HtmlOutputRendererTest extends PHPUnit_Framework_TestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class name should be changed into HtmlRendererTest
or RendererTest
, depends on this comment
Updated composer.lock
@datenbrille Do you still want to work on this one ? |
I'am a little bit busy at the moment, but I hope I can work on it this week. |
I think I have solved each code comment. |
return new Renderer\ConsoleOutputRenderer(new ConsoleOutput(), $c['violation.message_helper']); | ||
}; | ||
|
||
$c['violation.renderer.html'] = function ($c) { | ||
return new HtmlRendererFactory($c['violation.message_helper'], new Filesystem()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the old class name please change it to RendererFactory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@datenbrille could you fix that one today ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Sorry for the delay.
Hi,
at the Symfony Hack in Berlin @PhilippSchreiber, @ThYpHo0n and me hack this little extension. It allows you to create a file with a bootstrap style table of violations.
I modified the PR according to the comments on PR #42.