Skip to content

Commit

Permalink
Init.
Browse files Browse the repository at this point in the history
  • Loading branch information
BafS committed Jun 2, 2022
0 parents commit 38f09df
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Demacroable

Illuminate components often depends on the "[macroable](https://github.com/illuminate/macroable)" (aka Monkey patching) package.
This package replace the official `illuminate/macroable` package with an empty trait.

This package makes the macroable trait empty and removes the possibility to monkey patch
some illuminate components (using the `Macroable` trait) at runtime, forcing end users to
compose (or inherit) with illuminate components in production or use mocking for tests.

> ! Use at your own risk
## Install

```
composer req bafs/illuminate-demacroable
```
9 changes: 9 additions & 0 deletions Traits/Macroable.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

declare(strict_types=1);

namespace Illuminate\Support\Traits;

trait Macroable
{
}
17 changes: 17 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "bafs/illuminate-demacroable",
"description": "The Demacroable package, to remove monkey patching from your codebase.",
"license": "MIT",
"require": {
"php": "^8.0"
},
"autoload": {
"psr-4": {
"Illuminate\\Support\\": ""
}
},
"replace": {
"illuminate/macroable": "*"
},
"minimum-stability": "dev"
}

0 comments on commit 38f09df

Please sign in to comment.