I think the generator system is nearing a point where it can support this.

We would need:

- the code body array to be keyed in some way that tells you what that piece is: function name, 'php header', 'file docblock', classname, class::method, class end.
- the file generator then need to check whether there is an existing file, and if so, analyze that and reduce that to a similar list
- diff the list
- only output the new pieces

This would probably need a new abstract class below File for PHP code.

Comments

joachim’s picture

Issue summary: View changes

The drush command used to have an --add option, which just appended code to a file. Not sure if it still works, but that could be resurrected as an interim measure.

joachim’s picture