Modify

Ticket #60 (closed enhancement: wontfix)

Opened 5 years ago

Last modified 4 months ago

Phing Doesn't Fail When PhpDoc Task Fails

Reported by: ashnazg@… Owned by: hans
Priority: minor Milestone: TBD
Component: phing-tasks-ext Version: 2.2.0
Keywords: Cc:

Description

Phing does not fail when a Phpdoc child task itself fails, and I can't tell from the manual that there is any way to tell Phing to fail when the PhpDoc task fails.

I've tested this several ways:

  • put bad values in phpdoc's args, to force an "ERROR" message from phpdoc itself;
  • kill the php process while phpdoc was running;
  • phpdoc threw an malloc() failure due to low memory;

In all cases, Phing just keeps going like the phpdoc task finished successfully. I even put two phpdoc tasks in the same phing target, thinking perhaps the target would fail after the first phpdoc task failed, but no, it went right on to the second phpdoc task.

Shouldn't it be reporting a build failure when the phpdoc task failed, or is this an enhancement that needs to be added to Phing? Or, worse, is Phing already supposed to fail but Phpdoc is returning a success exit code even when it itself fails?

Attachments

Change History

comment:1 Changed 5 years ago by mrook

The Phing task *should* fail (throw a BuildExcepion) when phpdoc returns a non-zero exit code.

Additionally, any lines containing "ERROR" should be posted to the Phing error log (but do not necessarily trigger a BuildException).

comment:2 Changed 5 years ago by ashnazg@…

Given that one of the last files written by a successful PhpDoc run is the "errors.html" file, I'm working around this issue like this:

<phpdoc destdir="docs" sourcepath="." output="HTML:Smarty:HandS" /> <available file="docs/errors.html" property="doc_completed" value="true" /> <fail unless="devdoc_completed" message="It APPEARS that the Doc generation failed." />

comment:3 Changed 5 years ago by hans

  • Owner set to hans
  • Status changed from new to assigned
  • Version changed from 2.2.0RC3 to 2.2.0
  • Milestone set to 2.2.1

comment:5 Changed 5 years ago by hans

  • Component set to cruisecontrol-builder-plugin
  • Milestone changed from 2.2.1 to 2.3.0

comment:6 Changed 4 years ago by hans

  • Milestone changed from 2.3.0 to 3.0

I'm actually going to move this ahead in the hopes that newer versions of phpdoc will provide more potential for interop. Currently we are calling the phpdoc API directly and it is a completely atrocious API. One can only hope that they rectify this in future versions.

comment:7 Changed 4 years ago by hans

  • Component changed from cruisecontrol-builder-plugin to phing-tasks-ext

comment:8 Changed 4 years ago by ashnazg@…

Thanks for the update.

I actually came onboard as one of the PhpDocumentor maintainers this year, and I'm hoping to keep Phing's needs in mind as I refactor things towards an improved v2.0. I have this bookmarked ( http://phing.tigris.org/servlets/ReadMsg?listName=dev&msgNo=441) to use as some level of guidance in my planning.

So, any specific things that phing would like to see can be directed to me. I can open any needed request items at pear.php.net to record them if no one at phing has a PEAR account. I'm looking forward to making these two products work together well in the PHP Continuous Integration realm.

comment:9 Changed 4 months ago by mrook

  • Status changed from assigned to closed
  • Resolution set to wontfix
View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.