Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into ft/configurability
Browse files Browse the repository at this point in the history
  • Loading branch information
tsterker committed Jan 4, 2024
2 parents 1e96350 + 8aa6e7a commit 1bc0dbb
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 69 deletions.
52 changes: 28 additions & 24 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,40 @@
name: CI

on: [push]
on:
- push
- pull_request

jobs:
build-test:
php_matrix:
runs-on: ubuntu-latest

strategy:
matrix:
version: [7.4, 8.3]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: mbstring, intl, sockets
coverage: xdebug
tools: composer, prestissimo
# tools: phpunit, composer, prestissimo, php-cs-fixer, phpstan
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.version }}
extensions: mbstring, intl, sockets
coverage: xdebug
tools: composer, prestissimo
# tools: phpunit, composer, prestissimo, php-cs-fixer, phpstan

- run: composer install
- run: composer install

- name: Start SolrCloud
run: docker-compose up -d
- name: Start SolrCloud
run: docker-compose up -d

- name: Sleep a few seconds to wait for Solr to be ready
uses: jakejarvis/wait-action@master
with:
time: '10s'
- name: Sleep a few seconds to wait for Solr to be ready
uses: jakejarvis/wait-action@master
with:
time: "10s"

- name: PHPUnit
run: ./vendor/bin/phpunit --testdox --colors=always
- name: PHPUnit
run: ./vendor/bin/phpunit --testdox --colors=always

- name: PHPStan
run: ./vendor/bin/phpstan analyse --no-progress
- name: PHPStan
run: ./vendor/bin/phpstan analyse --no-progress
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ 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/spec/v2.0.0.html).

<<<<<<< HEAD
## Unreleased (XXXX-XX-XX)

### Added
- feat: Support

## [Unreleased]

- build: Support for PHP 8 and upgrade dependencies (#4)
- feat: Support Solr Cloud collection configuration during creation
- test: Add multi-node docker-compose setup
- test: Configure Solr client timeout

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"solarium/solarium": "^6.0"
},
"require-dev": {
"php": "^7.2 || ^8.0",
"phpunit/phpunit": "^9.3",
"mockery/mockery": "^1.4",
"php": "^7.4 || ^8.0",
"phpunit/phpunit": "^9.3 || ^10.0",
"mockery/mockery": "^1.4 || ^1.6",
"symfony/event-dispatcher": "^5.1",
"phpstan/phpstan-mockery": "^0.12.7"
"phpstan/phpstan-mockery": "^0.12.7 || ^1.1"
},
"license": "MIT",
"authors": [
Expand Down
4 changes: 2 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ parameters:
- tests

ignoreErrors:
- message: "#has no return typehint specified#"
path: tests/*
- message: "#has no return type([hint]?) specified#"
path: tests/*
54 changes: 22 additions & 32 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,34 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="tests/bootstrap.php"
colors="true"
>
<testsuites>
<testsuite name="SolariumCollectionManager">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>

<coverage includeUncoveredFiles="true"
processUncoveredFiles="true"
ignoreDeprecatedCodeUnits="true"
disableCodeCoverageIgnore="true"
>
<include>
<directory suffix=".php">src</directory>
</include>

<report>
<text outputFile="php://stdout" showUncoveredFiles="false" showOnlySummary="true"/>
</report>
</coverage>

<logging>
<!-- <testdoxText outputFile="php://stdout"/> -->
</logging>

<php>
<!-- <server name="NAME" value="VALUE"/> -->
</php>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="tests/bootstrap.php" colors="true" cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="SolariumCollectionManager">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<coverage includeUncoveredFiles="true" ignoreDeprecatedCodeUnits="true" disableCodeCoverageIgnore="true">
<report>
<text outputFile="php://stdout" showUncoveredFiles="false" showOnlySummary="true"/>
</report>
</coverage>
<logging>
<testdoxText outputFile="php://stdout"/>
</logging>
<php>
<!-- <server name="NAME" value="VALUE"/> -->
</php>
<source>
<include>
<directory suffix=".php">src</directory>
</include>
</source>
</phpunit>
10 changes: 5 additions & 5 deletions src/CollectionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ public function create(string $name, array $options = []): ResultInterface
/**
* Alias collection
*
* @var string $collection
* @var string $alias
* @param string $collection
* @param string $alias
* @return mixed[] JSON response
*/
public function alias(string $collection, string $alias): array
Expand All @@ -139,7 +139,7 @@ public function alias(string $collection, string $alias): array
/**
* Delete Alias collection
*
* @var string $alias
* @param string $alias
* @return mixed[] JSON response
*/
public function deleteAlias(string $alias): array
Expand Down Expand Up @@ -175,7 +175,7 @@ public function getAliasMappings(): array
/**
* Get collection for given alias or null
*
* @var string $alias
* @param string $alias
* @return null|string
*/
public function getAliasedCollection(string $alias): ?string
Expand All @@ -186,7 +186,7 @@ public function getAliasedCollection(string $alias): ?string
/**
* Delete collection
*
* @var string $name
* @param string $name
* @return ResultInterface|ClusterStatusResult
*/
public function delete(string $name): ResultInterface
Expand Down

0 comments on commit 1bc0dbb

Please sign in to comment.