Skip to content

Instantly share code, notes, and snippets.

@simensen
Created October 15, 2012 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simensen/a91db56328402b1468f5 to your computer and use it in GitHub Desktop.
Save simensen/a91db56328402b1468f5 to your computer and use it in GitHub Desktop.
Example showing offset.
{
"name": "offloc/router-silex-app",
"description": "Offloc Router Silex Application",
"homepage": "https://github.com/offloc/offloc-router-silex-app",
"keywords": ["url", "shortener"],
"license": "MIT",
"authors": [
{
"name": "Offloc Incorporated",
"email": "info@offloc.com",
"homepage": "http://offloc.com"
}
],
"repositories": [
{
"type": "git",
"url": "git://github.com/offloc/offloc-router.git"
},
{
"type": "git",
"url": "git://github.com/dflydev/dflydev-doctrine-orm-service-provider.git"
}
],
"require": {
"php": ">=5.3.2",
"dflydev/base32-crockford": "1.*",
"dflydev/identity-generator": "1.*",
"dflydev/identity-generator-dbal": "1.*",
"dflydev/doctrine-orm-service-provider": "1.*@dev",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"igorw/config-service-provider": "1.*",
"lootils/uuid": "1.*@dev",
"offloc/router": "1.*@dev",
"silex/silex": "1.*@dev",
"symfony/security": "2.1.*",
"symfony/twig-bridge": "2.1.*",
"twig/twig": "1.*"
},
"require-dev": {
"symfony/browser-kit": "2.1.*",
"symfony/css-selector": "2.1.*",
"symfony/dom-crawler": "2.1.*"
},
"autoload": {
"psr-0": {
"Offloc\\Router\\WebApp": "src"
}
},
"bin": ["bin/admin-manager"],
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"minimum-stability": "beta"
}

Setup environment:

mkdir /tmp/test-offloc-router-silex-app
cd /tmp/test-offloc-router-silex-app
curl https://raw.github.com/gist/a91db56328402b1468f5/a24d920974134fde2484d700c9e17294ac8c50d7/composer.json > composer.json
curl http://getcomposer.org/composer-new.phar > composer-new.phar

Try installing with --dev with new Composer build, fails:

# This breaks!
php composer-new.phar install --dev
...
Installing dev dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for ext-pdo_sqlite == 1.0.1.0 -> satisfiable by ext-pdo_sqlite 1.0.1.
    - ext-pdo_sqlite 1.0.1 requires doctrine/common master-dev -> no matching package found.
  Problem 2
    - Installation request for ext-sqlite3 == 0.7.0.0-dev -> satisfiable by ext-sqlite3 0.7-dev.
    - ext-sqlite3 0.7-dev requires doctrine/common master-dev -> no matching package found.
  Problem 3
    - Installation request for ext-xml == 0.0.0.0 -> satisfiable by ext-xml 0.
    - Can only install one of: ext-xmlreader 0.1, ext-xml 0.
    - Installation request for ext-xmlreader == 0.1.0.0 -> satisfiable by ext-xmlreader 0.1.

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 <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Try installing with --dev with new Composer build, fails differently:

# This breaks! Differently!
php composer-new.phar install --dev
...
Installing dev dependencies


                         
  [ErrorException]       
  Undefined offset: 392  
                         

Try updating with --dev with new Composer build, fails:

# This breaks! Similar message to second install failure?
php composer-new.phar update --dry-run --profile --dev
...
Updating dev dependencies


                         
  [ErrorException]       
  Undefined offset: 146  
                         

Install using default composer, should work? :)

rm -rf composer.lock vendor/

# Fallback to regular composer
composer install --dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment