PHPackages                             hugochinchilla/botanist - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hugochinchilla/botanist

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

hugochinchilla/botanist
=======================

Removes all the roots from your project dir

v0.2(2y ago)758GPL-3.0-onlyPHPPHP &gt;=7.0

Since Sep 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/hugochinchilla/botanist)[ Packagist](https://packagist.org/packages/hugochinchilla/botanist)[ RSS](/packages/hugochinchilla-botanist/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

Botanist 🪴
==========

[](#botanist-)

[![Run test suite](https://github.com/hugochinchilla/botanist/actions/workflows/run-phpunit.yml/badge.svg)](https://github.com/hugochinchilla/botanist/actions/workflows/run-phpunit.yml)

[![banner](img/ls-example.png)](img/ls-example.png)

Add this plugin to your `composer.json` to prevent composer from creating files owned by root while running on docker.

```
composer require hugochinchilla/botanist
```

Why this project?
-----------------

[](#why-this-project)

Something I like a lot is being able to run any development environment just by running `docker compose up` after cloning it, without having to set up anything, no need to read the readme file, for me that is devex bliss.

A typical problem setting docker to run with a user different that root is needing to customize your user id in a dotenv file before being able to start the project, and that makes me unhappy.

How does it work?
-----------------

[](#how-does-it-work)

It sets a hook to run after commands that may write the `vendor/` dir or update the `composer.lock` file. The hook will check the parent dir owner/group and will set the same ownership to the files.

It can only perform this action if composer is run as root, so if you don't install it as root you will not see the ownership changed until you execute any install/update as root.

Is it better than running docker as not root?
---------------------------------------------

[](#is-it-better-than-running-docker-as-not-root)

No. The best practice is to not run containers as root, but if you are running it as root nonetheless, this will solve a common issue.

What's the alternative?
-----------------------

[](#whats-the-alternative)

You can use a mix of a dotenv file and the following snippet:

```
# .env
USER_ID=1000 # get yours running `id -u`

# docker-compose.yml
services:
  php:
    image: php:some-version
    user: ${USER_ID:-1000}:${USER_ID:-1000}
    ...

```

This will run the docker container as the same user as yours. If you don't define the USER\_ID in the dotenv file it will use 1000 as default value, there is a great chance that this is your id anyway.

But if you want to have a repo that can be cloned by any user and just run with `docker compose up` without any prior setup, use botanist.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

955d ago

PHP version history (2 changes)v0.1PHP &gt;=7.4

v0.2PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/77529105a3fa32de7d4347ac14e48651e42c4b1fc34be45bcf09ea63efee44f5?d=identicon)[hugochinchilla](/maintainers/hugochinchilla)

---

Top Contributors

[![hugochinchilla](https://avatars.githubusercontent.com/u/196416?v=4)](https://github.com/hugochinchilla "hugochinchilla (25 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hugochinchilla-botanist/health.svg)

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

###  Alternatives

[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[vaimo/composer-changelogs

Provide information about package changes based on changelog files that are bundled with releases; provide tools for generating documentation files from changelog sources

11150.5k10](/packages/vaimo-composer-changelogs)[williarin/cook

Composer plugin to execute recipes embedded in packages

252.1k3](/packages/williarin-cook)[uma/composer-psysh

No-frills PsySH-Composer plugin

183.2k](/packages/uma-composer-psysh)[numero2/contao-storelocator

Contao Plugin for managing stores (or in common address data) and providing a frontend-search based on geo data

121.5k](/packages/numero2-contao-storelocator)

PHPackages © 2026

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