phpactor

Phpactor 2024.03.09

, tagged: phpactor
I have tagged Phpactor 2024.03.09. The last Phpactor release was about 3 months ago. This release has a large number of improvements and bug fixes from around 9 individual contributors. UTF-16 support ¶ It turns out that the language server protocol expects everything to be in UTF-16. This was a problem because Phpactor rather expected everything to be in UTF-8. This problem happened when converting to or from an LSP position. Read more...

Phpactor 2023.09.24

, tagged: phpactor
I have tagged Phpactor 2023.09.24. It’s been over a month and a half since the last release. As per the last month I haven’t been very active but have managed to contribute various bug fixes and small improvements, while there have been some great contributions from bart-jaskulski and mamazu. PHPCS Extension ¶ Phpactor has been providing an integration with php-cs-fixer for over a year. It fulfils the LSP document formatting action, while also providing inline diagnostics for code-style issues. Read more...

Phpactor 2023.08.06

, tagged: phpactor
I have tagged Phpactor 2023.08.06. There has not been much activity in the past months, I have been spending most of my spare programming time learning Rust while working on a Strava TUI, but this release does include some signficiant improvements and bug fixes. VIM ¶ Firstly this is a sad time for a project that owes its existence to the VIM editor. My history with VIM started about 15 years ago when I was a year or so into my first job as a PHP developer. Read more...

Phpactor 2023.06.17

, tagged: phpactor
I have tagged Phpactor 2023.06.17. Et voila, on a fait un autre release de Phpactor le serveur de language PHP. But today is not a day to practice my bad french, but to celebrate another Phpactor release 🎉 Class generic tags ¶ We’ll show diagnostics and provide a code action to add (best effort) generic tags for generics classes: Missing implements/extends Undefined variables and typos ¶ Show diagnostics for undefined variables and provide a code action to fix typos. Read more...

Self-testing code units

, tagged: phpactor php testing
TL;DR; Phpactor documents itself In Phpactor there are lots of units of code which add a category of functionality. One such examples is a Diagnostic Provider. Diagnostic providers provide diagnostics which provide feedback about your code: a diagnostic being shown in Neovim The old process for testing a diagnostic provider involved many steps and was tediously time consuming, and there was no documentation for diagnostic providers at all. Why not tediously invest time in a tedious solution which will make future work less tedious? Read more...

Phpactor 2023.04.10

, tagged: phpactor
I have tagged Phpactor 2023.04.10. It has been almost 3 months since the last tag, part of the reason for the delay has been the implementation of some great features which required some time to settle down, and also due to me chasing some white whales. Happily this release does include performance improvements, which will be noticeable on large and complicated files. Diagnostic Outsourcing ¶ By default Phpactor will now run diagnostic analysis in a separate process. Read more...

Phpactor 2023.01.21

, tagged: phpactor
I have tagged Phpactor 2023.01.21. This release is a little bit later than normal as I completely forgot to do it last week. Features ¶ Param docblock generation ¶ If there are any complex trivial types (e.g. generic types, or arrays) Phpactor will now suggest to generate default @param docblocks. class-string template param In addition the docblock updating code has been improved allowing us to update docblocks (previosuly Phpactor would only create them). Read more...

Phpactor 2022.12.12

