Skip to content
This repository was archived by the owner on Jul 8, 2023. It is now read-only.

0.6.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@ezzatron ezzatron released this 19 Feb 03:14
· 14 commits to develop since this release
  • [BC BREAK] Path resolvers refactored:
    • PathResolverInterface is for resolvers that don't require a base path or
      other information passed to resolve().
    • BasePathResolverInterface is for resolvers that take a base path in
      resolve().
    • BasePathResolver replaces PathResolver.
    • FixedBasePathResolver replaces BoundPathResolver.
  • [BC BREAK] Class/interface deletions:
    • AbstractAbsoluteFileSystemPath
    • AbstractRelativeFileSystemPath
    • NormalizingPathResolver (just use normalize() after resolution)
    • NormalizingPathResolverTrait (just use normalize() after resolution)
    • PathResolverTrait (use resolve() method or an injected resolver class)
    • WorkingDirectoryResolver (see the readme for a replacement solution)
  • [BC BREAK] Class/interface renames:
    • UndefinedPathAtomException -> UndefinedAtomException
  • [BC BREAK] The following methods no longer accept an optional normalizer:
    • PathInterface::parent()
    • PathInterface::normalize()
    • AbsolutePathInterface::isRoot()
    • AbsolutePathInterface::isParentOf()
    • AbsolutePathInterface::isAncestorOf()
    • AbsolutePathInterface::relativeTo()
    • RelativePathInterface::isSelf()
  • [NEW] Static factory methods available for all path types. Examples
    include:
    • Path::fromString()
    • Path::fromAtoms()
    • WindowsPath::fromDriveAndAtoms()
  • [NEW] Implemented AbsolutePathInterface::resolve() and
    RelativePathInterface::resolveAgainst as alternatives to using a resolver
    instance.
  • [NEW] Implemented nameAtomAt() and nameAtomAtDefault().
  • [NEW] Implemented InvalidPathExceptionInterface for all exceptions that
    involve a complete, but invalid path. Various new exceptions of this type may
    be thrown when appropriate.
  • [IMPROVED] Improved Windows path support:
    • Relative paths now support drive specifiers (yes, it's a thing).
    • Drive-less absolute paths are now represented as a relative path (after
      all, it is relative to the current drive).
    • Absolute paths now always have a drive specifier.
    • Implemented new WindowsPathInterface methods matchesDrive() and
      matchesDriveOrNull().
    • Implemented WindowsBasePathResolver.
  • [IMPROVED] Path factories will now create relative paths by default,
    rather than absolute ones.
  • [IMPROVED] atomAt() and atomAtDefault() now accept negative indices to
    indicate an offset from the last index.
  • [IMPROVED] Extra care is taken to avoid trailing separators in all result
    paths.
  • [IMPROVED] Extra care is taken to avoid constructing new instances of
    static dependencies. Should result in minor memory usage / performance
    improvements.
  • [MAINTENANCE] General repository maintenance