// you’re reading...

Development

Bugs in Phing on Windows

I use Phing to deploy my projects, and as they become more complex I expand on my use of Phing tasks. For instance, I have a ZIP archive of zip codes that Phing extracts and then imports into a database when deploying the application.

I maintain two development environments. One on a Linux server, and one locally on my Windows laptop using WAMP. So naturally, my PHP projects are cross-platform compatible and run on either Windows or Linux. And for the most part that simply means being careful about buildings paths, filenames, and file permissions.

To my surprise, the Unzip task defined in my build.xml that imports the Zip code data failed in mysterious ways: It reports success, but there's no extracted files to be found. It works on Linux, but not on Windows.

I dug into it and found two issues. First, the Phing's Unzip Task doesn't have the most solid error checking, and errors coming back from the Archive_Zip PEAR component. Second, the Archive_Zip PEAR component doesn't correctly check for absolute paths on Windows. Both problems have been reported on Phing's web site as Issue #261 and #262.

Discussion

No comments for “Bugs in Phing on Windows”

Post a comment

Did You Know?

When it comes to coding standards, I prefer the Allman indentation style; opening and closing braces should be in the same column for maximum readability. This goes back to my background in Pascal where the function's begin and end statements are aligned in the same column. But for consistency's sake, I'm trying to adopt the Zend Framework coding standards. It's still a bit of a struggle.