Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: updating versions #23

Merged
merged 5 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
"require": {
"php": ">=8.0",
"adhocore/jwt": "^1.1",
"utopia-php/framework": "0.*.*",
"utopia-php/cache": "^0.10.0"
"utopia-php/framework": "1.0.*",
"utopia-php/system": "0.8.*",
"utopia-php/cache": "0.10.*"
},
"require-dev": {
"phpunit/phpunit": "^9.4",
Expand Down
212 changes: 185 additions & 27 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.9'

services:
tests:
build:
Expand All @@ -11,4 +9,4 @@ services:
environment:
- PRIVATE_KEY
- APP_IDENTIFIER
- INSTALLATION_ID
- INSTALLATION_ID
8 changes: 4 additions & 4 deletions tests/Detector/DetectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Utopia\Tests;

use PHPUnit\Framework\TestCase;
use Utopia\Http\Http;
use Utopia\Cache\Adapter\None;
use Utopia\Cache\Cache;
use Utopia\Detector\Adapter\Bun;
Expand All @@ -18,6 +17,7 @@
use Utopia\Detector\Adapter\Ruby;
use Utopia\Detector\Adapter\Swift;
use Utopia\Detector\Detector;
use Utopia\System\System;
use Utopia\VCS\Adapter\Git\GitHub;

class DetectorTest extends TestCase
Expand Down Expand Up @@ -53,9 +53,9 @@ public function detect($files, $languages): ?string
public function setUp(): void
{
$this->github = new GitHub(new Cache(new None()));
$privateKey = Http::getEnv('PRIVATE_KEY') ?? '';
$githubAppId = Http::getEnv('APP_IDENTIFIER') ?? '';
$installationId = Http::getEnv('INSTALLATION_ID') ?? '';
$privateKey = System::getEnv('PRIVATE_KEY') ?? '';
$githubAppId = System::getEnv('APP_IDENTIFIER') ?? '';
$installationId = System::getEnv('INSTALLATION_ID') ?? '';
$this->github->initializeVariables($installationId, $privateKey, $githubAppId);
}

Expand Down
8 changes: 4 additions & 4 deletions tests/VCS/Adapter/GitHubTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Utopia\Tests\VCS\Adapter;

use Utopia\Http\Http;
use Utopia\Cache\Adapter\None;
use Utopia\Cache\Cache;
use Utopia\System\System;
use Utopia\Tests\Base;
use Utopia\VCS\Adapter\Git;
use Utopia\VCS\Adapter\Git\GitHub;
Expand All @@ -19,9 +19,9 @@ protected function createVCSAdapter(): Git
public function setUp(): void
{
$this->vcsAdapter = new GitHub(new Cache(new None()));
$privateKey = Http::getEnv('PRIVATE_KEY') ?? '';
$githubAppId = Http::getEnv('APP_IDENTIFIER') ?? '';
$installationId = Http::getEnv('INSTALLATION_ID') ?? '';
$privateKey = System::getEnv('PRIVATE_KEY') ?? '';
$githubAppId = System::getEnv('APP_IDENTIFIER') ?? '';
$installationId = System::getEnv('INSTALLATION_ID') ?? '';
$this->vcsAdapter->initializeVariables($installationId, $privateKey, $githubAppId);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/VCS/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Exception;
use PHPUnit\Framework\TestCase;
use Utopia\Http\Http;
use Utopia\System\System;
use Utopia\VCS\Adapter\Git;
use Utopia\VCS\Adapter\Git\GitHub;

Expand Down Expand Up @@ -44,7 +44,7 @@ public function testGetPullRequestFromBranch(): void

public function testGetOwnerName(): void
{
$installationId = Http::getEnv('INSTALLATION_ID') ?? '';
$installationId = System::getEnv('INSTALLATION_ID') ?? '';
$owner = $this->vcsAdapter->getOwnerName($installationId);
$this->assertEquals('test-kh', $owner);
}
Expand Down
Loading