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

fix: properly handle class sharing class name and namespace group name #555

Conversation

romm
Copy link
Member

@romm romm commented Sep 2, 2024

Fixes #554

@stof
Copy link

stof commented Sep 3, 2024

Why this need for isExplicitAlias ? Even when using an explicit alias as Money, use statements don't impact class names used in other use statements, which are always fully qualified.


if (! empty($namespaceParts)) {
$full .= '\\' . implode('\\', $namespaceParts);
if (! $aliases[$alias]['isExplicitAlias']) {
Copy link

Choose a reason for hiding this comment

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

this looks wrong to me. The non-empty namespace parts must always be respected.

@romm
Copy link
Member Author

romm commented Sep 18, 2024

@stof right, I just gave it another look and could greatly simplify it. Thanks for noticing it, I guess I was tired the other day. 😅

@romm romm enabled auto-merge (squash) September 24, 2024 10:51
@romm romm merged commit 6e68d6f into master Sep 24, 2024
21 checks passed
@romm romm deleted the fix/properly-handle-class-sharing-class-name-and-namespace-group-name branch September 24, 2024 10:51
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.

Class "Money\Money\Currency" does not exist
2 participants