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

Handle errors by importing packages #81

Open
wants to merge 2 commits into
base: 0.4.x
Choose a base branch
from

Conversation

a-ast
Copy link

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

  • 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
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?

Copy link
Collaborator

@dantleech dantleech Jan 28, 2022

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