donjajo / php-jsondb

A PHP Class that reads JSON file as a database. Use for sample DBs
MIT License
208 stars 56 forks source link

Update for check_file method #27

Closed Mohammadreza-73 closed 2 years ago

Mohammadreza-73 commented 3 years ago

Add file extension checker.

Dictor commented 3 years ago

It's good point out!

However, in my opinion, check error through json_decode is more better approach. Following official doc, this function return null when fail to decode. And error detail can be retrieved with json_last_error.

donjajo commented 3 years ago

File extensions do not determine the content of the file. @Dictor's approach looks like the better one IMO

TomasVotruba commented 2 years ago

Hi, I'm going through opened PRs as I'm using this amazing package.

I guess this can be closed then 👍

donjajo commented 2 years ago

Right. Thank you

TomasVotruba commented 2 years ago

Thanks for such a fast reply :+1:

Btw, I'd like to contribute to this project, but I don't see any Github Actions CI or coding standards/static analysis. I think it would be big benefit for code maintenance and safer contributions from external devs.

Would you be interested in PR adding those?

donjajo commented 2 years ago

I am glad you found this helpful. I have not really been active over here. I will appreciate your help in doing those.

Thank you very much