kornrunner/solidity
PHP library for working with Solidity smart contracts, including ABI encoding/decoding and utilities for Ethereum contract interaction. Encode calls, decode results and events, and handle contract data in PHP applications. Lightweight and suitable for transaction building and event parsing.
Architecture fit. kornrunner/solidity is a narrowly scoped PHP helper for parsing Solidity source and extracting contract metadata (principally ABI-shaped artifacts) without shelling out to solc. That places it in the "developer tooling / codegen helper" layer rather than the runtime transaction path. It is a reasonable fit for PHP back-office tooling — contract explorers, admin dashboards that enumerate functions/events, ABI generators, or CI-side linting — but it is not a component most PHP blockchain stacks actually need at runtime. The dominant pattern in PHP (web3p and friends) is to consume committed ABI/artifact JSON produced by a real compiler. Treat this package as an optional authoring-time convenience, not an architectural dependency.
Integration feasibility. Composer-installable, MIT-licensed, and the public surface is presumably small (source in → structured ABI/metadata out), so the integration cost is low. The real feasibility question is fidelity: a source-level Solidity parser must keep pace with the language. With the last release in December 2020, support for Solidity 0.8.x semantics, inheritance resolution, interfaces, imports, and library linking is the gating unknown, not the PHP wiring.
Technical risk. The risks are concentrated and material:
Key questions to resolve before adoption
solc version was it last validated?import, inheritance, interfaces, and using-for — or does it only parse a single flat file?solc --abi on a representative corpus?solc/solc-js already available in the environment?Stack fit. Consumes cleanly as a Composer dev/auxiliary dependency in a PHP 7.4–8.x service. It should sit behind an internal abstraction (e.g., an AbiExtractor interface with a SolcAbiExtractor fallback), so the package never becomes load-bearing. If the product already runs solc in CI, this package is additive at best and should not displace the compiler.
Migration path. There is no meaningful migration to this package as a compiler replacement — don't position it that way. The realistic path is:
solc in CI and committed.Compatibility. Two axes matter: PHP runtime version constraints and supported Solidity language versions. Verify both against the current dependency set and against the contracts actually in scope. Because the package is unmaintained, plan to vendor a fork if PHP 8.3+ deprecations surface.
Sequencing.
solc.solc fallback first.solc-js/solc is likely lower total cost than owning a parser fork.Maintenance. Effectively unmaintained. Budget for either accepting no upstream fixes or forking and owning the grammar. The MIT license makes forking legally trivial; operationally, a fork means you now own a Solidity grammar — a non-trivial, ongoing commitment.
Support. Community-only via GitHub issues, with a single contributor and no SLA. Escalation path is "we fix it ourselves." This should be documented as an accepted risk in the dependency register.
Scaling. The workload is CPU-bound parsing of small text inputs; throughput is a non-issue at typical tooling volumes (hundreds to low thousands of contracts per batch). Memory and latency are dominated by contract size, not by concurrency. No operational scaling concerns.
Failure modes.
solc in CI.solc path.Ramp-up. Low for the API (small surface, Composer install), moderate for the domain: engineers must understand Solidity language semantics and ABI encoding well enough to judge whether output is correct. That reviewer skill is the actual onboarding cost, not the package itself. Plan for one engineer to own the spike and the fallback abstraction.
Recommendation. Adopt only as a non-authoritative, behind-an-interface convenience for authoring-time tooling, gated on a successful solc-diff spike. Do not adopt it as the source of truth for ABIs used to drive on-chain transactions, and do not adopt it until the Solidity-version coverage question is answered.
How can I help you explore Laravel packages today?