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 new URL path helpers #292

Merged
merged 14 commits into from
Jul 30, 2022
Merged

Add new URL path helpers #292

merged 14 commits into from
Jul 30, 2022

Conversation

caendesilva
Copy link
Member

Having a function that can return both a string and a psuedo-boolean (false) can lead to unpredictable states. This PR deprecates the Hyde::uriPath() helper and adds two new ones instead, Hyde::qualifiedUrl() and Hyde::hasSiteUrl(), effectively splitting the former into the latter.

@codecov
Copy link

codecov bot commented Jul 30, 2022

Codecov Report

Merging #292 (6570ef9) into master (55b4f98) will not change coverage.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##              master      #292   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity       809       813    +4     
===========================================
  Files             96        96           
  Lines           2025      2033    +8     
===========================================
+ Hits            2025      2033    +8     
Impacted Files Coverage Δ
packages/framework/src/Hyde.php 100.00% <ø> (ø)
...framework/src/Commands/HydeBuildSitemapCommand.php 100.00% <100.00%> (ø)
...s/framework/src/Concerns/GeneratesPageMetadata.php 100.00% <100.00%> (ø)
...ackages/framework/src/Concerns/HasPageMetadata.php 100.00% <100.00%> (ø)
packages/framework/src/HydeKernel.php 100.00% <100.00%> (ø)
...ckages/framework/src/Models/Pages/MarkdownPost.php 100.00% <100.00%> (ø)
packages/framework/src/Models/Route.php 100.00% <100.00%> (ø)
packages/framework/src/Services/RssFeedService.php 100.00% <100.00%> (ø)
packages/framework/src/Services/SitemapService.php 100.00% <100.00%> (ø)
...kages/framework/src/Services/ValidationService.php 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55b4f98...6570ef9. Read the comment docs.

@caendesilva
Copy link
Member Author

caendesilva commented Jul 30, 2022

Since the refactor to fully use the new helper will involve the article views I first want to add tests for those.

Edit: Done.

@caendesilva caendesilva marked this pull request as ready for review July 30, 2022 12:03
@caendesilva caendesilva merged commit a3ca0b0 into master Jul 30, 2022
@caendesilva caendesilva deleted the add-new-url-path-helpers branch July 30, 2022 12:06
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