Open unomateo opened 3 years ago
Can we get this merged please?
PSR4 Specs state:
So RESO\RESO
was compliant. The only problem was that the class' FILE name was Reso.php
when it should have been RESO.php
to be compliant.
I'm personally not a fan of the Abc\Xyz
case convention that has become so prevalent. If a name is correctly written as "RESO", then that's how it should be written everywhere, not "Reso". Same as "WebAPI", not "WebApi". Acronyms should be recognized as such. Just my take.
Would you reconsider this, reverse the pull request, and instead rename the file to RESO.php
to satisfy the autoloader?
Description of the Change
Renamed the RESO class to Reso for psr4 compliance. The class name needs to be the same as the file name, including capitalization. The examples worked fine when I was testing the code, but when I imported into a symfony PHP project, I received the error regarding psr4 autoloading similar to issue: https://github.com/RESOStandards/RESO-WebAPI-Client-PHP/issues/9#issue-615109426
Also added a new cli example for connecting to the bridge web api using only the server token provided by bridge.
Benefits
Ability to autoload in projects that require psr4 autoloading
Possible Drawbacks
None
Verification Process
After importing to symfony project and getting the error. I renamed the class file and dumped the composer autoload file. The result was no errors and I was able to make a connection to the web api and pull property data.
Applicable Issues
None