johnpbloch / wordpress

A fork of WordPress with Composer support added. Branches, tags, and trunk synced from upstream every 15 minutes.
https://packagist.org/packages/johnpbloch/wordpress
604 stars 102 forks source link

wordpress-install-dir not being honored #9

Closed bmeynell closed 9 years ago

bmeynell commented 9 years ago

I have:

    "extra": {                                                                                                                               
        "wordpress-install-dir": "web/wordpress",                                                                                                     
    }  

Yet wordpress always installs in the current directory.

johnpbloch commented 9 years ago

Thanks for the bug report. Could you please provide your complete composer.json contents?

bmeynell commented 9 years ago

Trimmed down version (excluded most "require" packages):

{                                                                               
    "name": "symfony/framework-standard-edition",                               
    "license": "MIT",                                                           
    "type": "project",                                                          
    "description": "The \"Symfony Standard Edition\" distribution",             
    "autoload": {                                                               
        "psr-0": { "": "src/" }                                                 
    },                                                                          
    "require": {                                                                
        "php": ">=5.3.3",                                                       
        "symfony/symfony": "2.3.*",                                             
        "johnpbloch/wordpress": "^4.2"                                          
    },                                                                                                              
    "scripts": {                                                                
        "post-install-cmd": [                                                   
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",      
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ],                                                                      
        "post-update-cmd": [                                                    
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",      
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ]                                                                       
    },                                                                          
    "config": {                                                                 
        "bin-dir": "bin"                                                        
    },                                                                          
    "minimum-stability": "stable",                                              
    "extra": {                                                                  
        "symfony-app-dir": "app",                                               
        "vendor-dir": "vendor",                                                 
        "symfony-web-dir": "web",                                               
        "incenteev-parameters": {                                               
            "file": "app/config/parameters.yml"                                 
        },                                                                      
        "wordpress-install-dir": "web/wordpress",                               
        "branch-alias": {                                                       
            "dev-master": "2.3-dev"                                             
        }                                                                       
    }                                                                           
}                                                    
johnpbloch commented 9 years ago

I ran composer update on that composer.json and it installed in the expected location of web/wordpress. This was my output:

Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing johnpbloch/wordpress-core-installer (0.2.1)
    Loading from cache

  - Installing psr/log (1.0.0)
    Loading from cache

  - Installing twig/twig (v1.18.2)
    Downloading: 100%

  - Installing doctrine/lexer (v1.0.1)
    Loading from cache

  - Installing doctrine/annotations (v1.2.6)
    Downloading: 100%

  - Installing doctrine/collections (v1.3.0)
    Downloading: 100%

  - Installing doctrine/cache (v1.4.1)
    Downloading: 100%

  - Installing doctrine/inflector (v1.0.1)
    Loading from cache

  - Installing doctrine/common (v2.5.0)
    Loading from cache

  - Installing symfony/symfony (v2.3.31)
    Downloading: 100%

  - Installing johnpbloch/wordpress (4.2.2)
    Loading from cache

Writing lock file
Generating autoload files
Class Incenteev\ParameterHandler\ScriptHandler is not autoloadable, can not call post-update-cmd script
Class Sensio\Bundle\DistributionBundle\Composer\ScriptHandler is not autoloadable, can not call post-update-cmd script
Class Sensio\Bundle\DistributionBundle\Composer\ScriptHandler is not autoloadable, can not call post-update-cmd script
Class Sensio\Bundle\DistributionBundle\Composer\ScriptHandler is not autoloadable, can not call post-update-cmd script
Class Sensio\Bundle\DistributionBundle\Composer\ScriptHandler is not autoloadable, can not call post-update-cmd script

Could you please run composer update and paste the output?

bmeynell commented 9 years ago

This is working now.

throws hands up

No idea why it didn't the first couple of tries. Sorry for the noise and thanks for the prompt replies.

Cheers!