Skip to content

Commit

Permalink
update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
alcohol committed Oct 10, 2024
1 parent ead00f4 commit e0a3168
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 251 deletions.
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

* Nothing as of yet
* Updated: added XK for Kosovo ([#101])
* Changed: added types for private properties

## [4.3.1] - 2023-09-11

Expand All @@ -25,11 +26,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [4.1.0] - 2022-09-07

* Changed: Lookup is now unicode-safe ([#78]) and allows partial (prefix) matches ([#74])
* Changed: lookup is now unicode-safe ([#78]) and allows partial (prefix) matches ([#74])

## [4.0.0] - 2021-10-22

* Changed: Added return types ([#63] & [#65])
* Changed: added return types ([#63] & [#65])

## [3.0.0] - 2020-12-05

Expand Down Expand Up @@ -100,6 +101,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
[1.0.1]: https://github.com/thephpleague/iso3166/compare/1.0.0...1.0.1
[1.0.0]: https://github.com/thephpleague/iso3166/compare/64bae4f00dbd5679b9a36c54c37af73d5deb5be1...1.0.0

[#101]: https://github.com/thephpleague/iso3166/issues/101
[#96]: https://github.com/thephpleague/iso3166/pull/96
[#95]: https://github.com/thephpleague/iso3166/pull/95
[#78]: https://github.com/thephpleague/iso3166/pull/78
Expand Down
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@
"psr-4": { "League\\ISO3166\\": "src" }
},
"require-dev": {
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "^9.5",
"phpstan/phpstan": "^1.12",
"phpstan/phpstan-deprecation-rules": "^1.2",
"phpstan/phpstan-strict-rules": "^1.6"
},
"autoload-dev": {
"psr-4": { "League\\ISO3166\\": "tests" }
},
"scripts": {
"test": "vendor/bin/phpunit",
"phpstan": "tools/phpstan/vendor/bin/phpstan",
"phpstan": "vendor/bin/phpstan",
"php-cs-fixer": "tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run --diff",
"php-cs-fixer-fix": "tools/php-cs-fixer/vendor/bin/php-cs-fixer fix"
},
Expand Down
5 changes: 2 additions & 3 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
includes:
- tools/phpstan/vendor/phpstan/phpstan-deprecation-rules/rules.neon
- tools/phpstan/vendor/phpstan/phpstan-php-parser/extension.neon
- tools/phpstan/vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon
- phpstan-baseline.neon

parameters:
Expand Down
4 changes: 2 additions & 2 deletions src/ISO3166.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ final class ISO3166 implements \Countable, \IteratorAggregate, ISO3166DataProvid
/** @var string */
public const KEY_NAME = 'name';
/** @var string[] */
private $keys = [self::KEY_ALPHA2, self::KEY_ALPHA3, self::KEY_NUMERIC, self::KEY_NAME];
private array $keys = [self::KEY_ALPHA2, self::KEY_ALPHA3, self::KEY_NUMERIC, self::KEY_NAME];

/**
* @param array<array{name: string, alpha2: string, alpha3: string, numeric: numeric-string, currency: string[]}> $countries replace default dataset with given array
Expand Down Expand Up @@ -175,7 +175,7 @@ private function lookup(string $key, string $value): array
*
* @var array<array{name: string, alpha2: string, alpha3: string, numeric: numeric-string, currency: string[]}>>
*/
private $countries = [
private array $countries = [
[
'name' => 'Afghanistan',
'alpha2' => 'AF',
Expand Down
9 changes: 3 additions & 6 deletions src/ISO3166WithAliases.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@

namespace League\ISO3166;

use League\ISO3166\ISO3166DataProvider;

class ISO3166WithAliases implements ISO3166DataProvider
{
/** @var ISO3166DataProvider */
private $source;
private ISO3166DataProvider $source;

public function __construct(ISO3166DataProvider $iso3166)
{
Expand Down Expand Up @@ -49,9 +46,9 @@ public function name(string $name): array
'Vietnam' => 'Viet Nam',
];

foreach ($aliases as $alias => $full) {
foreach ($aliases as $alias => $original) {
if (0 === strcasecmp($alias, $name)) {
$name = $full;
$name = $original;
break;
}
}
Expand Down
8 changes: 0 additions & 8 deletions tools/phpstan/composer.json

This file was deleted.

227 changes: 0 additions & 227 deletions tools/phpstan/composer.lock

This file was deleted.

0 comments on commit e0a3168

Please sign in to comment.