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

Fix $blueprint functions to do what they're expected #111

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

expxx
Copy link
Contributor

@expxx expxx commented Apr 11, 2025

And add methods for current behavior

@@ -247,7 +282,7 @@ public function extensions(): Collection
try {
$conf = Yaml::parse($this->fileRead(base_path(".blueprint/extensions/$extension/private/.store/conf.yml")));

$collection->push(array_filter($conf['info'], fn ($k) => !!$k));
Copy link
Contributor

Choose a reason for hiding this comment

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

why? info is more than enough

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have an idea for an extension that would eventually require more than just the info tab.

But also just to do what it says. The method isn't for getting the info section, it's for getting the config

@@ -77,7 +77,7 @@ public function collect(): array

'blueprint' => [
'version' => $this->placeholderService->version(),
'extensions' => $this->blueprint->extensions()->toArray(),
'extensions' => $this->blueprint->extensionsConfigs()->toArray(),
Copy link
Contributor

Choose a reason for hiding this comment

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

this sends the entire config which is invalid, only info needs to be send (map the data)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll fix it, but I'm curious. What does the API use the entire info section for?

Copy link
Contributor

Choose a reason for hiding this comment

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

to keep track of usage statistics/versions

Copy link
Member

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.

interesting

Copy link
Contributor Author

@expxx expxx Apr 11, 2025

Choose a reason for hiding this comment

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

Should be fixed x2. That or I'm being very silly.

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.

3 participants