Webonaute / DoctrineFixturesGeneratorBundle

Generate Fixture from your existing data in your database. You can specify the Entity name and the IDs you want to import in your fixture.
63 stars 47 forks source link

Install bundle error with composer #11

Closed victordit closed 9 years ago

victordit commented 9 years ago

Hello, great project! I've a problem with I try install bundle via composer:

php composer.phar require Webonaute\DoctrineFixturesGeneratorBundle 'dev-master'

return the following error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package webonautedoctrinefixturesgeneratorbundle 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 <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.

Do you have any idea? How I can install the bundle?

I work with the last version of Symfony.

Thanks

victordit commented 9 years ago

So I install bundle via GitHub, without composer (manually), in this steps (if you are interested :) ):

vendor/webonaute/doctrine-fixtures-generator-bundle/Webonaute/
vendor/webonaute/doctrine-fixtures-generator-bundle/Webonaute/DoctrineFixturesGeneratorBundle

and clone the repo:

git clone git@github.com:Webonaute/DoctrineFixturesGeneratorBundle.git

-3 .* @deprecated Load the reference path on autoload, so go to in

vendor/composer/autoload_namespaces.php

and put in the array

 //installed manually DoctrineFixturesGeneratorBundle
    'Webonaute\\DoctrineFixturesGeneratorBundle' => array($vendorDir . '/webonaute/doctrine-fixtures-generator-bundle')

-4 Register bundle: go to in

 app/AppKernel.php

and put in the array $bundles the new bundle:


    public function registerBundles()
    {
        $bundles = array(
          //...
        );

        if (in_array($this->getEnvironment(), array('dev', 'test'))) {
         //...
         // this is our bundle :)
           $bundles[] = new Webonaute\DoctrineFixturesGeneratorBundle\DoctrineFixturesGeneratorBundle();
        }

HOW TO USE ? In the documentation on this Repo it's written that you must use "bin/console", but I use:

app/console  doctrine:generate:fixture

and works fine.

UPDATE

Point 3: this method is not performance because when update via composer is overwrite, instead, you should do:

-go to on app/autoload.php and put following code after $loader definition

//add customs classes
$loader->add('Webonaute\\DoctrineFixturesGeneratorBundle','vendor/webonaute/doctrine-fixtures-generator-bundle');

UPDATE OF UPDATE AT 2015-09-11

I'd installed the bundle this:

composer require webonaute/doctrine-fixtures-generator-bundle  "~1.2"
Webonaute commented 9 years ago

Hi Please use version number. (Check tags)

Le vendredi 21 août 2015, victordit notifications@github.com a écrit :

Hello, great project! I've a problem with I try install bundle via composer:

php composer.phar require Webonaute\DoctrineFixturesGeneratorBundle 'dev-master'

return the following error:

Your requirements could not be resolved to an installable set of packages.

Problem 1

  • The requested package webonautedoctrinefixturesgeneratorbundle could not be found in any version, there may be a typo in the package name.

Potential causes:

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

Installation failed, reverting ./composer.json to its original content.

Do you have any idea? How I can install the bundle?

I work with the last version of Symfony.

Thanks

— Reply to this email directly or view it on GitHub https://github.com/Webonaute/DoctrineFixturesGeneratorBundle/issues/11.

Mathieu Delisle Analyste-Programmeur Sénior 514.465.6335

P.S. Le présent courriel et toutes les pièces jointes contiennent de l'information privée, exclusive, privilégiée et/ou confidentielle, sujette au droit d'auteur, s'adressant uniquement au destinataire. Toute utilisation, copie ou distribution non autorisée du contenu de ce courriel est strictement interdite. Si vous n'êtes pas le destinataire de ce message et que vous l'avez reçu par erreur, veuillez le supprimer et en informer immédiatement l'expéditeur.

victordit commented 9 years ago

I have tried with the version's number but it didn't work. I solved everything by installing bundle manually

anybug commented 9 years ago

hi,

same here:


php composer.phar require Webonaute\DoctrineFixturesGeneratorBundle 'dev-master'
./composer.json has been updated
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 webonautedoctrinefixturesgeneratorbundle 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  for more details.
Read  for further common problems.
Installation failed, reverting ./composer.json to its original content.

same bug when using version number. I tried manual installation without success (class not found) but i suck in manual installation bundle though.

Anyway, thanks for your work, i wish i could use it someday. Backing up fixtures was natively managed in Symfony 1.4, that's a shame it's not the same in Sf 2.7...

anis-marrouchi commented 9 years ago

Have you tried php composer.phar require webonaute/doctrine-fixtures-generator-bundle/ composer require webonaute/doctrine-fixtures-generator-bundle?

anybug commented 9 years ago

hi,

yes i have. But i've just tried right now and it worked :


php composer.phar require webonaute/doctrine-fixtures-generator-bundle
Using version ~1.2 for webonaute/doctrine-fixtures-generator-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing webonaute/doctrine-fixtures-generator-bundle (v1.2.1)
    Downloading: 100%
Writing lock file
Generating autoload files
Updating the "app/config/parameters.yml" file
Clearing the cache for the dev environment with debug true

it looks like it's been fixed, thank you very much

victordit commented 9 years ago

Yes! whit the following comand i installit good:

composer require webonaute/doctrine-fixtures-generator-bundle  "~1.2"
Webonaute commented 9 years ago

Sorry for the delay.

So yeah you figured it out. you need to specify the version. because it change little bit depend on symfony version. master (dev-master) is only for clone development.

composer require webonaute/doctrine-fixtures-generator-bundle  "~1.2"
7system7 commented 7 years ago

This is not working anymore:

composer require webonaute/doctrine-fixtures-generator-bundle  "~1.2"

"The requested package webonautedoctrinefixturesgeneratorbundle could not be found in any version, there may be a typo in the package name."