-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Added support for the WEBSERVICE function #1409
Conversation
e07f9ab
to
1f756cf
Compare
What about using something like guzzle ? We can then assume guzzle is tested and working as expected and we may be able to mock it for our own tests ? |
@PowerKiKi Good point. I didn't want to add packages willy-nilly but with your blessing I added guzzle. This made mocking and testing a bit robuster. |
* | ||
* @param Client $client | ||
*/ | ||
public static function setClient(Client $client) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should live in \PhpOffice\PhpSpreadsheet\Settings
, like the similar setCache/getCache
, so settings are centralized and could maybe later be transformed into a PSR-11.
tests/PhpSpreadsheetTests/Calculation/Functions/Web/WebServiceTest.php
Outdated
Show resolved
Hide resolved
tests/PhpSpreadsheetTests/Calculation/Functions/Web/WebServiceTest.php
Outdated
Show resolved
Hide resolved
tests/PhpSpreadsheetTests/Calculation/Functions/Web/WebServiceTest.php
Outdated
Show resolved
Hide resolved
tests/PhpSpreadsheetTests/Calculation/Functions/Web/WebServiceTest.php
Outdated
Show resolved
Hide resolved
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
500b1a6
to
43e5df3
Compare
@PowerKiKi @paulkned @MarkBaker is Guzzle 7 a hard requirement for this to work or could we loosen up the requirement to Installing in a clean Laravel 7.0 install currently doesn't allow 1.14 to be installed, which I'm afraid will cause a lot of confusing among the Laravel Excel users who want to upgrade to use the backwards compatible fix for the empty enclosures which was fixed in 1.14. |
See also #1562 I did see the new release but wondering why it didn't upgrade => because my project uses Guzzle ^6 |
This is:
Checklist:
Why this change is needed?
The WEBSERVICE function was not supported, and now it is. The only thing I'm unsure of are the unit tests. Obviously this function needs to contact an external website. I chose a generic API which seems like it will stay in the air for a while. However, there is no way of knowing this for sure, neither is there any way of knowing if the API will keep returning the same results. This will break the unit tests without any code changes. But not including this test will make sure the function is not properly tested ... dilemma's, dilemma's.