Weave Code
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

Php Helpers Laravel Package

andreas-glaser/php-helpers

PHP 8.2+ helper toolkit offering ArrayHelper and other utilities for everyday tasks. Includes dot-notation get/set/unset, key/value lookups, insert/prepend/append, random/first/last helpers, filtering empty values, implode/explode helpers, key casing conversion, and more.

View on GitHub
Deep Wiki
Context7
v2.0.0

🚀 PHP Helpers 2.0.0 - Major Enhancement Release

We're excited to announce PHP Helpers 2.0.0, a massive update that significantly expands the library's capabilities with comprehensive HTTP request analysis, advanced URL manipulation, and extensive test coverage improvements.

🌟 Major Highlights

  • 30+ new RequestHelper methods for comprehensive HTTP request analysis
  • 30+ new UrlHelper methods for advanced URL manipulation
  • New NetworkHelper class for network operations
  • Enhanced HTML generation with improved AttributesHelper
  • 523 total tests with 1,804 assertions across the entire project
  • Complete test coverage for all major helpers

🔧 Major Features Added

🌐 RequestHelper - Complete HTTP Request Analysis

  • Environment Detection: isCli(), isHttps(), isAjax(), isBot(), isMobile()
  • HTTP Method Analysis: isGet(), isPost(), isPut(), isDelete(), isPatch()
  • Request Type Detection: isJson(), isXml(), isForm(), isMultipart()
  • Client Information: getUserAgent(), getClientIp(), getReferer()
  • Content Analysis: getContentType(), getContentLength(), getAcceptedLanguages()
  • Header Management: Complete header manipulation and security validation
  • 47 comprehensive tests with 107 assertions

🔗 UrlHelper - Advanced URL Manipulation

  • URL Parsing & Validation: isValid(), isAbsolute(), isRelative(), getScheme()
  • URL Manipulation: addQuery(), removeQuery(), setFragment(), normalize()
  • Path Operations: getPathSegments(), addPathSegment(), removePath()
  • Domain Utilities: getDomain(), getSubdomain(), isLocalhost()
  • Encoding/Decoding: Comprehensive URL encoding utilities
  • 64 total tests (28 new) with 168 assertions

🌐 NetworkHelper - New Network Utilities

  • IP address validation and manipulation
  • Network range calculations
  • DNS lookup utilities
  • Port connectivity testing

🎨 Enhanced HTML Generation

  • Improved AttributesHelper: Factory methods, validation, immutability patterns
  • Advanced Form Generation: Enhanced FormHelper with better attribute handling
  • Better Security: Improved HTML escaping and XSS protection

📊 Testing & Quality Improvements

  • Complete Test Coverage: All major helpers now have comprehensive test suites
  • 523 Total Tests: Massive increase in test coverage across the project
  • 1,804 Assertions: Thorough validation of all functionality
  • Edge Case Testing: Comprehensive boundary condition and error handling tests
  • Performance Testing: Validation of performance characteristics
  • Cross-Platform Compatibility: Tests verified across different environments

Test Coverage by Helper:

  • RequestHelper: 47 tests, 107 assertions
  • UrlHelper: 64 tests, 168 assertions
  • HexHelper: 15 tests, 116 assertions
  • FormHelper: 56 tests, 211 assertions
  • CsvHelper: 35 tests with 823 lines of coverage
  • AttributesHelper: 40 tests, 120 assertions
  • BootstrapHelper: 23 tests, 167 assertions

🐛 Fixes & Enhancements

  • RequestHelper: Fixed CLI mode detection during PHPUnit execution
  • UrlHelper: Improved toRelative() method edge case handling
  • EmailHelper: Resolved nested array processing and multi-delimiter bugs
  • CsvHelper: Enhanced IOHelper integration for better file management
  • Documentation: Updated README with comprehensive examples for all helpers

🏗️ Infrastructure Improvements

  • CI/CD: Enhanced GitHub Actions for dev branch testing
  • Documentation: Improved package description and keywords
  • Branch Management: Updated branch aliases (main: 2.0.x-dev, dev: 3.0.x-dev)
  • Code Quality: Added comprehensive PHPDoc comments and @test/@covers annotations

📚 Documentation

The README has been significantly updated with:

  • Comprehensive usage examples for all enhanced helpers
  • Detailed method documentation
  • Best practices and patterns
  • Testing information and guidelines

🔄 Compatibility

  • PHP Requirements: PHP 8.2+ (unchanged)
  • Breaking Changes: Minimal - mostly additive changes
  • Backward Compatibility: Existing code should continue to work without modifications

📈 Project Statistics

  • 68 files changed
  • 12,497 insertions, 590 deletions
  • 35+ new helper methods across RequestHelper and UrlHelper
  • 16 new test files created
  • Comprehensive test restructuring for better organization

🙏 Acknowledgments

Thank you to all contributors and users who have provided feedback and suggestions that made this release possible.


Full Changelog: View all changes

Installation: composer require andreas-glaser/php-helpers:^2.0

v1.3.0

PHP 8.3 Support + AI PHPDocs

1.2.0
  • PHP 7.4,8.0 Support
  • PHPUnit Test Upgrade
  • XDEBUG 3.x fix
1.1.10
1.1.9
1.0.11
1.1.1

See commits

1.1.0
1.0.5

Major bug fix. Upgrade is advisable!

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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor