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

Update Laravel alias to use the correct path for Composer global binaries. #2275

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adbarbosa
Copy link

Description

This pull request updates the laravel alias in Bash-it to reference the correct path for globally installed Composer binaries (~/.config/composer/vendor/bin/laravel). This change ensures that users can execute the laravel new command without needing manual adjustments to their environment's PATH.

Motivation and Context

The default path for Composer global installations has changed from ~/.composer to ~/.config/composer. Without this update, users with the default Composer configuration encounter issues when trying to use the laravel alias, as it points to the outdated path.

This change resolves the issue and aligns Bash-it's Laravel alias with Composer's current global installation directory structure.

No open issues were directly linked to this problem at the time of submission.

How Has This Been Tested?

  • Tested locally on a Linux environment with Composer and Laravel installed globally.
  • Verified the updated alias correctly points to ~/.config/composer/vendor/bin/laravel.
  • Confirmed the laravel new command successfully creates a new Laravel application using the alias.
  • Ensured no adverse effects on other Bash-it functionality.

Screenshots (if appropriate):

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh.
  • I have added tests to cover my changes, and all the new and existing tests pass.

Copy link
Contributor

@seefood seefood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See remark and fix if relevant, or mark it resolved if you are 100% sure it's not. Thanks!

@@ -3,7 +3,7 @@ about-alias 'laravel artisan abbreviations'

# A list of useful laravel aliases

alias laravel='${HOME?}/.composer/vendor/bin/laravel'
alias laravel='${HOME?}/.config/composer/vendor/bin/laravel'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance some users still use the old location on older installations and will somehow lose functionality? I have a feeling this can benefit from an "if" and a fallback location if an older installation is found.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seefood seefood marked this pull request as draft December 28, 2024 19:21
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.

2 participants