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

feat: Allow finding the base path when a laravel folder organisation … #144

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gjvanahee
Copy link

Hi,

Thank you for providing and maintaining so much quality code. I ran across something when I updated some of our internal packages to use the laravel-package-tools. Some of them follow Laravels app folder structure, i.e. they have the provider in a Providers folder. The package tools assume the provider lives in the src root and automatically sets the Providers folder as the base path. This results in pretty much everything not being found (out of the box) and requires each package to call setBasePath.

This PR adds a check in getPackageBaseDir() to see whether the path found ends in /Providers and if so, takes its parent folder as the base path. As I have seen the structuring of a package like Laravels app folder in other project too, I thought this PR might be useful to others too. Curious to learn what you think!

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