Skip to content

Conversation

@atournayre
Copy link
Owner

Summary

Enhance SplFileInfo::toLog() method to provide comprehensive file information for logging purposes.

Resolves #103

Changes

  • Enhanced toLog() method with 5 fields:

    • filename: File name as string
    • extension: File extension as string
    • size: Human-readable size (B, KB, MB, GB)
    • relativePath: Relative path as string
    • relativePathname: Full relative pathname as string
  • Added 13 comprehensive unit tests covering:

    • Array structure validation
    • Data type validation
    • Value accuracy validation

Testing

  • Unit tests: 13 tests added in SplFileInfoTest.php
  • All tests follow Elegant Object principles (1 assertion per test)
  • QA skipped (PHP 8.2.22 required, local 8.1.2)

Checklist

  • Code follows project standards
  • Tests added/updated
  • Documentation updated

…e file information

Add detailed logging support with filename, extension, size, relativePath, and relativePathname
… method

Add 13 unit tests covering array structure, data types, and values validation
@atournayre atournayre added this to the 2.15.0 milestone Nov 24, 2025
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.

[FEATURE]: SplFileInfo add toLog()

2 participants