This year I was lucky enough to acquire my first ticket to WordCamp US. And I was interested in what WordPress held for the future of PHP development.
My fortune continued when the camp was drivable enough for me to turn it into a workcation I could spend with my wife and yellow lab.
I consider myself a WordPress expert having worked with it since version 1.8.
Since I was not likely to learn anything new regarding WordPress core, I concentrated on sessions that could help developers in general.
Let’s see what happened.
I apologize for this taking forever and a day, but between WordCamp US and DrupalCon Lille, I had four site migrations in addition to my retainer work. Passion projects like Mobile Atom and Symfony Station still play second fiddle to business demands.
The best announcement at WCUS was that WordPress Core dropped support for PHP 5. It’s years too late but at least it happened. This allows for accelerated adoption of newer PHP versions, which means we might say goodbye to PHP 7.X sooner than expected as well.
So, if you work with WordPress and you’re still hanging onto older PHP versions, it might be time to get your shit together and get with PHP 8+.
Use the linked headings to view the sessions on YouTube.
If you want to learn about how the WordPress admin works these days, this was the session for you. I won’t go through it but will bring up the points relating to PHP.
While I recommend using full site editing themes going forward, you can still build hybrid themes and keep any complex functionality you’ve built with PHP.
And of course you can bring the new block capabilities into your traditional theme with add_theme_support in your functions.php file. That makes it hybrid.
Custom Blocks and Templates with PHP
Core WordPress blocks and many community blocks are built with React. Since React is shit, it’s fortunate you can still build custom blocks, patterns, and templates with PHP and use them in the site editor.
This session obviously covered Composer, which as we know is the PHP dependency manager.
With Composer you can break up and customize your WordPress install in a composable versus monolithic way. And of course it can integrate with your favorite git solution.
The one file is composer.json. It lets you control tags, versioning, dependencies, dev environments, etc. And the session covered those.
It’s great to see Composer being used with WordPress as it is part of modern PHP development.
This session as the name implies looked at developing a WordPress site similar to the way you would a Symfony site. It covered things most of us are familiar with like git and GitHub, VS Code, Docker, etc.
Specific to PHP it covered Lando. It’ a Docker-based local development tool for WordPress, Drupal, Symfony, and more.
And it has extensive integration with your other development tools. If you love PHP Storm, Elasticsearch, or Platform.sh you’ll be happy. Lando also has hosting integration with Platform.sh, Acquia, Pantheon, and Lagoon.
The session also covered Bedrock. It bills itself as an ideal starting point for using Composer with WordPress. You Manage your WordPress install and plugins with Composer. It will make development more reliable, help with team collaboration, and maintain a better Git repository.
While not PHP specific, the session ended with a look at Github Actions.
Unless you have been on a drug trip the past few years (and who would blame you), you know there is a growing movement toward decoupled websites.
Sean Blakeley looked at the "Headless" Block editor in his session. He explored bringing the Gutenberg editor into decoupled applications.
The obvious use case is for using the WordPress backend (where you can still program in PHP) as the data and content center for a variety of frontends. These include websites, mobile apps, IoT, "AI" etc.
Currently, this is still overkill for pure websites unless you have large enterprises sites or eCommerce sites. You have to justify the large expenses and headaches of two code bases.
Sean notes, you need a bridging mechanism to bring the data from the backend to the frontend by mapping it to the frontend components.
Until now the inelegant solution involved the REST API or GraphQL (via a plugin) with static HTML. The obvious drawback is that you can not have any interactive content with this approach.
Sean posits the need for registries providing shared schema from the Gutenberg editor to the frontend editor of choice.
So, watch the video to get those details.
The speaker, Joey, defined information architecture as the structural design of information including it organization and labeling to support usability and findability. She noted it's not just navigation and sitemaps.
It's also discoverability with contextual menus and related products, etc.
She went into detail on the "card sorting" strategy to provide an optimal organization of your content. You should run what you discover there, through tree testing.
You also need to do taxonomy development (the types and groups of your content) and descriptive information creation.
Of course core WordPress has categories and tags for taxonomy. You need to organize these based on content relationships.
Joey goes into detail on these items as well as database tables, so watch the video for the fine details.
As the name implies, Ross looked at bringing SPAs into WordPress sites. He used 100 Women, an Australian non-profit, as his case study.
Basically, it involves putting your SPA into a div within WordPress but not an iframe.
As a side note, they build their SPAs with Laravel and VueJs, and of course tie it into WordPress with an API.
Watch the video for details.
To answer my question at the top of this article, I do not think attending WordCamp US, Europe, Asia, etc. is relevant for the pure PHP developer. Just stay up to date with the WordPress Developer Resources.
For PHP developers (unfortunately) not so much. :(
If you want PHP action go to DrupalCon. ;) Which I did in Lille and will cover in a future article.