Code Monkey home page Code Monkey logo

Comments (7)

cmfcmf avatar cmfcmf commented on July 22, 2024

Thank you for raising this issue. AFAIK, this could only happen for weather group data. I fixed that in d55e066.

from openweathermap-php-api.

KarelWintersky avatar KarelWintersky commented on July 22, 2024

Nice. But in this version you use excessive libraries :(

At my small site I can't use version 2+ :(

from openweathermap-php-api.

cmfcmf avatar cmfcmf commented on July 22, 2024

Hi @KarelWintersky,

Could you elaborate a bit more on why the requirement to install additional libraries prevents you from using this library? I am trying to understand what prevents you from installing them. Or is the jump in the required PHP version from 5 to 7 the issue?

from openweathermap-php-api.

KarelWintersky avatar KarelWintersky commented on July 22, 2024

I wrote about this problem here: #136

However, most bigger projects will likely already have PSR-17/18-compatible libraries installed.

My project is small, frameworkless. And, I hope, quick and perfomance-oriented. I can't use a lot of libraries.

Also, with 'recommended' libraries it does not work.

from openweathermap-php-api.

cmfcmf avatar cmfcmf commented on July 22, 2024

Also, with 'recommended' libraries it does not work.

It appears to be working on my end. To test it, I created a new composer.json file with the following contents and ran composer install:

{
    "name": "root/app",
    "require": {
        "cmfcmf/openweathermap-php-api": "^3.0",
        "http-interop/http-factory-guzzle": "^1.0",
        "php-http/guzzle6-adapter": "^2.0"
    }
}

I then executed the example code from the README using PHP 7.3.5 successfully.

from openweathermap-php-api.

KarelWintersky avatar KarelWintersky commented on July 22, 2024

Our production server uses PHP 7.0.11 now :(

from openweathermap-php-api.

cmfcmf avatar cmfcmf commented on July 22, 2024

Our production server uses PHP 7.0.11 now :(

Ahh, I see. I haven't checked all dependencies, but on a quick glance it seams that at least the php-http/guzzle6-adapter library requires PHP 7.1+. Given that PHP 7.0 is EOL for more than a year now, I don't think it is feasible for me to invest the necessary time to make the example work with PHP 7.0. I know that upgrading PHP versions isn't alsways possible or easy, but I suppose you could continue using version 2.3 of this library for now and backport your fix to to it.

from openweathermap-php-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.