dbp / relay-educationalcredentials-bundle
此包已被废弃,不再维护。未建议替换包。
v0.1.7
2024-05-16 14:38 UTC
Requires
- php: >=8.1
- ext-json: *
- api-platform/core: ^2.7.11 || ^3.2
- dbp/relay-base-person-bundle: ^0.2.26
- dbp/relay-core-bundle: ^0.1.148
- guzzlehttp/guzzle: ^7.0
- psr/log: ^1.1.4 || ^2.0 || ^3.0
- symfony/config: ^5.4 || ^6.4
- symfony/dependency-injection: ^5.4 || ^6.4
- symfony/framework-bundle: ^5.4 || ^6.4
- symfony/http-foundation: ^5.4 || ^6.4
- symfony/http-kernel: ^5.4 || ^6.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.50
- phpstan/phpstan: ^1.10.59
- phpstan/phpstan-phpunit: ^1.3.16
- phpunit/phpunit: ^10.1
- symfony/browser-kit: ^5.4 || ^6.4
- symfony/http-client: ^5.4 || ^6.4
- symfony/monolog-bundle: ^3.10
- symfony/phpunit-bridge: ^5.4 || ^6.4
- vimeo/psalm: ^5.22.2
README
为您的用户创建可验证的凭证
- 学生文凭
集成到API服务器
- 将仓库添加到您的composer.json文件中
"repositories": [ { "type": "vcs", "url": "git@gitlab.tugraz.at:dbp/relay/dbp-relay-educationalcredentials-bundle.git" } ],
- 将包作为依赖项添加
composer require dbp/relay-educationalcredentials-bundle=dev-main
- 将包添加到您的config/bundles.php文件中
... Dbp\Relay\EducationalcredentialsBundle\DbpRelayEducationalcredentialsBundle::class => ['all' => true], DBP\API\CoreBundle\DbpCoreBundle::class => ['all' => true], ];
- 运行
composer install
以清除缓存
配置
该包有一个issuer
配置值,您可以在您的应用中指定,无论是通过硬编码还是通过引用环境变量。
为此,在应用中创建config/packages/dbp_relay_educationalcredentials.yaml
,内容如下
dbp_relay_educationalcredentials: issuer: "did:ebsi:abc..." # issuer: '%env(VC_ISSUER)%' urlIssuer: "https://:13080/1.0/credentials/issue" # urlIssuer: '%env(VC_URL_ISSUER)%' urlVerifier: "https://:14080/1.0/credentials/verify" # urlIssuer: '%env(VC_URL_VERIFIER)%'
该值在DbpRelayEducationalcredentialsExtension
中读取,并在创建ConfigService
服务时传递。
有关包配置的更多信息,请参阅https://symfony.com.cn/doc/current/bundles/configuration.html
开发与测试
- 安装依赖项:
composer install
- 运行测试:
composer test
- 运行linters:
composer run lint
- 运行cs-fixer:
composer run cs-fix
包依赖
如果您在一个包中安装包,别忘了在主应用中拉取依赖。
# updates and installs dependencies from dbp/relay-educationalcredentials-bundle
composer update dbp/relay-educationalcredentials-bundle