, tagged: phpactor
I have tagged Phpactor 2022.12.12. This is the 4th monthly Phpactor release, I forgot (or rather conveniently forgot) to write a blog post for the previous release 2022.11.12 so I’ll include the best changes from that too in this update. The most significant change with this “tag” is that we no longer support PHP 7.4. If this causes you issues please add a comment on this ticket. Features ¶ Replace Qualifier with Import (2022. Read more...

The Best Container

, tagged: phpactor php
There are few things that I really like about Phpactor, but its DI Container [link] is one of them. In seven years it has hardly changed at all. It’s modular, supports tags, parameters (with schemas) and the has only 233 lines of code including comments and whitespace[1] There is no YAML, XML or compilation. No auto wiring, no property injection, factory modifiers, weird ways to extend services. All services are singletons. Read more...

Phpactor 2022.10.11

, tagged: phpactor
Today I have tagged version 2022.10.11. This is the first (and hopefully not the last) monthly release, the full changelog is on the release page. I’ll run through some of the highlights in this post. Generate Decorator ¶ Thanks to the perserverance mamazu there is now a code action to generate a decorator: Generate Decorator This is an LSP only action, and must be invoked in a file with an empty class which implements one or more interfaces. Read more...

Phpactor 2022.09.11

, tagged: phpactor
Phpactor 2022.09.11 Today I have tagged Phpactor 2022.09.11. The previous release was Phpactor 18 all the way back in January. It has been a significant 8 months for Phpactor: Conversion to a mono-repository. Completely refactored type system. Phpactor theme song. Numerous features and improvements (see highlights) Converting Phpactor to a monorepo has accelerated development significantly, it has been far easier to fix bugs and add features. It is imaginable to say that more progress has been made in these 8 months than in the past 3 years and it’s still awful. Read more...

Phpactor's (New) Type System

, tagged: phpactor
Phpactor (it’s a Language Server) has a new type system, the most interesting features of which might be: First Class Types Generics Type Combination Type Literals In the examples below the function wrAssertType is used. This is an assertion used in Phpactor’s tests. History ¶ When I started Phpactor 7 years ago I had absolutely no clue about type systems (that’s only slightly less true today). As a consequence types were represented as a single class: Read more...

Phpactor is a monolith

, tagged: phpactor
Phpactor is a monolith with some exceptions. Over 20 packages have been imported into the main repo and their github repositories abandoned. This should make development far easier going forward. Background ¶ You may have heard me tell this story before. Hopefully this will be the last time I tell it. When I started Phpactor in 2015 I had just read “principles of package design”, and wanting to be a good developer, I decided to architect Phpactor as a set of decoupled packages, in general there would be four classes of package: Read more...

Phpactor 18

, tagged: phpactor
TL;DR;: Check the 0.18.0 release notes Phpactor 17 was released 11 months ago. After some busy months working on Phpactor I switched focus to phpbench for better or for worse and because of that there has been very little development on Phpactor for the past 6 months. During which time PHP 8.1 has been released. Phpactor 18 does not support PHP 8.1 features (e.g. Enum) currently, but thanks to tolerant-php-parser it supports the syntax and won’t crash if you use a readonly modifier. Read more...

Phpactor 17

, tagged: phpactor
TL;DR;: Check the 0.17.0 release notes It’s been over 6 months since the release of Phpactor 16. Time really files! I planned to release Phpactor 17 last August - but, well. It didn’t happen and in the meantime there has been a huge amount of activity in develop. PHP 8 Support and Github Actions ¶ Phpactor can now be installed with the PHP 8 runtime, some necessary fixes were made to support new PHP 8 syntax and some new features: Read more...

Maestro the Package Automator

, tagged: php maestro phpactor
TL;DR; Maestro is a package maintenance automator which is in development. It’s Christmas and Phpactor needs to be upgraded to PHP 8.0, but Phpactor has many packages: $ composer show | grep phpactor | wc -l 42 Most of these packages were created almost 4 years ago, and have been updated little by little as necessary. Even editing the composer.json file to allow PHP 8 for each repository is a big task - not to mention needing to migrate from Travis to Github Actions (as Travis has become unusable in the past months with build times sometimes taking an hour) - and that’s before I can even start manually editing all the test suites to be compatible with PHPUnit 9. Read more...

Phpactor 16

, tagged: phpactor
Release 16 (0.16.0). In total 32 tickets / cards have been worked on. Reference Finder ¶ Phpactor 15 introduced an indexer, which enabled a couple of new features. A major one is reference finding. In Phpactor, reference finding refers to finding: Class references Function references Class member (method,constant,property) references. The first two are straight-forward, the third requires additional static analysis and can be slower (we need to find all matching members, then perform some static analysis to see if the container type belongs to the class we are searching for). Read more...

Phpactor 15

, tagged: phpactor
It’s been two months since the last Phpactor release. Release 15 (0.15.0) was intended to be the release that integrated the Language Server. It has been a huge amount of work, and at least 63 tickets have been worked on. But there have also been numerous other improvements. New Documentation ¶ Phpactor now has new documentation hosted on readthedocs. The new docs can make use of the power of RST and should provide a better foundation for continuing documentation development. Read more...

Phpactor 14

, tagged: phpactor
TL;DR: See what’s new. It’s time to make a new release! Which generally involves lots of waiting for composer. So a good time to make a blog post. It’s been well over a year since I last blogged about 3 years of Phpactor. So what’s new since then? What happened in 2019? In January 2019 I really wanted to finish the Language Server implementation, and I spent lots of time working on a generic language server implementation, then the language server extension and quite a few other packages which added distinct capabilities to the server and finally it was working with completion, reference finding and hover. Read more...

Phpactor Extensions

, tagged: phpactor
Over the past month or so I have been gradually migrating Phpactor to use Extensions. This started because I wanted to add Language Server capabilities to Phpactor, but having two RPC mechanisms in the same application seemed overkill, so I decided to extract everything into extensions in order that all of the components could be easily reused and recombined (so that a phpactor-language-server standalone application could be created). In addition I wanted the ability to add framework and tool specific functionality, which doesn’t belong in the main distribution. Read more...

Rephpactor

, tagged: phpactor
TL;DR ¶ Phpactor 1.0 will have no features at all, but it will provide a way to install extensions. All current Phpactor functionality will be extracted to extensions. Background ¶ One problem with Phpactor has always been that it has not been extensible - it is not possible to, for example, install a Behat extension, or a Phpspec or Symfony extension. It is not that the infrastructure isn’t there internally - it is and was based on the precedent set by Phpbench (which was in turn influenced by other things, notaby Behat, Symfony, Pimple, etc). Read more...

Three Years of Phpactor

, tagged: phpactor
The first commit in Phpactor (pronounced “factor”) dates from almost three years ago: commit 3677c5cb58a5b203fb658c8e2498e512cdef555a Author: dantleech <[email protected]> Date: Thu Sep 24 14:08:35 2015 +0200 Initial I had no idea about how to create such an ambitious project in a domain in which I knew nothing. But I had been using VIM for around 7 years (?), VIM is a great text editor, but the tooling around refactoring and auto-completion for PHP was sub-optimal, and instead of waiting more years, I decided to write my own tool. Read more...
1 of 1