をautoload_psr4するネームスペースを追加していません(私が始める前に、私は両方ともここに私の問題ではない「パッケージ」にリポジトリタイプを設定し、二つの同一の質問を見てきました。)PHP Composerは
私は私の最初を作成しました他のプロジェクトにそれらを含めることを試みています。しかし、私が作成したオートロード設定は、適切なオートロードファイルに追加されていません。ここで
は、依存関係のcomposer.jsonです:
{
"config": {
"vendor-dir": "_framework/vendor",
"secure-http": false
},
"repositories": [
{
"type": "composer",
"url": "composer.<REDACTED>.com"
}
],
"require-dev": {
"phpunit/phpunit": "4.5.*",
"phpunit/dbunit": ">=1.2",
"phpunit/phpunit-selenium": ">=1.2"
},
"require": {
"company/authentication": "1.0.*"
}
}
そして最後に、これは自動生成されたautoload_psr4です:
{
"name": "company/authentication",
"description": "User authentication",
"require": {},
"require-dev": {
"phpunit/phpunit": "4.5.*"
},
"autoload": {
"psr-4": {
"Company\\Authentication\\": "src/"
}
}
}
そして、ここでは、私は上記のファイルを含めていた親composer.jsonですファイル:
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname(dirname($vendorDir));
return array(
'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'),
'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
);
私はSatisを使用していません。手は基本的なリポジトリを作成しました。これは私のリポジトリのための私のpackages.jsonファイルです:
{
"packages": {
"company/authentication": {
"1.0.0": {
"name": "company/authentication",
"version": "1.0.0",
"dist": {
"url": "http://composer.company.com/repo/authentication-1.0.0.zip",
"type": "zip"
}
}
},
etc...
そして、ここでは私のcomposer.lockファイルです:
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "f67a284cbfcb2cf6ae3765266015710b",
"content-hash": "57c9067e1b3a3bb7fef45eeabb928ffd",
"packages": [
{
"name": "company/authentication",
"version": "1.0.0",
"dist": {
"type": "zip",
"url": "http://composer.company.com/repo/authentication-1.0.0.zip",
"reference": null,
"shasum": null
},
"type": "library"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
あなたは 'satis.json'を見ることができますか? – Federkun