Skip to content

Initial addon setup#1

Open
kevinmeijer97 wants to merge 4 commits into
masterfrom
feature/addon-setup
Open

Initial addon setup#1
kevinmeijer97 wants to merge 4 commits into
masterfrom
feature/addon-setup

Conversation

@kevinmeijer97
Copy link
Copy Markdown
Member

This addon now adds a navigation item under the JustBetter namespace.
Currently, it links to an overview of installed JustBetter packages, where available updates are also displayed.

Comment thread src/Data/PackageOverview.php Outdated
} catch (Throwable) {
return false;
}
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You can just do

Http::timeout(5)
->get('https://packagist.org/packages/justbetter/statamic-base.json')
->succesful()
->throw();

i think and then you don't need the try catch

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Kept it how it is, with the throw you'd still need a try/catch or something like rescue().

@@ -0,0 +1,49 @@
<?php

namespace JustBetter\StatamicBase\Services;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would put this in a Client namespace

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I would disagree for this file, as this is not client related.
But i've moved src/Services/PackagistClient.php to src/Client/PackagistClient.php now!

@kevinmeijer97 kevinmeijer97 requested a review from BobWez98 May 19, 2026 14: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