Composer et component non listé

Par Glaived, il y a 12 ans


Voilà, j'ai beau chercher, je trouve pas comment faire, le but est d'intégré un github, qui n'es pas listé sur la liste des packages, qui n'a pas de branch, et si possible, avec l'autoload, une idée ? :/

6 réponses

Glaived, il y a 12 ans
{
    "repositories": {
        "type": "git",
        "url": "https://github.com/indieteq/PHP-MySQL-PDO-Database-Class"
    }],
    "require": {
        "slim/slim": "~2",
        "slim/views": "~0.1",
        "twig/twig": "~1.15",
        "indieteq/PHP-MySQL-PDO-Database-Class": "*"
    },
    "require-dev": {
        "raveren/kint": "*"
    }
}

? composer update
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 indieteq/php-mysql-pdo-database-class 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.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

=/

Vallyan, il y a 11 ans

Ligne 10 de ton code, mets la version dev-matser, plutot que *:

"indieteq/PHP-MySQL-PDO-Database-Class": "dev-master"
Glaived, il y a 11 ans
? composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing indieteq/php-mysql-pdo-database-class (dev-master 103f69e)
    Cloning 103f69ead1d6b588d454829aecf95220cd2d9484
Writing lock file
Generating autoload files

done, maintenant, pourquoi dev-master ? cette branch n'existe pas sur le repo, cela correspond à quoi ? Aussi, comment faire fonctionner l'autoload pour le component indieteq/php-mysql-pdo-database-class ? (je cherche, mais pour le moment ça marche pas)

Glaived, il y a 11 ans

up

Xen0risDEV, il y a 11 ans

Bonsoir ;)

{
    "repositories": {
        "type": "git",
        "url": "https://github.com/indieteq/PHP-MySQL-PDO-Database-Class"
    }],
    "require": {
        "slim/slim": "~2",
        "slim/views": "~0.1",
        "twig/twig": "~1.15",
        "indieteq/PHP-MySQL-PDO-Database-Class": "dev-master"
    },
    "require-dev": {
        "raveren/kint": "*"
    }
}

"dev-master" = La branche Master.
Pour un autoload : Voir ici :)