Skip to content

Commit e52fdb9

Browse files
Working on next version
1 parent 783fcc7 commit e52fdb9

File tree

5 files changed

+55
-75
lines changed

5 files changed

+55
-75
lines changed

.github/workflows/tests.yml

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,13 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
php: ['7.4', '8.0', '8.1', '8.2', '8.3']
15-
laravel: ['8', '9', '10', '11']
14+
php: ['8.1', '8.2', '8.3', '8.4']
15+
laravel: ['10', '11', '12']
1616
exclude:
17-
- php: '7.4'
18-
laravel: '9'
19-
- php: '7.4'
20-
laravel: '10'
21-
- php: '7.4'
22-
laravel: '11'
23-
- php: '8.0'
24-
laravel: '10'
25-
- php: '8.0'
26-
laravel: '11'
2717
- php: '8.1'
2818
laravel: '11'
29-
- php: '8.2'
30-
laravel: '8'
31-
- php: '8.3'
32-
laravel: '8'
33-
- php: '8.3'
34-
laravel: '9'
19+
- php: '8.1'
20+
laravel: '12'
3521

3622
steps:
3723
- name: Checkout Code
@@ -49,37 +35,29 @@ jobs:
4935
- name: Setup Problem Matchers
5036
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
5137

52-
- name: Select Laravel 8
53-
uses: nick-invision/retry@v3
54-
with:
55-
timeout_minutes: 5
56-
max_attempts: 5
57-
command: composer require "laravel/framework:^8.83.27" "phpunit/phpunit:^9.6.17" --no-update --no-interaction
58-
if: "matrix.laravel == '8'"
59-
60-
- name: Select Laravel 9
38+
- name: Select Laravel 10
6139
uses: nick-invision/retry@v3
6240
with:
6341
timeout_minutes: 5
6442
max_attempts: 5
65-
command: composer require "laravel/framework:^9.52.16" "phpunit/phpunit:^9.6.17" --no-update --no-interaction
66-
if: "matrix.laravel == '9'"
43+
command: composer require "laravel/framework:^10.48.28" "phpunit/phpunit:^10.5.45" --no-update --no-interaction
44+
if: "matrix.laravel == '10'"
6745

68-
- name: Select Laravel 10
46+
- name: Select Laravel 11
6947
uses: nick-invision/retry@v3
7048
with:
7149
timeout_minutes: 5
7250
max_attempts: 5
73-
command: composer require "laravel/framework:^10.34.2" "phpunit/phpunit:^10.5.13" --no-update --no-interaction
74-
if: "matrix.laravel == '10'"
51+
command: composer require "laravel/framework:^11.44.0" "phpunit/phpunit:^11.5.10" --no-update --no-interaction
52+
if: "matrix.laravel == '11'"
7553

76-
- name: Select Laravel 11
54+
- name: Select Laravel 12
7755
uses: nick-invision/retry@v3
7856
with:
7957
timeout_minutes: 5
8058
max_attempts: 5
81-
command: composer require "laravel/framework:^11.0.7" "phpunit/phpunit:^10.5.13" --no-update --no-interaction
82-
if: "matrix.laravel == '11'"
59+
command: composer require "laravel/framework:^12.0.1" "phpunit/phpunit:^11.5.10" --no-update --no-interaction
60+
if: "matrix.laravel == '12'"
8361

8462
- name: Install PHP Dependencies
8563
uses: nick-invision/retry@v3

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ CHANGE LOG
22
==========
33

44

5+
## V8.0 (XX/03/2025)
6+
7+
* Support only PHP 8.1-8.4
8+
* Support only Laravel 10-12
9+
* Require m4tthumphrey/php-gitlab-api 12.0
10+
11+
512
## V7.6 (04/03/2025)
613

714
* Added graham-campbell/bounded-cache v3 support

README.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,23 @@ Laravel GitLab was created by, and is maintained by [Graham Campbell](https://gi
1616

1717
## Installation
1818

19-
This version requires [PHP](https://www.php.net/) 7.4-8.3 and supports [Laravel](https://laravel.com/) 8-11.
20-
21-
| GitLab | L5.5 | L5.6 | L5.7 | L5.8 | L6 | L7 | L8 | L9 | L10 | L11 |
22-
|--------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|
23-
| 1.10 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
24-
| 2.7 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: |
25-
| 3.3 | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: |
26-
| 4.4 | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: |
27-
| 5.6 | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
28-
| 6.0 | :x: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :x: | :x: |
29-
| 7.6 | :x: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
19+
This version requires [PHP](https://www.php.net/) 8.1-8.4 and supports [Laravel](https://laravel.com/) 10-12.
20+
21+
| GitLab | L5.5 | L5.6 | L5.7 | L5.8 | L6 | L7 | L8 | L9 | L10 | L11 | L12 |
22+
|--------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|
23+
| 1.10 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
24+
| 2.7 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
25+
| 3.3 | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: |
26+
| 4.4 | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: |
27+
| 5.6 | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: |
28+
| 6.0 | :x: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: |
29+
| 7.6 | :x: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
30+
| 8.0 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
3031

3132
To get the latest version, simply require the project using [Composer](https://getcomposer.org/):
3233

3334
```bash
34-
$ composer require "graham-campbell/gitlab:^7.6"
35+
$ composer require "graham-campbell/gitlab:^8.0"
3536
```
3637

3738
Once installed, if you are not using automatic package discovery, then you need to register the `GrahamCampbell\GitLab\GitLabServiceProvider` service provider in your `config/app.php`.
@@ -124,11 +125,9 @@ use GrahamCampbell\GitLab\GitLabManager;
124125

125126
class Foo
126127
{
127-
private GitLabManager $gitlab;
128-
129-
public function __construct(GitLabManager $gitlab)
130-
{
131-
$this->gitlab = $gitlab;
128+
public function __construct(
129+
private readonly GitLabManager $gitlab,
130+
) {
132131
}
133132

134133
public function bar()
@@ -140,7 +139,7 @@ class Foo
140139
app(Foo::class)->bar();
141140
```
142141

143-
For more information on how to use the `Gitlab\Client` class we are calling behind the scenes here, check out the docs at https://github.com/GitLabPHP/Client/tree/11.14.0#general-api-usage, and the manager class at https://github.com/GrahamCampbell/Laravel-Manager#usage.
142+
For more information on how to use the `Gitlab\Client` class we are calling behind the scenes here, check out the docs at https://github.com/GitLabPHP/Client/tree/12.0.0#general-api-usage, and the manager class at https://github.com/GrahamCampbell/Laravel-Manager#usage.
144143

145144
##### Further Information
146145

composer.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^7.4.15 || ^8.0.2",
15-
"graham-campbell/bounded-cache": "^1.2 || ^2.2 || ^3.0",
16-
"graham-campbell/manager": "^5.1",
17-
"guzzlehttp/guzzle": "^7.8.1",
18-
"guzzlehttp/psr7": "^2.6.2",
19-
"illuminate/contracts": "^8.75 || ^9.0 || ^10.0 || ^11.0",
20-
"illuminate/support": "^8.75 || ^9.0 || ^10.0 || ^11.0",
21-
"m4tthumphrey/php-gitlab-api": "11.14.*",
22-
"symfony/cache": "^5.4 || ^6.0 || ^7.0"
14+
"php": "^8.1",
15+
"graham-campbell/bounded-cache": "^3.0",
16+
"graham-campbell/manager": "^5.2",
17+
"guzzlehttp/guzzle": "^7.9.2",
18+
"guzzlehttp/psr7": "^2.7.0",
19+
"illuminate/contracts": "^10.44 || ^11.0 || ^12.0",
20+
"illuminate/support": "^10.44 || ^11.0 || ^12.0",
21+
"m4tthumphrey/php-gitlab-api": "12.0.*",
22+
"symfony/cache": "^6.2 || ^7.0"
2323
},
2424
"require-dev": {
25-
"graham-campbell/analyzer": "^4.1",
26-
"graham-campbell/testbench": "^6.1",
25+
"graham-campbell/analyzer": "^5.0",
26+
"graham-campbell/testbench": "^6.2",
2727
"mockery/mockery": "^1.6.6",
28-
"phpunit/phpunit": "^9.6.17 || ^10.5.13"
28+
"phpunit/phpunit": "^10.5.45 || ^11.5.10"
2929
},
3030
"autoload": {
3131
"psr-4": {

src/Auth/AuthenticatorFactory.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,11 @@ class AuthenticatorFactory
3434
*/
3535
public function make(string $method): AuthenticatorInterface
3636
{
37-
switch ($method) {
38-
case 'job_token':
39-
return new Authenticator\JobTokenAuthenticator();
40-
case 'oauth':
41-
return new Authenticator\OauthAuthenticator();
42-
case 'token':
43-
return new Authenticator\TokenAuthenticator();
44-
}
45-
46-
throw new InvalidArgumentException("Unsupported authentication method [$method].");
37+
return match ($method) {
38+
'job_token' => new Authenticator\JobTokenAuthenticator(),
39+
'oauth' => new Authenticator\OauthAuthenticator(),
40+
'token' => new Authenticator\TokenAuthenticator(),
41+
default => throw new InvalidArgumentException("Unsupported authentication method [$method]."),
42+
};
4743
}
4844
}

0 commit comments

Comments
 (0)