Skip to content

Commit

Permalink
⬆️ Upgrade compatibility L11
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahNxT committed Sep 3, 2024
1 parent 8854e60 commit a7a6d11
Show file tree
Hide file tree
Showing 16 changed files with 73 additions and 93 deletions.
33 changes: 16 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"homepage": "https://github.com/noahnxt/laravel-open-holidays-api",
"license": "MIT",
"version": "0.0.5",
"version": "1.0.0",
"authors": [
{
"name": "Noah Gillard",
Expand All @@ -17,23 +17,22 @@
}
],
"require": {
"php": "^8.1",
"illuminate/contracts": "^10.0",
"saloonphp/saloon": "^3.0",
"spatie/laravel-package-tools": "^1.14.0"
"php": "^8.2",
"spatie/laravel-package-tools": "^1.16",
"illuminate/contracts": "^10.0||^11.0"
},
"require-dev": {
"laravel/pint": "^1.0",
"nunomaduro/collision": "^7.8",
"nunomaduro/larastan": "^2.0.1",
"orchestra/testbench": "^8.8",
"pestphp/pest": "^2.20",
"pestphp/pest-plugin-arch": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"spatie/laravel-ray": "^1.26"
"laravel/pint": "^1.14",
"nunomaduro/collision": "^8.1.1||^7.10.0",
"larastan/larastan": "^2.9",
"orchestra/testbench": "^9.0.0||^8.22.0",
"pestphp/pest": "^2.34",
"pestphp/pest-plugin-arch": "^2.7",
"pestphp/pest-plugin-laravel": "^2.3",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",
"spatie/laravel-ray": "^1.35"
},
"autoload": {
"psr-4": {
Expand All @@ -48,7 +47,7 @@
},
"scripts": {
"post-autoload-dump": "@composer run prepare",
"clear": "@php vendor/bin/testbench package:purge-laravel-open-holidays-api --ansi",
"clear": "@php vendor/bin/testbench package:purge-skeleton --ansi",
"prepare": "@php vendor/bin/testbench package:discover --ansi",
"build": [
"@composer run prepare",
Expand Down
4 changes: 1 addition & 3 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ includes:
- phpstan-baseline.neon

parameters:
level: 4
level: 5
paths:
- src
tmpDir: build/phpstan
checkOctaneCompatibility: true
checkModelProperties: true
checkMissingIterableValueType: false

11 changes: 2 additions & 9 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
backupGlobals="false"
bootstrap="vendor/autoload.php"
colors="true"
Expand All @@ -16,17 +16,10 @@
backupStaticProperties="false"
>
<testsuites>
<testsuite name="NoahNxT Test Suite">
<testsuite name="VendorName Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
Expand Down
13 changes: 6 additions & 7 deletions src/Requests/Holidays/PublicHolidays.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,19 @@ public function resolveEndpoint(): string
}

/**
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $validFrom Start of the date range
* @param string $validTo End of the date range
* @param string $subdivisionCode Code of the subdivision or empty
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $validFrom Start of the date range
* @param string $validTo End of the date range
* @param string $subdivisionCode Code of the subdivision or empty
*/
public function __construct(
protected string $countryIsoCode,
protected string $languageIsoCode,
protected string $validFrom,
protected string $validTo,
protected string $subdivisionCode,
) {
}
) {}

public function defaultQuery(): array
{
Expand Down
7 changes: 3 additions & 4 deletions src/Requests/Holidays/PublicHolidaysByDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ public function resolveEndpoint(): string
}

/**
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $date Date of interest
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $date Date of interest
*/
public function __construct(
protected string $languageIsoCode,
protected string $date,
) {
}
) {}

public function defaultQuery(): array
{
Expand Down
13 changes: 6 additions & 7 deletions src/Requests/Holidays/SchoolHolidays.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,19 @@ public function resolveEndpoint(): string
}

/**
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $validFrom Start of the date range
* @param string $validTo End of the date range
* @param string $subdivisionCode Code of the subdivision or empty
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $validFrom Start of the date range
* @param string $validTo End of the date range
* @param string $subdivisionCode Code of the subdivision or empty
*/
public function __construct(
protected string $countryIsoCode,
protected string $languageIsoCode,
protected string $validFrom,
protected string $validTo,
protected string $subdivisionCode,
) {
}
) {}

public function defaultQuery(): array
{
Expand Down
7 changes: 3 additions & 4 deletions src/Requests/Holidays/SchoolHolidaysByDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ public function resolveEndpoint(): string
}

/**
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $date Date of interest
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $date Date of interest
*/
public function __construct(
protected string $languageIsoCode,
protected string $date,
) {
}
) {}

