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 yesterday

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 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

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

1009d ago

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

v0.2PHP &gt;=7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/196416?v=4)[Hugo Chinchilla Carbonell](/maintainers/hugochinchilla)[@hugochinchilla](https://github.com/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

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[symfony/config

Helps you find, load, combine, autofill and validate configuration values of any kind

4.3k479.6M8.5k](/packages/symfony-config)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[symfony/asset-mapper

Maps directories of assets &amp; makes them available in a public directory with versioned filenames.

1678.8M238](/packages/symfony-asset-mapper)[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k78.3k90](/packages/pocketmine-pocketmine-mp)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)

PHPackages © 2026

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