Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repository type is not registered: path #2476

Closed
johnbendi opened this issue Nov 22, 2015 · 13 comments
Closed

Repository type is not registered: path #2476

johnbendi opened this issue Nov 22, 2015 · 13 comments
Labels
bug report Component: Setup Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@johnbendi
Copy link

When I add a repository of type: path to composer.json in root of installation, composer successfully installs the package from the url specified but bin/magento throws the above mentioned error during it's readiness check.

Command line stacktrace:

We're sorry, an error occurred. Try clearing the cache and code generation directories. By default, they are: var/cache, var/di, var/generation, and var/page_cache.

  [Zend\ServiceManager\Exception\ServiceNotCreatedException]                                                           
  An abstract factory could not create an instance of magentosetupconsolecommandcronruncommand(alias: Magento\Setup\C  
  onsole\Command\CronRunCommand).                                                                                      

  [Zend\ServiceManager\Exception\ServiceNotCreatedException]                                                   
  An exception was raised while creating "Magento\Setup\Console\Command\CronRunCommand"; no instance returned  

  [Zend\Di\Exception\MissingPropertyException]                                                                        
  Missing instance/object for parameter readinessCheck for Magento\Setup\Console\Command\CronRunCommand::__construct  

  [Zend\ServiceManager\Exception\ServiceNotCreatedException]                                                           
  An abstract factory could not create an instance of magentosetupmodelcronreadinesscheck(alias: Magento\Setup\Model\  
  Cron\ReadinessCheck).                                                                                                

  [Zend\ServiceManager\Exception\ServiceNotCreatedException]                                              
  An exception was raised while creating "Magento\Setup\Model\Cron\ReadinessCheck"; no instance returned  

  [Zend\Di\Exception\MissingPropertyException]                                                                      
  Missing instance/object for parameter phpReadinessCheck for Magento\Setup\Model\Cron\ReadinessCheck::__construct  

  [Zend\ServiceManager\Exception\ServiceNotCreatedException]                                                           
  An abstract factory could not create an instance of magentosetupmodelphpreadinesscheck(alias: Magento\Setup\Model\P  
  hpReadinessCheck).                                                                                                   

  [Zend\ServiceManager\Exception\ServiceNotCreatedException]                                            
  An exception was raised while creating "Magento\Setup\Model\PhpReadinessCheck"; no instance returned  

  [Zend\Di\Exception\MissingPropertyException]                                                                      
  Missing instance/object for parameter composerInformation for Magento\Setup\Model\PhpReadinessCheck::__construct  

  [Zend\ServiceManager\Exception\ServiceNotCreatedException]                                                           
  An abstract factory could not create an instance of magentoframeworkcomposercomposerinformation(alias: Magento\Fram  
  ework\Composer\ComposerInformation).                                                                                 

  [Zend\ServiceManager\Exception\ServiceNotCreatedException]                                                     
  An exception was raised while creating "Magento\Framework\Composer\ComposerInformation"; no instance returned  

  [InvalidArgumentException]               
  Repository type is not registered: path 
@buskamuza
Copy link
Contributor

Hi @johnbendi ,
could you, please, show an example of your composer.json?
As I can see from Composer's documentation (https://getcomposer.org/doc/04-schema.md#repositories) there is no type "path" in the list of repository types.

@dbritan
Copy link

dbritan commented Dec 1, 2015

@buskamuza
Copy link
Contributor

@dbritan , got it, thanks.
"path" is added in Composer version 11, while Magento uses version 10. So Composer library throws this exception, when we try to work with newer version of composer.json.
For now, looks like ./bin/magento is incompatible with format of composer.json newer then v.10 of Composer.
We'll review if it's possible to fix Magento CLI still depending on v.10 or should we update to v.11 of Composer.

@buskamuza
Copy link
Contributor

Internal ticket MAGETWO-46666

@aboutvale
Copy link

I've the same problem described by @johnbendi.
This is a very interesting feature for extensions developers.

@mcspronko
Copy link

Hi Magento team, :)

Are there any updates for this issue? It will really help to start using "path" repository for module development.

Thanks.

@jacquesbh
Copy link

Note: I removed my useless two previous messages

Ok, so. You can force composer to use a specific version for another… Let me explain with a really simple example.

Replace in your composer.json the require of composer/composer with this line:

"composer/composer": "dev-master as 1.0.0-alpha10"

It will say composer to use the master branch as version 1.0.0-alpha10 (version required by all Magento modules right now).

Hope this help :)

(Edit: Of course run a composer update after that…)

++

@mcspronko
Copy link

Hi @jacquesbh,

It now works as expected. Thank you.
I appreciate your fast response.

@benmarks thanks for tweet.

@buskamuza
Copy link
Contributor

Magento depends on Composer version 1.0.0-beta1 now, so repository of type "path" should be supported.

@jacquesbh
Copy link

Can we close then?

@barryvdh
Copy link
Contributor

This issue is still present in v2.0.5. The 2.0 branch still uses 1.0.0-alpha-10: https://github.com/magento/magento2/blob/2.0/composer.json#L41

Also, there are now stable versions of both composer 1.0 and 1.1, so perhaps upgrade to 1.1.x?

@buskamuza
Copy link
Contributor

Related internal ticket is MAGETWO-52770
@barryvdh , we're considering upgrading to the latest stable version. Thanks for the suggestion.

@vzabaznov vzabaznov added bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels Jun 22, 2016
@vkorotun vkorotun removed the PS label Aug 4, 2016
@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Component: Setup labels Sep 11, 2017
@magento-engcom-team
Copy link
Contributor

@johnbendi, thank you for your report.
The issue is already fixed in 2.2.0

@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Sep 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Setup Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests