Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Added a html output option #58

Merged
merged 38 commits into from
Dec 3, 2015
Merged

Added a html output option #58

merged 38 commits into from
Dec 3, 2015

Conversation

datenbrille
Copy link
Contributor

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.

<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">

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.

Copy link

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.

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.

Copy link
Contributor

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? 😃

Copy link

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?

Copy link
Member

Choose a reason for hiding this comment

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

👍

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!

Copy link

Choose a reason for hiding this comment

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

👍 looks amazing. Good work

Copy link
Contributor

Choose a reason for hiding this comment

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

😍

Copy link
Contributor Author

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.

@MarvinKlemp
Copy link
Contributor

ping @datenbrille

@datenbrille
Copy link
Contributor Author

I will check the conflicts

@datenbrille
Copy link
Contributor Author

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));
Copy link
Contributor

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."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.

@datenbrille
Copy link
Contributor Author

Does the status of the code match the requirements? Do I need to change something?

@MarvinKlemp
Copy link
Contributor

There are still some comments unfixed

use Prophecy\Argument;
use SensioLabs\DeprecationDetector\Violation\Renderer\Html\HtmlRenderer;

class HtmlOutputRendererTest extends PHPUnit_Framework_TestCase
Copy link
Contributor

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

@MarvinKlemp
Copy link
Contributor

@datenbrille Do you still want to work on this one ?

@datenbrille
Copy link
Contributor Author

I'am a little bit busy at the moment, but I hope I can work on it this week.

@datenbrille
Copy link
Contributor Author

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());
Copy link
Contributor

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

Copy link
Contributor

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 ?

Copy link
Contributor Author

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.

MarvinKlemp added a commit that referenced this pull request Dec 3, 2015
@MarvinKlemp MarvinKlemp merged commit fadc59c into opensoftwareconsulting:master Dec 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy