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.result.cache
|
||||||
/.phpunit.cache
|
/.phpunit.cache
|
||||||
/composer.lock
|
|
||||||
/phpunit.xml
|
/phpunit.xml
|
||||||
/vendor/
|
/vendor/
|
||||||
*~
|
*~
|
||||||
|
.vscode/settings.json
|
||||||
|
|||||||
@@ -1,20 +1,27 @@
|
|||||||
{
|
{
|
||||||
"name": "magdev/gitea-bundle",
|
"name": "magdev/gitea-bundle",
|
||||||
"description": "Symfony bundle to integrate Gitea",
|
"description": "Symfony bundle to integrate Gitea",
|
||||||
|
"license": "MIT",
|
||||||
"type": "symfony-bundle",
|
"type": "symfony-bundle",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "magdev",
|
||||||
|
"email": "magdev3.0@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"owenvoke/gitea": "^0.1.6",
|
|
||||||
"guzzlehttp/guzzle": "^7.4",
|
"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": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^9.5",
|
"phpunit/phpunit": "^9 || ^10",
|
||||||
"symfony/http-kernel": "^5.4",
|
"symfony/config": "^6 || ^7",
|
||||||
"symfony/dependency-injection": "^5.4",
|
"symfony/dependency-injection": "^6 || ^7",
|
||||||
"symfony/config": "^5.4",
|
"symfony/http-kernel": "^6 || ^7",
|
||||||
"symfony/phpunit-bridge": "^6.0"
|
"symfony/phpunit-bridge": "^6 || ^7"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"minimum-stability": "stable",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Magdev\\GiteaBundle\\": "src/"
|
"Magdev\\GiteaBundle\\": "src/"
|
||||||
@@ -25,11 +32,9 @@
|
|||||||
"Magdev\\GiteaBundle\\Tests\\": "tests/"
|
"Magdev\\GiteaBundle\\Tests\\": "tests/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"authors": [
|
"config": {
|
||||||
{
|
"allow-plugins": {
|
||||||
"name": "magdev",
|
"php-http/discovery": true
|
||||||
"email": "magdev3.0@gmail.com"
|
|
||||||
}
|
}
|
||||||
],
|
}
|
||||||
"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;
|
namespace Magdev\GiteaBundle\DependencyInjection;
|
||||||
|
|
||||||
use OwenVoke\Gitea\Client;
|
use OwenVoke\Gitea\Client as GiteaClient;
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use Symfony\Component\DependencyInjection\Extension\Extension;
|
use Symfony\Component\DependencyInjection\Extension\Extension;
|
||||||
|
|
||||||
@@ -22,13 +22,13 @@ final class MagdevGiteaExtension extends Extension
|
|||||||
|
|
||||||
foreach ($config['connections'] as $name => $connection) {
|
foreach ($config['connections'] as $name => $connection) {
|
||||||
$id = sprintf('magdev.gitea.%s', $name);
|
$id = sprintf('magdev.gitea.%s', $name);
|
||||||
$container->register($id, Client::class)
|
$container->register($id, GiteaClient::class)
|
||||||
->setArguments([null, null, $connection['baseurl']])
|
->setArguments([null, null, $connection['baseurl']])
|
||||||
->addMethodCall('authenticate', [$connection['token'], null, Client::AUTH_ACCESS_TOKEN]);
|
->addMethodCall('authenticate', [$connection['token'], null, GiteaClient::AUTH_ACCESS_TOKEN]);
|
||||||
$container->registerAliasForArgument($id, Client::class, "{$name}Client");
|
$container->registerAliasForArgument($id, GiteaClient::class, "{$name}Client");
|
||||||
|
|
||||||
if ($name === $config['default_connection']) {
|
if ($name === $config['default_connection']) {
|
||||||
$container->setAlias(Client::class, $id);
|
$container->setAlias(GiteaClient::class, $id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user