SlideShare a Scribd company logo
1 of 19
PHP Intellisense and Refactoring Tool
Phpactor
Works with
About Me
● @dantleech
● github.com/dantleech
● PHP Developer
● Phpbench
● Symfony CMF / PHPCR
Why Phpactor?
Things I wanted
● Cotext-aware auto-complete
● Moving classes and updating references
● Finding references
● Renaming
● Class generation
● Class inflection
Things I had
● “already seen” / ctag / php function completion
● Class import via. Ctags (vim-php-namespace)
● Git grep (fugitive)
● for file in `git ls-files`; do perl
-pie ‘s/foo/bar` $file; done …
● Nerdtree
● Syntastic
● Argument wrapping (vim-argwrap)
Phpactor
● Always waiting for somebody else to write one.
●
First attempt Sep 24th
2015
●
+5 Second attempt Feb 14th
2016
●
+10 Third attempt Novemeber 24th
2016
●
+8 Forth and final attempt June 19th
2016
Phpactor
● Standalone CLI application.
● Backend for text editors.
Architecture
Worse Reflection
● Based on BetterReflection* …
● Provides class reflection from an AST.
● AST provided by Tolerant PHP Parser.
● Locates source code with autoloader.
● Can build frames.
Standalone Tool
● Class move
● Class copy
● Class transform (implement interfaces, complete
constructor etc)
● New class
● Class inflect (new class based on an existing)
● Debug frames
● References / renaming / etc
And Globs!
Standalone demo
For Editors: RPC
RPC Demo from CLI
https://github.com/phpactor/phpactor/blob/master/doc/rpc.md
VIM Plugin
● 100% Vimscript!
● Bundled with Phpactor (currently).
● Most logic handled in Phpactor.
● My first VIM plugin (basically).
Commands
Demo!
Next Steps
● Contextual actions (improve UX).
● Option to enable indexing / caching
● Language Server Implementation
● Improved reflection
Links
@dantleech / @phpactor
github.com/phpactor

More Related Content

What's hot

What's hot (20)

Ruxmon.2015-08.-.proxenet
Ruxmon.2015-08.-.proxenetRuxmon.2015-08.-.proxenet
Ruxmon.2015-08.-.proxenet
 
.NET compiler platform codename Roslyn
.NET compiler platform codename Roslyn.NET compiler platform codename Roslyn
.NET compiler platform codename Roslyn
 
Beginning python programming
Beginning python programmingBeginning python programming
Beginning python programming
 
A Recovering Java Developer Learns to Go
A Recovering Java Developer Learns to GoA Recovering Java Developer Learns to Go
A Recovering Java Developer Learns to Go
 
Go Programming Language by Google
Go Programming Language by GoogleGo Programming Language by Google
Go Programming Language by Google
 
An introduction to go programming language
An introduction to go programming languageAn introduction to go programming language
An introduction to go programming language
 
Python training-course-content
Python training-course-contentPython training-course-content
Python training-course-content
 
Funcargs & other fun with pytest
Funcargs & other fun with pytestFuncargs & other fun with pytest
Funcargs & other fun with pytest
 
Python fundamental course curriculum
Python fundamental course curriculumPython fundamental course curriculum
Python fundamental course curriculum
 
Python debugging techniques
Python debugging techniquesPython debugging techniques
Python debugging techniques
 
Craate Your Own PHP Package - DILo Surabaya
Craate Your Own PHP Package - DILo SurabayaCraate Your Own PHP Package - DILo Surabaya
Craate Your Own PHP Package - DILo Surabaya
 
From NodeJS to Rust
From NodeJS to RustFrom NodeJS to Rust
From NodeJS to Rust
 
GoLang Introduction
GoLang IntroductionGoLang Introduction
GoLang Introduction
 
Last Month in PHP - June through Mid-July 2017
Last Month in PHP - June through Mid-July 2017Last Month in PHP - June through Mid-July 2017
Last Month in PHP - June through Mid-July 2017
 
javerosmx-2015-marzo-groovy-java8-comparison
javerosmx-2015-marzo-groovy-java8-comparisonjaverosmx-2015-marzo-groovy-java8-comparison
javerosmx-2015-marzo-groovy-java8-comparison
 
A First Look at Google's Go Programming Language
A First Look at Google's Go Programming LanguageA First Look at Google's Go Programming Language
A First Look at Google's Go Programming Language
 
Golang (Go Programming Language)
Golang (Go Programming Language)Golang (Go Programming Language)
Golang (Go Programming Language)
 
Ready, set, go! An introduction to the Go programming language
Ready, set, go! An introduction to the Go programming languageReady, set, go! An introduction to the Go programming language
Ready, set, go! An introduction to the Go programming language
 
A quick introduction to go
A quick introduction to  goA quick introduction to  go
A quick introduction to go
 
Introduction to Renjin, the alternative engine for R
Introduction to Renjin, the alternative engine for R Introduction to Renjin, the alternative engine for R
Introduction to Renjin, the alternative engine for R
 

Similar to Phpactor and VIM

これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
goccy
 
Behaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with DrupalBehaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with Drupal
smithmilner
 

Similar to Phpactor and VIM (20)

Getting Started with PHP Extensions
Getting Started with PHP ExtensionsGetting Started with PHP Extensions
Getting Started with PHP Extensions
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
 
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
 
PHP Profiling/performance
PHP Profiling/performancePHP Profiling/performance
PHP Profiling/performance
 
Lately in php - 2019 May 4
Lately in php - 2019 May 4Lately in php - 2019 May 4
Lately in php - 2019 May 4
 
Last Month in PHP - February 2017
Last Month in PHP - February 2017Last Month in PHP - February 2017
Last Month in PHP - February 2017
 
PHP 5.6 New and Deprecated Features
PHP 5.6  New and Deprecated FeaturesPHP 5.6  New and Deprecated Features
PHP 5.6 New and Deprecated Features
 
Flink Forward Berlin 2017: Zohar Mizrahi - Python Streaming API
Flink Forward Berlin 2017: Zohar Mizrahi - Python Streaming APIFlink Forward Berlin 2017: Zohar Mizrahi - Python Streaming API
Flink Forward Berlin 2017: Zohar Mizrahi - Python Streaming API
 
AtoM feature development
AtoM feature developmentAtoM feature development
AtoM feature development
 
Preparing code for Php 7 workshop
Preparing code for Php 7 workshopPreparing code for Php 7 workshop
Preparing code for Php 7 workshop
 
Behaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with DrupalBehaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with Drupal
 
Debugging (Django) application in PyCharm
Debugging (Django) application in PyCharmDebugging (Django) application in PyCharm
Debugging (Django) application in PyCharm
 
Codeception: introduction to php testing
Codeception: introduction to php testingCodeception: introduction to php testing
Codeception: introduction to php testing
 
All of the thing about Postman
All of the thing about PostmanAll of the thing about Postman
All of the thing about Postman
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
 
Php 7 - YNS
Php 7 - YNSPhp 7 - YNS
Php 7 - YNS
 
Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)
 
Boltc CMS - a really quick overview
Boltc CMS - a really quick overviewBoltc CMS - a really quick overview
Boltc CMS - a really quick overview
 
Nginx pres
Nginx presNginx pres
Nginx pres
 
A Python Tutorial
A Python TutorialA Python Tutorial
A Python Tutorial
 

More from dantleech

More from dantleech (7)

2019 11-bgphp
2019 11-bgphp2019 11-bgphp
2019 11-bgphp
 
Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)
 
Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...
Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...
Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...
 
Incredible Machine with Pipelines and Generators
Incredible Machine with Pipelines and GeneratorsIncredible Machine with Pipelines and Generators
Incredible Machine with Pipelines and Generators
 
A Tale of Three Components
A Tale of Three ComponentsA Tale of Three Components
A Tale of Three Components
 
Tmux quick intro
Tmux quick introTmux quick intro
Tmux quick intro
 
Benchmarking and PHPBench
Benchmarking and PHPBenchBenchmarking and PHPBench
Benchmarking and PHPBench
 

Recently uploaded

Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
MaherOthman7
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
benjamincojr
 
Artificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfArtificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdf
Kira Dess
 
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
drjose256
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
rahulmanepalli02
 

Recently uploaded (20)

analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
 
Artificial Intelligence in due diligence
Artificial Intelligence in due diligenceArtificial Intelligence in due diligence
Artificial Intelligence in due diligence
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, Functions
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Artificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfArtificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdf
 
History of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationHistory of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & Modernization
 
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
 
Intro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney UniIntro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney Uni
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptx
 
21scheme vtu syllabus of visveraya technological university
21scheme vtu syllabus of visveraya technological university21scheme vtu syllabus of visveraya technological university
21scheme vtu syllabus of visveraya technological university
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Software Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdfSoftware Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdf
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 

Phpactor and VIM