Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Tld Database Laravel Package

layershifter/tld-database

A PHP package providing an up-to-date database of top-level domains, with tools to parse domain names, extract and validate TLDs, and refresh the TLD list from IANA. Useful for domain validation, normalization, and routing logic.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: The package is a PHP abstraction over the Public Suffix List (PSL). In a Laravel application, legitimate use cases are narrow and data-centric: registrable-domain extraction for cookie scoping, tenant/subdomain routing, email-domain validation, and anti-phishing or domain-normalization checks. It is not a DNS resolver or a full domain parser. It does not provide Laravel service providers, facades, config publishing, or framework integration, so it should sit behind an internal service rather than be referenced directly across the codebase.
  • Integration feasibility: Composer-installable and Apache-2.0 licensed, so legal fit is fine. However, the package is archived and marked deprecated, last released 2019-08-04, has 0 dependents, and a low opportunity score (21.94), indicating no active ecosystem pull. Greenfield adoption is not advisable. Brownfield feasibility is acceptable only if the dependency is already pinned and isolated behind an internal interface.
  • Technical risk: High. The primary risk is stale PSL data: TLD and private-section changes since 2019 will produce incorrect registrable-domain results. Archived status means no security patches, no confirmed PHP 8.x/8.3+ compatibility, no Laravel 10/11/12 validation, and no maintainer response. There is also risk of Composer/autoload conflicts with modern dependency graphs. Data staleness is a silent correctness failure rather than a loud runtime error, which makes it more dangerous in auth, billing, and tenant-boundary paths.
  • Key questions:
    • Do we need the full PSL, including the private section, or only the IANA TLD list?
    • Which product decisions depend on registrable-domain correctness: cookies, tenants, auth, billing, email validation?
    • What PHP and Laravel versions must be supported now and in the next 12–18 months?
    • Who owns PSL data refresh if we vendor or fork the data?
    • Can we standardize on a maintained alternative such as jeremykendall/php-domain-parser or an equivalent PSL component?
    • Is there existing code already depending on this package, and can it be isolated without broad refactoring?

Integration Approach

  • Stack fit: Composer/PHP fits Laravel mechanically, but the package predates modern Laravel conventions and likely has no service provider or configuration surface. Treat it as a low-level utility library and wrap it in an application service such as RegistrableDomainResolver so the implementation can be swapped without touching call sites.
  • Migration path: Do not add this package to new Laravel services. For existing usage: inventory call sites and classify whether they need TLD-only or full PSL semantics; pin the current version and vendor/fork the PSL data if short-term stability is required; introduce an internal interface and adapter; replace the adapter with a maintained PSL parser or build-time generated data file; then remove the dependency.
  • Compatibility: Verify PHP constraints against the target runtime (PHP 8.1/8.2/8.3) and check for Composer conflicts with modern Laravel packages. Confirm whether the bundled PSL snapshot ships as PHP arrays or is parsed at runtime; if parsed at runtime, benchmark and cache the parsed structure. Apache-2.0 is compatible with commercial use, but the archived status means no CVE response or upstream fixes.
  • Sequencing:
    1. Discovery and usage inventory across the codebase.
    2. Freeze and pin existing usage; block new adopters.
    3. Add an internal abstraction plus tests for edge cases such as co.uk, github.io, appspot.com, wildcard rules, exceptions, and IDN/punycode.
    4. Evaluate a maintained replacement and run differential tests against a current PSL snapshot.
    5. Cut over call site by call site with monitoring.
    6. Remove the package and document the data-refresh process.

Operational Impact

  • Maintenance: Effectively zero upstream maintenance. The organization must own PSL data refresh, PHP compatibility, and security review. If the package remains, budget a recurring monthly or quarterly data-refresh task. Archived repositories are not reliable candidates for standard dependency vulnerability monitoring.
  • Support: No vendor or maintainer support. Internal support burden falls on the team owning domain logic. Documentation is minimal and unlikely to cover Laravel-specific integration. Incident response depends on internal knowledge, not upstream.
  • Scaling: The package is static data and should scale horizontally with opcache; there are no network calls. Memory footprint depends on whether the full PSL is loaded per request. Cache the parsed structure in Laravel’s cache or a singleton, and avoid loading the full list in high-QPS paths without caching.
  • Failure modes:
    • Silent misclassification of registrable domains due to stale PSL data.
    • Cookie domain scoping errors leading to cross-tenant leakage.
    • Incorrect tenant/subdomain routing and authorization boundaries.
    • Email or domain validation false positives and false negatives.
    • PHP upgrade failures caused by abandoned code.
    • Composer resolution conflicts blocking unrelated upgrades.
  • Ramp-up: Low initial integration effort, high long-term ownership cost. A developer can wire it in quickly, but PSL semantics—ICANN versus private sections, wildcard rules, exceptions, IDN handling—take time to get right. The real ramp-up is building differential tests and a data-refresh pipeline, which is disproportionate for a 63-star archived package. Recommendation: reject for new work; contain and replace if already present.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console