PHP: Guides and Practical Know-how | Page 3 | mironsoft Blog
PHP
-
Mar 29, 2026
Anyone lifting a grown PHP project onto PHPUnit 10 or 11 runs into a flood of deprecation notices, changed assertion signatures, and removed interfaces. This article shows a structured path through the migration, without endangering the running test suite and without having to touch every test class at once.
-
Mar 28, 2026
DI, Repository, ViewModel, Plugin, Observer, Factory, Proxy, MVC, Strategy, Iterator, Active Record, Singleton, Registry and more: all 13+ architectural patterns in Magento 2 explained, with code examples and the knowledge of when which pattern is the right choice.
-
Mar 25, 2026
Unlike Elixir or the proposed JavaScript feature, PHP has no native pipe operator. A single small pipe() function still recreates the same readable data flow in PHP 8.4, left to right instead of deeply nested function calls.
-
Mar 24, 2026
A dependency update checker regularly collects the state of outdated packages across multiple repositories and surfaces security advisories before they show up unpleasantly in an audit. This article shows how such a dependency update checker evaluates composer outdated and npm outdated with jq, classifies version jumps, and automatically ships the results as a report.
-
Mar 23, 2026
An upload form is one of the most direct attack surfaces of a PHP application, because it lets an attacker put fully controlled content onto the server. Relying solely on the file extension or the content type sent by the client opens the door to remote code execution, path traversal and injected script files disguised as harmless images.
-
Mar 22, 2026
In Magento 2 projects with tens of thousands of files in vendor/ and hundreds of modules in your own code, unfocused searching is inefficient. PhpStorm scopes limit search results to relevant areas, Custom Search Scopes filter down to your own modules, and Structural Search finds code patterns that cannot be meaningfully described with regex.
-
Mar 19, 2026
Anyone using modern frontend stacks with PhpStorm loses time to missing autocomplete configuration, failed CSS class completion, and Vite processes that aren't integrated into the IDE. The right settings reduce context switching between terminal, browser and editor to a minimum.
-
Mar 17, 2026
Almost every PHP developer has built their own observer pattern at some point, usually a subject class with a list of callbacks. PSR-14 formalizes that pattern into two cleanly separated contracts. We implement both ourselves, including stoppable events, and build a practical domain event mechanism from it without any framework.
-
Mar 14, 2026
Anyone who treats Value Objects as nothing more than fancier data classes gives up their real benefit: a Value Object encapsulates equality, validity, and immutability in exactly one place in the code, instead of scattering those rules across services, controllers, and forms. This article shows, in plain, framework-independent PHP 8.4, how to use equals() instead of naive comparison, how to enforce invariants inside the constructor, and how readonly properties deliver true immutability, all without losing the balance between objects that are too small and objects that are too large.
-
Mar 14, 2026
When a PHP application hits a hard computational ceiling, the classic path used to run through a custom C extension with its own build process. FFI lets you call existing native libraries directly from PHP code, with no compiler toolchain in the deployment, making performance-critical code practical for far more projects than before.