byrokrat/banking
PHP library for Swedish banking data: validate, format, and work with account and clearing numbers, Bankgiro and PlusGiro numbers, BIC/SWIFT codes, OCR references, and monetary amounts for payment integrations.
Architecture fit
app/Domain/Banking layer behind a thin application service.Integration feasibility
^7.3 || ^8.0 rather than a 7.x-only pin. Under Composer's caret semantics that resolves on PHP 8.1, 8.2 and 8.3 — so installation on a Laravel 10/11 project should now succeed where the prior assessment assumed it would fail. Still verify the literal constraint string: ^8.0 installs on 8.1–8.4, whereas ~8.0.0 or 8.0.* would cap at 8.0 and reintroduce the block.byrokrat/* packages (check-digit/amount style helpers). These may not have received the same constraint widening — confirm each resolves independently.Technical risk
| Risk | Severity | Rationale |
|---|---|---|
| Maintenance abandonment | High (marginally softened) | 15 stars, single-maintainer profile. 2.2.3 is the first evidence of responsiveness to a platform change, so "no upstream activity, ever" is no longer accurate — but a compatibility patch is not a maintenance commitment. Assume no functional or registry fixes. |
| PHP/framework version drift | Medium (down from High) | ^7.3 || ^8.0 resolves on modern Laravel/PHP baselines, which removes the hard blocker. Residual risk: no declared CI coverage beyond 8.0, so PHP 8.1–8.4 deprecations (e.g. implicit-nullable parameters in 8.4) are untested and could surface as warnings or, under strict error handling, failures. |
| Stale bank registry | Medium-High (unchanged) | 2.2.3 touches no bank/clearing data. Clearing-number ranges and bank/BIC mappings continue to change as Swedish banks consolidate and new entrants appear; validation may reject valid new ranges or mislabel banks. This is now the top functional risk by default, because the packaging risk has receded. |
| Correctness of checksums | Low | Mod-10/Mod-11 and OCR reference rules are stable, well-specified, and the package claims a comprehensive suite. Unchanged. |
| Licensing | Low | Unlicense (public domain) — permissive, fork-friendly, no attribution or copyleft obligations. This materially de-risks the abandonment scenario. |
| Security | Low | No I/O, no network, no deserialisation of untrusted serialised payloads. Input is a string. Unchanged. |
| PII handling | Medium | Account numbers are personal data under GDPR. The library is fine; your logging and error messages are the exposure. Descriptive exceptions may echo input values into logs. Unchanged. |
| Dev-dependency drift | Low | The build moved to PHPUnit 9. Fine today; if you fork, upgrading the test harness to PHPUnit 10/11 is your cost, not the vendor's. |
Key questions
composer.json — ^8.0 (installs on 8.1–8.4) or a narrower ~8.0.0? Do the sibling byrokrat/* packages declare the same widened range?error_reporting(E_ALL)?\InvalidArgumentException and custom types?setlocale dependency?Stack fit
app/Domain/Banking/ — thin wrapper services and your own exception types.SwedishBankAccount, Bankgiro, Plusgiro, OcrReference) that delegate to the library and translate its exceptions into ValidationException messages.config/banking.php for bank-registry overrides so stale metadata can be patched without forking. With 2.2.3 shipping no registry update, this config seam is now the primary mitigation, not a nicety — build it in phase one.Migration path
^8.0 rather than a capped range.Compatibility
Sequencing
Maintenance
composer.lock, and be prepared to fork under your own namespace for registry updates and future PHP widening. 2.2.3 reduces the imminence of the fork, not the need to plan for it.Support
Scaling
chunkById) to avoid memory growth from accumulating value objects, and should run in queued jobs with progress tracking.Failure modes
| Mode | Symptom | Mitigation |
|---|---|---|
| Uncaught library exception | 500 on a form submit instead of a field error | Mandatory boundary catch in every validation rule; enforce via a single shared rule base class |
| Stale clearing registry | Legitimate new bank range rejected; wrong bank name/BIC shown | Config-driven registry override; dual-run disagreement logging during rollout; scheduled quarterly review. Now the primary functional failure mode. |
| Untested runtime | Deprecation warnings or subtle type-coercion differences on PHP 8.1+ | Run the package's suite on the target runtime during the spike; add a CI matrix; pin the version |
| Silent over-permissiveness | Invalid OCR reference accepted, downstream payment rejected by bank | Do not rely on the library alone for payment-critical checks; contract-test against bank-published examples |
| Format drift | Same account stored in three formats across tables | Enforce canonical formatting on write via casts; one-off normalisation pass with dry-run |
| PII leakage | Account numbers in logs, exception traces, or error tracking | Scrub in exception handler and log processor; disable vendor stack traces in production |
| Dependency resolution break | composer update fails on a future PHP upgrade |
Lock file, internal fork, CI matrix |
Ramp-up
How can I help you explore Laravel packages today?