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

Uri Laravel Package

psx/uri

psx/uri is a lightweight PHP library for parsing, normalizing, and manipulating URIs. It provides an object-oriented API for working with scheme, host, path, query, and fragment components, making URL handling in PHP applications simpler and more reliable.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Standardizing URL/URI/URN handling in domain code: Use value objects instead of raw strings for public links, redirect targets, webhook callbacks, API resource identifiers, and external system URNs. This supports consistency in parsing, validation, normalization, and equality checks.
  • Feature and roadmap scoping: Relevant to features where canonical URLs matter — SEO/canonical links, multi-tenant domains, redirect allowlists, signed URL generation, campaign/UTM handling, and external resource identifiers. Not a platform-wide architectural bet.
  • Build vs. buy: Treat as a small tactical utility, not a strategic dependency. If the team needs only basic URL validation, Laravel’s validator and URL helpers are likely sufficient. If URI/URN semantics, immutable value objects, and comparison behavior are important, this can be evaluated against established alternatives.
  • Use cases in a Laravel app: Custom Eloquent casts for URL/URN columns, form-request validation, API resource normalization, callback/redirect allowlist checks, and domain-model comparisons. It should not be treated as an SSRF or open-redirect security boundary by itself.
  • Adoption signal: Apache-2.0 is permissive, but 4 stars and 0 dependents indicate low ecosystem adoption. Any product decision should assume vendor risk and require a bounded spike, wrapper layer, and tests before broader use.

When to Consider This Package

  • Consider it when the product genuinely needs URI, URL, and URN value objects rather than string helpers — especially immutable equality, parsing, and identifier semantics across domain models.
  • Consider it for a timeboxed technical spike if the team is comfortable vetting a low-adoption dependency, pinning versions, wrapping it behind an internal interface, and adding contract tests.
  • Consider it if the application already has a reason to align with the PSX ecosystem, or if URN handling is a first-class requirement that Laravel’s built-in URL validation does not cover well.
  • Look elsewhere if the need is basic URL validation, route generation, or HTTP client behavior — Laravel/Symfony utilities are likely simpler.
  • Look elsewhere if the product requires robust RFC-compliant parsing, IDN support, normalization, PSR-7 compatibility, active maintenance, security guidance, or broad ecosystem support. Established alternatives such as league/uri or Symfony HTTP foundation components should be compared.
  • Avoid it as a dependency for security-sensitive redirect allowlisting, SSRF prevention, or authentication flows unless the package is independently reviewed and the security model is implemented around it.
  • Due diligence should include PHP version compatibility, test coverage, release cadence, issue responsiveness, security policy, and whether the API leaks package-specific types into application code.

How to Pitch It (Stakeholders)

For executives: This is a small, permissively licensed utility for handling URLs and identifiers more safely. It is not a platform commitment. The commercial signal is weak — very low stars and no dependents — so the recommendation is a bounded evaluation, not broad adoption. The value is reducing malformed URL and identifier bugs in specific features; the risk is dependency immaturity.

For engineering: Evaluate psx/uri behind an internal adapter interface so the application does not depend directly on its types. Run a short spike against real use cases: Eloquent casts, API normalization, redirect/callback validation, and URN identifiers. Compare with league/uri, Symfony components, and a minimal in-house value object. Add contract tests for parsing, normalization, equality, and invalid inputs. Decision ask: approve a timeboxed spike and a narrow rollout only if it outperforms alternatives; otherwise use established tooling or a small internal implementation.

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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib