hyperf/code-parser
A lightweight PHP code parser for Hyperf that uses nikic/php-parser to inspect source as an AST. It helps analyze classes, methods, and properties, traverse nodes with visitors, and support code generation and transformation workflows.
Scope correction. The release supplied is Hyperf v3.2.0 — a coroutine PHP framework (Swoole/Swow) with Laravel-adjacent APIs (Collection, Arr, database layer, console, container), not a Composer package installable into a Laravel application. The assessment below treats it as a parallel PHP runtime and evaluates it against a Laravel-centric estate.
Architecture fit.
Integration feasibility.
>=8.2, plus Symfony ^6.0 || ^7.0, PHPUnit ^11, Elasticsearch ^8 || ^9, nikic/php-parser 5.6, guzzle ^7, protobuf ^3.6.1 || ^4.2. Any transitive dependency pinning Symfony 5 or Carbon 2 will block resolution.getQueueName() → getPoolName(), Consumer $queue → $pool, removal of Hyperf\Serializer\Contract\CacheableSupportsMethodInterface, swap of influxdb/influxdb-php → influxdata/influxdb-client-php, and a new dependencies.php binding for Swow.logger and cache switch from a flat map to default + channels/stores. Every environment, Helm value, and ConfigMap embedding the old shape must be migrated.Technical risk.
createFromTimestamp() no longer honoring date_default_timezone_get(), and diffInDays() no longer absolute by default. These do not throw — they shift timestamps and sign-flip interval math in billing, SLA, and reporting paths.logger/cache may still boot and behave differently (logging dropped, cache store/prefix falling back), producing blind operations or cross-environment key collisions.fgetcsv/fputcsv escape parameter requirements and the deleted_at default changing to datetime add touchpoints in CSV import/export and soft-delete queries.Key questions.
AsyncQueue\Job subclasses or custom consumers that override getQueueName()/$queue?config/autoload/{logger,cache}.php across environments, and are those shapes templated in Helm/K8s config?ResponseEmitterInterface binding is a required config addition, not optional.createFromTimestamp(). The intended semantics cannot be determined from the notes; upstream clarification is required before we can audit timezone-dependent code.Stack fit.
^6.0 || ^7.0 and Carbon 3 to be reusable across both stacks.Migration path.
composer.lock, run composer why-not against every first-party and third-party package for Symfony 6/7 and Carbon 3.config/autoload/logger.php and config/autoload/cache.php to the new default + channels/stores shape in the lowest environment first, verifying log output and cache read/write before proceeding.getPoolName(), $pool), delete CacheableSupportsMethodInterface implementations, swap the InfluxDB client, and add the Swow ResponseEmitterInterface binding if applicable.createFromTimestamp, diffInDays, and any code relying on default-timezone behavior.Compatibility.
Sequencing.
Maintenance.
ResumeExitCoordinatorListener, SocketIO flag, WebSocket exception alias typo) should be grep-verified; each is a latent boot failure.Support.
nesbot/carbon v3 support), so upstream documentation is the authority, not the Hyperf notes.Scaling.
processes.php entries — fewer drift bugs at scale; per-job queue/pool naming improves workload isolation; QueryException now carries the connection name, materially improving incident triage; listener caching avoids repeated resolution.Failure modes.
createFromTimestamp() and non-absolute diffInDays() — wrong billing, wrong SLA math, silently.escape — deprecation noise escalating to behavior change on import/export.limit() now throwing on non-positive values — previously tolerant query builders become runtime errors.Ramp-up.
How can I help you explore Laravel packages today?