As PHP 5.3 is marching towards the final release, Eclipse PDT's next version needs to support its new features. Two major additions to PHP 5.3 are namespaces and bundling the Phar extension. Especially used in combination, libraries could/should be distributed like Jars in the Java world.
The Phar extension provides a way to put entire PHP libraries or applications into a single file called a "Phar" (PHP Archive) for easy distribution and installation. Phar archives are best characterized as a convenient way to group several files into a single file. As such, a Phar archive provides a way to distribute a complete PHP library or application in a single file and run it from that file without the need to extract it to disk. Additionally, Phar archives can be executed by PHP as easily as any other file, both on the command line and from a web server. Phar is kind of like a thumb drive for PHP applications.
PHP 5.3 and Eclipse PDT 2.0 will soon hit the street
With Eclipse PDT 2.0 to be released in September (or October) support for namespaces is already on the roadmap. Support for Phar archives has not been listed, yet. But in my opinion Eclipse PDT 2.0 must support handling Phar archives when PHP 5.3 will hit the street.
Playing around with PHP 5.3 HEAD and Eclipse PDT 2.0 HEAD I've discovered several drawbacks of the yet missing support for Phar archives - here are the most important ones:
- You cannot browse Phar archives.
- Because of the disability of Eclipse PDT 2.0 of browsing Phar archives you cannot see in the outline which classes are inside of the Phar archive.
- You cannot debug Phar archives. (Eclipse won't open a Phar archive.) (Using Xdebug or Zend Debugger does not change the situation.)
Debugging Phar archives using Xdebug is still an issue with the current stable release (Xdebug won't return enough information to browse the Phar archive), but Derick is already working on solving that issue. I didn't try the Zend Debugger - I don't even know if it runs with PHP 5.3.
Requirements for the Phar support are still to be defined
So opened an feature request at the Bugzilla issue tracker of Eclipse PDT. Roy Ganor, the team leader of the Zend Development Tools Group, responded quite fast and said, that the development team of Eclipse PDT already talked about the support of Phar archives but couldn't decide on requirements.
He asked me to help out and define proposals for requirements in a PDF file or the Eclipse PDT wiki.
Before providing proposals for requirements of the support of Phar archives for the next version of Eclipse PDT on my own, I wanted to ask the PHP community (especially those using Eclipse PDT / Zend Studio for Eclipse), what kind of Phar support they would like to see in Eclipse PDT 2.0.
Please do not hesitate on responding /commenting on this article, as there's not much time left before Eclipse PDT 2.0 shall hit the streets - and I wouldn't like to miss Phar support in this great IDE.


Recent Comments