samwilson / phpflickr-cli

A Flickr command-line interface, written in PHP.
https://packagist.org/packages/samwilson/phpflickr-cli
GNU General Public License v3.0
2 stars 1 forks source link

Remove farm*.staticflickr.com URLs #27

Closed tacman closed 3 weeks ago

tacman commented 1 month ago

https://www.flickr.com/services/api/misc.urls.html

The urls are now at live., farms have been deprecated.

It seems, though, that this should be in the flickr library (and tests) rather than here, though maybe both.

In this case, tests fail because it's trying to download a file from the farm url.

vendor/bin/phpunit 
PHPUnit 8.5.38 by Sebastian Bergmann and contributors.

  Warning - The configuration file did not pass validation!
  The following problems have been detected:

  Line 7:
  - Element 'testsuite': The attribute 'name' is required but missing.

  Test results may not be as expected.

E                                                                   1 / 1 (100%)

Time: 263 ms, Memory: 6.00 MB

There was 1 error:

1) Samwilson\PhpFlickrCli\Test\TemplateTest::testCreation
copy(): php_network_getaddresses: getaddrinfo for farmf.staticflickr.com failed: Name or service not known

/home/tac/g/tacman/phpflickr-cli/src/Template.php:153
/home/tac/g/tacman/phpflickr-cli/tests/TemplateTest.php:77

ERRORS!
Tests: 1, Assertions: 0, Errors: 1.
samwilson commented 1 month ago

Yes, I totally agree: this app shouldn't have to know about the URLs at all, it should just get them from PhpFlickr.

Where are you seeing the farm URLs here?

tacman commented 1 month ago

in Samwilson\PhpFlickrCli\Test\TemplateTest::testCreation triggers the error, but it seems like indeed the call is in phpFlickr.

Regardless, both the tests and library should change, since that format is no longer valid.

samwilson commented 3 weeks ago

I've opened https://github.com/samwilson/phpflickr/issues/70 to track this. No changes need to be made here I think.