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

Create a simple framework for Hyde extensions #828

Merged
merged 33 commits into from
Jan 11, 2023

Conversation

caendesilva
Copy link
Member

@caendesilva caendesilva commented Jan 11, 2023

Adds a simple framework for creating Hyde extensions. I'm making this in parallel with #827. My initial thought was to house arrays of booting callbacks but I think those often makes it hard to understand where things are happening. This PR adds a base class that can be extended and registered. It's public methods are then called statically at the appropriate times, injecting any relevant dependencies.

Todo:

  • Add tests
  • Add documentation

@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Merging #828 (be6f30b) into master (13f58e8) will not change coverage.
The diff coverage is 100.00%.

@@              Coverage Diff              @@
##              master      #828     +/-   ##
=============================================
  Coverage     100.00%   100.00%             
- Complexity      1193      2406   +1213     
=============================================
  Files            144       290    +146     
  Lines           3152      6342   +3190     
=============================================
+ Hits            3152      6342   +3190     
Impacted Files Coverage Δ
packages/framework/src/Foundation/HydeKernel.php 100.00% <ø> (ø)
...ramework/src/Foundation/Concerns/HydeExtension.php 100.00% <100.00%> (ø)
...work/src/Foundation/Concerns/ManagesHydeKernel.php 100.00% <100.00%> (ø)
...ckages/framework/src/Foundation/FileCollection.php 100.00% <100.00%> (ø)
...ckages/framework/src/Foundation/PageCollection.php 100.00% <100.00%> (ø)
...kages/framework/src/Foundation/RouteCollection.php 100.00% <100.00%> (ø)
...work/src/Framework/Concerns/ValidatesExistence.php 100.00% <100.00%> (ø)
.../src/Framework/Concerns/RegistersFileLocations.php 100.00% <0.00%> (ø)
.../Framework/Features/Metadata/GlobalMetadataBag.php 100.00% <0.00%> (ø)
...p/packages/framework/src/Foundation/HydeKernel.php 100.00% <0.00%> (ø)
... and 142 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 marked this pull request as ready for review January 11, 2023 20:57
@caendesilva caendesilva changed the title Create extension framework Create a simple framework for Hyde extensions Jan 11, 2023
@caendesilva caendesilva merged commit 554f2ea into master Jan 11, 2023
@caendesilva caendesilva deleted the create-extension-framework branch January 11, 2023 21:08
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