Just over a year after publishing an article of the same name, I’m proud to announce that I’ll be presenting A Crash-course in PHP Namespaces for WordPress Developers at WordCamp Detroit 2019 this May!
Way back in 2009, PHP 5.3 was released to the world and with it brought support for PHP namespaces — a way of easily separating your code from other developers’ code, which has since become the de facto way of encapsulating functionality across the PHP ecosystem.
With namespaces, multiple packages could use the same class and function names without conflict, because each one would operate in their own PHP namespaces. Unfortunately, many PHP developers who focus on WordPress development may be in the dark on this extremely useful language feature.
This talk aims to shed light on PHP namespaces, especially targeted at WordPress developers who haven’t yet encountered them. Attendees will leave the talk with a firm grasp on PHP namespaces, how they work, and how they can be implemented in plugins and themes.
While I’ve given this talk once before at php[world] 2018, it was written first and foremost for developers who might have come up as a developer learning from WordPress core/plugins/themes and picked up a few anti-patterns along the way.
While it certainly gets the job done, WordPress’ PHP 5.2 support has long been a hinderance for upcoming developers in the ecosystem — it’s like having a history textbook that ends after World War II.
Fortunately, WordPress 5.2 is officially dropping support for PHP below version 5.6, with plans to bump the minimum version to PHP 7+ by the end of 2019.
It’s serendipitous then that I get to introduce a language feature the rest of the PHP community’s been embracing for the last decade to a whole new group of developers!
WordCamp Detroit 2019
Cass Technical High School
2501 2nd Ave
Detroit, MI 48201 May 18, 2019