Repository navigation
Release v0.0.13
docs: Prepare v0.0.13 release - Move Unreleased to v0.0.13 section
Changelog
Added
-
Enhanced Existing Fakers: Improved IbanFaker, AgeFaker, NameFaker, and SurnameFaker
IbanFaker: AddedvalidandformattedoptionsAgeFaker: Addeddistribution(uniform/normal),mean, andstd_devoptionsNameFaker: Addedgender(male/female/random) andlocale_specificoptionsSurnameFaker: Addedgenderandlocale_specificoptions for API consistency- All improvements backward compatible
-
New Fakers: Added 3 new faker types (Phase 2 - Data Preservation Strategies)
HashPreserveFaker: Deterministic anonymization using hash functions- Maintains referential integrity (same input → same output)
- Options:
algorithm(md5/sha1/sha256/sha512),salt,preserve_format,length - Use cases: When you need to maintain referential integrity
ShuffleFaker: Shuffle values within a column while maintaining distribution- Preserves statistical properties
- Options:
values(required),seed(for reproducibility),exclude - Use cases: When statistical properties must be preserved
ConstantFaker: Replace with constant value- Options:
value(required, can be any type including null) - Use cases: Null out sensitive data or replace with fixed values
- Options:
- All new fakers registered in FakerType enum and FakerFactory
- Total fakers available: 32 (29 from v0.0.12 + 3 new)
- Comprehensive test coverage for all new fakers
-
Pre-flight Checks: Comprehensive validation before anonymization execution
- Database connectivity validation
- Entity existence validation
- Column existence validation
- Faker type and options validation
- Pattern validation (include/exclude)
- Clear error messages for all validation failures
- Integrated in
AnonymizeCommandbefore processing - New
PreFlightCheckServicefor centralized validation
-
Progress Bars: Visual progress indicators for anonymization process
- Real-time progress bars using Symfony Console ProgressBar
- Shows percentage, elapsed time, and estimated time
- Displays current status message
- Updates every 1% of progress
- Option
--no-progressto disable progress bars - Compatible with
--stats-onlymode - Progress callback system in
AnonymizeService
-
Enhanced Environment Protection: Improved safety checks
- New
EnvironmentProtectionServicefor comprehensive environment validation - Validates environment (dev/test only)
- Validates debug mode
- Validates configuration files (detects production config)
- Validates bundle registration in
bundles.php - Clear error messages with actionable guidance
- Integrated in both
AnonymizeCommandandGenerateAnonymizedColumnCommand
- New
-
Debug and Verbose Modes: Enhanced output options
--verbose, -v: Increase verbosity of messages--debug: Enable debug mode with detailed information- Shows detailed entity information in verbose mode
- Shows property details, patterns, and options in debug mode
- Shows pre-flight check information
- Shows total records per table
- Shows property statistics after processing
- Compatible with Symfony Console verbosity system
-
Info Command: New command to display anonymizer information
nowo:anonymize:info: Display information about anonymizers- Shows location of each anonymizer (entity and property)
- Shows configuration (faker type, options, patterns)
- Shows execution order (based on weight)
- Shows statistics about how many records will be anonymized
- Options:
--connection,--locale
-
Event System: Symfony events for extensibility
BeforeAnonymizeEvent: Dispatched before anonymization startsAfterAnonymizeEvent: Dispatched after anonymization completesBeforeEntityAnonymizeEvent: Dispatched before processing each entityAfterEntityAnonymizeEvent: Dispatched after processing each entityAnonymizePropertyEvent: Dispatched before anonymizing each property- Allows listeners to modify anonymized values or skip anonymization
- Supports event listeners and subscribers
- EventDispatcher is optional (works without it)
-
Demo Coverage: Complete faker examples in all demos
- New
SystemLogentity demonstrating all remaining fakers - Demonstrates: password, ip_address, mac_address, uuid, hash, coordinate, color, boolean, numeric, file, json, text, enum, country, language, hash_preserve, shuffle, constant
- All 32 fakers now have examples in demos (100% coverage)
- Updated in all demo projects (Symfony 6, 7, 8)
- New
Improved
-
Services Configuration: Optimized
services.yamlfor better maintainability- Removed 32 redundant explicit alias definitions
- Aliases now created automatically from
#[AsAlias]attributes - Fakers without locale parameter use
#[Autoconfigure(public: true)]attribute - Reduced YAML from 89 to 52 lines (35% reduction)
- More declarative configuration in PHP classes
-
Demo Templates: Enhanced conditional display of anonymized column
- Column
anonymizednow displayed conditionally in all list views - Only shown when column exists in database (checked via
SchemaService) - Visual indicators: ✓ Yes (green) for anonymized, ✗ No (gray) for not anonymized
- Updated in all 18 templates across Symfony 6, 7, and 8 demos
- Prevents errors when column doesn't exist
- Column
-
Code Quality: Improved service registration
- Fakers use
#[Autoconfigure(public: true)]instead of YAML configuration - Configuration moved from YAML to PHP attributes (more maintainable)
- Consistent pattern across all fakers
- Fakers use
-
Command Options: Enhanced command-line interface
- Better error messages and warnings
- More informative output in verbose/debug modes
- Improved user experience with progress indicators
-
Safety: Enhanced protection against accidental production execution
- Multiple layers of environment validation
- Configuration file validation
- Clear warnings and error messages
-
Developer Experience: Better debugging and monitoring
- Detailed information in debug mode
- Progress tracking for long-running operations
- Comprehensive validation feedback
-
Tests: Enhanced test coverage for improved fakers
- 216 tests, 512 assertions - All passing
- Comprehensive tests for all enhanced faker options
Commits
- docs: Prepare v0.0.13 release - Move Unreleased to v0.0.13 section (b443204)