Page MenuHomeDevCentral

Output report in XML
ClosedPublic

Authored by DorianWinty on Feb 13 2022, 22:17.
Tags
None
Referenced Files
F3745134: D2527.id6382.diff
Fri, Nov 15, 12:26
F3745125: D2527.id6378.diff
Fri, Nov 15, 12:22
F3744997: D2527.diff
Fri, Nov 15, 10:55
F3743580: D2527.id6382.diff
Thu, Nov 14, 22:07
Unknown Object (File)
Thu, Nov 14, 07:59
Unknown Object (File)
Tue, Nov 12, 11:53
Unknown Object (File)
Mon, Nov 11, 20:22
Unknown Object (File)
Mon, Nov 11, 07:51
Subscribers

Details

Summary

This change adds test and XML support.

Test Plan

Unit tests for a regular report are provided.

Only missing some cases if the rapport, or a part of it like properties, is empty.

Diff Detail

Repository
rKREPORT Keruald Report
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningsrc/Output/MarkdownOutput.php:44PHPCS.W.Generic.Files.LineLength.TooLongGeneric.Files.LineLength.TooLong
Unit
Tests Passed
Branch
adding_xml
Build Status
Buildable 3945
Build 4196: arc lint + arc unit

Event Timeline

DorianWinty created this revision.
DorianWinty retitled this revision from Output report in HTML and Markdown to Output report in XML.Feb 13 2022, 23:12
DorianWinty edited the summary of this revision. (Show Details)

modify the report.xml template to a better one

tests/data/report.xml
6

To be coherent with the section attribute what about this?

<entry title="Air Max 90">
    One of the more icon color is the infrared.
</entry>
src/Output/XMLOutput.php
10

One of the issue with creating XML by hand we don't handle special cases.

Imagine a entry with this text:

In a report, section are closed by </section>. This tag allows to mark the end of the entries.

With your code, that would be written as is.

With a library to write XML, some strategies would allow the content to be safe:

PHP offers directly such capabilities, for example https://www.php.net/manual/en/example.xmlwriter-simple.php

dereckson requested changes to this revision.Feb 14 2022, 21:16
This revision now requires changes to proceed.Feb 14 2022, 21:16
DorianWinty marked 2 inline comments as done.

folowed the comment

This revision is now accepted and ready to land.Feb 16 2022, 22:28
This revision was automatically updated to reflect the committed changes.