lakedrops/composer-json-utils

Composer Library to provide utilities to work with project's own composer.json file

v2.5.1 2024-02-20 17:01 UTC

README

This base libary doesn't do much by itself. It exists as a foundation for most of the other plugins from LakeDrops and builds the composer command, plugin and handler framework together with a few utilities that are useful in most plugins:

Config

Manages all the settings (default and custom) for each plugin and stores them all together in the project root in a file called .lakedrops.yml. This file should be committed to your Git repository as it contains settings for the project similar to all developers and stages.

DotEnv

Manages stored environment variables in a env file in the root of the project. This file should NOT be committed to the Git repository, it contains local settings specific to the developer and stage.

NestedArray

A helper class to properly merge PHP array, borrowed from Drupal core.

Utils

All those utilities can be used in handler, that extend the BaseHandler class from this library with $this->utility() calls, where utility is a placeholder for any of the available callbacks. For scripts outside of the BaseHandler context, this class provides static access to the same utilities.