34
Eclipse – PHP Tool Integration (PTI) Sven Kiera, TWT Interactive GmbH

Eclipse PHP Tool Integration (IPC Spring 2010)

Embed Size (px)

DESCRIPTION

Es stehen immer neue und mächtigere Tools zur Unterstützung der Entwicklung von PHP-Projekten zur Verfügung. Doch leider fehlt hier oft eine Integration in einer der bekannten IDEs. PHP Tool Integration (PTI) versucht als Erweiterung für Eclipse diese Lücke zu schließen. Der Vortrag zeigt Ihnen, wie Sie mittels dieser Erweiterung unter anderem PHP_CodeSniffer, PHP_Depend und PHPUnit direkt in Eclipse nutzen können.

Citation preview

Page 1: Eclipse PHP Tool Integration (IPC Spring 2010)

Eclipse – PHP Tool Integration (PTI)

Sven Kiera, TWT Interactive GmbH

Page 2: Eclipse PHP Tool Integration (IPC Spring 2010)

Sven Kiera

Web Entwickler bei TWT Interactive GmbH in Düsseldorf

PHP und Java seit 1998 PHP5 Zend Certified Engineer Certified MySQL 5.0 Developer Autor von PHP Tool Integration

(PTI)

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 3: Eclipse PHP Tool Integration (IPC Spring 2010)

PHP Tools

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 4: Eclipse PHP Tool Integration (IPC Spring 2010)

PHP Tools

PHPUnitPHP DependPHP Mess DetectorPHP_CodeSnifferPHP Copy/Paste DetectorPHPDocumentorPhing…

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 5: Eclipse PHP Tool Integration (IPC Spring 2010)

„Einsatzgebiete“ von PHP ToolsKonsoleSVN HooksContinuous Integration Server

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 6: Eclipse PHP Tool Integration (IPC Spring 2010)

Unterstützung in Editoren / IDEsSo gut wie nicht vorhanden

Einzige Ausnahme PHPUnitProblem: Editoren / IDEs sind nicht in

PHP geschriebenAlternative: manuelle Ausführung

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 7: Eclipse PHP Tool Integration (IPC Spring 2010)

Eclipse - PHP Tool Integration (PTI)

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 8: Eclipse PHP Tool Integration (IPC Spring 2010)

Eclipse – PHP Tool Integration (PTI) Eclipse Plugins für Eclipse PDT 2.x und Zend Studio

7.x Ziel: Direkte Nutzung von PHP Tools in Eclipse PDT Aktuelle Unterstützung:

PHP_CodeSniffer PHPDepend PHPUnit PHP Copy / Paste Detector

PEAR Verwaltung inkl. aktueller PEAR Bibliothek Erweitert Eclipse DLTK External Checker um

direkte Nutzung von PHP Skripten Open Source (EPL)

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 9: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI - PHP_CodeSniffer

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 10: Eclipse PHP Tool Integration (IPC Spring 2010)

PHP_CodeSniffer

PHP Tool zum ausspüren von Abweichungen vom Coding Standard Ausführung per Konsole Integration als SVN Hook Integration in Continuous Integration

Server

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 11: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI – PHP_CodeSniffer (v1.2.4)Manuelle PrüfungAutomatische Prüfung per ValidatorMarkierung von Fehler und

Warnungen in DateienPrüfung mit mehreren StandardsBenutzung eigener StandardsFilterung von Dateien und Sniffs

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 12: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI - Konfiguration

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 13: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI – Manuelle Prüfung

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 14: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI – Fehlermarker

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 15: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI – Validator

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 16: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI - PHP Depend

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 17: Eclipse PHP Tool Integration (IPC Spring 2010)

PHP Depend

PHP Tool zur Generierung von Metriken Ausführung per Konsole Integration in Continuous Integration

Server

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 18: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI – PHP Depend (v0.4.0 DEV)Manuelle PrüfungAutomatische Prüfung per ValidatorKonfiguration von Fehlerbereiche für

MetrikenMarkierung von Fehler und

Warnungen in DateienVisuelle Anzeige der MetrikenAnzeige von Graphen

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 19: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI – Konfiguration

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 20: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI – Manuelle Ausführung

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 21: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI – Visuelle Anzeige

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 22: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI – Validator

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 23: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI - PHPUnit

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 24: Eclipse PHP Tool Integration (IPC Spring 2010)

PHP Unit

Bekannteste xUnit Test Framework zum Testen von PHP-Skripten Ausführung per Konsole Integration in Continuous Integration

Server Einfache Integration in vielen Editoren

und IDEs

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 25: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI – PHPUnit (v0.4.0 DEV)

Einfache Erkennung von Klassen und zugehörigen Tests

Manuelle PrüfungAutomatische Ausführung per ValidatorMarkierung von Fehler und Warnungen in

DateienVisuelle Anzeige der TestergebnisseGenerierung Test Klassen aus PHP KlassenGenerierung PHP Klassen aus Test Klassen

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 26: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI - Konfiguration

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 27: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI – Manuelle Test Ausführung

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 28: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI – Visuelle Anzeige

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 29: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI – Test Klasse Generierung

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 30: Eclipse PHP Tool Integration (IPC Spring 2010)

PTI – PHP Klasse Generierung

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 31: Eclipse PHP Tool Integration (IPC Spring 2010)

Ausblick

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 32: Eclipse PHP Tool Integration (IPC Spring 2010)

Ausblick PHP_CodeSniffer

Mehrfach Konfiguration für Standards Unterstützung für Rule Set Dateien (Wizard, Import,

Export)

PHPDepend Erweiterte Konfiguration für Metriken und Fehlerbereiche

PHPUnit Synchronisation Test Klasse <-> PHP Klasse Echtzeit Anzeige

Sonstiges Evaluierung neuer Tools: z.B. PHPMD, PHP_UML

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 33: Eclipse PHP Tool Integration (IPC Spring 2010)

Weitere Informationen Eclipse – PHP Tool Integration (PTI)

Homepage: http://www.phpsrc.org SourceForge: http://sourceforge.net/projects/pti/ Eclipse Marketplace:

http://marketplace.eclipse.org/content/pti-php-tool-integration Update Site: http://www.phpsrc.org/eclipse/pti/ Mail: [email protected]

PHP_CodeSniffer Homepage: http://pear.php.net/package/PHP_CodeSniffer/ Blog: http://www.squizlabs.com/php-codesniffer

PHPDepend Homepage: http://pdepend.org

PHPUnit Homepage: http://www.phpunit.de

Sven Kiera: Eclipse – PHP Tool Integration (PTI)

Page 34: Eclipse PHP Tool Integration (IPC Spring 2010)

Thanks for listening!

Sven Kiera: Eclipse – PHP Tool Integration (PTI)