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 2026Releases
latest 30-
1.13.019 Aug 2026Release notes
Open source →Added
$buildDironAbstractAppMeta:{appDir}/var/build/{context}, fixed toappDirregardless of$writeDirand not createdAbstractAppMeta::__wakeup()re-points paths underappDirwhen the application has moved since serializationMetarefuses a relative$appDir,$tmpDiror$logDirwithWriteDirNotAbsoluteException
Changed
Meta::appDir($name)moved toAbstractAppMetaand returns the canonical spelling, as do$appDir,$tmpDirand$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
$writeDironAbstractAppMeta: still filled for releasedbear/packageversions that read it; removal is a BC break and waits for the next major
Release notes
Open source →Added
$buildDironAbstractAppMeta:{appDir}/var/build/{context}, fixed toappDirregardless of$writeDirand not createdAbstractAppMeta::__wakeup()re-points paths underappDirwhen the application has moved since serializationMetarefuses a relative$appDir,$tmpDiror$logDirwithWriteDirNotAbsoluteException
Changed
Meta::appDir($name)moved toAbstractAppMetaand returns the canonical spelling, as do$appDir,$tmpDirand$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
$writeDironAbstractAppMeta: still filled for releasedbear/packageversions that read it; removal is a BC break and waits for the next major
-
1.12.016 Aug 2026Release notes
Open source →Added
Meta::create($name, $context, $appDir, $writeDir)places an application under{writeDir}/{Vendor}/{Project}/{context}, or its ownvar/when null$writeDironAbstractAppMeta: the base an application writes under, carried rather than derivedMeta::appDir($name)resolves an application directory from its nameMeta::create()refuses a write directory the current directory would resolve, withWriteDirNotAbsoluteException
Release notes
Open source →Added
Meta::create($name, $context, $appDir, $writeDir)places an application under{writeDir}/{Vendor}/{Project}/{context}, or its ownvar/when null$writeDironAbstractAppMeta: the base an application writes under, carried rather than derivedMeta::appDir($name)resolves an application directory from its nameMeta::create()refuses a write directory the current directory would resolve, withWriteDirNotAbsoluteException
-
1.11.010 Jul 2026Release notes
Open source →Added
- Optional
$tmpDirand$logDirconstructor arguments onMeta(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
Release notes
Open source →Added
- Optional
$tmpDirand$logDirconstructor arguments onMeta(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)
- Optional
-
1.10.027 Oct 2025Release notes
Open source →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
Release notes
Open source →Added
- Domain type aliases following BEAR.Package conventions (
Types.php) - PHP 8.5 support in CI test matrix
- Readonly properties for
ResMetavalue object - Private constructor to
Typesclass to prevent instantiation - Literal union type for
Scheme('app'|'page'|'*')
Changed
- BREAKING: Minimum PHP version upgraded from 8.0 to 8.1
- Lowered
bear/resourcerequirement from ^1.26 to ^1.0 for better compatibility - Lowered
koriym/psr4listrequirement 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-typepattern across all classes - Remove duplicate
@psalm-*annotations in favor of standard PHPDoc
Removed
- Removed
post-install-cmdandpost-update-cmdscripts for CI compatibility - Removed phpmetrics dependency (incompatible with readonly keyword)
Fixed
- Windows path separator issues in tests
- Add descriptive assert messages for better debugging
-
1.9.011 Jan 2025Release notes
Open source →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
-
1.8.006 Jan 2023Release notes
Open source →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
-
1.7.128 Jun 2022 -
1.7.001 Apr 2021 -
1.6.223 Jun 2020Release notes
Open source →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
-
1.6.127 May 2020 -
1.6.004 Dec 2019Nothing published for this version
-
1.5.009 Jun 2019Nothing published for this version
-
1.4.011 May 2018Nothing published for this version
-
1.3.018 Mar 2018Nothing published for this version
-
1.2.506 Feb 2018Nothing published for this version
-
1.2.424 Jul 2017Nothing published for this version
-
1.2.324 Jul 2017Nothing published for this version
-
1.2.212 Jul 2017Nothing published for this version
-
1.2.1no dateNothing published for this version
-
1.2.031 May 2017Nothing published for this version
-
1.1.124 Mar 2017Nothing published for this version
-
1.1.016 Mar 2017Nothing published for this version
-
1.0.019 May 2015Nothing published for this version
-
0.4.008 May 2015Nothing published for this version
-
0.3.301 May 2015Nothing published for this version
-
0.3.228 Apr 2015Nothing published for this version
-
0.3.128 Apr 2015Nothing published for this version
-
0.3.028 Apr 2015Nothing published for this version
-
0.1.117 Feb 2015Nothing published for this version
-
0.1.017 Feb 2015Nothing published for this version