- Is jakeasmith/http_build_url deprecated?
- Yes. The package is archived, and its own description tells users to use PHP 8.5's built-in Uri\Rfc3986\Uri instead. The last release was in 2017, so new adoption should be avoided except as a temporary compatibility shim.
- Does jakeasmith/http_build_url work with Laravel?
- It can be installed in any Laravel version because it is a framework-agnostic Composer package that autoloads a single global function. It has no service provider, facade, config, or container binding, so there is nothing Laravel-specific to configure. However, Laravel 11+ ships Illuminate\Support\Uri, which is usually the better choice for new code.
- How do I install jakeasmith/http_build_url?
- Install it with composer require jakeasmith/http_build_url. There is no configuration step and no transitive dependency chain. Composer's files autoload defines http_build_url() unless the function already exists, for example when pecl_http is loaded.
- What should I use instead of http_build_url() in Laravel?
- For application URLs, use route() or url(). For programmatic composition and relative resolution, use Illuminate\Support\Uri in Laravel 11+, GuzzleHttp\Psr7\Uri with UriResolver, or league/uri. Pick the replacement that preserves the exact flag behavior your call sites rely on.
- Does jakeasmith/http_build_url support PHP 8.5?
- PHP 8.5 introduces the built-in Uri\Rfc3986\Uri class, which is the migration target named by the package's deprecation notice. The polyfill predates PHP 8 and its Composer PHP constraint does not declare support for modern runtimes, though it may still install and run. On PHP 8.5+, prefer the native URI class over this package.
- Is jakeasmith/http_build_url safe to use in production?
- The code performs pure in-memory string manipulation with no I/O, network calls, or deserialization, so the exploit surface is small. The larger production risk is abandonment: no fixes for edge cases such as IPv6 literals, userinfo, default-port normalization, or percent-encoding. Many SCA and policy tools block archived packages, so expect a governance exception if you keep it.
- Does jakeasmith/http_build_url conflict with pecl_http?
- It guards its function definition with function_exists(), so it should not cause a fatal redeclare when pecl_http is present. In that case the polyfill becomes a no-op and behavior shifts to the extension's implementation. Test both environments if you rely on specific flag semantics.
- Does jakeasmith/http_build_url handle relative URLs and URL joining?
- Yes, it supports relative URL resolution, path and query joining, and component overrides using flags such as HTTP_URL_REPLACE, JOIN_PATH, JOIN_QUERY, and STRIP_*. It approximates pecl_http semantics but is not guaranteed to be bit-identical. Encode your expected outputs as tests, especially for path normalization and query merging.
- Is jakeasmith/http_build_url a Laravel package?
- No. It is a single global function delivered through Composer's files autoload, not a Laravel package. It has no service provider, facade, configuration file, or container binding, so it sits outside Laravel's architecture. That makes it maximally compatible but also minimally idiomatic in a Laravel codebase.
- How do I migrate away from jakeasmith/http_build_url?
- Inventory every http_build_url() call site and any vendor package that requires it, then classify which flags each one uses. Abstract URL composition behind a first-party UriBuilder or UrlComposer service so application code stops calling the global function. Map the pecl_http flags to Illuminate\Support\Uri, PSR-7, or league/uri operations and encode parity in tests before swapping implementations.