Skip to content

v3.0.0 - Multi-language Support & Comprehensive Refactor

Choose a tag to compare

@deemonic deemonic released this 05 Sep 10:34
· 50 commits to main since this release
8352bea

🌍 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.

πŸ“„ Full Changelog

https://github.com/Blaspsoft/blasp/blob/main/CHANGELOG.md