Maxim Mironjuk | Page 252
Posts by Maxim Mironjuk
-
May 31, 2025
Copying Luma's newsletter widget straight into a Hyvä theme collides with the strict Content Security Policy and produces a form that silently fails in the browser. A clean newsletter integration instead needs registerInlineScript(), a lean Alpine.js component with fetch(), a properly communicated double opt-in flow, and a server-validated GDPR consent checkbox, placed cleanly via layout XML in the footer, checkout success page and CMS block.
-
May 31, 2025
The built in Error class from JavaScript is rarely enough for a growing codebase: it carries no error codes, no structured metadata, and no clean serialization. A well thought out error class hierarchy solves these problems with a shared base class, consistent instanceof checks, and cause chaining for connected failure causes.
-
May 30, 2025
MySQL 8 introduced two small but practically important index features that were simply missing in earlier versions: true descending indexes and invisible indexes. Before, the optimizer simulated a descending sort with a backward scan over an ascending index, which hit a hard wall once mixed sort directions across several columns were involved. And an existing index could only be tested by actually dropping it, a risky step in a production Magento database. This article covers how both features work internally, when rebuilding an existing index is genuinely worth it, and how to make index changes to a live installation with minimal risk.
-
May 30, 2025
Redis has no native concept of multi-tenancy out of the box, which is why every multi-tenant setup requires a deliberate architectural decision. Three approaches are typically on the table: prefix-based namespaces within a shared database, logical databases via the classic SELECT index, or fully separate instances per tenant. All three differ significantly in isolation level, backup granularity, and scalability. This article compares the three strategies against concrete criteria and derives a practical recommendation for multi-store Magento setups, where several store views are meant to share the same cache layer.
-
May 30, 2025
A video embed without a fixed aspect ratio shifts the entire layout while it loads, and it costs Core Web Vitals points. Tailwind CSS's aspect-ratio utilities solve this problem cleanly, responsively and without a padding hack. This article shows every pattern, from 16:9 to fully custom ratios.
-
May 30, 2025
Log files that are never rotated grow silently until a disk fills up and a production server crashes. logrotate keeps log files in check by size or time, compresses old files, and runs hooks such as service restarts after rotation. This article shows a practical configuration for a custom PHP application log and how to test it safely with debug mode before going live.
-
May 29, 2025
Green tests do not mean the code is safe. In many teams, tests only get a superficial look in review, whether they run, whether coverage numbers add up. Yet it is entirely different criteria that decide whether a PHPUnit test provides real protection against regressions or merely fakes safety.
-
May 29, 2025
A modular monolith splits a Symfony application into clearly bounded modules, each shipped as its own bundle with its own data layer and defined interface. That keeps a growing project maintainable without immediately taking on the operational complexity of microservices. This article shows the concrete directory layout, the communication between modules and how Deptrac enforces architectural boundaries automatically.
-
May 29, 2025
The INFO command delivers a wealth of raw data about a Redis instance, but as plain text output it is barely usable for systematic alerting. The Redis Exporter translates exactly this raw data into structured Prometheus metrics, extends it with custom check commands for key sizes and latencies, and only then makes it usable for dashboards and alerting rules. This article covers which metrics the exporter concretely provides, what sensible alerting rules for memory usage, connection count, and replication lag look like, and how to build a dashboard for daily operations from it that fires not only on an acute outage, but already at the first warning signs.
-
May 29, 2025
Every call to clock_gettime, every timestamp generated by MySQL, and every latency measurement in PHP-FPM depends on the Linux kernel's active clocksource. The Time Stamp Counter (TSC) is orders of magnitude faster than HPET on modern hardware, but was long known for synchronization problems across CPU cores that still produce false expectations and misconfigurations today.