PinnedPeter Fox·Sep 27, 2024Mastering PHP: Type Hinting techniquesType hinting is considered by some to be the holy grail of features. One that all programming languages must have. PHP for the longest time…
PinnedPeter Fox·Sep 2, 2024Fix your Type Hints with Configurable Rules and PHP RectorMaking your own rules to work with Rector PHP can be a bit of a learning curve. That said we don’t have to create new rules to have a big…
PinnedPeter Fox·Aug 22, 2024Mastering Code Refactoring: A Complete Guide to Using Rector PHPIntroduction to Rector PHP
PinnedPeter Fox·Feb 13, 2024PHP: 7 tricks to help with upgrading Composer packagesRecently I had the pleasure of taking an enterprise app and upgrading it from Laravel 9 to Laravel 10. Like a lot of applications, we also…A response icon5A response icon5
PinnedPeter Fox·Oct 18, 2021Laravel Models: 3 Common custom cast examplesLearn how to use custom casts in Laravel through examples for casting Money, Date Intervals and Locations & Addresses.A response icon1A response icon1
Peter Fox·Sep 17, 2024PHP Upgrades: Block regressions with PHPStanOften when people think of PHPStan they typically think of improving Type Coverage. That is really only a small part of what PHPStan is…
Peter Fox·Jun 6, 2024PHP: Mocking Closures and performing assertionsTesting is crucial to ensuring code quality and reliability in modern PHP development. One powerful technique in testing is mocking, which…A response icon1A response icon1
Peter Fox·Apr 12, 2024Laravel Scout: Eager loading models for indexingIf you’re like me you want to get eager loading right from day one. One area that can initially seem difficult for this is when it comes to…
Peter Fox·Apr 1, 2024Laravel Testing: Mocking static methods with the containerI came across a difficult challenge this week. How can I mock a static method being used? Ideally, static methods shouldn’t be used as…
Peter Fox·Feb 12, 2023Laravel Feature Flags: Choosing a PackageThere are a good number of feature flag packages for Laravel, in this article I breakdown a few popular options.