Skip to content

Commit

Permalink
Merge pull request #659 from eveseat/5.0.x
Browse files Browse the repository at this point in the history
5.0.x
  • Loading branch information
Crypta-Eve authored Oct 2, 2024
2 parents c97b7cd + a878bd1 commit 3ee76b4
Show file tree
Hide file tree
Showing 789 changed files with 13,881 additions and 12,496 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ name: Tag a new seat-docker release
on:
release:
types: [released]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
name: Checkout and tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
repository: eveseat/seat-docker
ssh-key: '${{ secrets.SEAT_DOCKER_REPO }}'
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Unit Testing

on:
push:
branches: [ "5.0.x" ]
pull_request:
branches: [ "5.0.x" ]

jobs:
tests:

runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
php: [8.1, 8.2]
stability: [prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.stability }}
steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, gmp, json, mbstring, openssl
tools: composer:v2
coverage: xdebug

- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress

- name: Download Codeclimate Tools
if: ${{ github.event_name != 'pull_request' }}
run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter && chmod +x ./cc-test-reporter

- name: Init Codeclimate Tools
if: ${{ github.event_name != 'pull_request' }}
run: ./cc-test-reporter before-build

- name: Run Tests
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml

- name: Publish code coverage
if: ${{ github.event_name != 'pull_request' }}
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: ./cc-test-reporter after-build -t clover
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
.env.php
.env
.idea/

# testing
vendor/
composer.lock
.phpunit.cache/test-results
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

