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

Move source classes to the Yoast\WHIPv2 namespace #157

Merged
merged 5 commits into from
Dec 22, 2023

Conversation

enricobattocchi
Copy link
Member

Also includes backslashing of the global namespace functions.

@coveralls
Copy link

coveralls commented Dec 18, 2023

Pull Request Test Coverage Report for Build 7300692411

  • 30 of 114 (26.32%) changed or added relevant lines in 18 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+3.0%) to 31.683%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/Exceptions/InvalidType.php 0 1 0.0%
src/Exceptions/InvalidVersionComparisonString.php 0 1 0.0%
src/MessageDismisser.php 1 2 50.0%
src/VersionRequirement.php 13 14 92.86%
src/Exceptions/EmptyProperty.php 0 2 0.0%
src/Exceptions/InvalidOperatorType.php 0 2 0.0%
src/Messages/InvalidVersionRequirementMessage.php 0 2 0.0%
src/WPDismissOption.php 0 2 0.0%
src/Messages/HostMessage.php 0 4 0.0%
src/WPMessageDismissListener.php 2 6 33.33%
Totals Coverage Status
Change from base Build 7299405286: 3.0%
Covered Lines: 96
Relevant Lines: 303

💛 - Coveralls

@enricobattocchi enricobattocchi marked this pull request as ready for review December 18, 2023 14:57
Copy link
Contributor

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

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

@enricobattocchi I've looked this over.

As mentioned on Slack, the directory names need to be updated to match the namespace in a case-sensitive manner.
Looks like you made this change already, but only for the directories containing namespaced classes, which makes the directory structure inconsistent, so I propose to also apply this for the directories containing plain files.

Another thing is that, yes, you've added namespaces, but the prefixing which was applied to the classes (for lack of namespacing) was not removed.

The class prefixing is no longer needed now and as this change is going into a major release, now would be the time to remove it.

I'll push some commits in a minute to fix this all up and apply some minor changes to the PHPCS config as well.

Let me know what you think.

@enricobattocchi
Copy link
Member Author

Looks good to me!

@jrfnl
Copy link
Contributor

jrfnl commented Dec 22, 2023

Looks good to me!

@enricobattocchi To keep the history cleaner, shall I squash those rename commits ? (or will you ?) I mostly did them one class at the time to make sure I didn't miss anything, but these don't really need separate commits.

@enricobattocchi
Copy link
Member Author

On it!

@enricobattocchi enricobattocchi merged commit 11acf17 into main Dec 22, 2023
17 checks passed
@enricobattocchi enricobattocchi deleted the move-to-namespace-v2 branch December 22, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants