[wp-trac] [WordPress Trac] #27343: Update phpunit grunt task to not use deprecated util

WordPress Trac noreply at wordpress.org
Tue May 6 13:34:51 UTC 2014


#27343: Update phpunit grunt task to not use deprecated util
------------------------------+------------------
 Reporter:  jorbin            |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  4.0
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:
------------------------------+------------------
Changes (by jorbin):

 * milestone:  Awaiting Review => 4.0


Comment:

 Looking at this, I see a number of options.

 1) Do nothing for now.  While it is deprecated, it isn't removed.  We can
 continue using it and make a decision later. This has the lowest overhead.

 2) We can add https://github.com/gruntjs/grunt-legacy-util which contains
 the spawn task.  This is similar to option one, but with the benefit/cost
 of lasting longer.

 3) We can maintain our own copy of grunt.util.spawn and use that.  This
 has the highest long term cost since it means we will now need to maintain
 more outside code.

 4) We can write a new wrapper using
 http://nodejs.org/api/child_process.html to run phpunit. This has the cost
 of taking the most time to get working across the most environments.
 grunt.util.spawn includes https://github.com/cowboy/node-exit which we
 would likely also want to include in order to make the task possibly work
 on windows. (does it work there now?  I have no idea)


 Option 2 seems to be the best choice to me.  grunt-util-spawn is a nice
 function that does everything we need. If a better replacement comes out
 we can reassess and update then. Patch attached to do just that.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27343#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list