PHP loves its arrays. Arrays are the uber-data structure. They’re a list, a map, a stack, a queue, everything in one! Which is the problem. Modern PHP grossly over-uses arrays. In most cases there are better options today, and when you find yourself reaching for “oh I’ll just make this an associative array”, stop. An …
Continue reading “Never* use arrays”
How to measure the quality of unit tests? Code coverage is not necessarily a good indicator to answer this question. What other options do we have? Do we need tests to test the quality of our tests? In some way, yes we do. In this session, I will introduce you to the concept of mutation-based …
Continue reading “How good are my tests?”
There are some exciting new things in Symfony 5. Besides removing some deprecations and bumping the PHP verison requirements, several components have left the experimetal stage. the Mailer & Mime, HttpClient (and why do we need one?), Notifier, String handling, and more. In this talk, we’ll look at the new features in depth both from …
Continue reading “Symfony 5, the new bits.”
Don’t know the difference between a grant type and an auth code? Know the difference but not sure how to implement OAuth 2.0 in your own application? In this talk I’ll start with OAuth 2.0 basics, then jump into implementation details using The PHP League’s oauth2-server library.
Think about PHP for a few seconds… What came to mind? It’s very likely you thought about your average product catalog, a blogging platform, or how the platform is inferior to things like Node.js. But wait, it’s 2020! What if I told you PHP’s huge ecosystem has way more to offer and PHP is not …
Continue reading “Getting started with ReactPHP – Pushing real-time data to the browser”
Programmers naturally give more attention to a “happy path” – default scenario in application execution in which everything works as expected, often neglecting the opposite way things can go. Topics such as the use of exceptions and error handling seem insufficiently explored, so it is difficult to find useful resources online. Things usually end up …
Continue reading “Handling Exceptional Conditions with Grace and Style”
Now you will probably have heard of PHP_CodeSniffer as a tool to check your code for consistent code style, but did you know it can also be used to check for common best practices ? Out of the box, PHPCS already contains the basics to check your code against common industry metrics, however, when you …
Continue reading “Improving Code Quality with PHP_CodeSniffer”
During this presentation, we are going to look at the new features that are being introduced PHP 7.4. Join me to have a look at how the type system is strengthened with typed properties and co- and contra-variance of methods, what changes to operator precedence are, and which new features, such as pre-loading classes, are …
Continue reading “The La(te)st PHP 7 — What’s new in PHP 7.4”
What is it what we do? I believe we are problem solvers. But not just problems, complex problems. And most of the time these problems are unknown to us. This is what makes our job challenging. This is why we love our job. So how to find the problems we need to solve. And how …
Continue reading “Do the right thing right”
PHP has its own treasure chest of classic mistakes that surprises even the most seasoned expert : code that dies just by changing its namespace, strpos() that fails to find strings or arrays that changes without touching them. Do that get on your nerves too ? Let’s make a list of them, so we can …
Continue reading “Top 10 PHP coding traps”