Skip to content

Commit

Permalink
Merge pull request #15 from BellevueCollege/release-v1.13
Browse files Browse the repository at this point in the history
Release v1.13
  • Loading branch information
taija authored Dec 17, 2024
2 parents 42cab22 + 6f25d54 commit e9aec88
Show file tree
Hide file tree
Showing 26 changed files with 3,551 additions and 2,240 deletions.
2 changes: 1 addition & 1 deletion app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Kernel extends HttpKernel
*
* @var array
*/
protected $routeMiddleware = [
protected $middlewareAliases = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
Expand Down
9 changes: 7 additions & 2 deletions app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Http\Middleware;

use Illuminate\Http\Request;
use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Middleware\TrustProxies as Middleware;

class TrustProxies extends Middleware
{
Expand All @@ -19,5 +19,10 @@ class TrustProxies extends Middleware
*
* @var int
*/
protected $headers = Request::HEADER_X_FORWARDED_ALL;
protected $headers =
Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
Request::HEADER_X_FORWARDED_AWS_ELB;
}
11 changes: 5 additions & 6 deletions app/Http/Serializers/CustomDataArraySerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class CustomDataArraySerializer extends \League\Fractal\Serializer\ArraySerializ
* Custom serializer for API data.
* Allows passing of resource label which is used to wrap data.
**/

/**
* Serialize a collection.
*
Expand All @@ -18,14 +18,14 @@ class CustomDataArraySerializer extends \League\Fractal\Serializer\ArraySerializ
*
* @return array
*/
public function collection($resourceKey, array $data)
public function collection(?string $resourceKey, array $data):array
{
if ($resourceKey === false) {
return $data;
}
return array($resourceKey ?: 'data' => $data);
}

/**
* Serialize an item.
*
Expand All @@ -34,7 +34,7 @@ public function collection($resourceKey, array $data)
*
* @return array
*/
public function item($resourceKey, array $data)
public function item(?string $resourceKey, array $data):array
{
if ($resourceKey === false) {
return $data;
Expand All @@ -47,9 +47,8 @@ public function item($resourceKey, array $data)
*
* @return array
*/
public function null()
public function null():?array
{
return null;
}
}
?>
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ pr:
- release-*

pool:
vmImage: ubuntu-latest
vmImage: ubuntu-24.04

variables:
phpVersion: 7.3
phpVersion: 8.3

steps:
- script: |
Expand All @@ -32,4 +32,4 @@ steps:
inputs:
targetPath: '$(Pipeline.Workspace)'
artifact: 'data-api'
publishLocation: 'pipeline'
publishLocation: 'pipeline'
24 changes: 11 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,24 @@
"license": "MIT",
"type": "project",
"require": {
"php": "^7.3.14",
"adldap2/adldap2-laravel": "^6.1",
"php": "^8.3.6",
"darkaonline/l5-swagger": "^8.1",
"fideloper/proxy": "^4.2",
"laravel/framework": "^8.0",
"directorytree/ldaprecord-laravel": "*",
"laravel/framework": "^11.0",
"laravel/helpers": "^1.1",
"laravel/legacy-factories": "^1.1",
"laravel/tinker": "^2.0",
"laravel/ui": "^3.0",
"league/fractal": "^0.19",
"tymon/jwt-auth": "^1.0"
"laravel/ui": "^4.2.2",
"league/fractal": "^0.20.1",
"tymon/jwt-auth": "^2.0.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"filp/whoops": "^2.0",
"laravel/sail": "^1.19",
"laravel/sail": "^1.39",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^5.1",
"phpunit/phpunit": "^9.0"
"nunomaduro/collision": "^8.1",
"phpunit/phpunit": "^11.5"
},
"autoload": {
"autoload": {
Expand Down Expand Up @@ -65,12 +64,11 @@
"sort-packages": true,
"optimize-autoloader": true,
"platform": {
"php": "7.3.14"
"php": "8.3.6"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
Loading

0 comments on commit e9aec88

Please sign in to comment.