PHPackages                             mage/mage - 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. mage/mage

ActiveMagento2-module

mage/mage
=========

Fix of the Magento 2 DI and Object Manager issue. Make Magento great again!

2.6.35(2y ago)7533[1 PRs](https://github.com/Genaker/mage2/pulls)GPL-3.0PHP

Since Mar 15Pushed 3mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (8)Versions (44)Used By (0)

Mage is a Magento 2 library that makes magento backend easy again
=================================================================

[](#mage-is-a-magento-2-library-that-makes-magento-backend-easy-again)

**\\Mage::** Facades provide an old good static interface to Magento classes that are available in the application’s Mage service container (a place to store variables and objects to use them when needed). This means that we can use functions without making an object from a class. Facades provide a "static" interface to classes available in the application's service container. Mage ships with many facades provide access to all Magento 2 features.

Mage facades serve as "static proxies" to underlying classes in the service container, providing the benefit of a terse, expressive syntax while maintaining more flexibility than traditional magento methods.

Mage library is not only facades!
=================================

[](#mage-library-is-not-only-facades)

Magento 2 sucks, and Mage is here to resolve this issue. Adobe killed Magento with the scum and overengenered bloatware. Mage adding additional nice development features not available with Magento 2 core.

- Fast easy accesible facades
- Easy Logger
- Fast, accessible Object manager
- Symfony Dumper features
- Kint Backtrace and Debug
- Eloquent/Laravel Query Builder and ORM (powered by Laragento)

Advantages of the Mage::Facades
===============================

[](#advantages-of-the-magefacades)

- improve the readability and usability by masking interaction with more complex components behind a single and often simplified API
- provide a context-specific interface to more generic functionality
- serve as a launching point for a broader refactor of monolithic or tightly-coupled Magento systems in favor of more loosely-coupled code

We have decided to use a facade design pattern because the magento 2 system is very overengenered/complex and obfuscated - difficult to understand because the system has many interdependent classes. The mage::facade pattern hides the complexities of the Magento 2 system and provides a simpler interface to the developers. It typically involves a single wrapper class containing a set of members the client requires. These members access the system on behalf of the facade clients and hide the implementation details.

Mage DB2 facade powered by Laravel query builder
================================================

[](#mage-db2-facade-powered-by-laravel-query-builder)

Magento 2 uses an outdated Zend\_DB library to implement a slow legacy ORM and interact with a database. Mage DB2, based on Laravel/DB, makes work with databases extremely simple and fast using raw SQL, a fluent Laravel query builder, and the Eloquent ORM in conjunction with the Laragento package.

Also, Laravel collections provide a variety of extremely powerful methods for mapping and reducing data. For more information, check the awesome Laravel documentation.

Several examples:
-----------------

[](#several-examples)

Get all dates from the order table

```
$orders = DB2::table('sales_order');

```

Specify select statements
-------------------------

[](#specify-select-statements)

```
$users = DB2::table('users')
            ->select('name', 'email as user_email')
            ->get();

```

Join
----

[](#join)

```
$users = DB2::table('users')
            ->join('contacts', 'users.id', '=', 'contacts.user_id')
            ->join('orders', 'users.id', '=', 'orders.user_id')
            ->select('users.*', 'contacts.phone', 'orders.price')
            ->get();

```

Insert
------

[](#insert)

```
DB2::table('users')->insert([
    ['email' => 'picard@example.com', 'votes' => 0],
    ['email' => 'janeway@example.com', 'votes' => 0],
]);

```

Video example of the using Magento DB2 (powered by Laravel) query builder:
--------------------------------------------------------------------------

[](#video-example-of-the-using-magento-db2-powered-by-laravel-query-builder)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance55

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

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

42

Last Release

773d ago

Major Versions

0.11 → 2.12024-03-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/2614da2cb514a3749cd296d237c9ca3430f4dafa09b4e49e338a6b1794a5acf4?d=identicon)[genaker](/maintainers/genaker)

---

Top Contributors

[![Genaker](https://avatars.githubusercontent.com/u/9213670?v=4)](https://github.com/Genaker "Genaker (18 commits)")

### Embed Badge

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

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

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[laravel/folio

Page based routing for Laravel.

608453.9k27](/packages/laravel-folio)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)

PHPackages © 2026

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