v3.0.0 - Multi-language Support & Comprehensive Refactor
π Multi-language Profanity Detection
Blasp v3.0.0 introduces comprehensive multi-language support and a completely refactored architecture for improved performance and extensibility.
β¨ What's New
Added
- π Multi-language Support: Comprehensive profanity detection for Spanish, German, and French
- π Custom Mask Characters: New
maskWith()method for customizable censoring characters - π Chainable API: Simplified Laravel facade pattern with intuitive method chaining
- π Language Files Publishing: Publish and customize language configurations
- π§ͺ Expanded Test Coverage: Comprehensive tests across all supported languages
- ποΈ Extensibility System: Full registry pattern for language normalizers
Changed
- β‘ Performance Improvements: Dependency injection and simplified service architecture
- π§ Refactored Core: Extracted expression generation to dedicated generators
- π― Better Detection: Improved substitution detection across all languages
- π Enhanced Documentation: Complete API documentation with multi-language examples
Fixed
- β Language switching now correctly loads language-specific profanities
- β Prevented false positives from cross-word-boundary matches
Removed
- β Strategy factory and plugin manager (simplified architecture)
- β Domain-specific detection strategies (email, URL, phone)
- β Unused strict/lenient detection modes
- β Outdated documentation and duplications
π¦ Installation
composer require blaspsoft/blaspπ Quick Start
use Blasp\Facades\Blasp;
// English (default)
$hasProfanity = Blasp::check('some text');
$cleanText = Blasp::clean('some text');
// Multi-language support
$hasProfanity = Blasp::language('spanish')->check('texto aquΓ');
$cleanText = Blasp::language('french')->clean('texte ici');
// Custom mask characters
$masked = Blasp::maskWith('β')->clean('bad words here');π Supported Languages
- πΊπΈ English (default)
- πͺπΈ Spanish
- π©πͺ German
- π«π· French
π Breaking Changes
This is a major release with breaking changes from v2.x:
- Removed strategy factory pattern
- Removed plugin manager system
- Removed domain-specific strategies
- Simplified detection modes
Please review the documentation for migration details.