X
    Categories: Insights from Interview With PHP MagiciansInterviews With Experts and Influencers

Michael Cullum Talks About PHP FIG, PSR & Symfony

Michael Cullum is a versatile PHP/Symfony developer. Currently, he is a manager at  phpBB and  PHP-FIG secretary. Apart from his development skills, he is also a highly respected speaker at PHP conferences.

In this interview, Michael talks about the evolution of  PHP-FIG for enhancing PSR standard, contribution to phpBB and the tricks of speaking at technology conferences. Let’s start the interview!

 

Cloudways: Hello Michael, How are you? You have such a tremendous reputation for PHP development. Please tell us how  your career started and what motivated you to become such an exceptional software engineer?

Michael: I am well. I’ve just these last few days returned home from over two months of near-constant travel, so am just settling down at home for a few days before moving to central London next week. It’s nice to have a small break.

Thank you for that very humbling introduction. I started development of PHP by tinkering with an old phpBB installation I was running for a club over a decade ago to get it to do things it didn’t already do. From there my fascination of development grew and I started work on phpBB modifications for the wider community and people started approaching me in private to create custom modifications for them or perform services such as updating their phpBB installations (which at the time could be quite complex and required in-depth knowledge of PHP). This was the beginning of my freelance career.

In my eagerness to develop my knowledge, I broke out from the phpBB ecosystem into the wider PHP world and started working with PHP as a wider language, outside of the phpBB confines. I also joined the official phpBB team and started encouraging the integration of phpBB back into the wider PHP open source community and bring innovations such as Symfony and Composer back into the fold of phpBB.

In the past few years my freelancing has led me to now focus on backend PHP development, normally relating to, or using the Symfony framework. I’ve also started working with other languages such as Python, C/C++ and most recently Java.

In the PHP Community, I’ve now helped organize a couple of conferences including a DrupalCon and PHP South Coast 2016, and I founded a PHP User Group called PHP Surrey, based in Guildford in the UK, which has now been running just over one year. For quite a time now, I have been involved with a number of open source projects and the PHP Framework Interoperability Group (which I believe we’ll talk about in a bit). Last year I started work as Editor on PSR-12, a replacement for PSR-2, which incorporates PHP 7 functionality, and at the beginning of this year, I was elected to serve as a FIG Secretary for a term of two years.

Throughout all this time, I think there have been two core motivations. One has just been a simple desire to learn and an attitude of self-improvement. Whether it be improving existing skills, learning new technologies or simply exploring something new, I’ve always been curious and eager to learn new things and this has helped drive me. It is something I continue to do now as there is always more to learn. It’s important to regularly take time to invest in yourself and learn. My other core motivation has been to ‘pass it on’ as Cal Evans and others often say. The PHP community is fantastic and I owe so much to it. And as such, I want to give as much back as I can. Sometimes this is in the form of small but simple things like reporting bugs, submitting patches or simply thanking people for awesome things they’ve done. Other times it’s in the form of passing on knowledge through conference talks, the PHP mentoring program, working on the core of projects like phpBB or aiding in the administration of organizations like the PHP-FIG. I do what I can to help others in the community  because the community and open source software has given me so much back.

Cloudways: Michael, you are actively working on PHP-FIG. Would you elaborate what is PHP-FIG and what is the core purpose of the group?

Michael: The PHP-FIG, or Framework Interoperability Group, is an organization formed around some of the largest projects in the PHP ecosystem. These projects have come together on a single forum to collaborate on building PHP standards, named PSRs. This has had a huge impact on the PHP ecosystem in two ways. Firstly, it’s brought together projects, many of which we were used to seeing as insular communities, to work together towards the goal of interoperability. We’ve seen projects such as Drupal ‘get off the island’ as my friend Larry Garfield likes to say and start using libraries and frameworks from across the PHP ecosystem. Secondly, it’s helped simplify the life of developers hugely by helping improve interoperability between different applications/packages, it’s helped us create libraries which can be framework-agnostic, decouple our applications (being dependent upon interfaces instead of implementations), reduce cognitive friction and save developers’ time (no need to write their own coding guidelines and having defaults built into fixers, CI tools and IDEs).

