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

Enhance error reporting and clean code #20

Open
OnkelTem opened this issue Mar 13, 2019 · 3 comments
Open

Enhance error reporting and clean code #20

OnkelTem opened this issue Mar 13, 2019 · 3 comments

Comments

@OnkelTem
Copy link

It seems to me the bad part of this tool is error reporting as it rarely reports anything reasonable when validating schema for example.
So I started to enhance this part. I'm not sure though what is the best way to do so due to architecture specifics: exceptions logic is mixed with real errors and it's very difficult to distinguish.
I'm going to provide a PR today so that you @romaricdrigon could check it out.

P.S. While I was editing this message I got notification that you finally replied in my other issue lol

@romaricdrigon
Copy link
Owner

Hello again,
That's great, thank you. I believe there are some limitations coming from the architecture, at some point I wanted to rewrite it but it didn't happen. I'm looking forward seeing your PR.

OnkelTem pushed a commit to OnkelTem/MetaYaml that referenced this issue Mar 16, 2019
@OnkelTem
Copy link
Author

Sorry for the delay.

This patch only adds some better error reporting via tracking the tree. It's not perfect yet, so it's better to check in a separate branch. I'm not a dub hand in githubbing, if your github-fu is better than mine —you can handle this :)

Also, I didn't do anything in "code cleaning" - or rather in proper code hinting (I'm getting more that PHP 350 warnings in PHPStorm) as this task it too difficult for now and requires separate analysis.

@romaricdrigon
Copy link
Owner

Thank you! The patch is pretty substantial, I will review it tomorrow.
MetaYaml is stuck on PHP 5.3 for now, I will have a look if I can make things better and make it PHP7.

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

No branches or pull requests

2 participants