Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
config/config.php
by eliminating thedefault_language
,languages
, and language-specific keys forfalse_positives
andprofanities
. [1] [2] [3] [4] [5]Caching Enhancements:
BlaspCache
trait to handle caching of profanity configurations, including methods for generating cache keys, loading from cache, and clearing cache. [1] [2]BlaspClearCommand
to clear the Blasp profanity cache.Profanity and False Positive Handling:
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]BlaspService
class to support custom profanity and false positive configurations and added aconfigure
method for dynamic configuration.Testing Adjustments:
BlaspCheckTest
to include new false positive words and added exception handling for better debugging during tests. [1] [2]Miscellaneous:
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.