MyOnlineStore / ViesBundle

Symfony bundle for DragonBe/vies
MIT License
2 stars 4 forks source link

change dependences and fix SOAP-ERROR #2

Closed Triplkrypl closed 6 years ago

digibeuk commented 6 years ago

one other thing, please also change the unit test if you add a new path to the code

Triplkrypl commented 6 years ago

Hi, firs fix is update dependence: dragonbe/vies, in version 1.0 is bug in CZ VAT checksum and is fixed in 2.0 version, some CZ VAT is valid but checksum mark VAT as invalid. Here is commit from dragonbe/vies. https://github.com/DragonBe/vies/commit/7d9e2513a5be5cfc891bf86313b24e874c58894b#diff-95112eafdfcd4eb59b415711f0eb75fc

Second fix is clear error from soap service, soap library have one bad habit, if WSDL file can not be load, soap client throw Exception and in same time create php ERROR. Created Error can not be catched and this error symfony handle only in shutdown handler or error handler. In fix i add function error_clear_last(), this function is only in php 7.

Thank for comments, permission 755 is bad idea, i dit not see it. I will look for coding style, Is nice have written code by some rules.

I need write some issue in my repository, so i do not forget.

digibeuk commented 6 years ago

Second fix is clear error from soap service, soap library have one bad habit, if WSDL file can not be load, soap client throw Exception and in same time create php ERROR. Created Error can not be catched and this error symfony handle only in shutdown handler or error handler. In fix i add function error_clear_last(), this function is only in php 7.

Do you have a use case with which I can reproduce this error?

Triplkrypl commented 6 years ago

Yes error can be reprocuced creating SoapClient object with invalid WSDL url or I tryed it on virtual machine witch is cutof from public network and url for soap service is unrechable. I used php 7.1.

digibeuk commented 6 years ago

could you move the version change to a different PR and target the 1.0-release branch?

Triplkrypl commented 6 years ago

php version and code working only on php 7.0 reverted and new pull request with all changes is here: https://github.com/MyOnlineStore/ViesBundle/pull/3.

digibeuk commented 6 years ago

closing this as all changes are now in another PR