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

Comments

Projects
@johnbendi

johnbendi commented Nov 22, 2015

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

This comment has been minimized.

Contributor

buskamuza commented Nov 30, 2015

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

This comment has been minimized.

dbritan commented Dec 1, 2015

@buskamuza

This comment has been minimized.

Contributor

buskamuza commented Dec 8, 2015

@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

This comment has been minimized.

Contributor

buskamuza commented Dec 8, 2015

Internal ticket MAGETWO-46666

@aboutvale

This comment has been minimized.

aboutvale commented Dec 30, 2015

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

@mcspronko

This comment has been minimized.

Collaborator

mcspronko commented Mar 5, 2016

Hi Magento team, :)

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

Thanks.

@jacquesbh

This comment has been minimized.

jacquesbh commented Mar 5, 2016

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

This comment has been minimized.

Collaborator

mcspronko commented Mar 5, 2016

Hi @jacquesbh,

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

@benmarks thanks for tweet.

@buskamuza

This comment has been minimized.

Contributor

buskamuza commented Mar 19, 2016

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

@jacquesbh

This comment has been minimized.

jacquesbh commented Apr 11, 2016

Can we close then?

@barryvdh

This comment has been minimized.

Contributor

barryvdh commented May 13, 2016

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

This comment has been minimized.

Contributor

buskamuza commented May 31, 2016

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

@magento-engcom-team

This comment has been minimized.

Contributor

magento-engcom-team commented Sep 20, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment