Download the PHP package quellabs/support without Composer
On this page you can find all versions of the php package quellabs/support. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package support
Quellabs Support
A comprehensive PHP support library providing essential utilities for the Quellabs ecosystem, including advanced debugging, Composer integration, namespace resolution, and framework detection.
Features
- 🐛 Advanced Debugging - Enhanced variable dumping with rich HTML output and colored CLI display
- 📦 Composer Integration - Intelligent project root detection and PSR-4 namespace resolution
- 🔍 Context Resolution - Smart call stack analysis to determine execution context
- 🏗️ Framework Detection - Automatic detection of popular PHP frameworks
- 📝 Namespace Resolution - PHP-compliant class name resolution with use statement parsing
- 📚 String Inflection - English pluralization and singularization utilities
Requirements
- PHP 8.2 or higher
- Composer for autoloading
Installation
Quick Start
The library automatically registers global debugging functions when installed, providing an enhanced alternative to Laravel's dd() with rich formatting and intelligent context detection:
Core Components
CanvasDebugger
The core debugging engine that powers the global d() and dd() functions. While you'll typically use the convenient global functions, the class can be called directly when needed:
Features:
- Rich HTML output for web contexts with syntax highlighting
- Colored terminal output for CLI environments
- Collapsible sections for large data structures
- Call location tracking
- Graceful fallback handling
ComposerUtils
Comprehensive Composer project analysis and PSR-4 utilities:
Capabilities:
- Intelligent project root detection for various hosting environments
- PSR-4 namespace mapping and resolution
- Recursive class discovery with filtering
- Path normalization and resolution
- Shared hosting environment support (cPanel, Plesk, DirectAdmin, etc.)
NamespaceResolver
PHP-compliant class name resolution that mimics PHP's native resolution behavior:
Resolution Strategy:
- Direct import matches (
use App\Models\User;) - Compound name resolution (
Models\Userwithuse App\Models;) - Current namespace resolution
- Global namespace fallback
FrameworkResolver
Automatic detection of popular PHP frameworks:
Supported Frameworks:
- Canvas
- Laravel
- Symfony
- CakePHP
- CodeIgniter
- Zend/Laminas
- Yii
- Phalcon
- Slim
ContextResolver
Intelligent call stack analysis to find non-framework calling context:
StringInflector
English word pluralization and singularization:
Features:
- Comprehensive irregular word handling
- Uncountable noun support
- Case preservation
- Advanced pluralization rules
UseStatementParser
Extracts and parses PHP use statements from class files:
Capabilities:
- Single and grouped use statement parsing
- Alias resolution
- Efficient caching
- PSR-4 compatibility
Tools
General utility functions for common operations:
IP Address Detection:
- Handles proxy headers (X-Forwarded-For, X-Real-IP, etc.)
- Validates IPv4 addresses
- Filters private and reserved IP ranges
- Returns only public-facing IP addresses
GUID Generation:
- Cross-platform support (uses COM on Windows, OpenSSL elsewhere)
- RFC 4122 compliant UUID v4 and v7 formats
- Cryptographically secure when OpenSSL available
- Fallback to pseudo-random generation
GUID Validation:
- Validates format: 8-4-4-4-12 hexadecimal pattern
- Accepts GUIDs with or without curly braces
- Checks hexadecimal character validity
- Returns boolean result
Performance Considerations
The library includes several performance optimizations:
- Caching: All expensive operations (file parsing, reflection, etc.) are cached
- Lazy Loading: Components are loaded only when needed
- Memory Management: Automatic cache size limits prevent memory issues
- Optimized Algorithms: Efficient path resolution and namespace matching
Error Handling
The library provides graceful error handling:
- File system errors fall back to alternative detection methods
- Invalid composer.json files are handled gracefully
- Missing classes don't break namespace resolution
- Debug output includes fallback mechanisms
Contributing
This library is part of the Quellabs ecosystem. Contributions should follow PSR-12 coding standards and include comprehensive tests.
License
MIT License. See LICENSE file for details.