Skip to content

Commit

Permalink
Align tools and settings with main project release 9.1 (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
demiankatz authored Sep 15, 2023
1 parent 5fafa97 commit ce50040
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
VUFIND_LOCAL_DIR: $GITHUB_WORKSPACE/local
strategy:
matrix:
php-version: ['7.4', '8.0', '8.1']
php-version: ['8.0', '8.1', '8.2']
include:
- php-version: 7.4
phing_tasks: "phpunitfast"
- php-version: 8.0
phing_tasks: "phpunitfast"
- php-version: 8.1
phing_tasks: "phpunitfast"
- php-version: 8.2
phing_tasks: "phpunitfast phpcs-console php-cs-fixer-dryrun phpstan-console"

steps:
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## Next Release - TBD

### Added

- Nothing.

### Changed

- The minimum PHP version requirement has been raised to 8.0.

### Deprecated

- Nothing.

### Removed

- Nothing.

## Fixed

- Nothing.

## 3.2.0 - 2022-09-15

### Added
Expand Down
12 changes: 5 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,21 @@
},
"config": {
"platform": {
"php": "7.4.1"
"php": "8.0"
}
},
"require": {
"php": ">=7.4.1",
"php": ">=8.0",
"laminas/laminas-http": ">=2.2"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "3.14.4",
"friendsofphp/php-cs-fixer": "3.26.1",
"laminas/laminas-uri": ">=2.2",
"pear/http_request2": "2.5.1",
"phploc/phploc": "7.0.2",
"phpmd/phpmd": "2.13.0",
"phpstan/phpstan": "1.10.3",
"phpunit/phpunit": "9.6.4",
"phpstan/phpstan": "1.10.34",
"phpunit/phpunit": "9.6.12",
"phing/phing": "2.17.4",
"sebastian/phpcpd": "6.0.3",
"squizlabs/php_codesniffer": "3.7.2"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/VuFindHttp/HttpService.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function get(
) {
if ($params) {
$query = $this->createQueryString($params);
if (strpos($url, '?') !== false) {
if (str_contains($url, '?')) {
$url .= '&' . $query;
} else {
$url .= '?' . $query;
Expand Down
2 changes: 1 addition & 1 deletion tests/unit-tests/src/VuFindTest/HttpServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function testGetAppendsHeaders()
'http://example.tld',
['foo=bar'],
'test',
["Content-type: application/json", "Accept: application/json"]
['Content-type: application/json', 'Accept: application/json']
);
}

Expand Down
11 changes: 9 additions & 2 deletions tests/vufind.php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
->in(__DIR__ . '/../src');

$rules = [
'@PHP74Migration' => true,
'@PHP80Migration' => true,
'@PHPUnit84Migration:risky' => true,
'@PSR12' => true,
'align_multiline_comment' => true,
Expand All @@ -17,7 +17,7 @@
'class_attributes_separation' => ['elements' => ['method' => 'one', 'property' => 'one']],
'concat_space' => ['spacing' => 'one'],
'ereg_to_preg' => true,
'function_typehint_space' => true,
'get_class_to_class_keyword' => true,
'global_namespace_import' => [
'import_functions' => true,
'import_classes' => null,
Expand All @@ -26,11 +26,13 @@
'linebreak_after_opening_tag' => true,
'lowercase_cast' => true,
'magic_constant_casing' => true,
'modernize_strpos' => true,
'native_function_casing' => true,
'native_function_invocation' => [
'strict' => true,
'scope' => 'namespaced',
],
'no_alias_functions' => true,
'no_blank_lines_after_class_opening' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
Expand All @@ -39,10 +41,13 @@
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_mixed_echo_print' => true,
'no_php4_constructor' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_around_offset' => true,
'no_unneeded_control_parentheses' => true,
'no_unneeded_curly_braces' => true,
'no_unneeded_final_method' => true,
'no_unreachable_default_argument_value' => true,
'no_unused_imports' => true,
'no_useless_return' => true,
'no_whitespace_in_blank_line' => true,
Expand All @@ -55,8 +60,10 @@
'php_unit_method_casing' => true,
'pow_to_exponentiation' => true,
'single_line_after_imports' => true,
'single_quote' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
'type_declaration_spaces' => true,
];

$cacheDir = __DIR__ . '/../.php_cs_cache';
Expand Down

0 comments on commit ce50040

Please sign in to comment.