Skip to content

Handle errors by importing packages - #81

Open
a-ast wants to merge 2 commits into
my127:0.4.xfrom
a-ast:bugfix/handle-repository-errors
Open

Handle errors by importing packages#81
a-ast wants to merge 2 commits into
my127:0.4.xfrom
a-ast:bugfix/handle-repository-errors

Conversation

@a-ast

@a-ast a-ast commented Apr 12, 2021

Copy link
Copy Markdown
  • Allow package import fail with an expicit error message
  • Add explicit dependency on ext-json because of json functions used

@kierenevans
kierenevans changed the base branch from 0.1.x to 0.2.x May 19, 2021 05:36

if ($packages === null) {
throw new Exception(sprintf('Response of %s can\'t be decoded as json.', $source['url']));
}

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.

@a-ast i don't think we need the NULL check AND the flag?

@dantleech dantleech Jan 28, 2022

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.

but in anycase, I since added this sevice:

https://github.com/my127/workspace/blob/0.3.x/src/File/JsonLoader.php

which handles loading JSON in a way that can be better unit tested, so might make sense to refactor this class to use that....

@kierenevans
kierenevans changed the base branch from 0.2.x to 0.4.x February 22, 2024 12:11
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