PHPackages                             goma/goma-env - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. goma/goma-env

ActiveLibrary

goma/goma-env
=============

Goma ENV provides some basic concepts for PHP applications: Constants about FileSystem, central storage directory, cache directory as well as functions to get infos about the current environment.

01.9kPHPCI failing

Since Dec 23Pushed 5y ago1 watchersCompare

[ Source](https://github.com/gomaframework/Goma-ENV)[ Packagist](https://packagist.org/packages/goma/goma-env)[ RSS](/packages/goma-goma-env/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Goma ENV
========

[](#goma-env)

Goma ENV provides some basic concepts for PHP applications: Constants about FileSystem, central storage directory, cache directory as well as functions to get infos about the current environment. Is also ensures that the data and the cache folder are writable.

Available constants
-------------------

[](#available-constants)

- IN\_GOMA: defines that this module is loaded
- ROOT: root path of application, e.g. /var/www/
- GOMA\_DATADIR: data directory path segement, e.g. data
- CACHE\_DIRECTORY: cache directory path segement, e.g. data/temp/
- DEV\_MODE: boolean whether this environment is in development mode or not

Available methods
-----------------

[](#available-methods)

- GomaENV::isPHPUnit(): bool returns if current execution is within PHPUnit
- GomaENV::isCommandLineInterface(): bool returns if current execution is within command line
- GomaENV::getCommandLineArgs(): array returns an assocative array of command line arguments
- GomaENV::getMemoryLimit() : int returns memory limit in bytes
- GomaENV::getCacheDirectory(): string full path to cache directory
- GomaENV::getDataDirectory(): string full path to data directory
- GomaENV::getRoot(): string full path to root
- GomaENV::getProjectLevelComposerArray(): array returns array of composer.json for root project
- GomaENV::getProjectLevelComposerInstalledArray(): array returns array of installed.json for root project

Configuration
-------------

[](#configuration)

This plugin can be configured in the project-level composer file:

- goma\_datadir: define data-dir, e.g. mysite
- goma\_tempdir: define temp-dir in data-dir, e.g. temp
- goma\_dev\_mode: define if DEV\_MODE is true or false

This project belongs to the Goma Framework. See [Project Homepage](https://goma-cms.org).

License: LGPLv3 see [license.txt](license.txt)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f770f7ce9e7cb8a9261d408a6d70eaa86e96eab3419e7b49cce95bb7f2e556f?d=identicon)[daniel.gruber](/maintainers/daniel.gruber)

### Embed Badge

![Health badge](/badges/goma-goma-env/health.svg)

```
[![Health](https://phpackages.com/badges/goma-goma-env/health.svg)](https://phpackages.com/packages/goma-goma-env)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
