diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index e3f24db..922a6c7 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -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 \ No newline at end of file + - name: PHPStan + run: ./vendor/bin/phpstan analyse --no-progress diff --git a/CHANGELOG.md b/CHANGELOG.md index ac78b4d..90004e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/composer.json b/composer.json index 716ea86..2631fe5 100644 --- a/composer.json +++ b/composer.json @@ -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": [ diff --git a/phpstan.neon b/phpstan.neon index 983d39c..0b90c60 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -10,5 +10,5 @@ parameters: - tests ignoreErrors: - - message: "#has no return typehint specified#" - path: tests/* \ No newline at end of file + - message: "#has no return type([hint]?) specified#" + path: tests/* diff --git a/phpunit.xml b/phpunit.xml index 3be110c..4712d58 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,34 +1,24 @@ - - - - ./tests - - - - - - src - - - - - - - - - - - - - - + + + + ./tests + + + + + + + + + + + + + + + + src + + diff --git a/src/CollectionManager.php b/src/CollectionManager.php index e32420c..bc24616 100644 --- a/src/CollectionManager.php +++ b/src/CollectionManager.php @@ -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 @@ -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 @@ -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 @@ -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