Skip to content

Commit

Permalink
Merge pull request #2 from subugoe/main
Browse files Browse the repository at this point in the history
Sync Forked Repo
  • Loading branch information
mh-goe authored May 19, 2022
2 parents 1d1f6dc + b2fb472 commit bd400de
Show file tree
Hide file tree
Showing 64 changed files with 541 additions and 466 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI

on: [ push, pull_request ]

jobs:
build:
runs-on: ubuntu-latest

continue-on-error: ${{ matrix.env.experimental == true }}
strategy:
fail-fast: false
matrix:
env:
- { php: 7.4 }

env: ${{ matrix.env }}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.env.php }}
tools: composer
extensions: pdo, sqlite3

# composer
- name: Update Composer
run: |
sudo composer self-update
composer --version
- name: Validate composer.json and composer.lock
run: composer validate

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: dependencies-composer-${{ hashFiles('composer.json') }}

- name: Install dependencies
run: composer install

- name: Check coding style
run: composer lint

- name: Run Unit Tests
run: |
echo "Running unit tests with $(which php)";
.Build/bin/phpunit --colors -c .Build/vendor/nimut/testing-framework/res/Configuration/UnitTests.xml Tests/Unit/;
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ vendor/*
/composer.lock
/.Build
/.php_cs.cache
/.php-cs-fixer.cache
var
File renamed without changes.
1 change: 1 addition & 0 deletions .php-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.4
46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

23 changes: 7 additions & 16 deletions Classes/Controller/SearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,11 @@

class SearchController extends ActionController
{
/**
* @var array
*/
protected $requestArguments;
protected array $requestArguments = [];

/**
* @var ServiceProviderInterface
*/
protected $searchProvider;
protected ?object $searchProvider = null;

/**
* @var \Psr\Log\LoggerInterface
*/
private $logger;
private \Psr\Log\LoggerInterface $logger;

public function __construct(LogManagerInterface $logManager)
{
Expand All @@ -79,6 +70,7 @@ public function detailAction(string $id)
)
);
}

$this->addStandardAssignments();

$this->view->assignMultiple($detail);
Expand All @@ -103,9 +95,7 @@ public function indexAction()
$this->settings,
null,
$this->searchProvider->getRequestArguments()
),
false,
true
)
);

$this->addStandardAssignments();
Expand All @@ -124,14 +114,15 @@ public function indexAction()
/**
* Initialisation and setup.
*/
public function initializeAction()
protected function initializeAction()
{
ksort($this->settings['queryFields']);

$this->initializeConnection($this->settings['activeConnection']);

$this->requestArguments = $this->request->getArguments();
$this->requestArguments = ArrayUtility::cleanArgumentsArray($this->requestArguments);

$this->searchProvider->setRequestArguments($this->requestArguments);
$this->searchProvider->setAction($this->request->getControllerActionName());
$this->searchProvider->setControllerExtensionKey($this->request->getControllerExtensionKey());
Expand Down
1 change: 0 additions & 1 deletion Classes/Hooks/RealUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class RealUrl
* Create automatic RealUrl Configuratoin.
*
* @param $params
* @param $pObj
*
* @return array
*/
Expand Down
21 changes: 4 additions & 17 deletions Classes/Service/AbstractServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,18 @@

abstract class AbstractServiceProvider implements ServiceProviderInterface
{
/**
* @var string
*/
protected $connectionName;
protected string $connectionName;

/**
* @var LogManagerInterface
*/
protected $logger;

/**
* @var array
*/
protected $requestArguments;
protected array $requestArguments = [];

/**
* @var array
*/
protected $settings;
protected array $settings = [];

/**
* @param string $connectionName
* @param array $settings
*/
public function __construct($connectionName, $settings)
public function __construct(string $connectionName, array $settings)
{
$this->connectionName = $connectionName;
$this->settings = $settings;
Expand Down
6 changes: 1 addition & 5 deletions Classes/Service/ServiceProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@
*/
interface ServiceProviderInterface
{
/**
* @param string $connectionName
* @param array $settings
*/
public function __construct($connectionName, $settings);
public function __construct(string $connectionName, array $settings);

public function connect();

Expand Down
Loading

0 comments on commit bd400de

Please sign in to comment.