Skip to content

Commit

Permalink
PHP 8.4 Compatibility (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
nie7321 authored Jan 28, 2025
1 parent f4ea548 commit f842c96
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
php-versions: ['8.2', '8.3']
php-versions: ['8.2', '8.3', '8.4']

steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ yarn-error.log
.vapor/
/.idea
/composer.lock
/.phpunit.result.cache
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]
## [v2.1.0] - 2025-01-28
### Changed
- Compatibility for PHP 8.4 has been added, and support for PHP 8.1 has been dropped.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
],
"require": {
"php": "^8",
"php": "^8.2",
"northwestern-sysdev/laravel-soa": ">=6",
"northwestern-sysdev/dynamic-forms": "*"
},
Expand Down
12 changes: 6 additions & 6 deletions tests/Concerns/HandlesDirectorySearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public function testFound(): void
'nuAllTitle' => ['Head of IT'],
]);

$this->app['router']->get(__METHOD__.'/{search}', function (string $search) use ($api) {
$this->app['router']->get(__FUNCTION__.'/{search}', function (string $search) use ($api) {
return ($this->mock_controller($api))($search);
});

$response = $this->get(__METHOD__.'/test');
$response = $this->get(__FUNCTION__.'/test');

$response->assertOk()
->assertJson([
Expand All @@ -44,11 +44,11 @@ public function testNotFound(): void
$api = $this->createStub(DirectorySearch::class);
$api->method('lookup')->willReturn(false);

$this->app['router']->get(__METHOD__.'/{search}', function (string $search) use ($api) {
$this->app['router']->get(__FUNCTION__.'/{search}', function (string $search) use ($api) {
return ($this->mock_controller($api))($search);
});

$response = $this->get(__METHOD__.'/test@foo.com');
$response = $this->get(__FUNCTION__.'/test@foo.com');
$response->assertNotFound()->assertJson([
'display' => 'test@foo.com',
'searchType' => 'mail',
Expand All @@ -66,11 +66,11 @@ public function testIncompleteData(): void
'nuAllTitle' => null,
]);

$this->app['router']->get(__METHOD__.'/{search}', function (string $search) use ($api) {
$this->app['router']->get(__FUNCTION__.'/{search}', function (string $search) use ($api) {
return ($this->mock_controller($api))($search);
});

$response = $this->get(__METHOD__.'/test');
$response = $this->get(__FUNCTION__.'/test');
$response->assertOk()->assertJson([
'display' => 'test',
'searchType' => 'netid',
Expand Down

0 comments on commit f842c96

Please sign in to comment.