PHPackages                             simpsons/composermode - 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. simpsons/composermode

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

simpsons/composermode
=====================

A custom module for Magento 2

14PHP

Since Jul 8Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Creating and Installing a Simple Magento 2 Module using Composer
================================================================

[](#creating-and-installing-a-simple-magento-2-module-using-composer)

Introduction
------------

[](#introduction)

This guide provides steps to create a simple module, install it via Composer in a third-party or your own Magento 2 project, and upload the package to Packagist.org while connecting it with GitHub.

Creating a Simple Module
------------------------

[](#creating-a-simple-module)

1. **Create Module Structure**

    - Create the necessary directories and files for your Magento 2 module.
2. **Define composer.json**

    - Create a `composer.json` file in the root directory of your module with the following content: ```
        {
          "name": "simpsons/composermode",
          "description": "A simple Magento 2 module",
          "require": {
            "php": "^8.1"
          },
          "type": "magento2-module",
          "version": "1.0.0",
          "autoload": {
            "files": [
              "registration.php"
            ],
            "psr-4": {
              "Simpsons\\ComposerModule\\": ""
            }
          }
        }
        ```
3. **Create Module Files**

    - Create `registration.php` and `module.xml` files as required by Magento 2.

Installing the Module via Composer
----------------------------------

[](#installing-the-module-via-composer)

1. **Install the Module**
    - Use the following command to install the module: ```
        composer require simpsons/composermode dev-main
        ```

Requirements
------------

[](#requirements)

- PHP 8.1 is required for compatibility.

Uploading Your Package to Packagist.org
---------------------------------------

[](#uploading-your-package-to-packagistorg)

1. **Create an Account on Packagist.org**

    - Visit [Packagist.org](https://packagist.org) and sign up for a new account.
    - Verify your email address to activate the account.
2. **Submit Your Package**

    - Once logged in, click on "Submit" in the top menu.
    - Enter the URL of your GitHub repository and click "Check".
    - After validation, submit your package.

Connecting GitHub with Packagist
--------------------------------

[](#connecting-github-with-packagist)

1. **Link Your GitHub Account**

    - Go to your Packagist profile and click on "Settings".
    - Click "Link GitHub account" and follow the instructions to authorize Packagist to access your GitHub repositories.
2. **Automate Package Updates**

    - In your GitHub repository, navigate to "Settings" &gt; "Webhooks".
    - Add a new webhook with the following details:
        - **Payload URL:** `https://packagist.org/api/github`
        - **Content type:** `application/json`
        - **Events:** Select "Just the push event".
    - Save the webhook.

Summary
-------

[](#summary)

Following the steps above, you can create a simple Magento 2 module, install it using Composer, and manage your package on Packagist.org. Ensure your module meets the PHP 8.1 requirement for compatibility.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity18

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c1519c75213cf85c2cf22ae289791457693e3bbc58baccb0bb6b37e3c032cb0?d=identicon)[mohitShrivas](/maintainers/mohitShrivas)

---

Top Contributors

[![Mscodder007](https://avatars.githubusercontent.com/u/171933984?v=4)](https://github.com/Mscodder007 "Mscodder007 (26 commits)")

### Embed Badge

![Health badge](/badges/simpsons-composermode/health.svg)

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

PHPackages © 2026

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