Eclipse PHP Integrated Development Environment
The project has been created. Please visit the project page.
The PHP IDE Project is a proposed open-source project under the Eclipse Tools Project.
This document describes the content and the scope of the proposed project.
This proposal is in the Project Proposal Phase
and is written to declare its intent and scope.
This proposal is written to solicit additional participation and input from the
Eclipse community. You are invited to comment on and/or join the project.
Please send all feedback to the
PHP started as an open source project about 10 years ago. During the last 10 years,
PHP has gained significant momentum with now more than 23 million Web domains
running PHP. PHP’s simplicity and low cost of ownership have all contributed to
the fast and wide adoption of the language. PHP has now reached the point
of maturity where organizations are seeking standard tools and solutions that
will further facilitate application development with PHP.
The PHP IDE project will deliver a PHP Integrated Development Environment framework for the Eclipse platform.
This project will encompass the development components necessary to develop PHP-based Web Applications
and will facilitate extensibility. It will leverage the existing Web Tools Project
in providing developers with PHP capabilities.
The project will contribute an initial set of Eclipse plug-ins that will add PHP IDE capabilities to Eclipse, and will provide APIs to further extend the functionality of the project. The project will be composed of a set of extensible features covering the development life cycle of PHP including functionality that deals with developing, deploying, documenting, debugging and testing PHP-based applications.
The next section describes in detail the design, features and extension points needed in order to provide a comprehensive IDE.
The PHP IDE Project will include the following components:
PHP IDE Core
The PHP IDE Core provides the infrastructure for the PHP IDE and includes:
- PHP Language Model - provides infrastructure for the PHP language and the most popular extensions.
This Core component is the basis of all PHP language classes, functions and constants and it will support both PHP 4 and PHP 5.
The two PHP major versions support will affect the code assist, syntax coloring and PHP Functions view.
- PHP Inspector / Code Builder - analyzes PHP language elements such as: classes, functions, constants, variables, include statements, PHPDoc blocks and errors.
The PHP Inspector component is based on the PHP language Lexer and Parser and provides analysis for all PHP source code in either PHP 4 or PHP 5.
- PHPDoc Support - provides infrastructure that helps overcome some of the PHP language complexities. It adds capabilities to the PHP Language model and the PHP Inspector.
- PHP User Model - provides an API for navigating through PHP inspected data (PHP classes, functions, constants, variables and include statements). Used by the search engine, Code Assist and PHP Explorer View.
- PHP Source Code Formatter - Format PHP code according to personal preferences. The tool works in tandem with the Web Tools Project formatter.
PHP IDE UI
The PHP IDE UI provides the user interface for the PHP IDE. It includes several contributions to the Eclipse workbench:
- PHP Editor – The PHP Editor is built over the Web Tools Structured Editor and should inherit all its capabilities and actions. The PHP as a Structured Editor allows working on more then one programming language at the same time. All features in the PHP Editor support both PHP 4 and PHP 5.
- PHP Outline View – Supports two types of Outline Views:
- PHP specific - shows the structure of an inspected PHP file (classes, functions, variables, include files and constants).
- Generic web view - shows an HTML structural View – inherited from the Web Tools Project.
- Project Outline View - Very similar to the Outline View except that it shows the structure of an entire PHP Project.
- PHP Explorer View - PHP element hierarchy of the PHP projects in the workbench. It provides a PHP specific view of the resources shown in the Navigator.
- PHP Language View - A graphical representation of the PHP language Model.
- PHP Manual View - An offline view of the official PHP Manual (http://www.php.net/download-docs.php).
The UI will also provide the following functionalities:
- PHP Searching – Integrated in the Eclipse workbench’s search dialog, finds declarations of PHP classes, functions, constants and variables.
- Open PHP Type Dialog - Similar to JDT’s open Type dialog, the PHP open type dialog will show all PHP types in the workspace in order to open the selected type in the Editor.
PHP IDE Debug
The PHP IDE debug provides the infrastructure for PHP debugging, implemented on top of the debug model provided by the Eclipse Platform Debugger and on top of the Web Tools Projects.
The PHP IDE will support both types of PHP Servers: PHP local web server and PHP executable.
The debug protocol is based on Zend Studio’s debug protocol with extension points for new protocol messages.
The Debug Perspective will be based on the Eclipse Debug Perspective with compliance to the relevant PHP Debug actions.
The perspective will contain the standard debug views.
The Preview view will display what will be rendered on the browser as a result of processing the PHP file that is being edited. This will be part of a Multi-Page Editor, which will contain a Source page and a Preview page aggregated in a Tabbed Container.
The following list is work in progress and will most likely expand as requirements are identified.
The PHP IDE project will provide extension points to facilitate the extensibility of the project.
The extensions points will provide the ability to
- Extend the debug communication protocol, between the PHP IDE and the Web Server, with new messages. This will enable to increase the debugging capabilities with new features and functions.
- Integrate additional PHP builders.
- Extend the PHP data models by providing new data model that will reflect
code assist and outline view.
- Launch of a PHP project on any Web server.
In addition, the PHP IDE project will define several extension points to enhance the PHP Editor. The extensions points will provide the ability to
- Add new folding structured (regions) for the PHP Editor (similar to org.eclipse.jdt.ui.foldingStructureProviders)
- Enhance the PHP IDE with new text hover to the PHP Editor
- PHP Editor, will extend the WTP’s Structure Editor. The Editor will add PHP support to the Structured Editor using PHP Lexical Analyzer for the PHP language. The use of the WTP’s Structure Editor as a baseline for the extended functionality will provide the PHP developer with the benefits and capabilities that are already available with the WTP editor.
- Debugger - The debugger communication protocol between the IDE and the server side in the PHP IDE will be based on Zend’s proven debugging protocol. This protocol defines the agreed-upon format for transmitting data between both the server and the client side in order to facilitate debugging of a PHP application. The debug protocol will support PHP web server debugging and PHP stand-alone application debugging. Debug initiation will be done through an HTTP request made to the debugger server side, then the debugger server will open a communication channel to the PHP IDE to start debugging communication.
- Inspection – The PHP IDE will make use of an existing Zend inspection model and tool for parsing PHP code.
The PHP parser establishes a model constructed by file data for each of the project files. Each file’s data includes: classes, functions, constants, errors and include file data. The model is used for Code Assist, Outline View, Project Outline View and PHP Explorer View. The model is updated while you type in the editor and for every change in the PHP Project’s structure.
Zend and IBM will be making an initial code contribution that will encompass the core functionality for the PHP project including:
- High-quality and proven PHP model infrastructure incl. editor, syntax highlighting, code completion, and PHP explorer
- PHP perspectives
- PHP debugging capabilities
We plan to have an initial prototype version available by the end of Q1/2006. After the availability of the initial version we will work on incorporating changes and feedback as needed and strive to release the first functional version as early as possible.
The project leads will be initially the following people:
- Guy Harpaz, Zend (firstname.lastname@example.org)
- Robert Goodman,IBM (email@example.com)
Support has been expressed by:
- Guy Harpaz, Zend (firstname.lastname@example.org)
- Yossi Leon, Zend (email@example.com)
- Shachar Ben-Zeev Zend (firstname.lastname@example.org)
- Shalom Gibly, Zend (email@example.com)
- Guy Gurfinkel, Zend (firstname.lastname@example.org)
- Alik Elzin, Zend (email@example.com)
- Michael Spector, Zend (firstname.lastname@example.org)
- Robert Goodman,IBM (email@example.com)
- Brian Burns, IBM (firstname.lastname@example.org)
- Phil Berkland, IBM (email@example.com)