public function defaultQuery(): array
{
Expand Down
5 changes: 2 additions & 3 deletions src/Requests/Regional/Countries.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ public function resolveEndpoint(): string
}

/**
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $languageIsoCode ISO-639-1 code of a language or empty
*/
public function __construct(
protected string $languageIsoCode,
) {
}
) {}

public function defaultQuery(): array
{
Expand Down
5 changes: 2 additions & 3 deletions src/Requests/Regional/Languages.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ public function resolveEndpoint(): string
}

/**
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $languageIsoCode ISO-639-1 code of a language or empty
*/
public function __construct(
protected string $languageIsoCode,
) {
}
) {}

public function defaultQuery(): array
{
Expand Down
7 changes: 3 additions & 4 deletions src/Requests/Regional/Subdivisions.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ public function resolveEndpoint(): string
}

/**
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $languageIsoCode ISO-639-1 code of a language or empty
*/
public function __construct(
protected string $countryIsoCode,
protected string $languageIsoCode,
) {
}
) {}

public function defaultQuery(): array
{
Expand Down
7 changes: 3 additions & 4 deletions src/Requests/Statistics/StatisticsPublicHolidays.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ public function resolveEndpoint(): string
}

/**
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $subdivisionCode Code of the subdivision or empty
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $subdivisionCode Code of the subdivision or empty
*/
public function __construct(
protected string $countryIsoCode,
protected string $subdivisionCode,
) {
}
) {}

public function defaultQuery(): array
{
Expand Down
7 changes: 3 additions & 4 deletions src/Requests/Statistics/StatisticsSchoolHolidays.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ public function resolveEndpoint(): string
}

/**
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $subdivisionCode Code of the subdivision or empty
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $subdivisionCode Code of the subdivision or empty
*/
public function __construct(
protected string $countryIsoCode,
protected string $subdivisionCode,
) {
}
) {}

public function defaultQuery(): array
{
Expand Down
3 changes: 1 addition & 2 deletions src/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ class Resource
{
public function __construct(
protected Connector $connector,
) {
}
) {}
}
28 changes: 14 additions & 14 deletions src/Resource/Holidays.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
class Holidays extends Resource
{
/**
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $validFrom Start of the date range
* @param string $validTo End of the date range
* @param string $subdivisionCode Code of the subdivision or empty
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $validFrom Start of the date range
* @param string $validTo End of the date range
* @param string $subdivisionCode Code of the subdivision or empty
*/
public function publicHolidays(
string $countryIsoCode,
Expand All @@ -30,8 +30,8 @@ public function publicHolidays(
}

/**
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $date Date of interest
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $date Date of interest
*/
public function publicHolidaysByDate(
string $languageIsoCode,
Expand All @@ -41,11 +41,11 @@ public function publicHolidaysByDate(
}

/**
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $validFrom Start of the date range
* @param string $validTo End of the date range
* @param string $subdivisionCode Code of the subdivision or empty
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $validFrom Start of the date range
* @param string $validTo End of the date range
* @param string $subdivisionCode Code of the subdivision or empty
*/
public function schoolHolidays(
string $countryIsoCode,
Expand All @@ -58,8 +58,8 @@ public function schoolHolidays(
}

/**
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $date Date of interest
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $date Date of interest
*/
public function schoolHolidaysByDate(
string $languageIsoCode,
Expand Down
8 changes: 4 additions & 4 deletions src/Resource/Regional.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@
class Regional extends Resource
{
/**
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $languageIsoCode ISO-639-1 code of a language or empty
*/
public function countries(string $languageIsoCode): Response
{
return $this->connector->send(new Countries($languageIsoCode));
}

/**
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $languageIsoCode ISO-639-1 code of a language or empty
*/
public function languages(string $languageIsoCode): Response
{
return $this->connector->send(new Languages($languageIsoCode));
}

/**
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $languageIsoCode ISO-639-1 code of a language or empty
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $languageIsoCode ISO-639-1 code of a language or empty
*/
public function subdivisions(
string $countryIsoCode,
Expand Down
8 changes: 4 additions & 4 deletions src/Resource/Statistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
class Statistics extends Resource
{
/**
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $subdivisionCode Code of the subdivision or empty
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $subdivisionCode Code of the subdivision or empty
*/
public function statisticsPublicHolidays(
string $countryIsoCode,
Expand All @@ -21,8 +21,8 @@ public function statisticsPublicHolidays(
}

/**
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $subdivisionCode Code of the subdivision or empty
* @param string $countryIsoCode ISO 3166-1 code of the country
* @param string $subdivisionCode Code of the subdivision or empty
*/
public function statisticsSchoolHolidays(
string $countryIsoCode,
Expand Down

0 comments on commit a7a6d11

Please sign in to comment.