PackageTrack
Sign in Get early access

bear/app-meta

AppMeta is a utility class that manages application metadata such as directory paths and resource information. It provides easy access to application directories (appDir, logDir, tmpDir) and resource metadata via a generator.

1.13.0 676K downloads/mo #4349 most downloaded on Packagist bearsunday/BEAR.AppMeta

What this package is like to depend on

Last release 4 days ago

19 Aug 2026

Ships fairly regularly

a new release about every 9 months

Some releases are documented

notes for 10 of 30 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

30 releases · first in 2015

4 releases in the last 12 months

see the full history below

Release timeline

29 releases · Feb 2015 to Aug 2026
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 30
  1. 1.13.0 19 Aug 2026
    Release notes

    Added

    • $buildDir on AbstractAppMeta: {appDir}/var/build/{context}, fixed to appDir regardless of $writeDir and not created
    • AbstractAppMeta::__wakeup() re-points paths under appDir when the application has moved since serialization
    • Meta refuses a relative $appDir, $tmpDir or $logDir with WriteDirNotAbsoluteException

    Changed

    • Meta::appDir($name) moved to AbstractAppMeta and returns the canonical spelling, as do $appDir, $tmpDir and $logDir
    • Canonical spellings make existing compile markers mismatch once: recompile when deploying this release (a writable tree recompiles on first boot; a read-only tree must be rebuilt)

    Deprecated

    • $writeDir on AbstractAppMeta: still filled for released bear/package versions that read it; removal is a BC break and waits for the next major
    Open source →
    Release notes

    Added

    • $buildDir on AbstractAppMeta: {appDir}/var/build/{context}, fixed to appDir regardless of $writeDir and not created
    • AbstractAppMeta::__wakeup() re-points paths under appDir when the application has moved since serialization
    • Meta refuses a relative $appDir, $tmpDir or $logDir with WriteDirNotAbsoluteException

    Changed

    • Meta::appDir($name) moved to AbstractAppMeta and returns the canonical spelling, as do $appDir, $tmpDir and $logDir
    • Canonical spellings make existing compile markers mismatch once: recompile when deploying this release (a writable tree recompiles on first boot; a read-only tree must be rebuilt)

    Deprecated

    • $writeDir on AbstractAppMeta: still filled for released bear/package versions that read it; removal is a BC break and waits for the next major
    Open source →
  2. 1.12.0 16 Aug 2026
    Release notes

    Added

    • Meta::create($name, $context, $appDir, $writeDir) places an application under {writeDir}/{Vendor}/{Project}/{context}, or its own var/ when null
    • $writeDir on AbstractAppMeta: the base an application writes under, carried rather than derived
    • Meta::appDir($name) resolves an application directory from its name
    • Meta::create() refuses a write directory the current directory would resolve, with WriteDirNotAbsoluteException
    Open source →
    Release notes

    Added

    • Meta::create($name, $context, $appDir, $writeDir) places an application under {writeDir}/{Vendor}/{Project}/{context}, or its own var/ when null
    • $writeDir on AbstractAppMeta: the base an application writes under, carried rather than derived
    • Meta::appDir($name) resolves an application directory from its name
    • Meta::create() refuses a write directory the current directory would resolve, with WriteDirNotAbsoluteException
    Open source →
  3. 1.11.0 10 Jul 2026
    Release notes

    Added

    • Optional $tmpDir and $logDir constructor arguments on Meta (defaults unchanged: {appDir}/var/tmp/{context} and {appDir}/var/log/{context}) (#41)

    Changed

    • Centralize directory creation and writability checks in ensureDir()
    • Default path segments use / (portable on Windows PHP)

    Usage

    // defaults
    new Meta('MyVendor\\Project', 'prod-app', $appDir);
    
    // overrides (resolved paths only; env is the app's job)
    new Meta('MyVendor\\Project', 'prod-app', $appDir, '/var/tmp/my-app', '/var/log/my-app');

    Full changelog

    1.10.0...1.11.0

    Open source →
    Release notes

    Added

    • Optional $tmpDir and $logDir constructor arguments on Meta (defaults unchanged: {appDir}/var/tmp/{context} and {appDir}/var/log/{context}) (#41)

    Changed

    • Centralize directory creation and writability checks in ensureDir()
    • Default path segments use / (portable on Windows PHP)
    Open source →
  4. 1.10.0 27 Oct 2025
    Release notes

    What's Changed

    Added

    • Domain type aliases following BEAR.Package conventions
    • PHP 8.5 support in CI test matrix
    • Readonly properties for ResMeta value object

    Changed

    • BREAKING: Minimum PHP version upgraded from 8.0 to 8.1
    • Lowered dependency requirements for better compatibility (bear/resource ^1.0, koriym/psr4list ^1.0.2)
    • Updated PHPUnit to ^9.6 for PHP 8.1 support
    • Achieve 100% Psalm type inference

    Removed

    • Removed post-install/update-cmd scripts for CI compatibility
    • Removed phpmetrics dependency

    Fixed

    • Windows path separator issues in tests

    Full Changelog: 1.9.0...1.10.0

    Open source →
    Release notes

    Added

    • Domain type aliases following BEAR.Package conventions (Types.php)
    • PHP 8.5 support in CI test matrix
    • Readonly properties for ResMeta value object
    • Private constructor to Types class to prevent instantiation
    • Literal union type for Scheme ('app'|'page'|'*')

    Changed

    • BREAKING: Minimum PHP version upgraded from 8.0 to 8.1
    • Lowered bear/resource requirement from ^1.26 to ^1.0 for better compatibility
    • Lowered koriym/psr4list requirement from ^1.4 to ^1.0.2 for better compatibility
    • Updated PHPUnit from ^9.5.10 to ^9.6 for PHP 8.1 readonly support
    • Updated coding standards dependencies (doctrine/coding-standard ^14.0, squizlabs/php_codesniffer ^4.0)
    • Use @psalm-import-type pattern across all classes
    • Remove duplicate @psalm-* annotations in favor of standard PHPDoc

    Removed

    • Removed post-install-cmd and post-update-cmd scripts for CI compatibility
    • Removed phpmetrics dependency (incompatible with readonly keyword)

    Fixed

    • Windows path separator issues in tests
    • Add descriptive assert messages for better debugging
    Open source →
  5. 1.9.0 11 Jan 2025
    Release notes

    Windows

    • Enable Windows Compat

    What's Changed

    • Enable latest PHP compat by @koriym in #35
    • Enable PHP8.4 and Windows compat: Normalize file path handling and refactor tests by @koriym in #36
    • Update license copyright year(s) by @github-actions in #37

    Full Changelog: 1.8.0...1.9.0

    Open source →
  6. 1.8.0 06 Jan 2023
    Release notes

    What's Changed

    • Update license copyright year(s) by @github-actions in #33
    • Drop PHP 7.3 and 7.4 and optimized for PHP 8 by @NaokiTsuchiya in #34

    New Contributors

    • @github-actions made their first contribution in #33
    • @NaokiTsuchiya made their first contribution in #34

    Full Changelog: 1.7.1...1.8.0

    Open source →
  7. 1.7.1 28 Jun 2022
    Release notes

    What's Changed

    Full Changelog: 1.7.0...1.7.1

    Open source →
  8. 1.7.0 01 Apr 2021
    Release notes
    • Support PHP8 #29
    • Update CI #28
    Open source →
  9. 1.6.2 23 Jun 2020
    Release notes

    1.6.1 seems to be cached incorrectly in Travis CI, so this release is a Refresh. 🤔

    See https://travis-ci.org/github/bearsunday/BEAR.Package/jobs/701128249

    Open source →
  10. 1.6.1 27 May 2020
    Release notes
    • Refactor with psalm level max
    • Generics notation in phpdoc
    Open source →
  11. 1.6.0 04 Dec 2019

    Nothing published for this version

  12. 1.5.0 09 Jun 2019

    Nothing published for this version

  13. 1.4.0 11 May 2018

    Nothing published for this version

  14. 1.3.0 18 Mar 2018

    Nothing published for this version

  15. 1.2.5 06 Feb 2018

    Nothing published for this version

  16. 1.2.4 24 Jul 2017

    Nothing published for this version

  17. 1.2.3 24 Jul 2017

    Nothing published for this version

  18. 1.2.2 12 Jul 2017

    Nothing published for this version

  19. 1.2.1 no date

    Nothing published for this version

  20. 1.2.0 31 May 2017

    Nothing published for this version

  21. 1.1.1 24 Mar 2017

    Nothing published for this version

  22. 1.1.0 16 Mar 2017

    Nothing published for this version

  23. 1.0.0 19 May 2015

    Nothing published for this version

  24. 0.4.0 08 May 2015

    Nothing published for this version

  25. 0.3.3 01 May 2015

    Nothing published for this version

  26. 0.3.2 28 Apr 2015

    Nothing published for this version

  27. 0.3.1 28 Apr 2015

    Nothing published for this version

  28. 0.3.0 28 Apr 2015

    Nothing published for this version

  29. 0.1.1 17 Feb 2015

    Nothing published for this version

  30. 0.1.0 17 Feb 2015

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive