Skip to content

Commit 38f09df

Browse files
committed
Init.
0 parents  commit 38f09df

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Demacroable
2+
3+
Illuminate components often depends on the "[macroable](https://github.com/illuminate/macroable)" (aka Monkey patching) package.
4+
This package replace the official `illuminate/macroable` package with an empty trait.
5+
6+
This package makes the macroable trait empty and removes the possibility to monkey patch
7+
some illuminate components (using the `Macroable` trait) at runtime, forcing end users to
8+
compose (or inherit) with illuminate components in production or use mocking for tests.
9+
10+
> ! Use at your own risk
11+
12+
## Install
13+
14+
```
15+
composer req bafs/illuminate-demacroable
16+
```

Traits/Macroable.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Illuminate\Support\Traits;
6+
7+
trait Macroable
8+
{
9+
}

composer.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "bafs/illuminate-demacroable",
3+
"description": "The Demacroable package, to remove monkey patching from your codebase.",
4+
"license": "MIT",
5+
"require": {
6+
"php": "^8.0"
7+
},
8+
"autoload": {
9+
"psr-4": {
10+
"Illuminate\\Support\\": ""
11+
}
12+
},
13+
"replace": {
14+
"illuminate/macroable": "*"
15+
},
16+
"minimum-stability": "dev"
17+
}

0 commit comments

Comments
 (0)