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
Consistency

Consistency Laravel Package

hoa/consistency

Hoa\Consistency is a foundational PHP library that helps code behave consistently across PHP versions and environments. It offers compatibility helpers, callable utilities, and environment detection, making it useful for Hoa packages and projects that need stable cross-version behavior.

View on GitHub
Deep Wiki
Context7

The Hoa\Consistency library.

Frequently asked questions about Consistency
What is hoa/consistency used for?
hoa/consistency is a foundational PHP compatibility library that centralizes runtime capability checks for classes, interfaces, traits, functions, constants, and extensions. It also provides Xcallable for normalizing closures, arrays, strings, and invokable objects into reliable callables, plus Flex helpers for flexible entity behavior. In practice it is used in library bootstraps and environment validation, not as an application framework feature.
Is hoa/consistency compatible with Laravel?
It can be installed in a Laravel project, but it is not a Laravel package and provides no service provider, facade, or Laravel-specific integration. Its runtime checks and Xcallable utilities overlap with native Laravel and PHP features such as the container's call() and makeWith() methods, Closure::fromCallable(), and Macroable. For most Laravel applications there is effectively no architectural fit.
How do I install hoa/consistency with Composer?
Run composer require hoa/consistency and let Composer resolve the terminal 2.17.08.29 release. The package registers autoload and stream plumbing at bootstrap, so removal later is more involved than deleting the dependency line. Verify your PHP constraint first because the final release requires PHP 7.1 or newer and has no PHP 8 compatibility patches.
Does hoa/consistency support PHP 8?
No. The final release is frozen at PHP 7.1-era code and has no subsequent tag, patch, or advisory channel. On PHP 8.1 through 8.3 its reflection-based callable handling and dynamic properties can surface as deprecations or errors rather than warnings. Treat it as unsupported on modern PHP runtimes.
What is Xcallable in hoa/consistency?
Xcallable is a utility that normalizes mixed values such as closures, arrays, strings, and invokable objects into a reliable callable. It was useful before PHP 7.1 introduced Closure::fromCallable(), which now covers most of the same use cases natively. The API surface in the final release is identical to earlier versions.
Is hoa/consistency still maintained?
No. Version 2.17.08.29 is a date-stamped terminal release from August 2017, and the last commits are chores, tests, and documentation rewrites during the Hoa project wind-down. There are no features, security fixes, or forward-looking work, and there will never be a 2.18.x. The source tree was moved into a Source directory in that final release with no follow-up patch.
What are the alternatives to hoa/consistency for Laravel developers?
Use native PHP and Laravel features: class_exists(), function_exists(), extension_loaded(), Closure::fromCallable(), the container's call() and makeWith() methods, Macroable, and class_alias() where appropriate. These cover the runtime checks and callable normalization that Xcallable provided. They are maintained with PHP and Laravel and avoid the lifecycle cost of a frozen dependency.
Does hoa/consistency work on PHP 7.1 and older versions?
The final release raised the minimum runtime to PHP 7.1 and removed legacy PHP 7.x implementations, so consumers pinned below 7.1 break on upgrade. Composer constraints were also tightened in anticipation of future BC breaks, which can cause resolution deadlocks in downstream projects. Older PHP versions are not supported by 2.17.08.29.
How does hoa/consistency perform runtime capability checks?
It centralizes checks for classes, interfaces, traits, functions, constants, and extensions so a library can behave consistently across PHP versions and environments. It also provides graceful fallbacks and aliases for cross-version compatibility. Modern PHP offers class_exists(), function_exists(), and extension_loaded() for most of these checks without an extra dependency.
What are the production risks of depending on hoa/consistency?
The package is terminal, unmaintained, and frozen at PHP 7.1, so there is no patch path for regressions or PHP 8.x incompatibilities. It registers autoload and stream plumbing at bootstrap, which makes it expensive to remove once live. The final release also moved code into a Source directory, changing class-to-file mappings and breaking tooling that assumes the old layout.
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