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

Add Class Alias Autoload #13

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

Conversation

rpaggi
Copy link

@rpaggi rpaggi commented Jan 21, 2025

I extract and add the same function that currently exists in Laravel's Tinker to automatically create class aliases.

I'm sending this PR to analyze whether it makes sense to implement this functionality and for possible adjustments to the code.

image

@luanfreitasdev
Copy link
Member

I find this interesting, especially on Windows or when the LSP doesn't suggest the model namespace.

@@ -0,0 +1,152 @@
<?php
Copy link
Member

Choose a reason for hiding this comment

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

I wouldn't duplicate from Tinker. if the project is Laravel then it has Tinker in it and you can just check if the Class exists and use it instead of copying it

@@ -0,0 +1,59 @@
<?php
Copy link
Member

Choose a reason for hiding this comment

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

same opinion on this as well

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.

4 participants