Cloudways: PHP Standards Recommendations (PSRs) are a remarkable step by PHP frameworks and library creators. What benefits developers can get from them and how these recommendations streamline development of PHP apps?

Michael: PSRs have allowed us to make huge jumps forward as language as I indicated earlier. PSR-0 (and later PSR-4) provided us with an autoloading standard which has, together with Composer, allowed and promoted the use of reusable libraries and frameworks in applications. Composer and Packagist helped solve the dependency and distribution problems but autoloading (and OOP concepts introduced in PHP 5.x) made it easy to then integrate those libraries and frameworks into applications.

As an ecosystem, this has allowed us to mature hugely as we’ve been able to stop re-inventing the wheel, share code and stop attempting to solve the same problem hundreds of time. Application developers can begin to focus on the problems of their own application instead of trying to repeatedly solve general problems such as DBALs or authentication layers.

PSR-1 has helped us standardize things relating to coding standards that affect interoperability. For example not including side effects (ini_set(), echo etc.) in the same files as your business logic (classes and functions) makes it safe to include and use these libraries.

PSR-2 has provided a common base for small and large open source projects alike to stop spending time developing their own coding standard, but use a common one used by many projects and built into CS fixes, static analysis tools and IDEs.

PSR-4 and PSR-6 allowed developers of libraries to stop worrying about which Cache or Logging library might be used, but just rely on the fact that one would be passed into their services. Finally, PSR-7 has helped us standardize a core part of PHP development. The handling of HTTP requests and response objects. This provides benefits to PHP HTTP clients like Guzzle and frameworks returning HTTP responses like Slim, Symfony or Zend Framework alike and allowed the further production of middlewares which are being further developed on in the upcoming PSR-15.

Cloudways: You recently spoke at Symfony UK. Tell us how was the experience? How was your very first speaking experience and what advice would you give to beginners?

Michael: Speaking is a great way to learn things, as well as to pass on knowledge to the rest of community and aid other developers in their professional and personal growth. Quite often when working on a talk you’ll pick up things doing research you didn’t realize before and the conversations that come out of talks can sometimes be very thought provoking.

I’d really recommend thinking about getting into speaking to both experienced and less experienced developers alike. I’ve been speaking for quite a few years now but your first speaking experience is one you don’t forget. I’d recommend approaching your local user group and asking if you can do a short 20-minute talk to get started as this will help you get a feel for speaking in general. From there, develop a couple of talk topics, take them to some local user groups to practice and *get feedback*. Then start submitting them to conference CfPs. Don’t be disheartened by rejections and just keep submitting. For your first talk, it can sometimes take a year or more before you get accepted, and then a while before you get your second or third talk. If anyone wants further advice I’m more than happy to give it from both a conference organizer (and someone who has run speaker/talk selection for a number of conferences) and speaker perspective.

Cloudways: We now have a list of dynamic frameworks in PHP and you yourself contribute to different frameworks. So, what framework would you recommend to a newbie?

Michael: I personally prefer the Symfony framework but partly this does just come down a little bit too personal preferences and what you use the most. When I first started using Symfony, I found its documentation was second-to-none and therefore very easy to get started with. When thinking of a first framework to pick up, make sure it’s got a strong documentation base behind it as you’ll find this very useful when learning the ropes. I know Symfony has this amazing documentation but I cannot pretend I know of every framework. The other reason I like Symfony is its ability to scale well (It powers Yahoo Answers) and it puts a developer experience first through methods such as it’s DX initiative (trying to making developing with Symfony as frictionless, easy and intuitive as possible) and backward compatibility promises.

Cloudways: Who would you recommend to follow in the PHP community? Who has influenced you in the PHP world?

