sabre-io / vobject

:date: The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects
http://sabre.io/vobject/
BSD 3-Clause "New" or "Revised" License
569 stars 125 forks source link

"sabre/vobject 1.0.0 could not be found" #221

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hello,

When I am executing the command "Composer Update" after modifying the composer.json file, to add the line:

"require" : {
    "sabre/vobject" : "~3.3"
}

I am getting the following at the moment:

"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

Potential causes:

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

Why on earth does it want version 1.0.0? Is this a bug?

evert commented 9 years ago

I have no idea why ... do you have a recent composer ?

evert commented 9 years ago

I couldn't reproduce that issue here... could you perhaps share your entire composer.json?

ghost commented 9 years ago

My composer.json is:

{
    "name": "sabre/vobject",
    "description" : "The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects",
    "keywords" : [ "VObject", "iCalendar", "vCard", "jCard", "jCal" ],
    "homepage" : "http://sabre.io/vobject/",
    "license" : "BSD-3-Clause",
    "require" : {
        "php"          : ">=5.3.1",
        "ext-mbstring" : "*",
        "sabre/vobject" : "~3.3"
    },
    "require-dev" : {
        "phpunit/phpunit" : "*",
        "squizlabs/php_codesniffer": "*"
    },
    "authors" : [
        {
            "name" : "Evert Pot",
            "email" : "me@evertpot.com",
            "homepage" : "http://evertpot.com/",
            "role" : "Developer"
        },
        {
            "name" : "Dominik Tobschall",
            "email" : "dominik@fruux.com",
            "homepage" : "http://tobschall.de/",
            "role" : "Developer"
        }
    ],
    "support" : {
        "forum" : "https://groups.google.com/group/sabredav-discuss",
        "source" : "https://github.com/fruux/sabre-vobject"
    },
    "autoload" : {
        "psr-4" : {
            "Sabre\\VObject\\" : "lib/"
        }
    },
    "bin" : [
        "bin/vobject",
        "bin/generate_vcards"
    ],
    "extra" : {
        "branch-alias" : {
            "dev-master" : "3.2.x-dev"
        }
    },
    "config" : {
        "bin-dir" : "bin"
    }
}

Latest composer version - I've done all the composer troubleshooting steps to check for self updates etc and all comes back as latest version :(

evert commented 9 years ago

Ah ok... well that's broken :)

Your package requires sabre/vobject but it also identifies itself as sabre/vobject. You are not supposed to use the composer.json file that comes with sabre/vobject, but rather you should create your own composer.json.

Don't start from a sabre/vobject git clone either. To install sabre/vobject properly, start from an empty directory and simply type:

composer require sabre/vobject ~3.4
ghost commented 9 years ago

Thank you so much!!!! I've spent hours trying to get that to work! :)