Skip to content

Fix ClassName::beginsWith() #26

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

Merged
merged 8 commits into from
Apr 7, 2022

Conversation

przepompownia
Copy link
Contributor

No description provided.

@przepompownia
Copy link
Contributor Author

I'm not sure how it should work for PSR-0.

@dantleech
Copy link
Collaborator

seems to be some test failure and you fixed a couple of phpstan issues so the baseline needs to be updated phpstan --generate-baseline. Run composer integrate to run unit, cs and phpstan.

@dantleech
Copy link
Collaborator

tests still failing...

@przepompownia
Copy link
Contributor Author

Still failing for mixed PSR0 and PSR4 prefixes.

@dantleech
Copy link
Collaborator

7.3 failure and CS --- we can drop 7.3 and bump to 7.4

@przepompownia
Copy link
Contributor Author

przepompownia commented Apr 7, 2022

Currently I do not see any test result on the github side (1 workflow awaiting approval only). In my local env all CI tests pass.

@dantleech dantleech merged commit e9b7022 into phpactor:master Apr 7, 2022
],
[
$this->classLoader->getFallbackDirsPsr4(),
// PSR0 name inflector works here as there is no prefix
new Psr0NameInflector(),
Psr0NameInflector::NAMESPACE_SEPARATOR,
Copy link
Collaborator

Choose a reason for hiding this comment

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

hm, why do we pass this in if it's the same each time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not the same: Psr0NameInflector::NAMESPACE_SEPARATOR and Psr4NameInflector::NAMESPACE_SEPARATOR are used as an additional separator.

Such separator would be returned from NameInflector::getAdditionalSeparator() or something similar and the we would not need pass it there. If you agree then I can make this change.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah ok, confused though why would \\ be an additional separator for PSR4? but yeah if we could improve the intent of these constnats/and methods it would be good 👍

now that we've merged a PR the CI should run for you by default... 🤞

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#27

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please do not forget to make a release and upgrade it in phpactor while it's not a part of the monolith.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

@przepompownia przepompownia deleted the fix-class-begins-with branch April 7, 2022 19:22
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