Skip to content

Commit

Permalink
PHP 81
Browse files Browse the repository at this point in the history
  • Loading branch information
Spamercz committed Feb 23, 2022
1 parent 627d74c commit b7ea62e
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 119 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 7.4 ]
elastic: [ 7.12.1, 6.8.15, 5.6.16 ]
php: [ 7.4, 8.1 ]
elastic: [ 7.17.0 ]

steps:
- uses: actions/checkout@v2
Expand All @@ -33,14 +33,14 @@ jobs:
- name: Composer
run: make composer

- if: matrix.php == '7.4' && matrix.elastic == '7.12.1'
- if: matrix.php == '8.1' && matrix.elastic == '7.17.0'
name: Coding standard
run: make cs

- if: matrix.php == '7.4' && matrix.elastic == '7.12.1'
- if: matrix.php == '8.1' && matrix.elastic == '7.17.0'
name: PHPStan
run: make phpstan

- if: matrix.php == '7.4'
- if: matrix.php == '8.1'
name: Tests
run: make tests
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"require-dev": {
"ext-curl": "*",
"phpstan/phpstan": "v0.12.37",
"phpstan/phpstan": "^1.4.6",
"nette/tester": "v2.3.1",
"elasticsearch/elasticsearch": "^7",
"guzzlehttp/guzzle": "^6.3",
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameters:
ignoreErrors:
- "#Call to function array_key_exists\\(\\) with string and array<int, mixed> will always evaluate to false#"
- "#Call to function array_key_exists\\(\\) with string and array<int, string> will always evaluate to false#"

checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
3 changes: 3 additions & 0 deletions src/Exception/ResponseCouldNotBeMapped.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
class ResponseCouldNotBeMapped extends \InvalidArgumentException
{

/**
* @param string $message [optional] The Exception message to throw.
*/
public function __construct(
$message,
int $code = 0,
Expand Down
8 changes: 4 additions & 4 deletions src/Mapping/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function addMappingFieldKeyword(string $name): void
$this->addMappingField(
new \Spameri\ElasticQuery\Mapping\Settings\Mapping\Field(
$name,
\Spameri\Elastic\Model\ValidateMapping\AllowedValues::TYPE_KEYWORD
\Spameri\ElasticQuery\Mapping\AllowedValues::TYPE_KEYWORD
)
);
}
Expand All @@ -88,7 +88,7 @@ public function addMappingFieldFloat(string $name): void
$this->addMappingField(
new \Spameri\ElasticQuery\Mapping\Settings\Mapping\Field(
$name,
\Spameri\Elastic\Model\ValidateMapping\AllowedValues::TYPE_FLOAT
\Spameri\ElasticQuery\Mapping\AllowedValues::TYPE_FLOAT
)
);
}
Expand All @@ -99,7 +99,7 @@ public function addMappingFieldInteger(string $name): void
$this->addMappingField(
new \Spameri\ElasticQuery\Mapping\Settings\Mapping\Field(
$name,
\Spameri\Elastic\Model\ValidateMapping\AllowedValues::TYPE_INTEGER
\Spameri\ElasticQuery\Mapping\AllowedValues::TYPE_INTEGER
)
);
}
Expand All @@ -110,7 +110,7 @@ public function addMappingFieldBoolean(string $name): void
$this->addMappingField(
new \Spameri\ElasticQuery\Mapping\Settings\Mapping\Field(
$name,
\Spameri\Elastic\Model\ValidateMapping\AllowedValues::TYPE_BOOLEAN
\Spameri\ElasticQuery\Mapping\AllowedValues::TYPE_BOOLEAN
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ namespace SpameriTests\ElasticQuery\Mapping\Analyzer\Custom;

require_once __DIR__ . '/../../../../bootstrap.php';


/**
* @skip
* Should be run only locally, dictionaries are not initialized on GHA yet.
*/
class CzechDictionary extends \Tester\TestCase
{

Expand Down
107 changes: 0 additions & 107 deletions travis-elastic.sh

This file was deleted.

0 comments on commit b7ea62e

Please sign in to comment.