Releases: crealoz/easyaudit-cli
Releases · crealoz/easyaudit-cli
Cleared & Cleaned
Added
CliWriterservice for centralized CLI output formatting:- Colored output methods:
success(),error(),warning(),info() - Inline color helpers:
green(),blue(),bold() - Progress bar with credits display
- Menu item rendering for interactive selection
- Result line with severity icons
- Colored output methods:
- New exceptions for better error handling:
CliExceptionwith exit code supportCouldNotPreparePayloadExceptionfor payload preparation failuresCurlResponseExceptionfor API response errorsRuleNotAppliedExceptionfor rule selection errorsNoChildrenExceptionfor class hierarchy queries
AbstractPreparerbase class for payload preparers with shared logic- Rule mapping via
MAPPED_RULESconstant for proxy configuration rules phpcs.xmlconfiguration for PSR-12 code style enforcement- Required PHP extensions declared in
composer.json:ext-curl,ext-libxml,ext-simplexml - Codecov token authentication in GitHub Actions workflow
Changed
FixApplycommand completely refactored:- Extracted into smaller focused methods
- Uses
CliWriterfor all output - Proper exception handling instead of exit codes
- Better separation of concerns
UseOfObjectManagerprocessor improved detection:- Now correctly identifies useless imports vs actual usage
- Won't false-positive on unrelated
->get()or->create()calls - Uses class constants for ObjectManager patterns
- Leverages
Classesutility for constructor analysis
SpecificClassInjectionprocessor simplified:- Consolidated 7 result arrays into
resultsByCategorywithRULE_CONFIGS - Single
addViolation()method replaces multiple add methods - Uses
CliWriter::resultLine()for output
- Consolidated 7 result arrays into
- Payload preparers now extend
AbstractPreparer:GeneralPreparerandDiPreparershare common logic- Throws typed exceptions instead of
RuntimeException
UnusedModulesprocessor improved config.php detection:- Now traverses up from scan path until config.php is found
- Removed hardcoded relative path guessing
Authcommand simplified option parsing usingArgsutilityArgsutility refactored withparseLongOption()andparseShortFlags()methods- Exit code now respects exception code via
$e->getCode() ?: 1 - All processors updated for PSR-12 compliance (line length ≤150)
Removed
creditscommand (unused, stub only)fix-plancommand (unused, stub only)- Redundant checks like
hasChildren()andgetChildren()in SpecificClassInjection (usesClasses::getChildren()) - Removed implicit
EnvAuthExceptionthrow when credentials are empty
Fixed
- ObjectManager useless import detection no longer triggers API fix attempts
- PSR-12 violations across all source files
- Missing newlines at end of files
Full Changelog: v0.1.2...v0.2.0
v0.1.2
Added
- Version compatibility system for CLI-Middleware communication:
- New
Versionclass withVERSIONandHASHconstants --version/-vCLI flag to display version informationX-CLI-VersionandX-CLI-Hashheaders sent with all API requestsUpgradeRequiredExceptionfor handling HTTP 426 (Upgrade Required) responses
- New
- Automated release workflow:
- GitHub Actions builds PHAR with embedded version and SHA-512 hash
- Webhook notification to middleware for version registration
- Automatic GitHub Release creation with PHAR artifact
- Docker image tagging with version numbers
Changed
- Dockerfile simplified: Now uses PHAR distribution instead of copying source files
- Removed unused imports and variables across multiple files
FixApplyrefactored to use instance property for error tracking
Removed
- Deleted
src/Core/Scan/Util/Fixable.php(unused) - Removed metadata section from
box.json
Full Changelog: v0.1.1...v0.1.2
Better CI/CD
Added
- Version compatibility system for CLI-Middleware communication:
- New
Versionclass withVERSIONandHASHconstants --version/-vCLI flag to display version informationX-CLI-VersionandX-CLI-Hashheaders sent with all API requestsUpgradeRequiredExceptionfor handling HTTP 426 (Upgrade Required) responses
- New
- Automated release workflow:
- GitHub Actions builds PHAR with embedded version and SHA-512 hash
- Webhook notification to middleware for version registration
- Automatic GitHub Release creation with PHAR artifact
- Docker image tagging with version numbers
Changed
- Dockerfile simplified: Now uses PHAR distribution instead of copying source files
- Removed unused imports and variables across multiple files
FixApplyrefactored to use instance property for error tracking
Removed
- Deleted
src/Core/Scan/Util/Fixable.php(unused) - Removed metadata section from
box.json
Full Changelog: v0.1.0...v0.1.1
Full Changelog: v0.1.0...v0.1.1
Full Changelog: v0.1.0...v0.1.1
Full Changelog: v0.1.0...v0.1.1
The Integration Release
Added
- GitHub repository templates:
- Bug report and feature request issue templates (YAML forms)
- Pull request template
- Issue template chooser with contact links
- Dependabot configuration for Composer and GitHub Actions
- Code coverage with Codecov integration in CI workflow
- CI/CD documentation for multiple platforms:
- GitHub Actions, GitLab CI, Azure DevOps
- Jenkins, CircleCI, Travis CI, Bitbucket Pipelines
- MIT License file
- CI/CD environment detection for API requests:
- New
CiEnvironmentDetectorservice detects 7 CI providers X-CI-ProviderandX-CI-Identityheaders sent with API requests- Supports GitHub Actions, GitLab CI, Azure DevOps, CircleCI, Jenkins, Travis CI, Bitbucket Pipelines
- New
- Interactive
--fix-by-rulemode for fix-apply command:- Select which rule to fix via interactive menu
- Patches organized into rule-specific subdirectories (
patches/{ruleId}/...) - Sequenced filenames for multiple patches per file (
File-2.patch,File-3.patch) - Relative path preservation in patch output structure
ClassToProxyservice with 220+ heavy Magento classes:- Shared detection between
ProxyForHeavyClassesandSpecificClassInjectionprocessors - Includes repositories, resource connections, config readers, session handlers, etc.
- Shared detection between
- New ignored patterns in
SpecificClassInjection:- Classes ending with
ProviderorResolver - All
Magento\Frameworkclasses - Catalog visibility/status classes, sales order config, store manager, etc.
- Classes ending with
- New
Filenames::getRelativePath()andFilenames::getSequencedPath()utility methods - Integration test suite in phpunit.xml
- Tests for
ClassToProxyintegration inSpecificClassInjectionTest
Changed
SpecificClassInjectionnow skips CLI commands (Symfony Console) entirelyProxyForHeavyClassesusesClassToProxyservice instead of hardcoded listPreparerInterface::prepareFiles()now accepts optional$selectedRuleparameter- Removed
CollectionandResourceModelfrom pattern-based heavy class detection (now uses explicit list)
Fixed
- Reduced false positives in
SpecificClassInjectionfor legitimate Magento patterns - Removed redundant
isRegistry()andisFileSystem()checks (covered byClassToProxy)
What's Changed
- Bump actions/checkout from 4 to 6 by @dependabot[bot] in #1
New Contributors
- @dependabot[bot] made their first contribution in #1
Full Changelog: V0.1.0...v0.1.0
What's Changed
- Bump actions/checkout from 4 to 6 by @dependabot[bot] in #1
New Contributors
- @dependabot[bot] made their first contribution in #1
Full Changelog: V0.1.0...v0.1.0
What's Changed
- Bump actions/checkout from 4 to 6 by @dependabot[bot] in #1
New Contributors
- @dependabot[bot] made their first contribution in #1
Full Changelog: V0.1.0...v0.1.0
What's Changed
- Bump actions/checkout from 4 to 6 by @dependabot[bot] in #1
New Contributors
- @dependabot[bot] made their first contribution in #1
Full Changelog: V0.1.0...v0.1.0
What's Changed
- Bump actions/checkout from 4 to 6 by @dependabot[bot] in #1
New Contributors
- @dependabot[bot] made their first contribution in #1
Full Changelog: V0.1.0...v0.1.0
What's Changed
- Bump actions/checkout from 4 to 6 by @dependabot[bot] in #1
New Contributors
- @dependabot[bot] made their first contribution in #1
Full Changelog: V0.1.0...v0.1.0
What's Changed
- Bump actions/checkout from 4 to 6 by @dependabot[bot] in #1
New Contributors
- @dependabot[bot] made their first contribution in #1
Full Changelog: V0.1.0...v0.1.0
What's Changed
- Bump actions/checkout from 4 to 6 by @dependabot[bot] in #1
New Contributors
- @dependabot[bot] made their first contribution in #1
Full Changelog: V0.1.0...v0.1.0
Progress & Polish
Added
- Colorful scan output with severity indicators (red for errors, yellow for warnings, blue for info)
- Visual header with processor names in cyan for better readability
- Class hierarchy detection in SpecificClassInjection processor
- New rules for classes with children requiring manual fix:
collectionWithChildrenMustUseFactoryrepositoryWithChildrenMustUseInterface
- ExternalToolMapping for issues fixable by external tools (php-cs-fixer suggestions)
- Progress bar in FixApply command
- Echo output for all processor rules showing issue counts
- New
PreparerInterfacewithGeneralPreparerandDiPreparerfor payload preparation - Dedicated
Loggerservice for error and debug logging Filenamesutility class for path sanitization- Multi-file fix support via
Api::requestMultiFilefix()for cross-file issues
Changed
- Scanner output now displays processor names instead of identifiers
- Improved FixApply command with file-by-file processing
- Refactored
FixApplyto use class properties for better state management - Extracted payload preparation logic into dedicated preparer classes
- Simplified progress bar rendering using class properties
Fixed
- Helpers processor echo statements moved from getReport() to process() for consistency
Processors Update
Added
New Processors (12)
Dependency Injection & Architecture:
- Preferences - Multiple preferences detection
- ProxyForHeavyClasses - Heavy class proxy validation
Code Quality:
- HardWrittenSQL - Raw SQL detection
- SpecificClassInjection - Concrete class injection detection
- UseOfRegistry - Deprecated Registry usage
- UseOfObjectManager - Direct ObjectManager usage
- PaymentInterfaceUseAudit - Deprecated payment method detection
Template & View Layer:
- Cacheable - Non-cacheable block detection
- AdvancedBlockVsViewModel - Template anti-patterns
- Helpers - Deprecated Helper patterns
Architecture:
- BlockViewModelRatio - Block vs ViewModel analysis
- UnusedModules - Disabled modules detection
Documentation
- Complete processor documentation in
tests/fixtures/README.md - Updated README with full processor list
- Release notes and changelog
- Migration documentation
Testing
- 50+ test fixtures covering all processors
- Good and bad examples for each processor
- Ready-to-run test suite
Changed
- README now lists all 16 available processors with descriptions
- box.json now includes all new processor files
- Updated project documentation to reflect completion status
Technical Details
- All processors use static analysis only (no runtime required)
- SARIF-compatible output for GitHub Code Scanning
- Zero breaking changes from 1.x
- 42 files total in PHAR (165KB)
Improve verbosity, add git to container and patch name
v0.0.6 add patch name as option
API Connector
Full Changelog: v0.0.4...v0.0.5
Update SARIF reporter
v0.0.4 consolidate sarif results
add severity on sarif reports
v0.0.3 update sarif severity