xpaw/steamid
Lightweight PHP library for converting Steam IDs between SteamID64, SteamID32, and legacy SteamID formats, with support for individual, group, and lobby accounts. Simple, dependency-free API for parsing and formatting Steam identifiers in Laravel or any PHP project.
STEAM_0:1:12345, [U:1:12345], or a steamcommunity.com/id/customname URL from forums, Discord, spreadsheets, and support tickets. This library is the parsing/normalization layer that turns support-ticket-style input into a joinable key — directly reducing manual account-linking work for ops and support.SteamIdentity value object or a Laravel cast means later providers slot in without a refactor. This package is appropriate precisely because it is small enough to hide behind that interface.Consider it when:
/id/customname) resolution. This is the one genuinely non-trivial capability; it requires a Steam Web API key and introduces network I/O, so it must be cached and queued — design for that before adopting.Look elsewhere (or write ~100 lines in-house) when:
unsignedBigInteger column suffice. Adopting a dependency you don't exercise is pure inventory cost.Practical guardrails if adopted: wrap it behind an internal service or value object, pin the version in composer.json, and add a contract test over the ID formats you actually accept. That converts a 174-star dependency into a swap-able detail.
For executives (30 seconds): We need to identify Steam players consistently across our product. Steam has four different ID formats and users paste in whichever one they have, plus profile URLs. This is a small, free (MIT-licensed), actively maintained PHP library that normalizes all of them into one canonical ID in a few lines of code. Cost is effectively zero; it replaces roughly a day or two of engineering plus an ongoing tail of "why doesn't this profile link work" bugs. Risk is low: no database, no network calls except optional vanity-URL lookups, and if it ever disappears we can replace it in a day. Recommendation: adopt, contained behind our own interface.
For engineering (the honest version):
SteamIdentity value object or Eloquent cast, store steam_id64 as an unsigned bigint (it exceeds 32-bit and can exceed JS safe-integer range — do not send it to the frontend as a JSON number), and keep the third-party class out of our domain code.How can I help you explore Laravel packages today?