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

Add support for PHP 8 and bump dependency versions #4

Merged
merged 8 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 5 additions & 3 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ on:
- 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: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
php-version: ${{ matrix.version }}
extensions: mbstring, intl, sockets
coverage: xdebug
tools: composer, prestissimo
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ 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).

## [Unreleased]

- Add support for PHP 8 and upgrade dependencies

## 0.1.1 (2020-12-19)

### Added:
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",
"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>
12 changes: 6 additions & 6 deletions src/CollectionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function ensureCollection(string $name): void
/**
* Create collection
*
* @var string $name
* @param string $name
* @return ResultInterface|ClusterStatusResult
*/
public function create(string $name): ResultInterface
Expand All @@ -104,8 +104,8 @@ public function create(string $name): 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 @@ -116,7 +116,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 @@ -152,7 +152,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 @@ -163,7 +163,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
Loading