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

Support custom SplFileInfo objects in Phar::buildFromIterator() #14143

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on May 5, 2024

  1. Configuration menu
    Copy the full SHA
    af4f6e2 View commit details
    Browse the repository at this point in the history
  2. Make buildFromIterator() work with custom SplFileInfo objects

    While it is possible to return a custom SplFileInfo object in the
    iterator used by buildFromIterator(), the data is not actually used from
    that object, instead the data from the underlying internal structure is
    used. This makes it impossible to override some metadata such as the
    path name and modification time.
    
    The main motivation comes from two reasons:
    - Consistency. We expect our custom methods to be called when having a
      custom object.
    - Support reproducibility. This is the original use case as requested in
      [1].
    
    Add support for this by calling the getMTime() and getPathname() methods
    if they're overriden by a user class.
    
    [1] theseer/Autoload#114.
    nielsdos committed May 5, 2024
    Configuration menu
    Copy the full SHA
    373d8cf View commit details
    Browse the repository at this point in the history
  3. Fix compile warning

    nielsdos committed May 5, 2024
    Configuration menu
    Copy the full SHA
    fb73ffb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    17734ac View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    112ba55 View commit details
    Browse the repository at this point in the history