Michael: There are so many folks in the PHP community that I respect for such a huge variety of reasons, many of whom I’m proud to call friends. I have tremendous respect for Fabien Potencier (Symfony’s lead developer) and what he’s done in bringing concepts from Java (such as dependency injection containers) into the mainstream in PHP. Nils Adermann, a friend and colleague at phpBB, together with Jordi Boggiano, for their continued work on Composer, a project that has made such a huge impact on the PHP ecosystem and helped us as a community and as a language to mature greatly.

The other great folks over at the PHP-FIG such as Larry Garfield and Matthew Weier O’Phinney who are helping us move towards a world where instead of ‘ZF modules’ or ‘Symfony bundles’, we have a series of framework-agnostic widgets that anyone can use. Those who tirelessly work on PHP internals (past and present) such as Derick Rethans, Sara Golemon, Anthony Ferrara, Davey Shafik, Andrea Faulds, Zeev Suraski and Andi Gutmans. Great community cheerleaders including all conference organizers, user group leaders and people who work as cheerleaders of the PHP community on an international basis such as Cal Evans, Jeremy Mikola and Ben Ramsey.

Great speakers who help spread ideas and knowledge such as Lorna Mitchell, Samantha Quiñones and Ross Tuck.

Finally, I’d mention Ryan Weaver, a gentlemen of whom I have the utmost respect for leading the effort in producing documentation for the Symfony project with Wouter, Christian and Javier, as I mentioned earlier. It is some of the best documentation you will find for an open source project and I know many of us find producing documentation tedious at times. There are so many other people, and Cal maintains a great twitter list that include a vast number of them.

Cloudways: Michael, what are your comments on the inter-framework development. Can we make web applications by combining two frameworks? What are the pros and cons of the idea?

Michael: I believe this is ultimately where we are going. To quote again a nice phrase from Matthew Weier O’Phinney, “To me, this is the logical implication of Composer, the ability to package reusable web-focussed widgets that can be composed into applications”.

Websites in the modern age are not normally just comprised of one forum application or a standalone CMS. Often you will see a Drupal website with a phpBB forum and a Magento cart. Being able to integrate all of these applications seamlessly is a great goal to have and one I think we are working towards a universal an ecosystem. Being able to integrate applications using different frameworks is a huge part of this and it’s always been possible to some extent, but it’s becoming significantly easier as time goes on and things progress. It helps make developers’ lives easier and makes large systems much more maintainable.

Cloudways: Enough technical questions :). Let’s talk about life! How you spend your time when you are not working?  What are your hobbies 🙂

Michael: I love to travel, and fortunately conference speaking allows me to do this a lot. I also enjoy playing (and coaching the juniors) cricket. I  am also part of my local amateur dramatic society where I do lighting. In a previous life, I used to do lighting in my free time at professional theaters or with professional groups. I also have a passion for choral [classical] music and sing Tenor in a leading choral choir in the UK. We maintain a traditional choral tradition of a choir of men and boys, in addition to a separate girls choir with whom we also sing regularly a huge repertoire spanning six centuries of compositions. We regularly perform concerts, partake in the production of TV/Film soundtrack recordings, make recordings for CDs and go on tours all over the world, the most recent of which was to Cologne just last month.

Cloudways: What do you think about managed hosting solutions like Cloudways that provide an optimized PHP stack with features that help developers kickstart their web projects?

Michael:  As a developer, you always want to be able to have a reliable environment, that you know the specification of for reproduction locally, and you want to be able to get that up and running quickly and smoothly in production without having to worry about system administration. Having to skip all of the initial bootstrapping and using a platform that is ready-made and tailored for that does help prevent headaches and save time.

Shahroze Nawaz: Shahroze is a PHP Community Manager at Cloudways - A Managed PHP Hosting Platform. He’s always in search of new frameworks and methods to implement them. Besides his coding life, he loves movies and playing soccer with friends. You can email him at shahroze.nawaz@cloudways.com