You've already forked gitea-bundle
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fb4774001e | |||
| 2fdb2cd725 | |||
| 29f526672e | |||
| 5969ba9ce0 | |||
| 4496070e86 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,6 +1,6 @@
|
||||
/.phpunit.result.cache
|
||||
/.phpunit.cache
|
||||
/composer.lock
|
||||
/phpunit.xml
|
||||
/vendor/
|
||||
*~
|
||||
.vscode/settings.json
|
||||
|
||||
@@ -1,20 +1,27 @@
|
||||
{
|
||||
"name": "magdev/gitea-bundle",
|
||||
"description": "Symfony bundle to integrate Gitea",
|
||||
"license": "MIT",
|
||||
"type": "symfony-bundle",
|
||||
"authors": [
|
||||
{
|
||||
"name": "magdev",
|
||||
"email": "magdev3.0@gmail.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"owenvoke/gitea": "^0.1.6",
|
||||
"guzzlehttp/guzzle": "^7.4",
|
||||
"http-interop/http-factory-guzzle": "^1.2"
|
||||
"http-interop/http-factory-guzzle": "^1.2",
|
||||
"owenvoke/gitea": "^0.1.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"symfony/http-kernel": "^5.4",
|
||||
"symfony/dependency-injection": "^5.4",
|
||||
"symfony/config": "^5.4",
|
||||
"symfony/phpunit-bridge": "^6.0"
|
||||
"phpunit/phpunit": "^9 || ^10",
|
||||
"symfony/config": "^6 || ^7",
|
||||
"symfony/dependency-injection": "^6 || ^7",
|
||||
"symfony/http-kernel": "^6 || ^7",
|
||||
"symfony/phpunit-bridge": "^6 || ^7"
|
||||
},
|
||||
"license": "MIT",
|
||||
"minimum-stability": "stable",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Magdev\\GiteaBundle\\": "src/"
|
||||
@@ -25,11 +32,9 @@
|
||||
"Magdev\\GiteaBundle\\Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "magdev",
|
||||
"email": "magdev3.0@gmail.com"
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"php-http/discovery": true
|
||||
}
|
||||
],
|
||||
"minimum-stability": "stable"
|
||||
}
|
||||
}
|
||||
|
||||
4308
composer.lock
generated
Normal file
4308
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Magdev\GiteaBundle\DependencyInjection;
|
||||
|
||||
use OwenVoke\Gitea\Client;
|
||||
use OwenVoke\Gitea\Client as GiteaClient;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Extension\Extension;
|
||||
|
||||
@@ -22,13 +22,13 @@ final class MagdevGiteaExtension extends Extension
|
||||
|
||||
foreach ($config['connections'] as $name => $connection) {
|
||||
$id = sprintf('magdev.gitea.%s', $name);
|
||||
$container->register($id, Client::class)
|
||||
$container->register($id, GiteaClient::class)
|
||||
->setArguments([null, null, $connection['baseurl']])
|
||||
->addMethodCall('authenticate', [$connection['token'], null, Client::AUTH_ACCESS_TOKEN]);
|
||||
$container->registerAliasForArgument($id, Client::class, "{$name}Client");
|
||||
->addMethodCall('authenticate', [$connection['token'], null, GiteaClient::AUTH_ACCESS_TOKEN]);
|
||||
$container->registerAliasForArgument($id, GiteaClient::class, "{$name}Client");
|
||||
|
||||
if ($name === $config['default_connection']) {
|
||||
$container->setAlias(Client::class, $id);
|
||||
$container->setAlias(GiteaClient::class, $id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user