clearsoft/easysql-sdk
ClearSoft EasySQL SDK is a lightweight PHP library that simplifies building and executing SQL queries. Its fluent, chainable API reduces boilerplate, keeps queries readable, and integrates smoothly with Laravel and plain PHP projects.
Release scope. v4.1.0 is a single-feature minor release: Unix socket support in the MySQL and PostgreSQL connector configs (commit a9d8085). No deprecations, no removals, no documented breaking changes, and no changes to query semantics. This is a configuration-surface expansion of the connection layer, not an architectural change.
Architecture fit. The change lives where a TPM wants it to live — in the connector/config boundary rather than in query construction, pooling, or result handling. It means the package can be pointed at a local database socket instead of a TCP endpoint, which aligns with the common Laravel deployment shape (app and database co-located on one host or in one pod/VM) and with environments where the database is only exposed over a socket by design (managed MySQL/Postgres offerings, hardened hosts with the TCP listener bound to loopback or firewalled). It does not introduce a new dependency, a new transport abstraction, or a second code path through the query pipeline, so the blast radius is confined to connection establishment.
Integration feasibility. Low effort, config-only for most adopters. The realistic work is: (1) confirming the config key the package expects (unix_socket vs socket vs a DSN fragment) and how it interacts with host/port when both are supplied, (2) threading that key through the app's config/database.php connection arrays and any .env-driven overrides, (3) verifying parity with whatever Laravel's own connectors do, so the team isn't maintaining two mental models of "socket config." Because this is a package-level connector, the risk is divergence from framework conventions rather than integration complexity.
Technical risk. Low overall, with three specific hazards:
host and socket are set, behavior must be deterministic and documented. Silent fallback to TCP is the worst outcome — it turns a misconfiguration into a working-but-different connection path that surfaces later as a permissions or latency surprise./var/run/mysqld/mysqld.sock, /tmp/.s.PGSQL.5432, /var/run/postgresql, distro- and image-dependent). Any config that hardcodes a path becomes environment-specific and will break on the next base-image bump.Key questions for the maintainer/vendor.
host and socket are both present, and whether a fallback is logged or silent.Stack fit. Fits the standard Laravel shape with no ceremony: connection arrays in config/database.php, values from .env. It is most valuable for single-host deployments, Forge/Ploi-style provisioned servers, and environments where the DB is intentionally not on a public or private TCP interface. It is largely irrelevant for architectures that already assume networked DB endpoints (RDS/Aurora, Cloud SQL over TCP proxy, multi-host replicas).
Migration path. Treat as opt-in. Ship it as a per-environment config toggle rather than a global default so that local/dev and any socket-capable staging can be validated before production. A clean sequence:
composer.json (minor bump from 4.0.1 — standard constraint widening if the project uses ^4.0).DB_SOCKET), leaving TCP as the fallback so behavior is unchanged when the var is unset.Compatibility. Semver-minor and additive; no migration of application code, no schema or query changes, no data migration. The only compatibility consideration is whether any downstream code introspects the connection config array or builds its own DSN — those call sites should be audited before the flag is turned on.
Sequencing. Do this as a small, self-contained change in its own PR: config + env var + a smoke test that asserts the connection is actually established over the socket (e.g. assert @@socket/inet_server_addr() is null or the socket path, not just "query succeeded"). Bundle no other work — the value of this release is precisely that it can be validated and reverted in isolation.
Maintenance. Near-zero ongoing cost, with one caveat: socket paths are infrastructure detail that drifts with base images and OS upgrades. Whoever owns the runbooks must own that value, and it should live in configuration management, not in code review comments. Expect occasional "works on my machine" friction when a developer's local socket path differs from the container's.
Support. Positive for support load in the narrow case it's adopted — it removes a class of TCP/firewall/bind-address tickets and lets DB access be governed by filesystem permissions, which is easier to reason about than host-based firewall rules. Negative if precedence is ambiguous: "it connected, but to the wrong place" tickets are expensive to diagnose. Confirm and document the precedence rule before rollout.
Scaling. This is the main architectural caveat and worth stating plainly to stakeholders: sockets are local-only by definition. Socket config is correct for single-host and vertically scaled deployments, and it is wrong for horizontal scaling where app instances and database are on different machines, or where reads are served from replicas on other hosts. If the platform roadmap includes multi-node app tiers or managed DB with replicas, keep socket support scoped to local/dev and single-node environments and keep the TCP path as the default for anything elastic. Also note that socket connections bypass any network-level observability (no TCP metrics), so connection troubleshooting shifts to DB-side and filesystem signals.
Failure modes. (a) Missing or unmounted socket directory in a container → connection refused at boot, typically a total outage for that instance, so it must fail fast and loudly rather than retry indefinitely. (b) Wrong path → same symptom, different fix; explicit error messages matter here. (c) Permission mismatch between the PHP-FPM/queue worker user and the DB group → intermittent success depending on which process handles the request, which is the worst failure shape. (d) Silent fallback to TCP masking a misconfiguration. (e) Environment skew where the queue worker, scheduler, and web tier read different config — mitigated by keeping the socket value in a single env source consumed by all processes. Health checks should assert socket connectivity explicitly rather than relying on a generic DB ping.
Ramp-up. Very low for engineers — it's a connection string concept they likely already know from mysql -S or psql -h /var/run/postgresql. The ramp-up cost sits with platform/ops, who must document which environments are socket-eligible. Half a day for config plus validation across the environments actually in use; add a day if container orchestration changes are needed to mount the socket.
Recommendation. Adopt v4.1.0. It is a low-risk, additive capability with clear operational upside for co-located deployments and no impact on existing TCP configurations. Gate adoption on two answers from the vendor: the exact config key, and the documented precedence/validation behavior when socket and host are both present. Do not make socket the default for any environment that is or will be horizontally scaled.
How can I help you explore Laravel packages today?