PHPackages                             magedin/magento2-framework - 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. magedin/magento2-framework

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

magedin/magento2-framework
==========================

A set of utilities to help in Magento 2 development.

1.4.0(8mo ago)1161proprietaryPHPPHP ^7.4||^8.0

Since Nov 15Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/magedin/magento2-framework)[ Packagist](https://packagist.org/packages/magedin/magento2-framework)[ RSS](/packages/magedin-magento2-framework/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (2)Versions (10)Used By (0)

MagedIn Framework for Magento 2
===============================

[](#magedin-framework-for-magento-2)

A comprehensive framework that provides utilities, helpers, and extensions to facilitate Magento 2 development. This library offers a set of reusable components designed to standardize common tasks, improve code quality, and accelerate development across MagedIn modules.

Features
--------

[](#features)

### Module Management

[](#module-management)

- **Metadata Provider**: Retrieve module version and metadata information
- **Availability Checker**: Verify module dependencies and requirements

### Data Handling

[](#data-handling)

- **DataObject Extensions**: Utilities for manipulating and transferring data between objects
- **Validators**: Validations for common data formats including Brazilian CPF/CNPJ

### Time &amp; Date

[](#time--date)

- **DateTime Utilities**: Flexible date/time manipulation classes
- **Week/Year Handling**: Specialized classes for week and year operations

### Performance

[](#performance)

- **Profiler**: Track execution time and memory usage with minimal overhead
- **Optimized Operations**: Efficient implementations of common operations

### UI Components

[](#ui-components)

- **MetaConfigGenerator**: Standardized UI component configuration
- **Form Elements**: Reusable form elements and buttons for admin interfaces
- **Version Label**: Display module version information in admin panels

### String Processing

[](#string-processing)

- **Formatters**: Format strings for display and storage
- **Normalizers**: Standardize data formats (postal codes, numbers, etc.)
- **StringHelper**: Common string manipulation operations

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

[](#installation)

### Via Composer (recommended)

[](#via-composer-recommended)

```
composer require magedin/magento2-framework
bin/magento setup:upgrade
```

### Manual Installation

[](#manual-installation)

1. Create the following directory: `app/code/MagedIn/Framework`
2. Download the latest version from our repository
3. Extract files to the directory you created
4. Run the following commands:

```
bin/magento setup:upgrade
bin/magento cache:clean
```

Usage Examples
--------------

[](#usage-examples)

### Using the Profiler

[](#using-the-profiler)

```
use MagedIn\Framework\Magento2\Profiler;

// Start profiling a section
$profileId = Profiler::start('my-operation');

// Your code here
// ...

// Stop profiling and get results
Profiler::stop($profileId);
$duration = Profiler::getDuration($profileId);
$memory = Profiler::getMemory($profileId, Profiler::MEMORY_FORMAT_MB);

echo "Operation took {$duration} seconds and used {$memory}MB of memory";
```

### Getting Module Version

[](#getting-module-version)

```
use MagedIn\Framework\Magento2\Module\ModuleMetadataProvider;

class MyClass
{
    private ModuleMetadataProvider $metadataProvider;

    public function __construct(ModuleMetadataProvider $metadataProvider)
    {
        $this->metadataProvider = $metadataProvider;
    }

    public function getModuleVersion(): string
    {
        return $this->metadataProvider->getVersion('MagedIn_MyModule');
    }
}
```

### Using DataObject Copy

[](#using-dataobject-copy)

```
use MagedIn\Framework\Magento2\DataObject\Copy;
use Magento\Framework\DataObject;

class DataTransfer
{
    private Copy $copy;

    public function __construct(Copy $copy)
    {
        $this->copy = $copy;
    }

    public function transferData(DataObject $source, DataObject $target): void
    {
        $this->copy->copy(
            $source,
            $target,
            ['name', 'email', 'customer_id']
        );
    }
}
```

Module Structure
----------------

[](#module-structure)

```
├── src/
│   ├── Block/              # Block classes for rendering
│   ├── DataObject/         # DataObject extensions
│   ├── DateTime/           # Date and time utilities
│   ├── Formatter/          # String and data formatters
│   ├── Helper/             # Helper classes
│   ├── Layout/             # Layout-related functionality
│   ├── Message/            # Message handling
│   ├── Model/              # Models and business logic
│   ├── Module/             # Module management
│   ├── Normalizer/         # Data normalizers
│   ├── Ui/                 # UI components
│   ├── Validator/          # Validation classes
│   └── Profiler.php        # Performance profiling utility
├── tests/                  # Unit tests
├── composer.json           # Composer configuration
├── phpunit.xml             # PHPUnit configuration
└── registration.php        # Magento module registration

```

Compatibility
-------------

[](#compatibility)

- Magento 2.3.x, 2.4.x
- PHP 7.4, 8.0, 8.1
- MySQL 5.7+

Development
-----------

[](#development)

### Running Tests

[](#running-tests)

```
cd app/code/MagedIn/Framework
composer install
vendor/bin/phpunit
```

### Coding Standards

[](#coding-standards)

This project follows PSR-12 coding standards. To check your code:

```
composer run-script phpcs
```

Contributing
------------

[](#contributing)

We welcome contributions to the MagedIn Framework. Please follow these steps:

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run tests and ensure coding standards
5. Submit a pull request

License
-------

[](#license)

This package is licensed under the proprietary MagedIn Technology license.

Support
-------

[](#support)

For questions, issues, or support requests, please contact:

- Email:
- Website:

Changelog
---------

[](#changelog)

See the [RELEASE-NOTES.md](RELEASE-NOTES.md) file for a detailed changelog.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance73

Regular maintenance activity

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~174 days

Recently: every ~163 days

Total

6

Last Release

269d ago

PHP version history (2 changes)1.2.0PHP ~7.4||^8.0

1.2.1PHP ^7.4||^8.0

### Community

Maintainers

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

---

Top Contributors

[![tiagosampaio](https://avatars.githubusercontent.com/u/1485260?v=4)](https://github.com/tiagosampaio "tiagosampaio (57 commits)")

---

Tags

magentomagento-librarymagento2magento2-library

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/magedin-magento2-framework/health.svg)

```
[![Health](https://phpackages.com/badges/magedin-magento2-framework/health.svg)](https://phpackages.com/packages/magedin-magento2-framework)
```

###  Alternatives

[yireo/magento2-webp2

Magento 2 module to add WebP support to the Magento frontend

2091.2M7](/packages/yireo-magento2-webp2)[tig/postnl-magento2

TIG Magento 2 PostNL extension

58544.2k4](/packages/tig-postnl-magento2)[lillik/magento2-price-decimal

Magento 2 Price Decimal Precision

111147.5k](/packages/lillik-magento2-price-decimal)[nosto/module-nostotagging

Increase your conversion rate and average order value by delivering your customers personalized product recommendations throughout their shopping journey.

27659.1k4](/packages/nosto-module-nostotagging)[magepal/magento2-customeraccountlinksmanager

Customer Account Links Manager for Magento2 allows you to quickly and easily remove unwanted links from customer account dashboard

4084.9k](/packages/magepal-magento2-customeraccountlinksmanager)[doofinder/doofinder-magento2

Doofinder module for Magento 2

13204.0k1](/packages/doofinder-doofinder-magento2)

PHPackages © 2026

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