Skip to content

Commit

Permalink
fix: service factory type and class visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Mar 4, 2023
1 parent a3acc2c commit c7d4a74
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
"require": {
"php": "^8.1.0",
"openai-php/client": "^0.3.4",
"rector/rector": "^0.14.8",
"symfony/config": "^5.4.21|^6.2.7",
"symfony/dependency-injection": "^5.4.21|^6.2.7",
"symfony/http-kernel": "^5.4.21|^6.2.7"
},
"require-dev": {
"laravel/pint": "^1.6.0",
"phpstan/phpstan": "^1.10.3",
"rector/rector": "^0.14.8",
"symfony/phpunit-bridge": "^6.2.7"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
]);

$rectorConfig->skip([
__DIR__.'/src/Contracts/Response.php',
__DIR__.'/src/Resources/config/',
]);

$rectorConfig->rules([
Expand Down
3 changes: 0 additions & 3 deletions src/OpenAIBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

use Symfony\Component\HttpKernel\Bundle\Bundle;

/**
* @internal
*/
final class OpenAIBundle extends Bundle
{
}
2 changes: 1 addition & 1 deletion src/Resources/config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
return static function (ContainerConfigurator $container) {
$container->services()
->set(Client::class)
->factory(OpenAI::client(...))
->factory([OpenAI::class, 'client'])
->args([
abstract_arg('API Key'),
abstract_arg('Organisation'),
Expand Down

0 comments on commit c7d4a74

Please sign in to comment.