48 changes: 23 additions & 25 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,48 +10,46 @@
],
"autoload": {
"psr-4": {
"Seat\\Web\\": "src/"
"Seat\\Web\\": "src/",
"Seat\\Web\\Database\\Seeders\\": "src/database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Seat\\Tests\\Web\\": "tests/"
},
"classmap": [
"tests/database/factories"
]
"Seat\\Tests\\Web\\": "tests/",
"Seat\\Tests\\Web\\Database\\Factories\\": "tests/database/factories/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^7.3",
"php": "^8.1",
"ext-json": "*",
"ext-gd": "*",
"almasaeed2010/adminlte": "^3.0",
"components/font-awesome": "^5.9",
"datatables.net/datatables.net-bs4": "dev-master",
"datatables.net/datatables.net-buttons-bs4": "dev-master",
"doctrine/dbal": "~2",
"doctrine/dbal": "^3.0",
"erusev/parsedown": "^1.7",
"eveseat/eseye": "~2",
"eveseat/eveapi": "^4.8",
"eveseat/services": "^4.1",
"guzzlehttp/guzzle": "^6.3",
"intervention/image": "^2.5",
"laravel/framework": "^6.2",
"laravel/horizon": "^3.4",
"laravel/socialite": "^4.2",
"laravel/tinker": "^2.5",
"lasserafn/php-initial-avatar-generator": "^4.0",
"socialiteproviders/manager": "^3.0",
"eveseat/eseye": "^3.0",
"eveseat/eveapi": "^5.0.15",
"eveseat/services": "^5.0.8",
"guzzlehttp/guzzle": "^7.0",
"intervention/image": "^2.0",
"laravel/framework": "^10.0",
"laravel/horizon": "^5.24.4",
"laravel/socialite": "^5.0",
"laravel/ui": "^4.0",
"lasserafn/php-initial-avatar-generator": "^4.2",
"opcodesio/log-viewer": "^2.0",
"socialiteproviders/manager": "^4.0",
"twbs/bootstrap": "^4.3",
"yajra/laravel-datatables-oracle": "^9.10 <9.21",
"yajra/laravel-datatables-buttons": "^4.0"
"yajra/laravel-datatables-oracle": "^10.4.0",
"yajra/laravel-datatables-buttons": "^10.0",
"zircote/swagger-php": "^4.0"
},
"require-dev": {
"josiasmontag/laravel-redis-mock": "^1.0",
"orchestra/testbench": "^4.0",
"orchestra/database": "^4.0"
"orchestra/testbench": "^8.0"
},
"extra": {
"laravel": {
Expand Down
48 changes: 19 additions & 29 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,31 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
verbose="true"
>
<coverage includeUncoveredFiles="false">
<include>
<directory suffix=".php">src/</directory>
</include>
<report>
<clover outputFile="build/logs/clover.xml" />
</report>
</coverage>

<testsuites>
<testsuite name="Access Control Layer Test Suite">
<directory suffix="Test.php">./tests/Acl/</directory>
</testsuite>
<testsuite name="Squads Test Suite">
<directory suffix="Test.php">./tests/Squads/</directory>
</testsuite>
</testsuites>

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<coverage includeUncoveredFiles="false">
<report>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<testsuites>
<testsuite name="Access Control Layer Test Suite">
<directory suffix="Test.php">./tests/Acl/</directory>
</testsuite>
<testsuite name="Squads Test Suite">
<directory suffix="Test.php">./tests/Squads/</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
</phpunit>
2 changes: 1 addition & 1 deletion src/Acl/AccessManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of SeAT
*
* Copyright (C) 2015 to 2022 Leon Jacobs
* Copyright (C) 2015 to present Leon Jacobs
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/Acl/EsiRoleElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of SeAT
*
* Copyright (C) 2015 to 2022 Leon Jacobs
* Copyright (C) 2015 to present Leon Jacobs
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
44 changes: 22 additions & 22 deletions src/Acl/EsiRolesMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of SeAT
*
* Copyright (C) 2015 to 2022 Leon Jacobs
* Copyright (C) 2015 to present Leon Jacobs
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -38,65 +38,65 @@ class EsiRolesMap
* @var array
*/
const DEFAULT_VALUES = [
'Accountant' => [
'Accountant' => [
'corporation.summary',
'corporation.journal',
'corporation.transaction',
],
'Account_Take_1' => [
'Account_Take_1' => [
'corporation.wallet_first_division',
],
'Account_Take_2' => [
'Account_Take_2' => [
'corporation.wallet_second_division',
],
'Account_Take_3' => [
'Account_Take_3' => [
'corporation.wallet_third_division',
],
'Account_Take_4' => [
'Account_Take_4' => [
'corporation.wallet_fourth_division',
],
'Account_Take_5' => [
'Account_Take_5' => [
'corporation.wallet_fifth_division',
],
'Account_Take_6' => [
'Account_Take_6' => [
'corporation.wallet_sixth_division',
],
'Account_Take_7' => [
'Account_Take_7' => [
'corporation.wallet_seventh_division',
],
'Auditor' => [
'Auditor' => [
'corporation.summary',
],
'Container_Take_1' => [
'Container_Take_1' => [
'corporation.asset_first_division',
],
'Container_Take_2' => [
'Container_Take_2' => [
'corporation.asset_first_division',
],
'Container_Take_3' => [
'Container_Take_3' => [
'corporation.asset_third_division',
],
'Container_Take_4' => [
'Container_Take_4' => [
'corporation.asset_fourth_division',
],
'Container_Take_5' => [
'Container_Take_5' => [
'corporation.asset_fifth_division',
],
'Container_Take_6' => [
'Container_Take_6' => [
'corporation.asset_sixth_division',
],
'Container_Take_7' => [
'Container_Take_7' => [
'corporation.asset_seventh_division',
],
'Contract_Manager' => [
'Contract_Manager' => [
'corporation.summary',
'corporation.contracts',
],
'Diplomat' => [
'Diplomat' => [
'corporation.summary',
'corporation.tracking',
],
'Director' => [
'Director' => [
'corporation.summary',
'corporation.asset',
'corporation.asset_first_division',
Expand Down Expand Up @@ -134,11 +134,11 @@ class EsiRolesMap
'Junior_Accountant' => [
'corporation.summary',
],
'Security_Officer' => [
'Security_Officer' => [
'corporation.summary',
'corporation.security',
],
'Trader' => [
'Trader' => [
'corporation.summary',
'corporation.market',
],
Expand Down
2 changes: 1 addition & 1 deletion src/Acl/Policies/AbstractEntityPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of SeAT
*
* Copyright (C) 2015 to 2022 Leon Jacobs
* Copyright (C) 2015 to present Leon Jacobs
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/Acl/Policies/AbstractPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of SeAT
*
* Copyright (C) 2015 to 2022 Leon Jacobs
* Copyright (C) 2015 to present Leon Jacobs
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions src/Acl/Policies/AlliancePolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of SeAT
*
* Copyright (C) 2015 to 2022 Leon Jacobs
* Copyright (C) 2015 to present Leon Jacobs
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -78,7 +78,7 @@ public function __call($method, $args)

/**
* @param \Seat\Web\Models\Acl\Permission $permission
* @param $entity
* @param $entity
* @return bool
*/
private function isGrantedByFilters(Permission $permission, Alliance $alliance): bool
Expand Down
4 changes: 2 additions & 2 deletions src/Acl/Policies/CharacterPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of SeAT
*
* Copyright (C) 2015 to 2022 Leon Jacobs
* Copyright (C) 2015 to present Leon Jacobs
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -154,7 +154,7 @@ private function isValidSharingSession(CharacterInfo $character)

/**
* @param \Seat\Web\Models\Acl\Permission $permission
* @param $character
* @param $character
* @return bool
*/
private function isGrantedByFilters(Permission $permission, CharacterInfo $character): bool
Expand Down
Loading

0 comments on commit 3ee76b4

Please sign in to comment.