Yii2- Date Picker extension not getting installed - yii2-extension

In composer.json I entered "nex/yii2-datepicker" : "*" in require section and minimum stability is stable. Now I run composer update, then foll error is displayed
Loading composer repositories with package information
Updating dependencies (including require-dev)
Content-Length mismatch
http://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package nex/yii2-datepicker * is satisfiable by nex/yii2-datepicker[dev-master] but these conflict with your requirements or minimum-stability

Replace in composer.json
"minimum-stability": "stable",
to
"minimum-stability": "dev",
"prefer-stable": true,

Related

Local package "invalid" when added with yarn

I am trying to add my modified version of vega as a local package as a dependency via:
yarn add vega#file:../vega/packages/vega
however, when I then do yarn, it tells me my package is invalid:
invalid: vega#5.22.1 /Users/alex/Documents/Work/Research/vega_profiler/VegaProf.nosync/editor/node_modules/vega
I think this is because it tries to match the version with the one in my package.json, which does not contain version information for the local package. However, I don't know how to address this.

Composer conflicts GitHub tag with its commit hash

When I run composer update with lot of packages i get this error:
Problem 1
- Installation request for piwik/piwik dev-2491e6bfcf61984b0f0f3387e1496815e809c6cc -> satisfiable by piwik/piwik[dev-2491e6bfcf61984b0f0f3387e1496815e809c6cc].
- myspace/MyPlugin 2.13.0 requires piwik/piwik >=2.16.0 -> satisfiable by piwik/piwik[2.16.0].
- Can only install one of: piwik/piwik[2.16.0, dev-2491e6bfcf61984b0f0f3387e1496815e809c6cc].
- Installation request for myspace/myplugin 2.13.0 -> satisfiable by myspace/MyPlugin[2.13.0].
The weird thing is that piwik tag 2.16.0 is the exact same commit as dev-2491e6bfcf61984b0f0f3387e1496815e809c6cc. Further more I don't see any dependent composer.json which requires dev-2491e6bfcf61984b0f0f3387e1496815e809c6cc.
This in my main composer.json. Repositories are defined as (https://github.com/myspace/MyPlugin.git is a fake address):
"repositories": {
"myspace-myplugin": {
"type": "vcs",
"url": "https://github.com/myspace/MyPlugin.git"
},
"require": {
"myspace/MyPlugin": "2.13.0"
}
}
and dependent composer.json requirements of myspace/MyPlugin:
"require": {
"piwik/piwik": ">=2.16.0",
"php": ">=5.4"
}
I switched from unbounded version constraint >=2.16.0 to range ^2.16 on piwik/piwik - this will install piwik/piwik (2.16.1-b1) atm.
I've also added minimum-stability beta because piwik 2.16.0 has a dependency on php-di 5.0.0-beta, which could not be resolved at the given level of stability. We need to go lower to get beta stuff. And they should probably raise it to a stable version on their side.
Bottom-line: please try the following composer.json.
{
"require": {
"piwik/piwik": "^2.16",
"php": ">=5.4"
},
"minimum-stability": "beta"
}
Tested & works for me.

Installing repo from GitHub with composer

I'm trying to update this test extension to my project but I encountered an error:
adz#adz:/var/www/site$ php composer.phar update
Loading composer repositories with package information Updating
dependencies (including require-dev)
Nothing to install or update
I also tried
adz#adz:/var/www/site$ php composer.phar require adz/yii2-featureditems:dev-master
./composer.json has been updated
Package "adz/yii2-featureditems" listed for update is not installed.
Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
Here is my composer.json file
{
"repositories":[
{
"type": "git",
"url": "https://github.com/adzayko/featured-items.git"
}
],
"require": {
"adz/yii2-featureditems": "dev-master"
}
}

Composer cannot find package for a Symfony2 bundle

I'm creating a Symfony2 bundle hosted on GitHub. I suppose that everything is configured well! However, when I try to install it something goes wrong.
Here follows a summary of the key info.
First, in my Symfony2 app I update the composer.json as follows:
"require": {
...,
"bundle-name": "dev-master"
},
When I try to install the bundle through the command php composer.phar update, I get the following error:
Loading composer repositories with package information
Installing dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package bundle-name could
not be found in any version, there may be a typo in the package name.
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.
Any idea?
You have to add repository for "bundle-name".
I couldn't find it on packagist, so register it first.

How to install ZendRest module in zf2?

I would like to install the ZF2 ZendRest module.
How to install it?
When I'm doing
php .\composer.phar install
in \vendor\zendrest. I get:
Loading composer repositories with package information
Installing dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package zendframework/zend-http 1.0.0 could not be found.
Problem 2
- The requested package zendframework/zend-uri 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.
Where should I put the ZendRest folder?
Thanks!
There is no stable version for the ZendRest dependencies: zend-http and zend-uri (see the show output below for the existing versions). Composer relies on stable packages by default. That's why you can't install this package.
$ composer show zendframework/zend-http
name : zendframework/zend-http
descrip. : provides an easy interface for preforming Hyper-Text Transfer Protocol (HTTP) requests
keywords : zf2, http
versions : 2.0.0rc4, 2.0.0rc3, 2.0.0rc2, 2.0.0-rc1, 2.0.0-beta5, 2.0.0-beta4
type : library
...
You should change the minimum-stability to dev in your project:
{
"require": {
// ...
},
"minimum-stability": "dev"
}
Edit: the following composer.json works for instance. This is what you should have in your own project (maybe with more dependencies):
{
"require": {
"zendframework/zend-rest": "*"
},
"repositories": [
{
"type": "composer",
"url": "http://packages.zendframework.com/"
}
],
"minimum-stability": "dev"
}