PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, December 30, 2021

[FIXED] Install package to a custom path with composer doesn't working

 December 30, 2021     composer-php, php, yii     No comments   

Issue

I used this link, but for me doesn't working...

{
"name": "vendor/work-team-betting",
"description": "Team betting webapplication for an event.",
"type": "webapplication",
"authors": [
    {

    }
],
"config": {
    "vendor-dir": "application/vendor"
},
"extra": {
    "installer-paths": {
        "application/framework/{$name}": ["yiisoft/yii"]
    }
},
"require": {
    "composer/installers": "~1.0",
    "yiisoft/yii": "1.1.14"         
}
}

I use this composer.json, but after installation the composer didn't move the yiisoft/yii into my application/framework/ directory. Anybody can help me, what did I do wrong? :)


Solution

That's not possible, because Yii does (and will) not use custom composer installers, which would be required to make this work.

To quote from the composer installers README:

The following frameworks natively work with Composer and will be installed to the default vendor directory. composer/installers is not needed to install packages with these frameworks: [...] Yii

https://github.com/composer/installers

This also applies to the framework package itself and I'd strongly recommend you not to change this behavior.

If you need to work around some glitches, these articles may be helpful to you:

  • http://www.yiiframework.com/wiki/392/creating-yii-applications-with-composer
  • http://www.yiiframework.com/wiki/457/fixing-extensions-without-modifying-their-code


Answered By - schmunk
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing