Skip to content

Commit 812c097

Browse files
sheldon-workosSheldon Vaughnrobframpton
authored
Update package requirements to support Laravel 9 (#27)
* Update package requirements to support Laravel 9 * Designated constants in Version.php as public * Fix linting errors * remove whitespace causing linting error * removing more white space for linting error * add void option to setUp() function in compliance with new version of PHPUnit * Use double pipes Co-authored-by: Sheldon Vaughn <svaughn@sheldons-mbp.lan> Co-authored-by: Rob Frampton <rob@workos.com>
1 parent 9d9a523 commit 812c097

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

composer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"laravel 5",
77
"laravel 6",
88
"laravel 7",
9+
"laravel 8",
10+
"laravel 9",
911
"workos",
1012
"sdk",
1113
"sso"
@@ -19,12 +21,12 @@
1921
],
2022
"require": {
2123
"php": ">=5.6.0",
22-
"illuminate/support": "^5.0 || ^6.0 || ^7.0 || ^8.0",
24+
"illuminate/support": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
2325
"workos/workos-php": "^1.8.0"
2426
},
2527
"require-dev": {
26-
"friendsofphp/php-cs-fixer": "^2.15",
27-
"phpunit/phpunit": "^5.7"
28+
"friendsofphp/php-cs-fixer": "^2.15 || ^3.6",
29+
"phpunit/phpunit": "^5.7 || ^9.5.10"
2830
},
2931
"suggest": {
3032
"laravel/framework": "For testing"

lib/Version.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
final class Version
66
{
7-
const SDK_IDENTIFIER = "WorkOS PHP Laravel";
8-
const SDK_VERSION = '1.3.0';
7+
public const SDK_IDENTIFIER = "WorkOS PHP Laravel";
8+
public const SDK_VERSION = '1.3.0';
99
}

lib/WorkOSServiceProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public function register()
3131
$config = $this->app["config"]->get("workos");
3232
\WorkOS\WorkOS::setApiKey($config["api_key"]);
3333
\WorkOS\WorkOS::setClientId($config["client_id"]);
34-
3534
\WorkOS\WorkOS::setIdentifier(\WorkOS\Laravel\Version::SDK_IDENTIFIER);
3635
\WorkOS\WorkOS::setVersion(\WorkOS\Laravel\Version::SDK_VERSION);
3736

tests/WorkOS/WorkOSServiceProviderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ class WorkOSServiceProviderTest extends LaravelTestCase
66
{
77
protected $app;
88

9-
protected function setUp()
9+
protected function setUp(): void
1010
{
1111
$this->app = $this->setupApplication();
1212
}
13-
13+
1414
public function testRegisterWorkOSServiceProviderYieldsExpectedConfig()
1515
{
1616
$this->app["config"]->set("workos.api_key", "pk_secretsauce");
1717
$this->app["config"]->set("workos.client_id", "client_pizza");
1818
$this->app["config"]->set("workos.api_base_url", "https://workos-hop.com/");
1919
$this->setupProvider($this->app);
20-
20+
2121
$this->assertEquals("pk_secretsauce", \WorkOS\WorkOS::getApiKey());
2222
$this->assertEquals("client_pizza", \WorkOS\WorkOS::getClientId());
2323
$this->assertEquals("https://workos-hop.com/", \WorkOS\WorkOS::getApiBaseUrl());

tests/bootstrap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
<?php
2+
23
require_once __DIR__ . "/LaravelTestCase.php";

0 commit comments

Comments
 (0)