google-trends icon indicating copy to clipboard operation
google-trends copied to clipboard

Composer

Open youngbobby opened this issue 9 years ago • 5 comments

Thanks. I can't seem to run composer on this repo with the guide you have given.

composer update janasva / google-trends

I updated composer.json file as adviced.

{
    "require": {
        "jonasva/google-trends": "dev-master"
    }
}

I'm hoping that you would add supoort for Google Topcharts country based :)

youngbobby avatar Jul 09 '15 11:07 youngbobby

Hi @youngbobby,

What is the error you are getting?

Make sure that you first update your composer.json file, and then execute the composer update command. Also, there is a typo in the composer update statement you posted. It has to be:

composer update jonasva/google-trends

Give it a try and let me know how it goes.

jonasva avatar Jul 10 '15 02:07 jonasva

Hi @jonasva

This is the error I am getting:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - The requested package jonasva/google-trends No version set (parsed as 1.0.0) could not be found.
Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see  for more details.
Read  for further common problems.

Here's my composer.json file:

{
    "name": "jonasva/google-trends",
    "description": "Unofficial Google Trends PHP API",
    "homepage": "http://github.com/jonasva/google-trends",
    "keywords": ["google", "trends", "api"],
    "license": "MIT",
    "authors": [
        {
            "name": "Jonas Van Assche",
            "email": "[email protected]"
        }
    ],
    "require": {
        "php": ">=5.4.0",
        "guzzlehttp/guzzle": "5.0.*@dev",
        "jonasva/google-trends": "dev-master"
    },
    "autoload": {
        "psr-0": {
            "Jonasva\\GoogleTrends": "src/"
        }
    }
}

youngbobby avatar Jul 10 '15 02:07 youngbobby

hmm, that might related to the minimum-stability setting in your own composer.json. Try adding these 2 lines at the bottom of your project's composer.json:

"prefer-stable": true,
"minimum-stability": "dev"

jonasva avatar Jul 10 '15 03:07 jonasva

i even have same issue, can you please guide me what to do. my composer.json file: { "name": "jonasva/google-trends", "description": "Unofficial Google Trends PHP API", "homepage": "http://github.com/jonasva/google-trends", "keywords": ["google", "trends", "api"], "license": "MIT",

"authors": [
    {
        "name": "Jonas Van Assche",
        "email": "[email protected]"
    }
],
"require": {
    "php": ">=5.4.0",
    "guzzlehttp/guzzle": "5.0.*@dev",
    "jonasva/google-trends": "dev-master"
},
"autoload": {
    "psr-0": {
        "Jonasva\\GoogleTrends": "src/"
    }
},
"prefer-stable": true,
"minimum-stability": "dev"

}

and error i am receiving following error: Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.

Problem 1 - The requested package jonasva/google-trends No version set (parsed as 1.0.0) could not be found.

Potential causes:

  • A typo in the package name
  • The package is not available in a stable-enough version according to your minimum-stability setting see https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion for more details.

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

salmanyaqoob avatar Oct 28 '15 00:10 salmanyaqoob

Hi @salmanyaqoob,

Actually in your project's composer.json file, you should just include jonasva/google-trends.

Give it a try with a composer.json file like this in your project, and let me know if it works:

{
    "require": {
        "jonasva/google-trends": "dev-master"
    },
    "prefer-stable": true,
    "minimum-stability": "dev"
}

jonasva avatar Nov 04 '15 04:11 jonasva