dan-coulter / phpflickr

PHP Wrapper for the Flickr API
GNU General Public License v2.0
207 stars 128 forks source link

PHP Deprecation Warnings #81

Closed cogdog closed 2 years ago

cogdog commented 6 years ago

Started seeing this warning on phpFlickr site I've run since 2008 http://pechaflickr.net

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpFlickr has a deprecated constructor in /home/cogdog/public_html/pechaflickr.net/phpFlickr.php on line 25

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpFlickr_pager has a deprecated constructor in /home/cogdog/public_html/pechaflickr.net/phpFlickr.php on line 1702

For now, I am suppressing warnings with

error_reporting(E_ALL ^ (E_NOTICE | E_WARNING | E_DEPRECATED));

samwilson commented 6 years ago

I'm attempting to bring this library up to date, in my fork: https://packagist.org/packages/samwilson/phpflickr The issue of constructors is fixed (there are still other bugs though).

cogdog commented 6 years ago

Awesome thanks, will give it a go for my app (my API use is simple, pretty much searching for photos).

On Thu, Sep 13, 2018 at 7:45 PM Sam Wilson notifications@github.com wrote:

I'm attempting to bring this library up to date, in my fork: https://packagist.org/packages/samwilson/phpflickr The issue of constructors is fixed (there are still other bugs though).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dan-coulter/phpflickr/issues/81#issuecomment-421204483, or mute the thread https://github.com/notifications/unsubscribe-auth/AAcQvkbHd8MKGaPvrYWkF4eCvh33IrMqks5uawpLgaJpZM4WoOcN .

--

---------------------------------------------------------------------------------------------------- Alan Levine info: cog.dog • blog: cogdogblog.com • tweets: @cogdog http://twitter.com/cogdog

photos: flickr http://flickr.com/photos/cogdog & Barking Dog http://barkingdog.me • code: github.com/cogdog ------------------------------------------------------------------------------------ ----------------

nighrv commented 5 years ago

I just upgraded my website to 7.1 from 5.6 as recommended by Joomla CMS 3.9. I converted all my old bespoke code that depended on mysql to mysqli.
I wrote several unsigned searches. This is one example. http://www.friendsofsilverbrook.org/site4/photos/photo-search

Now I see the following in my server logs:

[07-Jun-2019 18:22:39 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpFlickr has a deprecated constructor in /home3/frien130/php/FlickrAPI/phpFlickr.php on line 25 [07-Jun-2019 18:22:39 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpFlickr_pager has a deprecated constructor in /home3/frien130/php/FlickrAPI/phpFlickr.php on line 1702

I wasn't brave enough to go up to PHP 7.3 yet. I'll give the samwilson fork a go.

Thanks!