Modify

Ticket #281 (new enhancement)

Opened 3 years ago

Last modified 7 months ago

Integrate SPL into Phing

Reported by: alexeyshockov Owned by: alexeyshockov
Priority: major Milestone: 2.5.0
Component: phing-core Version:
Keywords: spl Cc: mp@…

Description

Integrate  SPL features (Iterator, ArrayAccess...) to Phing, as  discussed.

Attachments

Change History

comment:1 Changed 11 months ago by mrook

  • Milestone changed from TBD to 2.5.0

comment:2 Changed 7 months ago by mp

A good place to start could be the way FileSets are handled... there is a recurring pattern all over the place that looks like

       	// $fs is a FileSet
    	$fromDir = $fs->getDir($this->project);
       	$ds = $fs->getDirectoryScanner($this->project);
    	foreach ($ds->getIncludedFiles() as $srcFile) {
    	    	$pf = new PhingFile($fromDir, $srcFile)
    	    	...

that could just read

    	foreach ($pf in $fs) {
    	    	...

I don't know whether there is a need at all to access the excludedFile from the directory scanner? When it comes to processing files and directories separately (which I've seen in a few places), PhingFile also supports isFile()/isDirectory().

comment:3 Changed 7 months ago by mp

  • Cc mp@… added
View

Add a comment

Modify Ticket

Action
as new
Author


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

 
Note: See TracTickets for help on using tickets.