Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow modules without the -module prefix using extra option #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bert-w
Copy link

@bert-w bert-w commented Jul 27, 2022

Apparently there appears to be a requirement to name your repository in a specific way in order to be accepted as a Laravel module.

I've added a much more simple solution that allows to add an additional property to composer.json of any repository:

{
    "extra": {
        "module-dir-name": "MyModuleName"
    }
}

Then, together with

{
    "type": "laravel-module"
}

any repository should work.

This adds the most flexibility. I've also used the ?? operator (PHP 7+ which works for this package) to simplify the code.

PS: I coded this on Github so I didnt test it.

@nWidart possible doc update for https://nwidart.com/laravel-modules/v6/advanced-tools/publishing-modules if this gets accepted?

@bert-w
Copy link
Author

bert-w commented Sep 3, 2022

@joshbrw can you take a look at this PR? thx

Cyvelnet added a commit to Cyvelnet/laravel-module-installer that referenced this pull request Jan 14, 2023
added pr from bert-w joshbrw#17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant