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

Finalize the asset service #1186

Merged
merged 47 commits into from
Mar 3, 2023
Merged

Finalize the asset service #1186

merged 47 commits into from
Mar 3, 2023

Conversation

caendesilva
Copy link
Member

@caendesilva caendesilva commented Mar 2, 2023

Abstract

Polishes and finalizes the asset service in preparation for the 1.0 release.

Breaking changes

Contains the following breaking changes:

Rename hyde.cache_busting to hyde.enable_cache_busting

The following options were considered:

  • enable_cache_busting
  • use_cache_busting
  • cache_busting

Of the three options provided, I would recommend using enable_cache_busting as the name for the configuration option that controls whether cache busting is applied.

This is because the term "enable" clearly indicates that the option is a boolean toggle that turns a feature on or off. The term "cache_busting" is also clear and concise, making it easy for users to understand what the option does.

The option use_cache_busting is also a reasonable alternative, but it is slightly less clear in its meaning. It could be interpreted as indicating that the feature is always on, and the option is simply selecting which type of cache busting to use.

Lastly, cache_busting on its own is too ambiguous and does not clearly indicate whether the feature is enabled or disabled. It also does not provide any indication of what the option does or how it affects the behavior of the system.

Make public AssetService::$version property protected

There is already a convenient place to set this property, using the config value in the constructor, and there is a public accessor method.

@codecov
Copy link

codecov bot commented Mar 2, 2023

Codecov Report

Merging #1186 (858cd8d) into master (36e3bb4) will not change coverage.
The diff coverage is 100.00%.

@@              Coverage Diff              @@
##              master     #1186     +/-   ##
=============================================
  Coverage     100.00%   100.00%             
- Complexity      1353      2702   +1349     
=============================================
  Files            156       312    +156     
  Lines           3527      7056   +3529     
=============================================
+ Hits            3527      7056   +3529     
Impacted Files Coverage Δ
.../framework/src/Framework/Services/AssetService.php 100.00% <100.00%> (ø)
...op/packages/framework/src/Support/Models/Route.php 100.00% <0.00%> (ø)
...ackages/framework/src/Foundation/Facades/Pages.php 100.00% <0.00%> (ø)
...ackages/framework/src/Support/Models/RouteList.php 100.00% <0.00%> (ø)
develop/packages/framework/src/Facades/Author.php 100.00% <0.00%> (ø)
.../packages/framework/src/Foundation/PharSupport.php 100.00% <0.00%> (ø)
...ramework/Views/Components/BreadcrumbsComponent.php 100.00% <0.00%> (ø)
...framework/src/Markdown/Models/MarkdownDocument.php 100.00% <0.00%> (ø)
...amework/Features/Navigation/BaseNavigationMenu.php 100.00% <0.00%> (ø)
develop/packages/framework/src/helpers.php 100.00% <0.00%> (ø)
... and 147 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@caendesilva caendesilva force-pushed the finalize-asset-service branch from 5fb274f to 8d8dacc Compare March 2, 2023 21:52
There is already a convenient place to set this property, using the config value in the constructor, and there is a public accessor method.
@caendesilva caendesilva force-pushed the finalize-asset-service branch from 48fd5c7 to 3ab44e5 Compare March 3, 2023 09:20
@caendesilva caendesilva marked this pull request as ready for review March 3, 2023 09:21
@caendesilva caendesilva merged commit de57173 into master Mar 3, 2023
@caendesilva caendesilva deleted the finalize-asset-service branch March 3, 2023 09:25
@caendesilva caendesilva mentioned this pull request Mar 3, 2023
26 tasks
@caendesilva caendesilva added this to the v1 milestone Mar 3, 2023
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