Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2 #21

Merged
merged 5 commits into from
Feb 27, 2025
Merged

Version 2 #21

merged 5 commits into from
Feb 27, 2025

Conversation

deemonic
Copy link
Collaborator

This pull request includes significant changes to the Blasp package, focusing on improving the configuration management, enhancing caching mechanisms, and updating the handling of profanities and false positives. The most important changes are summarized below.

Configuration Management:

  • Removed language-specific configurations and simplified the structure in config/config.php by eliminating the default_language, languages, and language-specific keys for false_positives and profanities. [1] [2] [3] [4] [5]

Caching Enhancements:

  • Introduced the BlaspCache trait to handle caching of profanity configurations, including methods for generating cache keys, loading from cache, and clearing cache. [1] [2]
  • Added a new console command BlaspClearCommand to clear the Blasp profanity cache.

Profanity and False Positive Handling:

  • Updated the BlaspExpressionService class to remove language-specific properties and methods, and refactored the constructor and configuration loading to accept custom profanity and false positive arrays. [1] [2]
  • Modified the BlaspService class to support custom profanity and false positive configurations and added a configure method for dynamic configuration.

Testing Adjustments:

  • Updated the BlaspCheckTest to include new false positive words and added exception handling for better debugging during tests. [1] [2]

Miscellaneous:

  • Simplified the Normalize class by removing language-specific normalization and defaulting to English normalization.

These changes collectively enhance the flexibility, performance, and maintainability of the Blasp package.

@deemonic deemonic merged commit a4ad887 into main Feb 27, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant