Dependencies

From orangehrm/orangehrm · View interactive version

Dependencies is an AI agent skill from the GitHub repository orangehrm/orangehrm. Reference for managing OrangeHRM Composer and Yarn dependencies — where composer.json and package.json files live, running package-manager commands inside the Docker dev environment, using the lowest supported PHP version from the relevant composer.json for Composer install/update/require, respectin

How to use this skill

Skill file

Dependency management

Use this skill whenever dependency files or lockfiles are involved. Pair it with dev-environment for where commands run, compatibility for supported-version policy, and testing for validation.

Dependency projects

| Area | Files | Package manager | Notes |

|---|---|---|---|

| Main PHP app | src/composer.json, src/composer.lock | Composer | Runtime app dependencies and app-level dev dependencies. |

| Dev tools | devTools/core/composer.json, devTools/core/composer.lock | Composer | Developer-only console dependencies. |

| Main Vue app | src/client/package.json, lockfile in same workspace | Yarn | Main Vue frontend; builds into web/dist. |

| Installer Vue app | installer/client/package.json, lockfile in same workspace | Yarn | Installer UI frontend. |

| Cypress tests | src/test/functional/package.json, lockfile in same workspace | Yarn | Functional/E2E test workspace. |

Read the actual composer.json / package.json before choosing commands. Do not copy current version constraints into this skill; package metadata is the source of truth.

Hard rules

Composer workflow

  1. Identify the owning Composer project.
  2. Read its composer.json, especially require.php and config.platform.
  3. Pick the Docker PHP container matching the lowest supported PHP version.
  4. Run the narrowest command that solves the task.
  5. Commit the manifest and lockfile together.
  6. Run relevant validation.

Example pattern:

docker exec -it os_dev_php<lowest-supported-version> bash
cd /var/www/<ohrm-checkout-dir>/src
composer require vendor/package:^1.2
composer update vendor/package --with-dependencies

Why: if a Composer project supports a PHP range such as "lowest supported PHP through newer PHP versions", resolving dependencies on the newest PHP can select packages that do not work on the lowest supported runtime.

Composer DOs and DON'Ts

DO:

DON'T:

Yarn / Node workflow

  1. Identify the owning workspace by locating the nearest package.json.
  2. Read packageManager, engines, scripts, and any repo Node-version files if present.
  3. Run Yarn inside the Docker dev environment.
  4. Commit the workspace manifest and lockfile together.
  5. Run the narrowest relevant validation (yarn lint, yarn test:unit, yarn build, or Cypress commands).

Example pattern:

docker exec -it os_dev_php<chosen-dev-container> bash
cd /var/www/<ohrm-checkout-dir>/src/client
yarn install
yarn add package-name
yarn build

Yarn / Node DOs and DON'Ts

DO:

DON'T:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.