PHPackages                             bap72190/composer-importer - 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. bap72190/composer-importer

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

bap72190/composer-importer
==========================

Import/update composer file with contrib modules from an outdated site.

1.0.5(4y ago)09PHPPHP &gt;=5.6

Since Jul 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/bap72190/composer-importer)[ Packagist](https://packagist.org/packages/bap72190/composer-importer)[ RSS](/packages/bap72190-composer-importer/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (11)Versions (7)Used By (0)

Composer Importer
=================

[](#composer-importer)

*Composer Importer* is a Composer plugin that can import all contrib modules from an existing Drupal site already using composer into the composer file. This is useful when the composer file doesn't get used properly and modules end up being installed outside composer.

This project was created based on the work by grasmash/composerize-drupal

Installation
------------

[](#installation)

```
composer global require bap72190/composer-importer

```

Usage:
------

[](#usage)

```
cd path/to/drupal/project/repo
composer ci --composer-root=[repo-root] --drupal-root=[drupal-root]

```

The `[composer-root]` should be the root directory of your project, where existing composer.json file is located.

The `[drupal-root]` should be the Drupal root, where `index.php` is located.

Options
-------

[](#options)

- `--composer-root`: Specifies the root directory of your project where `composer.json` will be generated. This should be the root of your Git repository, where `.git` is located.
- `--drupal-root`: Specifies the Drupal root directory where `index.php` is located.
- `--no-update`: Prevents `composer update` from being automatically run after `composer.json` is generated.
- `--exact-versions`: Will cause Drupal core and contributed projects (modules, themes, profiles) to be be required with exact verions constraints in `composer.json`, rather than using the default caret operator. E.g., a `drupal/core` would be required as `8.4.4` rather than `^8.4.4`. This prevents projects from being updated. It is not recommended as a long-term solution, but may help you convert to using Composer more easily by reducing the size of the change to your project.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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

6

Last Release

1819d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2914855?v=4)[bap72190](/maintainers/bap72190)[@bap72190](https://github.com/bap72190)

---

Top Contributors

[![bap72190](https://avatars.githubusercontent.com/u/2914855?v=4)](https://github.com/bap72190 "bap72190 (7 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/bap72190-composer-importer/health.svg)

```
[![Health](https://phpackages.com/badges/bap72190-composer-importer/health.svg)](https://phpackages.com/packages/bap72190-composer-importer)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M24.9k](/packages/friendsofphp-php-cs-fixer)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k60.6M796](/packages/drush-drush)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[oro/platform

Business Application Platform (BAP)

645143.5k114](/packages/oro-platform)[friendsoftypo3/content-blocks

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

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

PHPackages © 2026

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