grumphp icon indicating copy to clipboard operation
grumphp copied to clipboard

fix: XML and HTML reports as string paths instead of boolean options

Open petrisorciprian-vitals opened this issue 1 year ago • 2 comments

Q A
Branch v2.x
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Documented? yes
Fixed tickets -

Converts the existing 'xml' and 'html' options for Codeception from booleans to strings. Codeception supports specifying paths for these options. If a plain option is passed (without the value, i.e. '--xml' or '--html'), Codeception uses defaults of 'report.xml' and 'report.html'.

If a valued option is passed (i.e. '--xml=my-custom-path/report.xml' or '--html=my-custom-path/report.html'), then this is used instead.

This MR just brings this possibility into GrumPHP

petrisorciprian-vitals avatar Apr 02 '24 08:04 petrisorciprian-vitals

Thanks for the PR @petrisorciprian-vitals

So if I understand this option correctly, there are 3 ways to use these options?

  • no option : no report
  • --xml: Stores the report by default at report.xml
  • --xml=path: The path where you want to store te report.

Would it make sense to find a way to support all 3 options in here as well, that can be used in a Backwards Compatible way from a grumphp configuration point of view?

I'm thinking:

Keep bool|string as supported types, where:

  • false would result in no argument (no report)
  • true would result in --xml
  • string would result in a custom XML path: --xml=path

WDYT?

veewee avatar Apr 11 '24 07:04 veewee