在composer中创建本地包

时间:2016-06-22 22:02:57

标签: php symfony composer-php packages

我想通过作曲家加载我的本地包,simillar到这个例子 https://l.facebook.com/l.php?u=https%3A%2F%2Fcarlosbuenosvinos.com%2Fworking-at-the-same-time-in-a-project-and-its-dependencies-composer-and-path-type-repository%2F&h=rAQFmjwQ6

但我得到了这个错误:

Problem 1
- The requested package apliga/user-bundle 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://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

这是我的目录树

Mamtaakąstrukturękatalogów

apliga
--main_project
composer.json
--user-bundle
composer.json

main_project / composer.json

{
    "name": "michal/gitflow",
    "license": "proprietary",
    "type": "project",
    "autoload": {
        "psr-4": {
            "": "src/"
        },
        "classmap": [
            "app/AppKernel.php",
            "app/AppCache.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "repositories": [
        {
            "type": "path",
            "url": "../../apliga/user-bundle",
            "options": {
                "symlink": true
            }
        }
    ],
    "require": {
        "php": ">=5.5.9",
        "symfony/symfony": "3.1.*",
        "doctrine/orm": "^2.5",
        "doctrine/doctrine-bundle": "^1.6",
        "doctrine/doctrine-cache-bundle": "^1.2",
        "symfony/swiftmailer-bundle": "^2.3",
        "symfony/monolog-bundle": "^2.8",
        "symfony/polyfill-apcu": "^1.0",
        "sensio/distribution-bundle": "^5.0",
        "sensio/framework-extra-bundle": "^3.0.2",
        "incenteev/composer-parameter-handler": "^2.0",
        "apliga/user-bundle": "master"
    },
    "require-dev": {
        "sensio/generator-bundle": "^3.0",
        "symfony/phpunit-bridge": "^3.0"
    },
    "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",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
        ],
        "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",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
        ]
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-bin-dir": "bin",
        "symfony-var-dir": "var",
        "symfony-web-dir": "web",
        "symfony-tests-dir": "tests",
        "symfony-assets-install": "relative",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        }
    }
}

用户束/ composer.json

{
  "name": "apliga/user-bundle",
  "type": "symfony-bundle",
  "minimum-stability":"stable",
  "description": "Symfony ApligaUserBUndle",
  "keywords": ["User management"],
  "license": "MIT",
  "authors": [
    {
      "name": "Michal Kowalski",
      "email": "mical.kowal@gmail.com"
    }
  ],
  "require": {
    "php": ">=5.5",
    "symfony/framework-bundle": "~3.0"
  },
  "autoload": {
    "psr-4": { "Apliga\\UserBundle\\": "" }
  }
}

如何解决我的问题?

0 个答案:

没有答案