Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0.x #182

Closed
wants to merge 36 commits into from
Closed

5.0.x #182

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5d63d9d
feat: allow settings default to be defined
warlof Jan 1, 2022
bae05f4
deps: update dependencies to be L8 compliant
warlof Jan 1, 2022
8634ec8
refactor: upgrade swagger annotations registration
warlof Jan 3, 2022
0f65bf5
fix: ignore data clean when parameter string is empty
warlof Jan 5, 2022
be0d308
deps: add missing dom extension
warlof Jan 5, 2022
9f8bef0
feat: provide a generic seeder subscriber
Crypta-Eve Dec 6, 2022
a8a066c
deps: update dependencies to be L9 compliant
warlof Feb 9, 2022
688e3f0
refactor: introduce esi contracts to reduce eseye coupling
warlof Sep 14, 2022
2e4e010
fix: adjust client_id config path
Crypta-Eve Jan 29, 2023
a72ab10
feat: call all registered plugin db seeders
Crypta-Eve Feb 7, 2023
bde2828
chore: bump to laravel 10
Crypta-Eve Feb 15, 2023
da8bc35
style: apply fixes from StyleCI (#160)
warlof Mar 5, 2023
dabfc95
feat: allow available skins to be configurable (#161)
recursivetree Apr 27, 2023
3a3e7ce
refactor: extract jwt validator from service provider
warlof May 21, 2023
83cb22e
chore: require proper eseye version
warlof May 21, 2023
1c6b78d
fix: ensure eseye is properly setup
warlof May 21, 2023
9c6ead8
fix: avoid duplicate seeder to be stored in config
warlof May 21, 2023
220bd5a
Merge branch '5.0.x' into backport
warlof May 30, 2023
18d9708
Merge pull request #163 from eveseat/backport
warlof May 30, 2023
01926be
test: make tests compliant with phpunit 10 (#164)
warlof May 30, 2023
d24c23e
style: apply fixes from StyleCI (#165)
warlof May 30, 2023
5606381
deps: lock eseye to stable build
warlof Jul 14, 2023
1d48854
ci: on release push changes to 5.0.x
warlof Jul 14, 2023
5534f13
ci: remove docker image auto-tag
warlof Jul 15, 2023
6c88cb8
ci: move travis to github action for testing
warlof Jul 15, 2023
c367d47
fix: address ccp richtext parsing with utf-8 encoding issue (#169)
recursivetree Aug 14, 2023
673c6cf
Injectable Relations (#166)
recursivetree Nov 9, 2023
cc17fe2
Start integrating recursivetree/seat-prices-core into the seat core (…
recursivetree Nov 9, 2023
09d8b55
deferred migrations system (#175)
recursivetree Feb 14, 2024
756ed09
Fix socialite provider (#176)
hermesdj Feb 16, 2024
a0ea02f
Apply fixes from StyleCI (#177)
Crypta-Eve Feb 16, 2024
8bb84aa
Fix the socialite provider after they pushed a revert (#178)
hermesdj Feb 20, 2024
1504474
add schedule seeder helper (#179)
recursivetree Mar 26, 2024
f378db3
feat: add HasTypeIDWithAmount interface (#180)
recursivetree Apr 3, 2024
31974c9
eseye-bindings: allow access token refreshing (#181)
recursivetree Sep 6, 2024
e0dae2f
chore: bump eseye dep
Crypta-Eve Sep 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions .github/workflows/main.yml

This file was deleted.

32 changes: 24 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@ name: Unit Testing

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

permissions:
contents: read

jobs:
build:
tests:

runs-on: ubuntu-latest

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

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

Expand All @@ -28,10 +30,24 @@ jobs:
php-version: ${{ matrix.php }}
extensions: curl, gmp, json, mbstring, openssl
tools: composer:v2
coverage: none
coverage: xdebug

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

- name: Execute tests
run: vendor/bin/phpunit --verbose
- 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
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

31 changes: 19 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,40 @@
],
"autoload": {
"psr-4": {
"Seat\\Services\\": "src/"
"Seat\\Services\\": "src/",
"Seat\\Services\\Database\\Seeders\\": "src/database/seeders/"
},
"files": [
"src/Helpers/helpers.php"
]
},
"autoload-dev": {
"psr-4": {
"Seat\\Tests\\Services\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^7.3",
"php": "^8.1",
"ext-dom": "*",
"ext-gmp": "*",
"ext-json": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
"composer-runtime-api": "^2.0",
"coduo/php-humanizer": "^3.0",
"composer/semver": "^2.0",
"doctrine/dbal": "^2.9",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "^6.2",
"web-token/jwt-easy": "^2.1",
"web-token/jwt-signature-algorithm-hmac": "^2.1",
"web-token/jwt-signature-algorithm-rsa": "^2.1",
"web-token/jwt-signature-algorithm-ecdsa": "^2.1"
"coduo/php-humanizer": "^4.0",
"composer/semver": "^3.0",
"doctrine/dbal": "^3.0",
"eveseat/eseye": "^3.1",
"guzzlehttp/guzzle": "^7.0",
"laravel/framework": "^10.0",
"psr/simple-cache": "^3.0",
"psr/log": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "^10.0",
"orchestra/testbench": "^8.0"
},
"extra": {
"laravel": {
Expand Down
33 changes: 18 additions & 15 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true"
bootstrap="./vendor/autoload.php"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true">
<coverage>
<include>
<directory suffix=".php">./src/</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Report Parser Test Suite">
<directory>./tests/ReportParser</directory>
</testsuite>
</testsuites>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" bootstrap="./vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" cacheDirectory=".phpunit.cache">
<coverage/>
<testsuites>
<testsuite name="Report Parser Test Suite">
<directory>./tests/ReportParser</directory>
</testsuite>
<testsuite name="Injected Relations Test Suite">
<directory>./tests/InjectedRelations</directory>
</testsuite>
<testsuite name="CCP HTML CLeaning Test Suite">
<directory>./tests/CleanCCPHtml</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src/</directory>
</include>
</source>
</phpunit>
29 changes: 23 additions & 6 deletions src/AbstractSeatPlugin.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 @@ -37,6 +37,7 @@ abstract class AbstractSeatPlugin extends ServiceProvider
* Return an URI to a CHANGELOG.md file or an API path which will be providing changelog history.
*
* @example https://raw.githubusercontent.com/eveseat/seat/master/LICENSE
*
* @exemple https://api.github.com/repos/eveseat/web/releases
*
* @return string|null
Expand Down Expand Up @@ -146,10 +147,8 @@ abstract public function getPackagistVendorName(): string;
* Return the plugin installed version.
*
* @return string
*
* @deprecated This method will be non longer overridable in the future.
*/
public function getVersion(): string
final public function getVersion(): string
{
$name = sprintf('%s/%s', $this->getPackagistVendorName(), $this->getPackagistPackageName());

Expand Down Expand Up @@ -201,7 +200,7 @@ final public function registerPermissions(string $permissions_path, string $scop
final public function registerApiAnnotationsPath($paths)
{
// ensure current annotation setting is an array of path or transform into it
$current_annotations = config('l5-swagger.paths.annotations', []);
$current_annotations = config('l5-swagger.documentations.default.paths.annotations', []);

if (! is_array($current_annotations))
$current_annotations = [$current_annotations];
Expand All @@ -211,7 +210,7 @@ final public function registerApiAnnotationsPath($paths)

// merge paths together and update config
config([
'l5-swagger.paths.annotations' => array_unique(array_merge($current_annotations, $paths)),
'l5-swagger.documentations.default.paths.annotations' => array_unique(array_merge($current_annotations, $paths)),
]);
}

Expand All @@ -231,4 +230,22 @@ final public function registerSdeTables($tables)
'seat.sde.tables' => array_unique(array_merge($current_tables, $tables)),
]);
}

/**
* Register database seeders in the stack.
*
* @param string|array $classes
* @return void
*/
final public function registerDatabaseSeeders(string|array $classes)
{
$current_seeders = config('seat.seeders', []);

if (! is_array($classes))
$classes = [$classes];

config([
'seat.seeders' => array_unique(array_merge($current_seeders, $classes)),
]);
}
}
2 changes: 1 addition & 1 deletion src/Commands/Seat/Admin/Email.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/Commands/Seat/Version.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/Config/services.config.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
104 changes: 104 additions & 0 deletions src/Contracts/EsiClient.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?php

/*
* This file is part of SeAT
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

namespace Seat\Services\Contracts;

use Psr\Log\LoggerInterface;
use Psr\SimpleCache\CacheInterface;

interface EsiClient
{
/**
* @return \Seat\Services\Contracts\EsiToken
*/
public function getAuthentication(): EsiToken;

/**
* @param \Seat\Services\Contracts\EsiToken $authentication
* @return $this
*/
public function setAuthentication(EsiToken $authentication): self;

/**
* @return bool
*/
public function isAuthenticated(): bool;

/**
* @return string
*/
public function getVersion(): string;

/**
* @param string $version
* @return $this
*/
public function setVersion(string $version): self;

/**
* @return array
*/
public function getQueryString(): array;

/**
* @param array $query
* @return $this
*/
public function setQueryString(array $query): self;

/**
* @return array
*/
public function getBody(): array;

/**
* @param array $body
* @return $this
*/
public function setBody(array $body): self;

/**
* @param string $method
* @param string $uri
* @param array $uri_data
* @return \Seat\Services\Contracts\EsiResponse
*/
public function invoke(string $method, string $uri, array $uri_data = []): EsiResponse;

/**
* @param int $page
* @return $this
*/
public function page(int $page): self;

/**
* @return \Psr\Log\LoggerInterface
*/
public function getLogger(): LoggerInterface;

/**
* @return \Psr\SimpleCache\CacheInterface
*/
public function getCache(): CacheInterface;

public function getValidAccessToken(): string;
}
Loading
Loading