diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..05955b2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,55 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] +# Change these settings to your own preference +indent_style = space +indent_size = 4 + +# We recommend you to keep these unchanged +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.json] +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false + +[*.sh] +indent_style = tab + +[*.xml{,.dist}] +indent_style = space +indent_size = 4 + +[*.{yaml,yml}] +trim_trailing_whitespace = false + +[.github/workflows/*.yml] +indent_size = 2 + +[.gitmodules] +indent_style = tab + +[.php_cs{,.dist}] +indent_style = space +indent_size = 4 + +[composer.json] +indent_size = 4 + +[{,docker-}compose{,.*}.{yaml,yml}] +indent_style = space +indent_size = 2 + +[{,*.*}Dockerfile] +indent_style = tab + +[{,*.*}Caddyfile] +indent_style = tab diff --git a/.github/workflows/php.yaml b/.github/workflows/php.yaml index 270a3a2..084c061 100644 --- a/.github/workflows/php.yaml +++ b/.github/workflows/php.yaml @@ -11,13 +11,11 @@ permissions: jobs: tests: - runs-on: ubuntu-latest strategy: matrix: php: - - '7.2' - - '7.4' + - '8.3' composer_preference: - 'lowest' - 'highest' diff --git a/.gitignore b/.gitignore index 5600cd9..28c78b1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,19 @@ .idea vendor +.phpunit.cache/ + +composer.lock + +export/achievements/* +export/banners/* +export/character/* +export/characterfull/* +export/cwlinkshell/* +export/freecompany/* +export/leaderboards/* +export/linkshell/* +export/pvpteam/* + +!**.gitkeep test\.json diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5e94d5f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,57 @@ +FROM php:8.3-alpine AS php_base + +WORKDIR /app + +VOLUME /app/var/ + +ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ + +RUN apk add --no-cache \ + acl \ + file \ + gettext \ + git \ +; + +RUN set -eux; \ + install-php-extensions \ + @composer \ + apcu \ + intl \ + opcache \ + ; + +ENV COMPOSER_ALLOW_SUPERUSER=1 + +# Dev FrankenPHP image +FROM php_base AS php_dev + +ENV XDEBUG_MODE=debug + +VOLUME /app/var/ + +RUN apk add --no-cache \ + curl \ + ; + +RUN set -eux; \ + install-php-extensions \ + xdebug \ + ; + +FROM php_base AS php_prod + +COPY --link docker/conf.d/app.prod.ini $PHP_INI_DIR/conf.d/ + +COPY --link composer.* ./ +RUN set -eux; \ + composer install --no-cache --prefer-dist --no-dev --no-autoloader --no-scripts --no-progress + +# copy sources +COPY --link . ./ +RUN rm -Rf docker/ + +RUN set -eux; \ + composer dump-autoload --classmap-authoritative --no-dev; \ + composer dump-env prod; \ + composer run-script --no-dev post-install-cmd; diff --git a/README.md b/README.md index 18ebd95..8b27ba7 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,39 @@ Parse lodestone for those juicy details - Run `php cli ` for debugging - Run `php tests` to validate tests -|CLI Command|Arguments|Description| -|-|-|-| -|`character`|``|Prints a character parse. -|`freecompany`|``|Prints a freecompanies parse.| -|`pvpteam`|``|Prints a pvpteam parse.| -|`linkshell`|``|Prints a linkshell parse.| -|`achievements`|``|Prints a characters achievement parse.| -|`banners`|none|Prints the currently displayed banners on the lodestone homepage.| -|`leaderboards`|`feast`,`potd`,`hoh`|Prints the current leaderboard parse for The Feast, Palace of The Dead, or Heaven on High.| +| CLI Command |Arguments|Description| +|-----------------|-|-| +| `character` |``|Prints a character parse. +| `characterfull` |``|Prints a character parse with its complete class jobs list. +| `freecompany` |``|Prints a freecompanies parse.| +| `pvpteam` |``|Prints a pvpteam parse.| +| `linkshell` |``|Prints a linkshell parse.| +| `achievements` |``|Prints a characters achievement parse.| +| `banners` |none|Prints the currently displayed banners on the lodestone homepage.| +| `leaderboards` |`feast`,`potd`,`hoh`|Prints the current leaderboard parse for The Feast, Palace of The Dead, or Heaven on High.| -All commands accept a flag to print the returned blob to a json file. -Example +All commands accept a flag to print the returned blob to a json file (with `-f filename` after the ``). + +The json file is saved in the `export` directory under the directory with the command name. + +## Languages supported +- `en`: English (default) +- `fr`: French +- `de`: German +- `ja`: Japanese + +## Commands with language support +- `character` +- `characterfull` +- `freecompany` +- `achievements` + +## Examples ``` // prints returned object to file myCharacter.json -php cli character -file myCharacter -``` \ No newline at end of file +php cli character -f myCharacter +``` +``` +// prints returned object to file myCharacter.json from the French Lodestone +php cli character -f myCharacter -l fr +``` diff --git a/cli b/cli index 04b922b..268bc8b 100644 --- a/cli +++ b/cli @@ -7,11 +7,14 @@ */ // composer auto loader +use Lodestone\Enum\LocaleEnum; + require __DIR__ . '/vendor/autoload.php'; $api = new \Lodestone\Api(); +$exporter = new \LodestoneUtils\Exporter(); -print_r($argv); +//print_r($argv); if ($argc < 2) { print("No arguments provided.\n"); @@ -22,6 +25,22 @@ if ($argc < 2) { array_shift($argv); $cliCommandType = $argv[0]; +$locale = LocaleEnum::EN->value; + +foreach ($argv as $key => $arg) { + if ($arg === "-l") { + if ( + !isset($argv[$key + 1]) + || !LocaleEnum::isValid(strtolower($argv[$key + 1])) + ) { + print_r("INVALID ARGUMENT: Expected country identifier or wrong country identifier\n"); + exit(1); + } + $locale = strtolower($argv[$key + 1]); + break; + } +} + switch ($cliCommandType) { case "character": if (!isset($argv[1])) { @@ -29,11 +48,23 @@ switch ($cliCommandType) { break; } print_r("Parsing character of {$argv[1]}...\n"); - $results = $api->character()->get($argv[1]); - if (isset($argv[2]) == "-file") { - $file = fopen("{$argv[3]}.json", 'w'); - fwrite($file, json_encode($results)); - fclose($file); + $results = $api->character()->get($argv[1], $locale); + if (isset($argv[2]) == "-f") { + $exporter->exportToFile($argv[0], $argv[3], $results); + break; + } + print_r($results); + break; + + case "characterfull": + if (!isset($argv[1])) { + print_r("INVALID ARGUMENT: Expected Character ID\n"); + break; + } + print_r("Parsing character of {$argv[1]}...\n"); + $results = $api->character()->getFull($argv[1], $locale, true); + if (isset($argv[2]) == "-f") { + $exporter->exportToFile($argv[0], $argv[3], $results); break; } print_r($results); @@ -45,11 +76,9 @@ switch ($cliCommandType) { break; } print_r("Parsing freecompany of {$argv[1]}...\n"); - $results = $api->freecompany()->get($argv[1]); - if (isset($argv[2]) == "-file") { - $file = fopen("{$argv[3]}.json", 'w'); - fwrite($file, json_encode($results)); - fclose($file); + $results = $api->freecompany()->get($argv[1], $locale); + if (isset($argv[2]) == "-f") { + $exporter->exportToFile($argv[0], $argv[3], $results); break; } print_r($results); @@ -61,11 +90,9 @@ switch ($cliCommandType) { break; } print_r("Parsing pvp team of {$argv[1]}...\n"); - $results = $api->pvpteam()->get($argv[1]); - if (isset($argv[2]) == "-file") { - $file = fopen("{$argv[3]}.json", 'w'); - fwrite($file, json_encode($results)); - fclose($file); + $results = $api->pvpteam()->get($argv[1], $locale); + if (isset($argv[2]) == "-f") { + $exporter->exportToFile($argv[0], $argv[3], $results); break; } print_r($results); @@ -77,11 +104,9 @@ switch ($cliCommandType) { break; } print_r("Parsing linkshell of {$argv[1]}...\n"); - $results = $api->linkshell()->get($argv[1])->Results; - if (isset($argv[2]) == "-file") { - $file = fopen("{$argv[3]}.json", 'w'); - fwrite($file, json_encode($results)); - fclose($file); + $results = $api->linkshell()->get(id: $argv[1], locale: $locale)->Results; + if (isset($argv[2]) == "-f") { + $exporter->exportToFile($argv[0], $argv[3], $results); break; } print_r($results); @@ -93,11 +118,9 @@ switch ($cliCommandType) { break; } print_r("Parsing linkshell of {$argv[1]}...\n"); - $results = $api->linkshell()->getCrossWorld($argv[1])->Results; - if (isset($argv[2]) == "-file") { - $file = fopen("{$argv[3]}.json", 'w'); - fwrite($file, json_encode($results)); - fclose($file); + $results = $api->linkshell()->getCrossWorld(id: $argv[1], locale: $locale)->Results; + if (isset($argv[2]) == "-f") { + $exporter->exportToFile($argv[0], $argv[3], $results); break; } print_r($results); @@ -109,11 +132,9 @@ switch ($cliCommandType) { break; } print_r("Parsing achievements of {$argv[1]}...\n"); - $results = $api->character()->achievements($argv[1]); - if (isset($argv[2]) == "-file") { - $file = fopen("{$argv[3]}.json", 'w'); - fwrite($file, json_encode($results)); - fclose($file); + $results = $api->character()->achievements(id: $argv[1], locale: $locale); + if (isset($argv[2]) == "-f") { + $exporter->exportToFile($argv[0], $argv[3], $results); break; } print_r($results); @@ -121,10 +142,8 @@ switch ($cliCommandType) { case "banners": $results = $api->lodestone()->banners(); - if (isset($argv[1]) == "-file") { - $file = fopen("{$argv[2]}.json", 'w'); - fwrite($file, json_encode($results)); - fclose($file); + if (isset($argv[1]) == "-f") { + $exporter->exportToFile($argv[0], $argv[2], $results); break; } print_r($results); @@ -135,10 +154,8 @@ switch ($cliCommandType) { switch ($argv[1]) { case "feast": $results = $api->leaderboards()->feast(); - if (isset($argv[2]) == "-file") { - $file = fopen("{$argv[3]}.json", 'w'); - fwrite($file, json_encode($results)); - fclose($file); + if (isset($argv[2]) == "-f") { + $exporter->exportToFile($argv[0], $argv[3], $results); break; } print_r($results); @@ -146,10 +163,8 @@ switch ($cliCommandType) { case "potd": $results = $api->leaderboards()->ddPalaceOfTheDead(); - if (isset($argv[2]) == "-file") { - $file = fopen("{$argv[3]}.json", 'w'); - fwrite($file, json_encode($results)); - fclose($file); + if (isset($argv[2]) == "-f") { + $exporter->exportToFile($argv[0], $argv[3], $results); break; } print_r($results); @@ -157,10 +172,8 @@ switch ($cliCommandType) { case "hoh": $results = $api->leaderboards()->ddHeavenOnHigh(); - if (isset($argv[2]) == "-file") { - $file = fopen("{$argv[3]}.json", 'w'); - fwrite($file, json_encode($results)); - fclose($file); + if (isset($argv[2]) == "-f") { + $exporter->exportToFile($argv[0], $argv[3], $results); break; } print_r($results); diff --git a/compose.override.yaml b/compose.override.yaml new file mode 100644 index 0000000..12be206 --- /dev/null +++ b/compose.override.yaml @@ -0,0 +1,19 @@ +# Development environment override +services: + php: + build: + context: . + target: php_dev + user: "${UID:-1000}:${GID:-1000}" + volumes: + - ./:/app + - ./docker/conf.d/app.dev.ini:/usr/local/etc/php/conf.d/app.dev.ini:ro + - '/etc/timezone:/etc/timezone:ro' + - '/etc/localtime:/etc/localtime:ro' + environment: + # See https://xdebug.org/docs/all_settings#mode + XDEBUG_MODE: "${XDEBUG_MODE:-debug}" + extra_hosts: + # Ensure that host.docker.internal is correctly defined on Linux + - host.docker.internal:host-gateway + tty: true diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..7f8a92f --- /dev/null +++ b/compose.yaml @@ -0,0 +1,6 @@ +services: + php: + image: php:8.3-alpine + container_name: lodestone-parser-php + restart: unless-stopped + tty: true diff --git a/composer.json b/composer.json index f14dd1a..cf617e7 100644 --- a/composer.json +++ b/composer.json @@ -14,19 +14,20 @@ } ], "require": { - "php": "^7.2", + "php": "^8.3", "symfony/css-selector": ">=3.2", - "nesbot/carbon": "^2.10", - "symfony/http-client": "^4.3|^5.0", - "ramsey/uuid": "^3.8|^4.0", - "rct567/dom-query": "^0.8.0" + "nesbot/carbon": "^3.3", + "symfony/http-client": "^6.4", + "ramsey/uuid": "^4.0", + "rct567/dom-query": "^1.1" }, "require-dev": { - "phpunit/phpunit": "^8|^9" + "phpunit/phpunit": "^9" }, "autoload": { "psr-4": { - "Lodestone\\": "src/Lodestone" + "Lodestone\\": "src/Lodestone", + "LodestoneUtils\\": "src/Utils" } }, "autoload-dev": { diff --git a/composer.lock b/composer.lock index a0a764a..c157891 100644 --- a/composer.lock +++ b/composer.lock @@ -4,30 +4,29 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8ac69f2b6d3384f94327c5624d93c85b", + "content-hash": "483b8a2145b656e373f05f8adcec233c", "packages": [ { "name": "brick/math", - "version": "0.9.3", + "version": "0.12.1", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae" + "reference": "f510c0a40911935b77b86859eb5223d58d660df1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae", - "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae", + "url": "https://api.github.com/repos/brick/math/zipball/f510c0a40911935b77b86859eb5223d58d660df1", + "reference": "f510c0a40911935b77b86859eb5223d58d660df1", "shasum": "" }, "require": { - "ext-json": "*", - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", - "vimeo/psalm": "4.9.2" + "phpunit/phpunit": "^10.1", + "vimeo/psalm": "5.16.0" }, "type": "library", "autoload": { @@ -47,56 +46,132 @@ "arithmetic", "bigdecimal", "bignum", + "bignumber", "brick", - "math" + "decimal", + "integer", + "math", + "mathematics", + "rational" ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.9.3" + "source": "https://github.com/brick/math/tree/0.12.1" }, "funding": [ { "url": "https://github.com/BenMorel", "type": "github" + } + ], + "time": "2023-11-29T23:19:16+00:00" + }, + { + "name": "carbonphp/carbon-doctrine-types", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", + "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/18ba5ddfec8976260ead6e866180bd5d2f71aa1d", + "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "conflict": { + "doctrine/dbal": "<4.0.0 || >=5.0.0" + }, + "require-dev": { + "doctrine/dbal": "^4.0.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Types to use Carbon in Doctrine", + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], + "support": { + "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" }, { - "url": "https://tidelift.com/funding/github/packagist/brick/math", + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", "type": "tidelift" } ], - "time": "2021-08-15T20:50:18+00:00" + "time": "2024-02-09T16:56:22+00:00" }, { "name": "nesbot/carbon", - "version": "2.55.2", + "version": "3.3.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "8c2a18ce3e67c34efc1b29f64fe61304368259a2" + "reference": "8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8c2a18ce3e67c34efc1b29f64fe61304368259a2", - "reference": "8c2a18ce3e67c34efc1b29f64fe61304368259a2", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a", + "reference": "8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a", "shasum": "" }, "require": { + "carbonphp/carbon-doctrine-types": "*", "ext-json": "*", - "php": "^7.1.8 || ^8.0", + "php": "^8.1", + "psr/clock": "^1.0", + "symfony/clock": "^6.3 || ^7.0", "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" + "symfony/translation": "^4.4.18 || ^5.2.1|| ^6.0 || ^7.0" + }, + "provide": { + "psr/clock-implementation": "1.0" }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.0", - "doctrine/orm": "^2.7", - "friendsofphp/php-cs-fixer": "^3.0", - "kylekatarnls/multi-tester": "^2.0", - "phpmd/phpmd": "^2.9", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.54", - "phpunit/phpunit": "^7.5.20 || ^8.5.14", - "squizlabs/php_codesniffer": "^3.4" + "doctrine/dbal": "^3.6.3 || ^4.0", + "doctrine/orm": "^2.15.2 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.52.1", + "kylekatarnls/multi-tester": "^2.5.3", + "ondrejmirtes/better-reflection": "^6.25.0.4", + "phpmd/phpmd": "^2.15.0", + "phpstan/extension-installer": "^1.3.1", + "phpstan/phpstan": "^1.10.65", + "phpunit/phpunit": "^10.5.15", + "squizlabs/php_codesniffer": "^3.9.0" }, "bin": [ "bin/carbon" @@ -104,8 +179,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-3.x": "3.x-dev", - "dev-master": "2.x-dev" + "dev-master": "3.x-dev", + "dev-2.x": "2.x-dev" }, "laravel": { "providers": [ @@ -152,34 +227,91 @@ }, "funding": [ { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" + }, + { + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", "type": "tidelift" } ], - "time": "2021-12-03T14:59:52+00:00" + "time": "2024-05-01T06:54:22+00:00" + }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "time": "2022-11-25T14:36:26+00:00" }, { "name": "psr/container", - "version": "1.1.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -206,36 +338,36 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -256,48 +388,58 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:46:02+00:00" }, { "name": "ramsey/collection", - "version": "1.2.2", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a" + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/cccc74ee5e328031b15640b51056ee8d3bb66c0a", - "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a", + "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", "shasum": "" }, "require": { - "php": "^7.3 || ^8", - "symfony/polyfill-php81": "^1.23" + "php": "^8.1" }, "require-dev": { - "captainhook/captainhook": "^5.3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "ergebnis/composer-normalize": "^2.6", - "fakerphp/faker": "^1.5", - "hamcrest/hamcrest-php": "^2", - "jangregor/phpstan-prophecy": "^0.8", - "mockery/mockery": "^1.3", + "captainhook/plugin-composer": "^5.3", + "ergebnis/composer-normalize": "^2.28.3", + "fakerphp/faker": "^1.21", + "hamcrest/hamcrest-php": "^2.0", + "jangregor/phpstan-prophecy": "^1.0", + "mockery/mockery": "^1.5", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpcsstandards/phpcsutils": "^1.0.0-rc1", "phpspec/prophecy-phpunit": "^2.0", - "phpstan/extension-installer": "^1", - "phpstan/phpstan": "^0.12.32", - "phpstan/phpstan-mockery": "^0.12.5", - "phpstan/phpstan-phpunit": "^0.12.11", - "phpunit/phpunit": "^8.5 || ^9", - "psy/psysh": "^0.10.4", - "slevomat/coding-standard": "^6.3", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.4" + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18.4", + "ramsey/coding-standard": "^2.0.3", + "ramsey/conventional-commits": "^1.3", + "vimeo/psalm": "^5.4" }, "type": "library", + "extra": { + "captainhook": { + "force-install": true + }, + "ramsey/conventional-commits": { + "configFile": "conventional-commits.json" + } + }, "autoload": { "psr-4": { "Ramsey\\Collection\\": "src/" @@ -325,7 +467,7 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/1.2.2" + "source": "https://github.com/ramsey/collection/tree/2.0.0" }, "funding": [ { @@ -337,29 +479,27 @@ "type": "tidelift" } ], - "time": "2021-10-10T03:01:02+00:00" + "time": "2022-12-31T21:50:55+00:00" }, { "name": "ramsey/uuid", - "version": "4.2.3", + "version": "4.7.6", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df" + "reference": "91039bc1faa45ba123c4328958e620d382ec7088" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", - "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088", "shasum": "" }, "require": { - "brick/math": "^0.8 || ^0.9", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", "ext-json": "*", - "php": "^7.2 || ^8.0", - "ramsey/collection": "^1.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php80": "^1.14" + "php": "^8.0", + "ramsey/collection": "^1.2 || ^2.0" }, "replace": { "rhumsaa/uuid": "self.version" @@ -371,24 +511,23 @@ "doctrine/annotations": "^1.8", "ergebnis/composer-normalize": "^2.15", "mockery/mockery": "^1.3", - "moontoast/math": "^1.1", "paragonie/random-lib": "^2", "php-mock/php-mock": "^2.2", "php-mock/php-mock-mockery": "^1.3", "php-parallel-lint/php-parallel-lint": "^1.1", "phpbench/phpbench": "^1.0", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-mockery": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.1", "phpunit/phpunit": "^8.5 || ^9", - "slevomat/coding-standard": "^7.0", + "ramsey/composer-repl": "^1.4", + "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.5", "vimeo/psalm": "^4.9" }, "suggest": { "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", - "ext-ctype": "Enables faster processing of character classification using ctype functions.", "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", @@ -396,20 +535,17 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "4.x-dev" - }, "captainhook": { "force-install": true } }, "autoload": { - "psr-4": { - "Ramsey\\Uuid\\": "src/" - }, "files": [ "src/functions.php" - ] + ], + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -423,7 +559,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.2.3" + "source": "https://github.com/ramsey/uuid/tree/4.7.6" }, "funding": [ { @@ -435,33 +571,33 @@ "type": "tidelift" } ], - "time": "2021-09-25T23:10:38+00:00" + "time": "2024-04-27T21:32:50+00:00" }, { "name": "rct567/dom-query", - "version": "v0.8", + "version": "v1.1", "source": { "type": "git", "url": "https://github.com/Rct567/DomQuery.git", - "reference": "15208bd61f0b87d3befa795a38e5b47a3dbebb97" + "reference": "15b663353cd791097d9f679b3b8bc0471a01d72d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Rct567/DomQuery/zipball/15208bd61f0b87d3befa795a38e5b47a3dbebb97", - "reference": "15208bd61f0b87d3befa795a38e5b47a3dbebb97", + "url": "https://api.github.com/repos/Rct567/DomQuery/zipball/15b663353cd791097d9f679b3b8bc0471a01d72d", + "reference": "15b663353cd791097d9f679b3b8bc0471a01d72d", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", "ext-xml": "*", - "php": "^7.0.0" + "php": "^7.2.0||^8.0.0" }, "require-dev": { - "phpstan/phpstan": "^0.8", - "phpunit/php-code-coverage": "^5.3", - "phpunit/phpunit": "^6.5", - "squizlabs/php_codesniffer": "^3.1" + "phpstan/phpstan": "^1.10", + "phpunit/php-code-coverage": "^7.0||^9.0", + "phpunit/phpunit": "^8.5||^9.3", + "squizlabs/php_codesniffer": "^3.7" }, "type": "library", "autoload": { @@ -490,27 +626,100 @@ ], "support": { "issues": "https://github.com/Rct567/DomQuery/issues", - "source": "https://github.com/Rct567/DomQuery/tree/v0.8" + "source": "https://github.com/Rct567/DomQuery/tree/v1.1" + }, + "time": "2024-01-18T20:32:27+00:00" + }, + { + "name": "symfony/clock", + "version": "v7.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/clock.git", + "reference": "2008671acb4a30b01c453de193cf9c80549ebda6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/clock/zipball/2008671acb4a30b01c453de193cf9c80549ebda6", + "reference": "2008671acb4a30b01c453de193cf9c80549ebda6", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/clock": "^1.0", + "symfony/polyfill-php83": "^1.28" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/now.php" + ], + "psr-4": { + "Symfony\\Component\\Clock\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Decouples applications from the system clock", + "homepage": "https://symfony.com", + "keywords": [ + "clock", + "psr20", + "time" + ], + "support": { + "source": "https://github.com/symfony/clock/tree/v7.0.7" }, - "time": "2019-05-13T13:28:13+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/css-selector", - "version": "v5.4.0", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "44b933f98bb4b5220d10bed9ce5662f8c2d13dcc" + "reference": "b08a4ad89e84b29cec285b7b1f781a7ae51cf4bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/44b933f98bb4b5220d10bed9ce5662f8c2d13dcc", - "reference": "44b933f98bb4b5220d10bed9ce5662f8c2d13dcc", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/b08a4ad89e84b29cec285b7b1f781a7ae51cf4bc", + "reference": "b08a4ad89e84b29cec285b7b1f781a7ae51cf4bc", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -542,7 +751,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.4.0" + "source": "https://github.com/symfony/css-selector/tree/v7.0.7" }, "funding": [ { @@ -558,29 +767,29 @@ "type": "tidelift" } ], - "time": "2021-09-09T08:06:01+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.0", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -609,7 +818,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" }, "funding": [ { @@ -625,50 +834,53 @@ "type": "tidelift" } ], - "time": "2021-07-12T14:48:14+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/http-client", - "version": "v5.4.1", + "version": "v6.4.7", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "78b69fc4532253f3025db7f2429d8765e506cbf2" + "reference": "3683d8107cf1efdd24795cc5f7482be1eded34ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/78b69fc4532253f3025db7f2429d8765e506cbf2", - "reference": "78b69fc4532253f3025db7f2429d8765e506cbf2", + "url": "https://api.github.com/repos/symfony/http-client/zipball/3683d8107cf1efdd24795cc5f7482be1eded34ac", + "reference": "3683d8107cf1efdd24795cc5f7482be1eded34ac", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/http-client-contracts": "^2.4", - "symfony/polyfill-php73": "^1.11", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.0|^2|^3" + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/http-client-contracts": "^3.4.1", + "symfony/service-contracts": "^2.5|^3" + }, + "conflict": { + "php-http/discovery": "<1.15", + "symfony/http-foundation": "<6.3" }, "provide": { "php-http/async-client-implementation": "*", "php-http/client-implementation": "*", "psr/http-client-implementation": "1.0", - "symfony/http-client-implementation": "2.4" + "symfony/http-client-implementation": "3.0" }, "require-dev": { "amphp/amp": "^2.5", "amphp/http-client": "^4.2.1", "amphp/http-tunnel": "^1.0", "amphp/socket": "^1.1", - "guzzlehttp/promises": "^1.4", + "guzzlehttp/promises": "^1.4|^2.0", "nyholm/psr7": "^1.0", "php-http/httplug": "^1.0|^2.0", "psr/http-client": "^1.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^4.4.13|^5.1.5|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0" + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -695,8 +907,11 @@ ], "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", "homepage": "https://symfony.com", + "keywords": [ + "http" + ], "support": { - "source": "https://github.com/symfony/http-client/tree/v5.4.1" + "source": "https://github.com/symfony/http-client/tree/v6.4.7" }, "funding": [ { @@ -712,32 +927,29 @@ "type": "tidelift" } ], - "time": "2021-12-01T15:04:08+00:00" + "time": "2024-04-18T09:22:46+00:00" }, { "name": "symfony/http-client-contracts", - "version": "v2.5.0", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "ec82e57b5b714dbb69300d348bd840b345e24166" + "reference": "20414d96f391677bf80078aa55baece78b82647d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/ec82e57b5b714dbb69300d348bd840b345e24166", - "reference": "ec82e57b5b714dbb69300d348bd840b345e24166", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/20414d96f391677bf80078aa55baece78b82647d", + "reference": "20414d96f391677bf80078aa55baece78b82647d", "shasum": "" }, "require": { - "php": ">=7.2.5" - }, - "suggest": { - "symfony/http-client-implementation": "" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -747,7 +959,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\HttpClient\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -774,7 +989,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/http-client-contracts/tree/v3.5.0" }, "funding": [ { @@ -790,45 +1005,45 @@ "type": "tidelift" } ], - "time": "2021-11-03T09:24:47+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "name": "symfony/polyfill-mbstring", + "version": "v1.29.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, "suggest": { - "ext-ctype": "For best performance" + "ext-mbstring": "For best performance" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -836,24 +1051,25 @@ ], "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for ctype functions", + "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "ctype", + "mbstring", "polyfill", - "portable" + "portable", + "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -869,44 +1085,41 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", + "name": "symfony/polyfill-php80", + "version": "v1.29.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { "php": ">=7.1" }, - "suggest": { - "ext-mbstring": "For best performance" - }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -914,6 +1127,10 @@ "MIT" ], "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -923,17 +1140,16 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "mbstring", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" }, "funding": [ { @@ -949,42 +1165,40 @@ "type": "tidelift" } ], - "time": "2021-05-27T12:26:48+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.23.0", + "name": "symfony/polyfill-php83", + "version": "v1.29.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" + "url": "https://github.com/symfony/polyfill-php83.git", + "reference": "86fcae159633351e5fd145d1c47de6c528f8caff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/86fcae159633351e5fd145d1c47de6c528f8caff", + "reference": "86fcae159633351e5fd145d1c47de6c528f8caff", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.1", + "symfony/polyfill-php80": "^1.14" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php83\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -1003,7 +1217,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -1012,7 +1226,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.29.0" }, "funding": [ { @@ -1028,127 +1242,46 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.23.1", + "name": "symfony/service-contracts", + "version": "v3.5.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" + "url": "https://github.com/symfony/service-contracts.git", + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "3.5-dev" }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" + "Symfony\\Contracts\\Service\\": "" }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-07-28T13:41:28+00:00" - }, - { - "name": "symfony/polyfill-php81", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "e66119f3de95efc359483f810c4c3e6436279436" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/e66119f3de95efc359483f810c4c3e6436279436", - "reference": "e66119f3de95efc359483f810c4c3e6436279436", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" + "exclude-from-classmap": [ + "/Test/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1165,87 +1298,6 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-21T13:25:03+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v2.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], "description": "Generic abstractions related to writing services", "homepage": "https://symfony.com", "keywords": [ @@ -1257,7 +1309,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" }, "funding": [ { @@ -1273,57 +1325,54 @@ "type": "tidelift" } ], - "time": "2021-11-04T16:48:04+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/translation", - "version": "v5.4.1", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "8c82cd35ed861236138d5ae1c78c0c7ebcd62107" + "reference": "1515e03afaa93e6419aba5d5c9d209159317100b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/8c82cd35ed861236138d5ae1c78c0c7ebcd62107", - "reference": "8c82cd35ed861236138d5ae1c78c0c7ebcd62107", + "url": "https://api.github.com/repos/symfony/translation/zipball/1515e03afaa93e6419aba5d5c9d209159317100b", + "reference": "1515e03afaa93e6419aba5d5c9d209159317100b", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/translation-contracts": "^2.3" + "symfony/translation-contracts": "^2.5|^3.0" }, "conflict": { - "symfony/config": "<4.4", - "symfony/console": "<5.3", - "symfony/dependency-injection": "<5.0", - "symfony/http-kernel": "<5.0", - "symfony/twig-bundle": "<5.0", - "symfony/yaml": "<4.4" + "symfony/config": "<6.4", + "symfony/console": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/http-client-contracts": "<2.5", + "symfony/http-kernel": "<6.4", + "symfony/service-contracts": "<2.5", + "symfony/twig-bundle": "<6.4", + "symfony/yaml": "<6.4" }, "provide": { - "symfony/translation-implementation": "2.3" + "symfony/translation-implementation": "2.3|3.0" }, "require-dev": { + "nikic/php-parser": "^4.18|^5.0", "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/dependency-injection": "^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/http-client-contracts": "^1.1|^2.0|^3.0", - "symfony/http-kernel": "^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", + "symfony/config": "^6.4|^7.0", + "symfony/console": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", + "symfony/http-client-contracts": "^2.5|^3.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", "symfony/polyfill-intl-icu": "^1.21", - "symfony/service-contracts": "^1.1.2|^2|^3", - "symfony/yaml": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log-implementation": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" + "symfony/routing": "^6.4|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1354,7 +1403,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.4.1" + "source": "https://github.com/symfony/translation/tree/v7.0.7" }, "funding": [ { @@ -1370,32 +1419,29 @@ "type": "tidelift" } ], - "time": "2021-12-05T20:33:52+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.5.0", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "d28150f0f44ce854e942b671fc2620a98aae1b1e" + "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/d28150f0f44ce854e942b671fc2620a98aae1b1e", - "reference": "d28150f0f44ce854e942b671fc2620a98aae1b1e", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", + "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", "shasum": "" }, "require": { - "php": ">=7.2.5" - }, - "suggest": { - "symfony/translation-implementation": "" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -1405,7 +1451,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Translation\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1432,7 +1481,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.5.0" }, "funding": [ { @@ -1448,35 +1497,36 @@ "type": "tidelift" } ], - "time": "2021-08-17T14:20:01+00:00" + "time": "2024-04-18T09:32:20+00:00" } ], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.4.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" }, "type": "library", "autoload": { @@ -1503,7 +1553,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" }, "funding": [ { @@ -1519,41 +1569,42 @@ "type": "tidelift" } ], - "time": "2020-11-10T18:47:58+00:00" + "time": "2022-12-30T00:23:10+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1569,7 +1620,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -1577,38 +1628,45 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2023-03-08T13:26:56+00:00" }, { - "name": "phar-io/manifest", - "version": "1.0.1", + "name": "nikic/php-parser", + "version": "v5.0.2", "source": { "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-phar": "*", - "phar-io/version": "^1.0.1", - "php": "^5.6 || ^7.0" + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, + "bin": [ + "bin/php-parse" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "5.0-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1616,46 +1674,48 @@ ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" + "name": "Nikita Popov" } ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/master" + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" }, - "time": "2017-03-05T18:14:27+00:00" + "time": "2024-03-05T20:51:40+00:00" }, { - "name": "phar-io/version", - "version": "1.0.1", + "name": "phar-io/manifest", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1682,276 +1742,172 @@ "role": "Developer" } ], - "description": "Library for handling version information and constraints", + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/master" - }, - "time": "2017-03-05T17:38:23+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "funding": [ { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" + "url": "https://github.com/theseer", + "type": "github" } ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" + "time": "2024-03-03T12:33:53+00:00" }, { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", + "name": "phar-io/version", + "version": "3.2.1", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" + "php": "^7.2 || ^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" }, { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.5.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", - "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" } ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "description": "Library for handling version information and constraints", "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2021-10-02T14:08:47+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { - "name": "phpspec/prophecy", - "version": "v1.10.3", + "name": "phpunit/php-code-coverage", + "version": "9.2.31", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "451c3cd1418cf640de218914901e51b064abb093" + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", - "reference": "451c3cd1418cf640de218914901e51b064abb093", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.10.x-dev" + "dev-master": "9.2-dev" } }, "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" + "coverage", + "testing", + "xunit" ], "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.10.3" + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" }, - "time": "2020-03-05T15:02:03+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:37:42+00:00" }, { - "name": "phpunit/php-code-coverage", - "version": "5.3.2", + "name": "phpunit/php-file-iterator", + "version": "3.0.6", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "c89677919c5dd6d3b3852f230a663118762218ac" + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac", - "reference": "c89677919c5dd6d3b3852f230a663118762218ac", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": "^7.0", - "phpunit/php-file-iterator": "^1.4.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^2.0.1", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.0", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "suggest": { - "ext-xdebug": "^2.5.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1970,40 +1926,52 @@ "role": "lead" } ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", "keywords": [ - "coverage", - "testing", - "xunit" + "filesystem", + "iterator" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/5.3" + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" }, - "time": "2018-04-06T15:36:58+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" }, { - "name": "phpunit/php-file-iterator", - "version": "1.4.5", + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2018,41 +1986,53 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", "keywords": [ - "filesystem", - "iterator" + "process" ], "support": { - "irc": "irc://irc.freenode.net/phpunit", - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/1.4.5" + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" }, - "time": "2017-11-27T13:52:08+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" }, { "name": "phpunit/php-text-template", - "version": "1.2.1", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -2076,34 +2056,40 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" }, - "time": "2015-06-21T13:50:34+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" }, { "name": "phpunit/php-timer", - "version": "1.0.9", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2118,7 +2104,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -2129,38 +2115,76 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/master" + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" }, - "time": "2017-02-26T11:10:40+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "2.0.2", + "name": "phpunit/phpunit", + "version": "9.6.19", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "791198a2c6254db10131eecfe8c06670700904db" + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", - "reference": "791198a2c6254db10131eecfe8c06670700904db", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8", + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": "^7.0" + "doctrine/instantiator": "^1.3.1 || ^2", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.28", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.8", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.5", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.2", + "sebastian/version": "^3.0.2" }, - "require-dev": { - "phpunit/phpunit": "^6.2.4" + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, + "bin": [ + "phpunit" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "9.6-dev" } }, "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], "classmap": [ "src/" ] @@ -2172,78 +2196,62 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", "keywords": [ - "tokenizer" + "phpunit", + "testing", + "xunit" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", - "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19" }, - "abandoned": true, - "time": "2017-11-27T05:48:46+00:00" + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2024-04-05T04:35:58+00:00" }, { - "name": "phpunit/phpunit", - "version": "6.5.14", + "name": "sebastian/cli-parser", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7" + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bac23fe7ff13dbdb461481f706f0e9fe746334b7", - "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", "shasum": "" }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "myclabs/deep-copy": "^1.6.1", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", - "php": "^7.0", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^5.3", - "phpunit/php-file-iterator": "^1.4.3", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^1.0.9", - "phpunit/phpunit-mock-objects": "^5.0.9", - "sebastian/comparator": "^2.1", - "sebastian/diff": "^2.0", - "sebastian/environment": "^3.1", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^1.0", - "sebastian/version": "^2.0.1" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2", - "phpunit/dbunit": "<3.0" + "require": { + "php": ">=7.3" }, "require-dev": { - "ext-pdo": "*" - }, - "suggest": { - "ext-xdebug": "*", - "phpunit/php-invoker": "^1.1" + "phpunit/phpunit": "^9.3" }, - "bin": [ - "phpunit" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "6.5.x-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -2262,52 +2270,44 @@ "role": "lead" } ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/6.5.14" + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" }, - "time": "2019-02-01T05:22:47+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:27:43+00:00" }, { - "name": "phpunit/phpunit-mock-objects", - "version": "5.0.10", + "name": "sebastian/code-unit", + "version": "1.0.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f" + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/cd1cf05c553ecfec36b170070573e540b67d3f1f", - "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.5", - "php": "^7.0", - "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.1" - }, - "conflict": { - "phpunit/phpunit": "<6.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.5.11" - }, - "suggest": { - "ext-soap": "*" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0.x-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -2326,43 +2326,44 @@ "role": "lead" } ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { - "issues": "https://github.com/sebastianbergmann/phpunit-mock-objects/issues", - "source": "https://github.com/sebastianbergmann/phpunit-mock-objects/tree/5.0.10" + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" }, - "abandoned": true, - "time": "2018-08-09T05:50:03+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2384,7 +2385,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" }, "funding": [ { @@ -2392,34 +2393,34 @@ "type": "github" } ], - "time": "2020-11-30T08:15:22+00:00" + "time": "2020-09-28T05:30:19+00:00" }, { "name": "sebastian/comparator", - "version": "2.1.3", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", - "sebastian/exporter": "^3.1" + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2432,6 +2433,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -2443,10 +2448,6 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", @@ -2458,29 +2459,36 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/master" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, - "time": "2018-02-01T13:46:46+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" }, { - "name": "sebastian/diff", - "version": "2.0.1", + "name": "sebastian/complexity", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { - "php": "^7.0" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { @@ -2499,49 +2507,118 @@ ], "authors": [ { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:19:30+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "diff" + "diff", + "udiff", + "unidiff", + "unified diff" ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/master" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, - "time": "2017-08-03T08:09:46+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:30:58+00:00" }, { "name": "sebastian/environment", - "version": "3.1.0", + "version": "5.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.1" + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2568,36 +2645,42 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/master" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, - "time": "2017-07-01T08:51:00+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:03:51+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.4", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db" + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2632,14 +2715,14 @@ } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, "funding": [ { @@ -2647,27 +2730,30 @@ "type": "github" } ], - "time": "2021-11-11T13:51:24+00:00" + "time": "2024-03-02T06:33:00+00:00" }, { "name": "sebastian/global-state", - "version": "2.0.0", + "version": "5.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "ext-dom": "*", + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-uopz": "*" @@ -2675,7 +2761,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2700,36 +2786,99 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/2.0.0" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:35:11+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" }, - "time": "2017-04-27T15:39:26+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:20:34+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.4", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2751,7 +2900,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" }, "funding": [ { @@ -2759,32 +2908,32 @@ "type": "github" } ], - "time": "2020-11-30T07:40:27+00:00" + "time": "2020-10-26T13:12:34+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2806,7 +2955,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" }, "funding": [ { @@ -2814,32 +2963,32 @@ "type": "github" } ], - "time": "2020-11-30T07:37:18+00:00" + "time": "2020-10-26T13:14:26+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.1", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2866,10 +3015,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { @@ -2877,29 +3026,32 @@ "type": "github" } ], - "time": "2020-11-30T07:34:24+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { "name": "sebastian/resource-operations", - "version": "1.0.0", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { - "php": ">=5.6.0" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2920,32 +3072,40 @@ "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/master" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" }, - "time": "2015-07-28T20:34:47+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-14T16:00:52+00:00" }, { - "name": "sebastian/version", - "version": "2.0.1", + "name": "sebastian/type", + "version": "3.2.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -2964,35 +3124,43 @@ "role": "lead" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/master" + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" }, - "time": "2016-10-03T07:35:21+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:13:03+00:00" }, { - "name": "theseer/tokenizer", - "version": "1.2.1", + "name": "sebastian/version", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" + "php": ">=7.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -3004,81 +3172,74 @@ ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" }, "funding": [ { - "url": "https://github.com/theseer", + "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2020-09-28T06:39:44+00:00" }, { - "name": "webmozart/assert", - "version": "1.10.0", + "name": "theseer/tokenizer", + "version": "1.2.3", "source": { "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" } ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, - "time": "2021-03-09T10:59:23+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:36:25+00:00" } ], "aliases": [], @@ -3087,8 +3248,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.2" + "php": "^8.3" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.6.0" } diff --git a/docker/conf.d/app.dev.ini b/docker/conf.d/app.dev.ini new file mode 100644 index 0000000..e50f43d --- /dev/null +++ b/docker/conf.d/app.dev.ini @@ -0,0 +1,5 @@ +; See https://docs.docker.com/desktop/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host +; See https://github.com/docker/for-linux/issues/264 +; The `client_host` below may optionally be replaced with `discover_client_host=yes` +; Add `start_with_request=yes` to start debug session on each request +xdebug.client_host = host.docker.internal diff --git a/docker/conf.d/app.ini b/docker/conf.d/app.ini new file mode 100644 index 0000000..c48fd68 --- /dev/null +++ b/docker/conf.d/app.ini @@ -0,0 +1,13 @@ +variables_order = EGPCS +expose_php = 0 +date.timezone = UTC +apc.enable_cli = 1 +session.use_strict_mode = 1 +zend.detect_unicode = 0 + +realpath_cache_size = 4096K +realpath_cache_ttl = 600 +opcache.interned_strings_buffer = 16 +opcache.max_accelerated_files = 20000 +opcache.memory_consumption = 256 +opcache.enable_file_override = 1 diff --git a/docker/conf.d/app.prod.ini b/docker/conf.d/app.prod.ini new file mode 100644 index 0000000..3bcaa71 --- /dev/null +++ b/docker/conf.d/app.prod.ini @@ -0,0 +1,2 @@ +opcache.preload_user = root +opcache.preload = /app/config/preload.php diff --git a/export/achievements/.gitkeep b/export/achievements/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/export/banners/.gitkeep b/export/banners/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/export/character/.gitkeep b/export/character/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/export/characterfull/.gitkeep b/export/characterfull/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/export/cwlinkshell/.gitkeep b/export/cwlinkshell/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/export/freecompany/.gitkeep b/export/freecompany/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/export/leaderboards/.gitkeep b/export/leaderboards/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/export/linkshell/.gitkeep b/export/linkshell/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/export/pvpteam/.gitkeep b/export/pvpteam/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/Lodestone/Api/ApiAbstract.php b/src/Lodestone/Api/ApiAbstract.php index 3d923d2..e63b75c 100644 --- a/src/Lodestone/Api/ApiAbstract.php +++ b/src/Lodestone/Api/ApiAbstract.php @@ -2,6 +2,7 @@ namespace Lodestone\Api; +use Lodestone\Enum\LocaleEnum; use Lodestone\Http\Http; use Lodestone\Http\Request; use Lodestone\Http\RequestConfig; @@ -14,7 +15,7 @@ class ApiAbstract [' ', "'"], ]; - protected $http; + protected Http $http; public function __construct() { @@ -24,15 +25,40 @@ public function __construct() /** * Handle a request */ - protected function handle(string $parser, array $requestOptions) - { + protected function handle( + string $parser, + array $requestOptions, + array $extraRequestOptions = [], + string $locale = LocaleEnum::EN->value, + ) { if(!isset($requestOptions['user-agent'])) { $requestOptions['user-agent'] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36"; } $request = new Request($requestOptions); - /** @var ResponseInterface $response */ - $response = $this->http->request($parser, $request); + if (!empty($extraRequestOptions)) { + $extraRequestOptions['request']['user-agent'] = $requestOptions['user-agent']; + $extraRequest = new Request($extraRequestOptions['request']); + + /** @var ResponseInterface $response */ + $response = $this->http->request( + parser: $parser, + request: $request, + extraRequestOptions: [ + 'parser' => $extraRequestOptions['parser'], + 'request' => $extraRequest, + 'dataTarget' => $extraRequestOptions['dataTarget'], + ], + locale: $locale, + ); + } else { + /** @var ResponseInterface $response */ + $response = $this->http->request( + parser: $parser, + request: $request, + locale: $locale, + ); + } if (RequestConfig::$isAsync) { return null; diff --git a/src/Lodestone/Api/Character.php b/src/Lodestone/Api/Character.php index 3578e86..b8b25bb 100644 --- a/src/Lodestone/Api/Character.php +++ b/src/Lodestone/Api/Character.php @@ -2,6 +2,7 @@ namespace Lodestone\Api; +use Lodestone\Entity\LodestoneDataInterface; use Lodestone\Parser\ParseCharacter; use Lodestone\Parser\ParseCharacterAchievements; use Lodestone\Parser\ParseCharacterClassJobs; @@ -13,10 +14,11 @@ class Character extends ApiAbstract { - public function search(string $name, string $server = null, int $page = 1) + public function search(string $name, string $server = null, int $page = 1): LodestoneDataInterface { $name = str_ireplace(self::STRING_FIXES[0], self::STRING_FIXES[1], $name); + /** @var LodestoneDataInterface */ return $this->handle(ParseCharacterSearch::class, [ 'endpoint' => "/lodestone/character", 'query' => [ @@ -27,33 +29,64 @@ public function search(string $name, string $server = null, int $page = 1) ]); } - public function get(int $id) - { - return $this->handle(ParseCharacter::class, [ - 'endpoint' => "/lodestone/character/{$id}", - ]); + public function get( + int $id, + string $locale, + ): LodestoneDataInterface { + /** @var LodestoneDataInterface */ + return $this->handle( + parser: ParseCharacter::class, + requestOptions: [ + 'endpoint' => "/lodestone/character/{$id}", + ], + locale: $locale, + ); + } + + public function getFull( + int $id, + string $locale, + ): LodestoneDataInterface { + /** @var LodestoneDataInterface */ + return $this->handle( + parser: ParseCharacter::class, + requestOptions: [ + 'endpoint' => "/lodestone/character/{$id}", + ], + extraRequestOptions: [ + 'parser' => ParseCharacterClassJobs::class, + 'request' => [ + 'endpoint' => "/lodestone/character/{$id}/class_job", + ], + 'dataTarget' => 'ClassJobs', + ], + locale: $locale, + ); } - public function friends(int $id, int $page = 1) + public function friends(int $id, int $page = 1): LodestoneDataInterface { + /** @var LodestoneDataInterface */ return $this->handle(ParseCharacterFriends::class, [ 'endpoint' => "/lodestone/character/{$id}/friend", 'query' => [ - 'page' => $page - ] + 'page' => $page, + ], ]); } - public function minions(int $id) + public function minions(int $id): array { + /** @var LodestoneDataInterface[] */ return $this->handle(ParseCharacterMinions::class, [ 'endpoint' => "/lodestone/character/{$id}/minion", 'user-agent' => 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.76 Mobile Safari/537.36' ]); } - public function mounts(int $id) + public function mounts(int $id): array { + /** @var LodestoneDataInterface[] */ return $this->handle(ParseCharacterMounts::class, [ 'endpoint' => "/lodestone/character/{$id}/mount", 'user-agent' => 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.76 Mobile Safari/537.36' @@ -78,10 +111,18 @@ public function following(int $id, int $page = 1) ]); } - public function achievements(int $id, int $kindId = 1) - { - return $this->handle(ParseCharacterAchievements::class, [ - 'endpoint' => "/lodestone/character/{$id}/achievement/kind/{$kindId}/", - ]); + public function achievements( + int $id, + string $locale, + int $kindId = 1, + ): LodestoneDataInterface { + /** @var LodestoneDataInterface */ + return $this->handle( + parser: ParseCharacterAchievements::class, + requestOptions: [ + 'endpoint' => "/lodestone/character/{$id}/achievement/kind/{$kindId}/", + ], + locale: $locale, + ); } } diff --git a/src/Lodestone/Api/FreeCompany.php b/src/Lodestone/Api/FreeCompany.php index cad6a0c..ab309da 100644 --- a/src/Lodestone/Api/FreeCompany.php +++ b/src/Lodestone/Api/FreeCompany.php @@ -2,16 +2,21 @@ namespace Lodestone\Api; +use Lodestone\Entity\LodestoneDataInterface; use Lodestone\Parser\ParseFreeCompany; use Lodestone\Parser\ParseFreeCompanyMembers; use Lodestone\Parser\ParseFreeCompanySearch; class FreeCompany extends ApiAbstract { - public function search(string $name, string $server = null, int $page = 1) - { + public function search( + string $name, + string $server = null, + int $page = 1 + ): LodestoneDataInterface { $name = str_ireplace(self::STRING_FIXES[0], self::STRING_FIXES[1], $name); + /** @var LodestoneDataInterface */ return $this->handle(ParseFreeCompanySearch::class, [ 'endpoint' => "/lodestone/freecompany", 'query' => [ @@ -22,15 +27,25 @@ public function search(string $name, string $server = null, int $page = 1) ]); } - public function get(string $id) - { - return $this->handle(ParseFreeCompany::class, [ - 'endpoint' => "/lodestone/freecompany/{$id}", - ]); + public function get( + string $id, + string $locale, + ): LodestoneDataInterface { + /** @var LodestoneDataInterface */ + return $this->handle( + parser: ParseFreeCompany::class, + requestOptions: [ + 'endpoint' => "/lodestone/freecompany/{$id}", + ], + locale: $locale, + ); } - public function members(string $id, int $page = 1) - { + public function members( + string $id, + int $page = 1 + ): LodestoneDataInterface { + /** @var LodestoneDataInterface */ return $this->handle(ParseFreeCompanyMembers::class, [ 'endpoint' => "/lodestone/freecompany/{$id}/member", 'query' => [ diff --git a/src/Lodestone/Api/Linkshell.php b/src/Lodestone/Api/Linkshell.php index be33224..7a2160f 100644 --- a/src/Lodestone/Api/Linkshell.php +++ b/src/Lodestone/Api/Linkshell.php @@ -22,37 +22,59 @@ public function search(string $name, string $server = null, int $page = 1) ]); } - public function searchCrossWorld(string $name, string $server = null, int $page = 1) - { + public function searchCrossWorld( + string $name, + string $server = null, + int $page = 1, + string $locale, + ) { $name = str_ireplace(self::STRING_FIXES[0], self::STRING_FIXES[1], $name); - return $this->handle(ParseLinkshellSearch::class, [ - 'endpoint' => "/lodestone/crossworld_linkshell", - 'query' => [ - 'q' => '"' . $name . '"', - 'worldname' => $server, - 'page' => $page - ] - ]); + return $this->handle( + parser: ParseLinkshellSearch::class, + requestOptions: [ + 'endpoint' => "/lodestone/crossworld_linkshell", + 'query' => [ + 'q' => '"' . $name . '"', + 'worldname' => $server, + 'page' => $page + ] + ], + locale: $locale, + ); } - public function get(string $id, int $page = 1) - { - return $this->handle(ParseLinkshellMembers::class, [ - 'endpoint' => "/lodestone/linkshell/{$id}", - 'query' => [ - 'page' => $page - ] - ]); + public function get( + string $id, + string $locale, + int $page = 1, + ) { + return $this->handle( + parser: ParseLinkshellMembers::class, + requestOptions: [ + 'endpoint' => "/lodestone/linkshell/{$id}", + 'query' => [ + 'page' => $page + ] + ], + locale: $locale, + ); } - public function getCrossWorld(string $id, int $page = 1) - { - return $this->handle(ParseLinkshellCWMembers::class, [ - 'endpoint' => "/lodestone/crossworld_linkshell/{$id}", - 'query' => [ - 'page' => $page - ] - ]); + public function getCrossWorld( + string $id, + int $page = 1, + string $locale, + ) { + return $this->handle( + parser: ParseLinkshellCWMembers::class, + requestOptions: [ + 'endpoint' => "/lodestone/crossworld_linkshell/{$id}", + 'query' => [ + 'page' => $page + ] + ], + locale: $locale, + ); } } diff --git a/src/Lodestone/Entity/Character/Achievement.php b/src/Lodestone/Entity/Character/Achievement.php index 02fd6f6..eb37cc2 100644 --- a/src/Lodestone/Entity/Character/Achievement.php +++ b/src/Lodestone/Entity/Character/Achievement.php @@ -6,9 +6,9 @@ class Achievement extends AbstractEntity { - public $ID; - public $Name; - public $Icon; - public $Points = 0; - public $ObtainedTimestamp; + public int $ID; + public string $Name; + public string $Icon; + public int $Points = 0; + public int $ObtainedTimestamp; } diff --git a/src/Lodestone/Entity/Character/Achievements.php b/src/Lodestone/Entity/Character/Achievements.php index 0c6b6f7..36f434c 100644 --- a/src/Lodestone/Entity/Character/Achievements.php +++ b/src/Lodestone/Entity/Character/Achievements.php @@ -3,11 +3,13 @@ namespace Lodestone\Entity\Character; use Lodestone\Entity\AbstractEntity; +use Lodestone\Entity\LodestoneDataInterface; -class Achievements extends AbstractEntity +class Achievements extends AbstractEntity implements LodestoneDataInterface { - public $Achievements = []; - public $ParseDate; + /** @var Achievement[] */ + public array $Achievements = []; + public int $ParseDate; public function __construct() { diff --git a/src/Lodestone/Entity/Character/CharacterFriends.php b/src/Lodestone/Entity/Character/CharacterFriends.php index e698dac..a2e7f86 100644 --- a/src/Lodestone/Entity/Character/CharacterFriends.php +++ b/src/Lodestone/Entity/Character/CharacterFriends.php @@ -3,8 +3,9 @@ namespace Lodestone\Entity\Character; use Lodestone\Entity\AbstractEntity; +use Lodestone\Entity\LodestoneDataInterface; -class CharacterFriends extends AbstractEntity +class CharacterFriends extends AbstractEntity implements LodestoneDataInterface { public $ID; public $ParseDate; diff --git a/src/Lodestone/Entity/Character/CharacterFriendsFull.php b/src/Lodestone/Entity/Character/CharacterFriendsFull.php index 5077c2a..e7de27e 100644 --- a/src/Lodestone/Entity/Character/CharacterFriendsFull.php +++ b/src/Lodestone/Entity/Character/CharacterFriendsFull.php @@ -4,8 +4,9 @@ use Lodestone\Entity\AbstractEntity; use Lodestone\Entity\ListView\ListView; +use Lodestone\Entity\LodestoneDataInterface; -class CharacterFriendsFull extends AbstractEntity +class CharacterFriendsFull extends AbstractEntity implements LodestoneDataInterface { public $ID; /** @var array */ diff --git a/src/Lodestone/Entity/Character/CharacterProfile.php b/src/Lodestone/Entity/Character/CharacterProfile.php index 4bd6e94..40e9045 100644 --- a/src/Lodestone/Entity/Character/CharacterProfile.php +++ b/src/Lodestone/Entity/Character/CharacterProfile.php @@ -3,33 +3,34 @@ namespace Lodestone\Entity\Character; use Lodestone\Entity\AbstractEntity; +use Lodestone\Entity\LodestoneDataInterface; -class CharacterProfile extends AbstractEntity +class CharacterProfile extends AbstractEntity implements LodestoneDataInterface { - public $ID; - public $Name; - public $Server; - public $DC; - public $Title; - public $TitleTop; - public $Avatar; - public $Portrait; - public $Bio = ''; - public $Race; - public $Tribe; - public $Gender; - public $Nameday; - public $GuardianDeity; - public $Town; - public $GrandCompany; - public $FreeCompanyId; - public $FreeCompanyName; - public $PvPTeamId; - public $ClassJobs = []; - public $GearSet = []; // gear + attributes - public $ActiveClassJob; - public $ParseDate; - public $Lang; + public string $ID; + public string $Name; + public string $Server; + public string $DC; + public string $Title; + public bool $TitleTop; + public string $Avatar; + public string $Portrait; + public ?string $Bio = ''; + public string $Race; + public string $Tribe; + public string $Gender; + public string $Nameday; + public object $GuardianDeity; + public object $Town; + public object $GrandCompany; + public ?string $FreeCompanyId; + public ?string $FreeCompanyName; + public ?int $PvPTeamId; + public array $ClassJobs = []; + public array $GearSet = []; // gear + attributes + public object $ActiveClassJob; + public int $ParseDate; + public string $Lang; public function __construct() { diff --git a/src/Lodestone/Entity/Character/CharacterSimple.php b/src/Lodestone/Entity/Character/CharacterSimple.php index 4adaee0..2c8dd3c 100644 --- a/src/Lodestone/Entity/Character/CharacterSimple.php +++ b/src/Lodestone/Entity/Character/CharacterSimple.php @@ -6,12 +6,12 @@ class CharacterSimple extends AbstractEntity { - public $ID; - public $Name; - public $Lang; - public $Server; - public $Avatar; - public $Rank; - public $RankIcon; - public $FeastMatches = 0; + public string $ID; + public string $Name; + public string $Lang; + public string $Server; + public string $Avatar; + public string $Rank; + public string $RankIcon; + public int $FeastMatches = 0; } diff --git a/src/Lodestone/Entity/Character/ClassJob.php b/src/Lodestone/Entity/Character/ClassJob.php index 81df842..0dc6297 100644 --- a/src/Lodestone/Entity/Character/ClassJob.php +++ b/src/Lodestone/Entity/Character/ClassJob.php @@ -6,13 +6,13 @@ class ClassJob extends AbstractEntity { - public $Name; - public $ClassID; - public $JobID; - public $Level; - public $ExpLevel; - public $ExpLevelTogo; - public $ExpLevelMax; - public $IsSpecialised; - Public $UnlockedState; + public string $Name; + public int $ClassID; + public int $JobID; + public int $Level; + public int $ExpLevel; + public int $ExpLevelTogo; + public int $ExpLevelMax; + public bool $IsSpecialised; + public array $UnlockedState; } diff --git a/src/Lodestone/Entity/Character/Minion.php b/src/Lodestone/Entity/Character/Minion.php index a2cbe0a..66c169e 100644 --- a/src/Lodestone/Entity/Character/Minion.php +++ b/src/Lodestone/Entity/Character/Minion.php @@ -3,8 +3,9 @@ namespace Lodestone\Entity\Character; use Lodestone\Entity\AbstractEntity; +use Lodestone\Entity\LodestoneDataInterface; -class Minion extends AbstractEntity +class Minion extends AbstractEntity implements LodestoneDataInterface { public $Name; public $Icon; diff --git a/src/Lodestone/Entity/Character/Mount.php b/src/Lodestone/Entity/Character/Mount.php index d35f96f..2500983 100644 --- a/src/Lodestone/Entity/Character/Mount.php +++ b/src/Lodestone/Entity/Character/Mount.php @@ -3,8 +3,9 @@ namespace Lodestone\Entity\Character; use Lodestone\Entity\AbstractEntity; +use Lodestone\Entity\LodestoneDataInterface; -class Mount extends AbstractEntity +class Mount extends AbstractEntity implements LodestoneDataInterface { public $Name; public $Icon; diff --git a/src/Lodestone/Entity/FreeCompany/FreeCompany.php b/src/Lodestone/Entity/FreeCompany/FreeCompany.php index d4a53c4..7407c25 100644 --- a/src/Lodestone/Entity/FreeCompany/FreeCompany.php +++ b/src/Lodestone/Entity/FreeCompany/FreeCompany.php @@ -3,28 +3,29 @@ namespace Lodestone\Entity\FreeCompany; use Lodestone\Entity\AbstractEntity; +use Lodestone\Entity\LodestoneDataInterface; -class FreeCompany extends AbstractEntity +class FreeCompany extends AbstractEntity implements LodestoneDataInterface { - public $ID; - public $Crest = []; - public $GrandCompany; - public $Name; - public $Server; - public $DC; - public $Tag; - public $Formed; - public $ActiveMemberCount; - public $Rank; - public $Ranking; - public $Slogan; - public $Estate; - public $Reputation = []; + public int $ID; + public array $Crest = []; + public string $GrandCompany; + public string $Name; + public string $Server; + public string $DC; + public string $Tag; + public int $Formed; + public int $ActiveMemberCount; + public int $Rank; + public array $Ranking; + public string $Slogan; + public array $Estate; + public array $Reputation = []; public $Active; public $Recruitment; - public $Focus = []; - public $Seeking = []; - public $ParseDate; + public array $Focus = []; + public array $Seeking = []; + public int $ParseDate; public function __construct() { diff --git a/src/Lodestone/Entity/FreeCompany/FreeCompanyFull.php b/src/Lodestone/Entity/FreeCompany/FreeCompanyFull.php index b4e3323..c2bee91 100644 --- a/src/Lodestone/Entity/FreeCompany/FreeCompanyFull.php +++ b/src/Lodestone/Entity/FreeCompany/FreeCompanyFull.php @@ -7,11 +7,9 @@ class FreeCompanyFull extends AbstractEntity { - public $ID; - /** @var FreeCompany */ - public $Profile; - /** @var array */ - public $Members = []; + public int $ID; + public FreeCompany $Profile; + public array $Members = []; public function addMembers(ListView $list) { diff --git a/src/Lodestone/Entity/FreeCompany/FreeCompanyMembers.php b/src/Lodestone/Entity/FreeCompany/FreeCompanyMembers.php index 11adc75..1b62c78 100644 --- a/src/Lodestone/Entity/FreeCompany/FreeCompanyMembers.php +++ b/src/Lodestone/Entity/FreeCompany/FreeCompanyMembers.php @@ -6,8 +6,8 @@ class FreeCompanyMembers extends AbstractEntity { - public $ID; - public $ParseDate; + public int $ID; + public int $ParseDate; public function __construct() { diff --git a/src/Lodestone/Entity/FreeCompany/FreeCompanySimple.php b/src/Lodestone/Entity/FreeCompany/FreeCompanySimple.php index f63a47d..467ca9e 100644 --- a/src/Lodestone/Entity/FreeCompany/FreeCompanySimple.php +++ b/src/Lodestone/Entity/FreeCompany/FreeCompanySimple.php @@ -6,8 +6,8 @@ class FreeCompanySimple extends AbstractEntity { - public $ID; - public $Name; - public $Server; - public $Crest = []; + public string $ID; + public string $Name; + public string $Server; + public array $Crest = []; } diff --git a/src/Lodestone/Entity/ListView/ListView.php b/src/Lodestone/Entity/ListView/ListView.php index ac1373d..49c498b 100644 --- a/src/Lodestone/Entity/ListView/ListView.php +++ b/src/Lodestone/Entity/ListView/ListView.php @@ -3,14 +3,15 @@ namespace Lodestone\Entity\ListView; use Lodestone\Entity\AbstractEntity; +use Lodestone\Entity\LodestoneDataInterface; -class ListView extends AbstractEntity +class ListView extends AbstractEntity implements LodestoneDataInterface { /** @var Pagination */ public $Pagination; /** @var array */ public $Results = []; - + public function __construct() { $this->Pagination = new Pagination(); diff --git a/src/Lodestone/Entity/LodestoneDataInterface.php b/src/Lodestone/Entity/LodestoneDataInterface.php new file mode 100644 index 0000000..fbe7c08 --- /dev/null +++ b/src/Lodestone/Entity/LodestoneDataInterface.php @@ -0,0 +1,9 @@ +value, self::FR->value, self::DE->value, self::JA->value]; + } + + public static function isValid(string $locale): bool + { + return in_array($locale, self::getEnumValues(), true); + } +} diff --git a/src/Lodestone/Enum/LodestoneBaseUriEnum.php b/src/Lodestone/Enum/LodestoneBaseUriEnum.php new file mode 100644 index 0000000..5cd9cfe --- /dev/null +++ b/src/Lodestone/Enum/LodestoneBaseUriEnum.php @@ -0,0 +1,13 @@ + */ + const array ROLES = [ 0 => 'adventurer', 1 => 'gladiator', 2 => 'pugilist', @@ -47,7 +49,7 @@ class ClassJobs 37 => 'gunbreaker', 38 => 'dancer', 39 => 'reaper', - 40 => 'sage' + 40 => 'sage', ]; /** @@ -99,21 +101,35 @@ class ClassJobs 39 => [ 39, 39, ], 40 => [ 40, 40, ], ]; - - public static function findGameData($name) - { - [$ClassID, $JobID] = self::findClassJob($name); - - $className = self::ROLES[$ClassID]; - $jobName = self::ROLES[$JobID] ?? null; - - return (Object)[ + + public static function findGameData( + string $name, + string $locale, + ): object { + [$ClassID, $JobID] = self::findClassJob($name, $locale); + + $className = match ($locale) { + LocaleEnum::FR->value => ClassJobsFrench::ROLES[$ClassID], + LocaleEnum::DE->value => ClassJobsGerman::ROLES[$ClassID], + LocaleEnum::JA->value => ClassJobsJapanese::ROLES[$ClassID], + default => self::ROLES[$ClassID], + }; + + $jobName = match ($locale) { + LocaleEnum::EN->value => self::ROLES[$JobID], + LocaleEnum::FR->value => ClassJobsFrench::ROLES[$JobID], + LocaleEnum::DE->value => ClassJobsGerman::ROLES[$JobID], + LocaleEnum::JA->value => ClassJobsJapanese::ROLES[$JobID], + default => null, + }; + + return (object)[ 'Name' => "{$className} / {$jobName}", 'ClassID' => self::CLASS_JOB_LINKS[$ClassID][0], 'JobID' => self::CLASS_JOB_LINKS[$JobID][1] ?? null ]; } - + /** * Provides the correct role ID for a given role name, this * separates job/class. @@ -122,41 +138,55 @@ public static function findRoleIdFromName($name) { $name = strtolower($name); $array = array_flip(self::ROLES); - + return $array[$name] ?? null; } - + /** * Find class/job in the json data * - * @param $name * @return bool|object */ - private static function findClassJob($name) - { + private static function findClassJob( + string $name, + string $locale, + ): false|array { foreach(self::CLASS_JOB_LINKS as $classjob) { [$ClassID, $JobID] = $classjob; - - $className = self::ROLES[$ClassID] ?? null; - $jobName = self::ROLES[$JobID] ?? null; - + + $className = match ($locale) { + LocaleEnum::EN->value => self::ROLES[$ClassID], + LocaleEnum::FR->value => ClassJobsFrench::ROLES[$ClassID], + LocaleEnum::DE->value => ClassJobsGerman::ROLES[$ClassID], + LocaleEnum::JA->value => ClassJobsJapanese::ROLES[$ClassID], + default => null, + }; + + $jobName = match ($locale) { + LocaleEnum::EN->value => self::ROLES[$JobID], + LocaleEnum::FR->value => ClassJobsFrench::ROLES[$JobID], + LocaleEnum::DE->value => ClassJobsGerman::ROLES[$JobID], + LocaleEnum::JA->value => ClassJobsJapanese::ROLES[$JobID], + default => null, + }; + if ( - ($className && self::minifyname($name) == self::minifyname($className)) || - ($jobName && self::minifyname($name) == self::minifyname($jobName)) + ($className && self::minifyName($name) === self::minifyName($className)) || + ($jobName && self::minifyName($name) === self::minifyName($jobName)) ) { return $classjob; } } - + return false; } - + /** * @param $name * @return string */ - private static function minifyname($name) + private static function minifyName($name): string { - return trim(strtolower(str_ireplace(' ', null, $name))); + return mb_strtolower(trim(str_ireplace(" ", null, $name)), 'UTF-8'); } } diff --git a/src/Lodestone/Game/ClassJobsFrench.php b/src/Lodestone/Game/ClassJobsFrench.php new file mode 100644 index 0000000..1bd49c6 --- /dev/null +++ b/src/Lodestone/Game/ClassJobsFrench.php @@ -0,0 +1,54 @@ + */ + const array ROLES = [ + 0 => 'aventurier', + 1 => 'gladiateur', + 2 => 'pugiliste', + 3 => 'maraudeur', + 4 => 'maître d\'hast', + 5 => 'archer', + 6 => 'élémentaliste', + 7 => 'occultiste', + 8 => 'menuisier', + 9 => 'forgeron', + 10 => 'armurier', + 11 => 'orfèvre', + 12 => 'tanneur', + 13 => 'couturier', + 14 => 'alchimiste', + 15 => 'cuisinier', + 16 => 'mineur', + 17 => 'botaniste', + 18 => 'pêcheur', + 19 => 'paladin', + 20 => 'moine', + 21 => 'guerrier', + 22 => 'chevalier dragon', + 23 => 'barde', + 24 => 'mage blanc', + 25 => 'mage noir', + 26 => 'arcaniste', + 27 => 'invocateur', + 28 => 'érudit', + 29 => 'surineur', + 30 => 'ninja', + 31 => 'machiniste', + 32 => 'chevalier noir', + 33 => 'astromancien', + 34 => 'samouraï', + 35 => 'mage rouge', + 36 => 'mage bleu', + 37 => 'pistosabreur', + 38 => 'danseur', + 39 => 'faucheur', + 40 => 'sage', + ]; +} diff --git a/src/Lodestone/Game/ClassJobsGerman.php b/src/Lodestone/Game/ClassJobsGerman.php new file mode 100644 index 0000000..460e89d --- /dev/null +++ b/src/Lodestone/Game/ClassJobsGerman.php @@ -0,0 +1,54 @@ + */ + const array ROLES = [ + 0 => 'abenteurer', + 1 => 'gladiator', + 2 => 'faustkämpfer', + 3 => 'marodeur', + 4 => 'pikenier', + 5 => 'waldläufer', + 6 => 'druide', + 7 => 'thamaturg', + 8 => 'zimmerer', + 9 => 'grobschmied', + 10 => 'plattner', + 11 => 'goldschmied', + 12 => 'gerber', + 13 => 'weber', + 14 => 'alchemist', + 15 => 'gourmet', + 16 => 'minenarbeiter', + 17 => 'gärtner', + 18 => 'fischer', + 19 => 'paladin', + 20 => 'mönch', + 21 => 'krieger', + 22 => 'dragoon', + 23 => 'barde', + 24 => 'weißmagier', + 25 => 'schwarzmagier', + 26 => 'hermetiker', + 27 => 'beschwörer', + 28 => 'gelehrter', + 29 => 'schurke', + 30 => 'ninja', + 31 => 'maschinist', + 32 => 'dunkelritter', + 33 => 'astrologe', + 34 => 'samurai', + 35 => 'rotmagier', + 36 => 'blaumagier', + 37 => 'revolverklinge', + 38 => 'tänzer', + 39 => 'schnitter', + 40 => 'weiser' + ]; +} diff --git a/src/Lodestone/Game/ClassJobsJapanese.php b/src/Lodestone/Game/ClassJobsJapanese.php new file mode 100644 index 0000000..b3cbd78 --- /dev/null +++ b/src/Lodestone/Game/ClassJobsJapanese.php @@ -0,0 +1,54 @@ + */ + const array ROLES = [ + 0 => '冒険者', + 1 => '格闘士', + 2 => '斧術士', + 3 => '槍術士', + 4 => '槍術士', + 5 => '弓術士', + 6 => '幻術士', + 7 => '呪術士', + 8 => '木工師', + 9 => '鍛冶師', + 10 => '甲冑師', + 11 => '彫金師', + 12 => '革細工師', + 13 => '裁縫師', + 14 => '錬金術師', + 15 => '調理師', + 16 => '採掘師', + 17 => '園芸師', + 18 => '漁師', + 19 => 'ナイト', + 20 => 'モンク', + 21 => '戦士', + 22 => '竜騎士', + 23 => '吟遊詩人', + 24 => '白魔道士', + 25 => '黒魔道士', + 26 => '巴術士', + 27 => '召喚士', + 28 => '学者', + 29 => '双剣士', + 30 => '忍者', + 31 => '機工士', + 32 => '暗黒騎士', + 33 => '占星術師', + 34 => '侍', + 35 => '赤魔道士', + 36 => '青魔道士', + 37 => 'ガンブレイカー', + 38 => '踊り子', + 39 => 'リーパー', + 40 => '賢者' + ]; +} diff --git a/src/Lodestone/Http/Http.php b/src/Lodestone/Http/Http.php index 442ce80..a2e61c9 100644 --- a/src/Lodestone/Http/Http.php +++ b/src/Lodestone/Http/Http.php @@ -2,6 +2,8 @@ namespace Lodestone\Http; +use Lodestone\Enum\LocaleEnum; +use Lodestone\Enum\LodestoneBaseUriEnum; use Lodestone\Exceptions\LodestoneException; use Lodestone\Exceptions\LodestoneMaintenanceException; use Lodestone\Exceptions\LodestoneNotFoundException; @@ -9,19 +11,21 @@ use Lodestone\Parser\Parser; use Ramsey\Uuid\Uuid; use Symfony\Component\HttpClient\CurlHttpClient; +use Symfony\Contracts\HttpClient\ResponseInterface; class Http { - const BASE_URI = 'https://na.finalfantasyxiv.com/'; - const TIMEOUT = 30; + const int TIMEOUT = 30; + + private string $baseUri; /** * Get Symfony Client */ - private function getClient(string $baseUri = null) + private function getClient(string $baseUri = null): CurlHttpClient { return new CurlHttpClient([ - 'base_uri' => $baseUri ?: self::BASE_URI, + 'base_uri' => $baseUri ?? $this->baseUri, 'timeout' => self::TIMEOUT ]); } @@ -30,23 +34,25 @@ private function getClient(string $baseUri = null) * Perform a request * @throws */ - public function request(string $parser, Request $request, int $tryIndex = 0) - { - // get client - $client = $this->getClient($request->baseUri); - - // set some custom user data - $request->userData['request_url'] = $request->baseUri . $request->endpoint; - $request->userData['request_id'] = AsyncHandler::$requestId ?: Uuid::uuid4()->toString(); - $request->userData['parser'] = $parser; - - // perform request - $response = $client->request($request->method, $request->endpoint, [ - 'query' => $request->query, - 'headers' => $request->headers, - 'json' => $request->json, - 'user_data' => $request->userData - ]); + public function request( + string $parser, + Request $request, + int $tryIndex = 0, + array $extraRequestOptions = [], + string $locale = LocaleEnum::EN->value, + ) { + $this->baseUri = match ($locale) { + LocaleEnum::FR->value => LodestoneBaseUriEnum::FR->value, + LocaleEnum::DE->value => LodestoneBaseUriEnum::DE->value, + LocaleEnum::JA->value => LodestoneBaseUriEnum::JA->value, + default => LodestoneBaseUriEnum::EN->value, + }; + + $response = $this->processRequest($parser, $request); + + if (!empty($extraRequestOptions)) { + $responseExtraRequest = $this->processRequest($extraRequestOptions['parser'], $extraRequestOptions['request']); + } // Asynchronous: Pop the response into the async handler, this returns the number // it was assigned to @@ -55,9 +61,15 @@ public function request(string $parser, Request $request, int $tryIndex = 0) return null; } - if ($response->getStatusCode() != 200 && $tryIndex < 3) { + if ($response->getStatusCode() !== 200 && $tryIndex < 3) { sleep(2); - return $this->request($parser, $request, $tryIndex + 1); + return $this->request( + parser: $parser, + request: $request, + tryIndex: $tryIndex + 1, + extraRequestOptions: $extraRequestOptions, + locale: $locale, + ); } if ($response->getStatusCode() == 503) { @@ -90,16 +102,24 @@ public function request(string $parser, Request $request, int $tryIndex = 0) /** @var Parser $parser */ $parser = new $parser($request->userData); + $content = $parser->handle($response->getContent(), $locale); + + if (!empty($extraRequestOptions)) { + $extraParser = new $extraRequestOptions['parser']($extraRequestOptions['request']->userData); + $dataTarget = $extraRequestOptions['dataTarget']; + $content->$dataTarget = ($extraParser->handle($responseExtraRequest->getContent(), $locale))[strtolower($dataTarget)]; + } // Synchronous: Get the content - return $parser->handle($response->getContent()); + return $content; } /** * Settle any async requests + * @return array * @throws */ - public function settle() + public function settle(): array { if (RequestConfig::$isAsync === false) { throw new \Exception("Request API is not in async mode. There will be no async requests to settle."); @@ -132,11 +152,32 @@ public function settle() // handle response $content[$requestId] = $parser->handle( - $response->getContent() + $response->getContent(), ); } } return $content; } + + private function processRequest( + string $parser, + Request $request, + ): ResponseInterface { + // get client + $client = $this->getClient($request->baseUri); + + // set some custom user data + $request->userData['request_url'] = $request->baseUri . $request->endpoint; + $request->userData['request_id'] = AsyncHandler::$requestId ?: Uuid::uuid4()->toString(); + $request->userData['parser'] = $parser; + + // perform request + return $client->request($request->method, $request->endpoint, [ + 'query' => $request->query, + 'headers' => $request->headers, + 'json' => $request->json, + 'user_data' => $request->userData + ]); + } } diff --git a/src/Lodestone/Parser/HelpersTrait.php b/src/Lodestone/Parser/HelpersTrait.php index 223b7e8..032630c 100644 --- a/src/Lodestone/Parser/HelpersTrait.php +++ b/src/Lodestone/Parser/HelpersTrait.php @@ -29,12 +29,16 @@ public function getTimestamp($node) $timestamp = trim(explode(',', $timestamp)[0]); return $timestamp ? $timestamp : null; } - + public function getServerAndDc($line) { $parts = explode(' ', $line, 2); $server = trim($parts[0]); - $dc = trim($parts[1] ?? '', '[]'); + $dc = trim($parts[1] ?? ''); + + if ('' !== $dc) { + $dc = str_replace(['[', ']'], '', $dc); + } return [ $server, diff --git a/src/Lodestone/Parser/ListTrait.php b/src/Lodestone/Parser/ListTrait.php index 69854ee..2e57dbb 100644 --- a/src/Lodestone/Parser/ListTrait.php +++ b/src/Lodestone/Parser/ListTrait.php @@ -4,17 +4,18 @@ use Lodestone\Entity\Character\CharacterSimple; use Lodestone\Entity\ListView\ListView; +use Lodestone\Enum\LocaleEnum; +use LodestoneUtils\Translator; use Rct567\DomQuery\DomQuery; trait ListTrait { - /** @var ListView */ - protected $list; + protected ListView $list; /** * Initialize a list view */ - protected function setList() + protected function setList(string $locale = LocaleEnum::EN->value): void { $this->list = new ListView(); @@ -23,7 +24,12 @@ protected function setList() } $data = $this->dom->find('.btn__pager__current')->text(); - [$current, $total] = explode(' of ', $data); + + if (str_contains($data, ' / ')) { + [$current, $total] = explode(' / ', $data); + } else { + [$current, $total] = explode(Translator::translate($locale, ' of '), $data); + } $this->list->Pagination->Page = filter_var($current, FILTER_SANITIZE_NUMBER_INT); $this->list->Pagination->PageTotal = filter_var($total, FILTER_SANITIZE_NUMBER_INT); @@ -36,7 +42,7 @@ protected function setList() $this->list->Pagination->setNextPrevious(); } - public function handleCharacterList() + public function handleCharacterList(): void { /** @var DomQuery $node */ foreach ($this->dom->find('.ldst__window div.entry') as $node) { diff --git a/src/Lodestone/Parser/ParseCharacter.php b/src/Lodestone/Parser/ParseCharacter.php index 84628cf..b6898a6 100644 --- a/src/Lodestone/Parser/ParseCharacter.php +++ b/src/Lodestone/Parser/ParseCharacter.php @@ -9,31 +9,32 @@ use Lodestone\Entity\Character\Item; use Lodestone\Entity\Character\ItemSimple; use Lodestone\Entity\Character\Town; +use Lodestone\Exceptions\LodestonePrivateException; use Rct567\DomQuery\DomQuery; class ParseCharacter extends ParseAbstract implements Parser { use HelpersTrait; - const TX_RACECLANGENDER = ['Race/Clan/Gender', 'Volk / Stamm / Geschlecht', 'Race / Ethnie / Sexe', '種族/部族/性別']; - const TX_NAMEDAY = ['Nameday', 'Guardian', 'Namenstag', 'Schutzgott', 'Date de naissance', 'Divinité', '誕生日', '守護神']; - const TX_TOWN = ['City-state', 'Stadtstaat', 'Cité de départ', '開始都市']; - const TX_GRANDCOMPANY = ['Grand Company', 'Staatliche Gesellschaft', 'Grande compagnie', '所属グランドカンパニー']; - + private const TX_RACECLANGENDER = ['Race/Clan/Gender', 'Volk / Stamm / Geschlecht', 'Race / Ethnie / Sexe', '種族/部族/性別']; + private const TX_NAMEDAY = ['Nameday', 'Guardian', 'Namenstag', 'Schutzgott', 'Date de naissance', 'Divinité', '誕生日', '守護神']; + private const TX_TOWN = ['City-state', 'Stadtstaat', 'Cité de départ', '開始都市']; + private const TX_GRANDCOMPANY = ['Grand Company', 'Staatliche Gesellschaft', 'Grande compagnie', '所属グランドカンパニー']; + /** @var CharacterProfile */ - private $profile; - + private CharacterProfile $profile; + /** * Handle Character parsing */ - public function handle(string $html) + public function handle(string $htmlContent): CharacterProfile { // set dom - $this->setDom($html); - + $this->setDom($htmlContent); + // set profile object $this->profile = new CharacterProfile(); - + // parse main profile $this->parseProfile(); $this->parseAttributes(); @@ -41,74 +42,75 @@ public function handle(string $html) return $this->profile; } - + /** * Parse the "Profile" tab + * @throws LodestonePrivateException */ - private function parseProfile() + private function parseProfile(): void { $blocks = $this->dom->find('.character__profile__data__detail .character-block'); - + /** @var DomQuery $block */ foreach ($blocks as $block) { - $blocktitle = $block->find('.character-block__title')->text(); - - if (in_array($blocktitle, self::TX_RACECLANGENDER)) { + $blockTitle = $block->find('.character-block__title')->text(); + + if (in_array($blockTitle, self::TX_RACECLANGENDER, true)) { $this->parseProfileRaceTribeGender($block); - } elseif (in_array($blocktitle, self::TX_NAMEDAY)) { + } elseif (in_array($blockTitle, self::TX_NAMEDAY, true)) { $this->parseProfileNameDay($block); - } elseif (in_array($blocktitle, self::TX_TOWN)) { + } elseif (in_array($blockTitle, self::TX_TOWN, true)) { $this->parseProfileTown($block); - } elseif (in_array($blocktitle, self::TX_GRANDCOMPANY)) { + } elseif (in_array($blockTitle, self::TX_GRANDCOMPANY, true)) { $this->parseProfileGrandCompany($block); } else { - if ($block->find('.character__freecompany__name')->text() != "") { + if ($block->find('.character__freecompany__name')->text() !== "") { $this->parseProfileFreeCompany($block); - } elseif ($block->find('.character__pvpteam__name')->find('h4')->text() != "") { + } elseif ($block->find('.character__pvpteam__name')->find('h4')->text() !== "") { $this->parseProfilePvPTeam($block); } } } - + $this->parseProfileBasic(); $this->parseProfileBio(); } - + /** * Parse the "Attributes" tab */ - private function parseAttributes() + private function parseAttributes(): void { // // Base Param // - + /** @var DomQuery $tr */ foreach ($this->dom->find('.character__param__list tr') as $tr) { - $attr = new Attribute(); - $attr->Name = $tr->find('th')->text(); - $attr->Value = $tr->find('td')->text(); + $attribute = new Attribute(); + $attribute->Name = $tr->find('th')->text(); + $attribute->Value = $tr->find('td')->text(); - $this->profile->GearSet['Attributes'][] = $attr; + $this->profile->GearSet['Attributes'][] = $attribute; } - + // // hp, mp, etc // /** @var DomQuery $li */ foreach ($this->dom->find('.character__param ul li') as $li) { - $attr = new Attribute(); - $attr->Name = $li->find('p')->text(); - $attr->Value = $li->find('span')->text(); + $attribute = new Attribute(); + $attribute->Name = $li->find('p')->text(); + $attribute->Value = $li->find('span')->text(); - $this->profile->GearSet['Attributes'][] = $attr; + $this->profile->GearSet['Attributes'][] = $attribute; } } - + /** * Parse the characters currently equipped gear */ - private function parseEquipGear() + private function parseEquipGear(): void { /** * @var int $i @@ -116,23 +118,23 @@ private function parseEquipGear() */ foreach ($this->dom->find('.character__view')->eq(0)->find('.item_detail_box') as $i => $node) { $item = new Item(); - + // get name $name = $node->find('.db-tooltip__item__name')->text(); - + // If this slot has no item name html // it's safe to assume empty slot if (!$name) { continue; } - + $item->Name = strip_tags($name); - + // get lodestone id $lodestoneId = $node->find('.db-tooltip__bt_item_detail a')->attr('href'); $explodedLodestoneId = explode('/', $lodestoneId); $item->ID = trim($explodedLodestoneId[count($explodedLodestoneId) - 2]); - + // get category // this is a bit buggy for crafters, eg: https://eu.finalfantasyxiv.com/lodestone/character/17650647 // as it's just looking for "Two-handed" and ignoring things like "Carpenters Secondary" @@ -144,23 +146,23 @@ private function parseEquipGear() $catName = trim(str_ireplace(['Two-handed', 'One-handed'], null, $catName)); $catName = ucwords(strtolower($catName)); $item->Category = $catName; - + // get slot from category - $slot = ($i == 0) ? 'MainHand' : $catName; - + $slot = ($i === 0) ? 'MainHand' : $catName; + // if item is secondary tool or shield, its off-hand $slot = (stripos($catSecond, 'secondary tool') !== false) ? 'OffHand' : $slot; - $slot = ($slot == 'Shield') ? 'OffHand' : $slot; - + $slot = ($slot === 'Shield') ? 'OffHand' : $slot; + // if item is a ring, check if its ring 1 or 2 - if ($slot == 'Ring') { + if ($slot === 'Ring') { $slot = isset($this->profile->GearSet['Gear']['Ring1']) ? 'Ring2' : 'Ring1'; } - + // save slot $slot = str_ireplace(' ', '', $slot); $item->Slot = $slot; - + // add mirage $mirage = $node->find('.db-tooltip__item__mirage'); if (trim($mirage->html())) { @@ -171,174 +173,175 @@ private function parseEquipGear() $mirageItem = new ItemSimple(); $mirageItem->ID = $lodestoneId; $mirageItem->Name = $mirage->find('p')->text();; - + $item->Mirage = $mirageItem; } - + // add creator $creator = $node->find('.db-tooltip__signature-character'); if (trim($creator->html())) { $creator = explode("/", $creator->find('a')->attr('href')); $item->Creator = trim($creator[3]); } - + // add dye $dye = $node->find('.eorzeadb_tooltip_mb10 .stain'); if (trim($dye->html())) { $dyeUrl = $dye->find('a')->attr('href'); $dyeName = $dye->find('a')->text(); $dyeId = trim(explode("/", $dyeUrl)[5]); - + $dyeObject = new ItemSimple(); $dyeObject->ID = $dyeId; $dyeObject->Name = $dyeName; $item->Dye = $dyeObject; } - + // add materia $materiaNodes = $node->find('.db-tooltip__materia'); - if (trim($materiaNodes->html())) { - if ($materiaNodes = $materiaNodes->find('li')) { - /** @var DomQuery $mnode */ - foreach ($materiaNodes as $mnode) { - $mhtml = $mnode->find('.db-tooltip__materia__txt')->html(); - if (!$mhtml) { - continue; - } - - $mdetails = explode('
', html_entity_decode($mhtml)); - if (empty($mdetails[1])) {$mdetails[1] = null;} - - $materiaObject = new ItemSimple(); - $materiaObject->Name = trim(strip_tags($mdetails[0])); - $materiaObject->Value = trim(strip_tags($mdetails[1])); - $item->Materia[] = $materiaObject; + if ( + trim($materiaNodes->html()) + && $materiaNodes = $materiaNodes->find('li') + ) { + /** @var DomQuery $materiaNode */ + foreach ($materiaNodes as $materiaNode) { + $mhtml = $materiaNode->find('.db-tooltip__materia__txt')->html(); + if (!$mhtml) { + continue; } + + $materiaDetails = explode('
', html_entity_decode($mhtml)); + if (empty($materiaDetails[1])) {$materiaDetails[1] = null;} + + $materiaObject = new ItemSimple(); + $materiaObject->Name = trim(strip_tags($materiaDetails[0])); + $materiaObject->Value = trim(strip_tags($materiaDetails[1])); + $item->Materia[] = $materiaObject; } } - + $this->profile->GearSet['Gear'][$slot] = $item; } } - + /** * Parse basic profile information (name, server, avatar, etc) */ - private function parseProfileBasic() + private function parseProfileBasic(): void { // name $name = $this->dom->find('.frame__chara__name')->eq(0)->html(); $name = trim(strip_tags($name)); $name = html_entity_decode($name, ENT_QUOTES, "UTF-8"); $this->profile->Name = trim($name); - + // server [$server, $dc] = $this->getServerAndDc( $this->dom->find('.frame__chara__world')->eq(0)->text() ); - + $this->profile->Server = $server; $this->profile->DC = $dc; - + // title if ($title = $this->dom->find('.frame__chara__title')) { $this->profile->Title = html_entity_decode(trim(strip_tags($title[0])), ENT_QUOTES, "UTF-8"); $this->profile->TitleTop = $this->dom->find('.frame__chara .frame__chara__box p')->eq(0)->hasClass('frame__chara__title'); } } - + /** * Parse a players bio field */ - private function parseProfileBio() + private function parseProfileBio(): void { $bio = $this->dom->find('.character__selfintroduction')->html(); $bio = str_replace(['
', '
', '
'], "\n", $bio); $bio = html_entity_decode($bio, ENT_QUOTES, "UTF-8"); $bio = str_ireplace('Character Profile', null, $bio); - + if ($bio = strip_tags($bio)) { $this->profile->Bio = $bio; } - + $this->profile->Bio = mb_convert_encoding($this->profile->Bio, 'UTF-8', 'UTF-8'); } - + /** * @param DomQuery $node */ - private function parseProfileRaceTribeGender($node) + private function parseProfileRaceTribeGender($node): void { $html = $node->find('.character-block__name')->html(); $html = str_ireplace(['
', '
', '
'], ' / ', $html); - + [$race, $tribe, $gender] = explode('/', strip_tags($html)); - + $this->profile->Race = strip_tags(trim($race)); $this->profile->Tribe = strip_tags(trim($tribe)); - $this->profile->Gender = strip_tags(trim($gender)) == '♀' ? 'female' : 'male'; - + $this->profile->Gender = strip_tags(trim($gender)) === '♀' ? 'female' : 'male'; + // picture $avatar = $node->find('img')->attr('src'); $this->profile->Avatar = $avatar; $this->profile->Portrait = str_ireplace('c0_96x96', 'l0_640x873', $avatar); } - + /** * @param DomQuery $node */ - private function parseProfileNameDay($node) + private function parseProfileNameDay($node): void { $this->profile->Nameday = $node->find('.character-block__birth')->text(); - + $obj = new Guardian(); $obj->Name = html_entity_decode($node->find('.character-block__name')->text(), ENT_QUOTES, "UTF-8"); $obj->Icon = $node->find('img')->attr('src'); - + $this->profile->GuardianDeity = $obj; } - + /** * @param DomQuery $node */ - private function parseProfileTown($node) + private function parseProfileTown($node): void { $obj = new Town(); $obj->Name = html_entity_decode($node->find('.character-block__name')->text(), ENT_QUOTES, "UTF-8"); $obj->Icon = $node->find('img')->attr('src'); $this->profile->Town = $obj; } - + /** * @param DomQuery $node */ - private function parseProfileGrandCompany($node) + private function parseProfileGrandCompany($node): void { $html = $node->find('.character-block__name')->html(); - + // not all characters have a grand company [$name, $rank] = explode('/', strip_tags($html)); - + $gc = new GrandCompany(); $gc->Name = trim($name); $gc->Icon = $node->find('img')->attr('src'); $gc->Rank = trim($rank); $this->profile->GrandCompany = $gc; } - + /** * @param DomQuery $node */ - private function parseProfileFreeCompany($node) + private function parseProfileFreeCompany($node): void { $this->profile->FreeCompanyId = $this->getLodestoneId($node); $this->profile->FreeCompanyName = trim($node->find('a')->text()); } - + /** * @param DomQuery $node */ - private function parseProfilePvPTeam($node) + private function parseProfilePvPTeam($node): void { $this->profile->PvPTeamId = $this->getLodestoneId($node); } diff --git a/src/Lodestone/Parser/ParseCharacterAchievements.php b/src/Lodestone/Parser/ParseCharacterAchievements.php index e72a0b1..7ad8ff2 100644 --- a/src/Lodestone/Parser/ParseCharacterAchievements.php +++ b/src/Lodestone/Parser/ParseCharacterAchievements.php @@ -14,10 +14,10 @@ class ParseCharacterAchievements extends ParseAbstract implements Parser /** * @throws LodestonePrivateException */ - public function handle(string $html) + public function handle(string $htmlContent) { // set dom - $this->setDom($html); + $this->setDom($htmlContent); $achievements = new Achievements(); /** @var DomQuery $a */ diff --git a/src/Lodestone/Parser/ParseCharacterClassJobs.php b/src/Lodestone/Parser/ParseCharacterClassJobs.php index 0aec584..51235ce 100644 --- a/src/Lodestone/Parser/ParseCharacterClassJobs.php +++ b/src/Lodestone/Parser/ParseCharacterClassJobs.php @@ -5,8 +5,10 @@ use Lodestone\Entity\Character\ClassJob; use Lodestone\Entity\Character\ClassJobBozjan; use Lodestone\Entity\Character\ClassJobEureka; +use Lodestone\Enum\LocaleEnum; use Lodestone\Exceptions\LodestonePrivateException; use Lodestone\Game\ClassJobs; +use LodestoneUtils\Translator; use Rct567\DomQuery\DomQuery; class ParseCharacterClassJobs extends ParseAbstract implements Parser @@ -14,15 +16,17 @@ class ParseCharacterClassJobs extends ParseAbstract implements Parser use HelpersTrait; /** - * @throws LodestonePrivateException + * @return array */ - public function handle(string $html) - { + public function handle( + string $htmlContent, + string $locale = LocaleEnum::EN->value, + ): array { // set dom - $this->setDom($html); + $this->setDom($htmlContent); $classjobs = []; - + // loop through roles /** @var DomQuery $li */ foreach ($this->dom->find('.character__content')->find('li') as $li) @@ -30,7 +34,7 @@ public function handle(string $html) // class name $name = trim($li->find('.character__job__name')->text()); $master = trim($li->find('.character__job__name--meister')->text()); - $name = str_ireplace('(Limited Job)', null, $name); + $name = str_ireplace(Translator::translate($locale, 'Limited Job'), null, $name); $name = $name ?: $master; if (empty($name)) { @@ -38,17 +42,17 @@ public function handle(string $html) } // get game data ids - $gd = ClassJobs::findGameData($name); + $gd = ClassJobs::findGameData($name, $locale); // build role $role = new ClassJob(); $role->Name = $gd->Name; $role->ClassID = $gd->ClassID; $role->JobID = $gd->JobID; - + // Handle the unlock state based on the tooltip name, the 1st "Name" will be Job or Class if no Job unlocked. $unlockedState = trim(explode('/', $li->find('.character__job__name')->attr('data-tooltip'))[0]); - + $role->UnlockedState = [ 'Name' => $unlockedState, 'ID' => ClassJobs::findRoleIdFromName($unlockedState) @@ -56,7 +60,7 @@ public function handle(string $html) // level $level = trim($li->find('.character__job__level')->text()); - $level = ($level == '--') ? 0 : intval($level); + $level = ($level === '-') ? 0 : (int) $level; $role->Level = $level; //specialist @@ -73,24 +77,24 @@ public function handle(string $html) $classjobs[] = $role; } - + $elementalIndex = 1; - + /** @var DomQuery $node */ - + // // Bozjan Southern Front // - $bozjan = new ClassJobBozjan('Resistance Rank'); + $bozjan = new ClassJobBozjan(Translator::translate($locale, 'Resistance Rank')); $node = $this->dom->find('.character__job__list')[0]; $fieldname = trim($node->find('.character__job__name')->text()); - + // if elemental level is the 1st one, they haven't started Bozjan - if ($fieldname == 'Elemental Level') { + if ($fieldname === Translator::translate($locale, 'Elemental Level')) { $elementalIndex = 0; } else { $bozjanString = trim($node->find('.character__job__exp')->text()); - + if ($bozjanString) { [$current, $max] = explode('/', $bozjanString); $current = filter_var(trim(str_ireplace('-', null, $current)) ?: 0, FILTER_SANITIZE_NUMBER_INT); @@ -98,8 +102,8 @@ public function handle(string $html) if ($current == "") { $current = null; } - - + + $bozjan->Level = (int)$node->find('.character__job__level')->text(); $bozjan->Mettle = $current; } @@ -108,23 +112,23 @@ public function handle(string $html) // // The Forbidden Land, Eureka // - $elemental = new ClassJobEureka('Elemental Level'); + $elemental = new ClassJobEureka(Translator::translate($locale, 'Elemental Level')); $node = $this->dom->find('.character__job__list')[$elementalIndex]; - + $eurekaString = explode('/', $node->find('.character__job__exp')->text()); $current = $eurekaString[0] ?? null; $max = $eurekaString[1] ?? null; - + $current = filter_var(trim(str_ireplace('-', null, $current)) ?: 0, FILTER_SANITIZE_NUMBER_INT); $max = filter_var(trim(str_ireplace('-', null, $max)) ?: 0, FILTER_SANITIZE_NUMBER_INT); - + $elemental->Level = (int)$node->find('.character__job__level')->text(); $elemental->ExpLevel = $current; $elemental->ExpLevelMax = $max; $elemental->ExpLevelTogo = $max - $current; - + // fin - + unset($box); unset($node); diff --git a/src/Lodestone/Parser/ParseCharacterFollowing.php b/src/Lodestone/Parser/ParseCharacterFollowing.php index 72c0d91..c5833c4 100644 --- a/src/Lodestone/Parser/ParseCharacterFollowing.php +++ b/src/Lodestone/Parser/ParseCharacterFollowing.php @@ -2,21 +2,23 @@ namespace Lodestone\Parser; -use Lodestone\Entity\Character\CharacterSimple; -use Rct567\DomQuery\DomQuery; +use Lodestone\Entity\LodestoneDataInterface; +use Lodestone\Enum\LocaleEnum; class ParseCharacterFollowing extends ParseAbstract implements Parser { use HelpersTrait; use ListTrait; - public function handle(string $html) - { + public function handle( + string $htmlContent, + string $locale = LocaleEnum::EN->value, + ): LodestoneDataInterface { // set dom - $this->setDom($html); + $this->setDom($htmlContent); // build list - $this->setList(); + $this->setList($locale); // parse list $this->handleCharacterList(); diff --git a/src/Lodestone/Parser/ParseCharacterFriends.php b/src/Lodestone/Parser/ParseCharacterFriends.php index 60eda5d..1e860f4 100644 --- a/src/Lodestone/Parser/ParseCharacterFriends.php +++ b/src/Lodestone/Parser/ParseCharacterFriends.php @@ -2,21 +2,23 @@ namespace Lodestone\Parser; -use Lodestone\Entity\Character\CharacterSimple; -use Rct567\DomQuery\DomQuery; +use Lodestone\Entity\LodestoneDataInterface; +use Lodestone\Enum\LocaleEnum; class ParseCharacterFriends extends ParseAbstract implements Parser { use HelpersTrait; use ListTrait; - public function handle(string $html) - { + public function handle( + string $htmlContent, + string $locale = LocaleEnum::EN->value, + ): LodestoneDataInterface { // set dom - $this->setDom($html); + $this->setDom($htmlContent); // build list - $this->setList(); + $this->setList($locale); // parse list $this->handleCharacterList(); diff --git a/src/Lodestone/Parser/ParseCharacterMinions.php b/src/Lodestone/Parser/ParseCharacterMinions.php index a7f51d7..188bec6 100644 --- a/src/Lodestone/Parser/ParseCharacterMinions.php +++ b/src/Lodestone/Parser/ParseCharacterMinions.php @@ -15,10 +15,10 @@ class ParseCharacterMinions extends ParseAbstract implements Parser /** * @throws LodestonePrivateException */ - public function handle(string $html) + public function handle(string $htmlContent) { // set dom - $this->setDom($html, true); + $this->setDom($htmlContent, true); $minions = []; foreach ($this->dom->find('.minion__list__item') as $li) { $minion = new Minion(); diff --git a/src/Lodestone/Parser/ParseCharacterMounts.php b/src/Lodestone/Parser/ParseCharacterMounts.php index 5a18c36..3e45e51 100644 --- a/src/Lodestone/Parser/ParseCharacterMounts.php +++ b/src/Lodestone/Parser/ParseCharacterMounts.php @@ -15,10 +15,10 @@ class ParseCharacterMounts extends ParseAbstract implements Parser /** * @throws LodestonePrivateException */ - public function handle(string $html) + public function handle(string $htmlContent) { // set dom - $this->setDom($html, true); + $this->setDom($htmlContent, true); $mounts = []; foreach ($this->dom->find('.mount__list__item') as $li) { $mount = new Minion(); diff --git a/src/Lodestone/Parser/ParseCharacterSearch.php b/src/Lodestone/Parser/ParseCharacterSearch.php index 9e6bf46..93f991b 100644 --- a/src/Lodestone/Parser/ParseCharacterSearch.php +++ b/src/Lodestone/Parser/ParseCharacterSearch.php @@ -2,21 +2,23 @@ namespace Lodestone\Parser; -use Lodestone\Entity\Character\CharacterSimple; -use Rct567\DomQuery\DomQuery; +use Lodestone\Entity\LodestoneDataInterface; +use Lodestone\Enum\LocaleEnum; class ParseCharacterSearch extends ParseAbstract implements Parser { use HelpersTrait; use ListTrait; - public function handle(string $html) - { + public function handle( + string $htmlContent, + string $locale = LocaleEnum::EN->value, + ): LodestoneDataInterface { // set dom - $this->setDom($html); + $this->setDom($htmlContent); // build list - $this->setList(); + $this->setList($locale); // parse list $this->handleCharacterList(); diff --git a/src/Lodestone/Parser/ParseFreeCompany.php b/src/Lodestone/Parser/ParseFreeCompany.php index f9e2f56..0111228 100644 --- a/src/Lodestone/Parser/ParseFreeCompany.php +++ b/src/Lodestone/Parser/ParseFreeCompany.php @@ -9,10 +9,10 @@ class ParseFreeCompany extends ParseAbstract implements Parser { use HelpersTrait; - public function handle(string $html) + public function handle(string $htmlContent) { // set dom - $this->setDom($html); + $this->setDom($htmlContent); $fc = new FreeCompany(); @@ -23,7 +23,7 @@ public function handle(string $html) foreach ($this->dom->find('.entry__freecompany__crest__image img') as $img) { $fc->Crest[] = str_ireplace('64x64', '128x128', $img->attr('src')); } - + [$server, $dc] = $this->getServerAndDc( $this->dom->find('.entry__freecompany__gc')->eq(1)->text() ); @@ -48,7 +48,7 @@ public function handle(string $html) $fc->Estate = [ 'Name' => $this->dom->find('.freecompany__estate__name')->text(), 'Plot' => $this->dom->find('.freecompany__estate__text')->text(), - 'Greeting' => $this->dom->find('.freecompany__estate__greeting')->text(), + 'Greeting' => str_replace("\"", '', $this->dom->find('.freecompany__estate__greeting')->text()), ]; /** @var DomQuery $rep */ diff --git a/src/Lodestone/Parser/ParseFreeCompanyMembers.php b/src/Lodestone/Parser/ParseFreeCompanyMembers.php index bbca10d..d9be9c5 100644 --- a/src/Lodestone/Parser/ParseFreeCompanyMembers.php +++ b/src/Lodestone/Parser/ParseFreeCompanyMembers.php @@ -3,7 +3,8 @@ namespace Lodestone\Parser; use Lodestone\Entity\Character\CharacterSimple; -use Lodestone\Entity\FreeCompany\FreeCompanySimple; +use Lodestone\Entity\LodestoneDataInterface; +use Lodestone\Enum\LocaleEnum; use Rct567\DomQuery\DomQuery; class ParseFreeCompanyMembers extends ParseAbstract implements Parser @@ -11,13 +12,15 @@ class ParseFreeCompanyMembers extends ParseAbstract implements Parser use HelpersTrait; use ListTrait; - public function handle(string $html) - { + public function handle( + string $htmlContent, + string $locale = LocaleEnum::EN->value, + ): LodestoneDataInterface { // set dom - $this->setDom($html); + $this->setDom($htmlContent); // build list - $this->setList(); + $this->setList($locale); // parse list /** @var DomQuery $node */ diff --git a/src/Lodestone/Parser/ParseFreeCompanySearch.php b/src/Lodestone/Parser/ParseFreeCompanySearch.php index 9535fef..9a91632 100644 --- a/src/Lodestone/Parser/ParseFreeCompanySearch.php +++ b/src/Lodestone/Parser/ParseFreeCompanySearch.php @@ -2,8 +2,9 @@ namespace Lodestone\Parser; -use Lodestone\Entity\Character\CharacterSimple; use Lodestone\Entity\FreeCompany\FreeCompanySimple; +use Lodestone\Entity\LodestoneDataInterface; +use Lodestone\Enum\LocaleEnum; use Rct567\DomQuery\DomQuery; class ParseFreeCompanySearch extends ParseAbstract implements Parser @@ -11,13 +12,15 @@ class ParseFreeCompanySearch extends ParseAbstract implements Parser use HelpersTrait; use ListTrait; - public function handle(string $html) - { + public function handle( + string $htmlContent, + string $locale = LocaleEnum::EN->value, + ): LodestoneDataInterface { // set dom - $this->setDom($html); + $this->setDom($htmlContent); // build list - $this->setList(); + $this->setList($locale); // parse list /** @var DomQuery $node */ diff --git a/src/Lodestone/Parser/ParseLinkshellCWMembers.php b/src/Lodestone/Parser/ParseLinkshellCWMembers.php index c875714..5ad8f76 100644 --- a/src/Lodestone/Parser/ParseLinkshellCWMembers.php +++ b/src/Lodestone/Parser/ParseLinkshellCWMembers.php @@ -3,7 +3,8 @@ namespace Lodestone\Parser; use Lodestone\Entity\Character\CharacterSimple; -use Lodestone\Entity\FreeCompany\FreeCompanySimple; +use Lodestone\Entity\LodestoneDataInterface; +use Lodestone\Enum\LocaleEnum; use Rct567\DomQuery\DomQuery; class ParseLinkshellCWMembers extends ParseAbstract implements Parser @@ -11,13 +12,15 @@ class ParseLinkshellCWMembers extends ParseAbstract implements Parser use HelpersTrait; use ListTrait; - public function handle(string $html) - { + public function handle( + string $htmlContent, + string $locale = LocaleEnum::EN->value, + ): LodestoneDataInterface { // set dom - $this->setDom($html); + $this->setDom($htmlContent); // build list - $this->setList(); + $this->setList($locale); $namedata = trim($this->dom->find('.heading__linkshell__name')->text()); $namedata = explode("\n", $namedata); diff --git a/src/Lodestone/Parser/ParseLinkshellMembers.php b/src/Lodestone/Parser/ParseLinkshellMembers.php index 29b707a..904ec31 100644 --- a/src/Lodestone/Parser/ParseLinkshellMembers.php +++ b/src/Lodestone/Parser/ParseLinkshellMembers.php @@ -3,7 +3,8 @@ namespace Lodestone\Parser; use Lodestone\Entity\Character\CharacterSimple; -use Lodestone\Entity\FreeCompany\FreeCompanySimple; +use Lodestone\Entity\LodestoneDataInterface; +use Lodestone\Enum\LocaleEnum; use Rct567\DomQuery\DomQuery; class ParseLinkshellMembers extends ParseAbstract implements Parser @@ -11,13 +12,15 @@ class ParseLinkshellMembers extends ParseAbstract implements Parser use HelpersTrait; use ListTrait; - public function handle(string $html) - { + public function handle( + string $htmlContent, + string $locale = LocaleEnum::EN->value, + ): LodestoneDataInterface { // set dom - $this->setDom($html); + $this->setDom($htmlContent); // build list - $this->setList(); + $this->setList($locale); $namedata = trim($this->dom->find('.heading__linkshell__name')->text()); $namedata = explode("\n", $namedata); diff --git a/src/Lodestone/Parser/ParseLinkshellSearch.php b/src/Lodestone/Parser/ParseLinkshellSearch.php index ed8df01..ec233cb 100644 --- a/src/Lodestone/Parser/ParseLinkshellSearch.php +++ b/src/Lodestone/Parser/ParseLinkshellSearch.php @@ -2,8 +2,9 @@ namespace Lodestone\Parser; -use Lodestone\Entity\Character\CharacterSimple; use Lodestone\Entity\FreeCompany\FreeCompanySimple; +use Lodestone\Entity\LodestoneDataInterface; +use Lodestone\Enum\LocaleEnum; use Rct567\DomQuery\DomQuery; class ParseLinkshellSearch extends ParseAbstract implements Parser @@ -11,13 +12,15 @@ class ParseLinkshellSearch extends ParseAbstract implements Parser use HelpersTrait; use ListTrait; - public function handle(string $html) - { + public function handle( + string $htmlContent, + string $locale = LocaleEnum::EN->value, + ): LodestoneDataInterface { // set dom - $this->setDom($html); + $this->setDom($htmlContent); // build list - $this->setList(); + $this->setList($locale); // parse list /** @var DomQuery $node */ diff --git a/src/Lodestone/Parser/ParseLodestoneBanners.php b/src/Lodestone/Parser/ParseLodestoneBanners.php index a89aa43..2a59402 100644 --- a/src/Lodestone/Parser/ParseLodestoneBanners.php +++ b/src/Lodestone/Parser/ParseLodestoneBanners.php @@ -8,10 +8,10 @@ class ParseLodestoneBanners extends ParseAbstract implements Parser { use HelpersTrait; - public function handle(string $html) + public function handle(string $htmlContent) { // set dom - $this->setDom($html); + $this->setDom($htmlContent); /** @var DomQuery $node */ $arr = []; diff --git a/src/Lodestone/Parser/ParseLodestoneWorldStatus.php b/src/Lodestone/Parser/ParseLodestoneWorldStatus.php index 9218bbc..42d40d1 100644 --- a/src/Lodestone/Parser/ParseLodestoneWorldStatus.php +++ b/src/Lodestone/Parser/ParseLodestoneWorldStatus.php @@ -8,20 +8,20 @@ class ParseLodestoneWorldStatus extends ParseAbstract implements Parser { use HelpersTrait; - public function handle(string $html) + public function handle(string $htmlContent) { // set dom - $this->setDom($html); + $this->setDom($htmlContent); /** @var DomQuery $node */ $arr = []; foreach ($this->dom->find('.item-list') as $node) { $status = trim($node->find('.world-list__status_icon i')->attr('data-tooltip')); $isOnline = strtolower($status) == 'online'; - + $category = trim($node->find('.world-list__world_category')->text()); $isCongested = strtolower($category) == 'congested'; - + $arr[] = [ 'Name' => trim($node->find('.world-list__world_name')->text()), 'Status' => $status, diff --git a/src/Lodestone/Parser/ParsePvPTeamMembers.php b/src/Lodestone/Parser/ParsePvPTeamMembers.php index 4bd088f..d67e990 100644 --- a/src/Lodestone/Parser/ParsePvPTeamMembers.php +++ b/src/Lodestone/Parser/ParsePvPTeamMembers.php @@ -3,7 +3,8 @@ namespace Lodestone\Parser; use Lodestone\Entity\Character\CharacterSimple; -use Lodestone\Entity\FreeCompany\FreeCompanySimple; +use Lodestone\Entity\LodestoneDataInterface; +use Lodestone\Enum\LocaleEnum; use Rct567\DomQuery\DomQuery; class ParsePvPTeamMembers extends ParseAbstract implements Parser @@ -11,13 +12,15 @@ class ParsePvPTeamMembers extends ParseAbstract implements Parser use HelpersTrait; use ListTrait; - public function handle(string $html) - { + public function handle( + string $htmlContent, + string $locale = LocaleEnum::EN->value, + ): LodestoneDataInterface { // set dom - $this->setDom($html); + $this->setDom($htmlContent); // build list - $this->setList(); + $this->setList($locale); $this->list->Profile = (Object)[ 'Name' => $this->dom->find('.entry__pvpteam__name--team')->text(), diff --git a/src/Lodestone/Parser/ParsePvPTeamSearch.php b/src/Lodestone/Parser/ParsePvPTeamSearch.php index de7cdf1..3a6c4bf 100644 --- a/src/Lodestone/Parser/ParsePvPTeamSearch.php +++ b/src/Lodestone/Parser/ParsePvPTeamSearch.php @@ -2,8 +2,9 @@ namespace Lodestone\Parser; -use Lodestone\Entity\Character\CharacterSimple; use Lodestone\Entity\FreeCompany\FreeCompanySimple; +use Lodestone\Entity\LodestoneDataInterface; +use Lodestone\Enum\LocaleEnum; use Rct567\DomQuery\DomQuery; class ParsePvPTeamSearch extends ParseAbstract implements Parser @@ -11,13 +12,15 @@ class ParsePvPTeamSearch extends ParseAbstract implements Parser use HelpersTrait; use ListTrait; - public function handle(string $html) - { + public function handle( + string $htmlContent, + string $locale = LocaleEnum::EN->value, + ): LodestoneDataInterface { // set dom - $this->setDom($html); + $this->setDom($htmlContent); // build list - $this->setList(); + $this->setList($locale); // parse list /** @var DomQuery $node */ diff --git a/src/Lodestone/Translation/BaseLanguage.php b/src/Lodestone/Translation/BaseLanguage.php new file mode 100644 index 0000000..1f495bd --- /dev/null +++ b/src/Lodestone/Translation/BaseLanguage.php @@ -0,0 +1,19 @@ + ' de ', + + // Character + 'Limited Job' => 'Job restreint', + 'Resistance Rank' => 'Niveau de résistant', + 'Elemental Level' => 'Niveau élémentaire', + ]; +} diff --git a/src/Lodestone/Translation/JA.php b/src/Lodestone/Translation/JA.php new file mode 100644 index 0000000..9cd47f9 --- /dev/null +++ b/src/Lodestone/Translation/JA.php @@ -0,0 +1,11 @@ +value => new FR(), + LocaleEnum::DE->value => new DE(), + LocaleEnum::JA->value => new JA(), + default => null, + }; + + if ($localeClass === null) { + return $text; + } + + return $localeClass->translate($text); + } +} diff --git a/tests/BasicTest.php b/tests/BasicTest.php index 46e30f6..4599589 100644 --- a/tests/BasicTest.php +++ b/tests/BasicTest.php @@ -2,6 +2,7 @@ namespace Lodestone\Tests; +use Lodestone\Enum\LocaleEnum; use PHPUnit\Framework\TestCase; final class BasicTest extends TestCase @@ -10,9 +11,10 @@ public function test(): void { // create api instance $api = new \Lodestone\Api(); + $locale = LocaleEnum::EN->value; // Easy adjusting of tests - $user = '9575452'; + $userId = 9575452; $expectedUserName = 'Arcane Disgea'; $fc = '9232379236109629819'; $expectedfc = 'Hell On Aura'; @@ -20,18 +22,18 @@ public function test(): void $pvp = '59665d98bf81ff58db63305b538cd69a6c64d578'; $bio = "This is a test of the emergency alert system.\nAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH\n\nECU125614VC"; - $character = $api->character()->get($user); + $character = $api->character()->get($userId, $locale); self::assertSame($expectedUserName, $character->Name); self::assertSame($bio, $character->Bio); - self::assertNotEmpty($api->character()->friends($user)); - self::assertNotEmpty($api->character()->following($user)); - // self::assertTrue($api->character()->achievements($user)->PointsTotal > 0); AHHHHHHHHHHHHHHHH - // self::assertNotEmpty($api->getCharacterAchievementsFull($user)->Achievements); This may not be relevant anymore - self::assertSame($expectedfc, $api->FreeCompany()->get($fc)->Name); + self::assertNotEmpty($api->character()->friends($userId)); + self::assertNotEmpty($api->character()->following($userId)); + // self::assertTrue($api->character()->achievements($userId)->PointsTotal > 0); AHHHHHHHHHHHHHHHH + // self::assertNotEmpty($api->getCharacterAchievementsFull($userId)->Achievements); This may not be relevant anymore + self::assertSame($expectedfc, $api->FreeCompany()->get($fc, $locale)->Name); // self::assertSame($api->getFreeCompanyFull('9233927348481473031')->Profile->ID, '9233927348481473031'); This may not be relevant anymore self::assertNotEmpty($api->FreeCompany()->members($fc)->Results); - self::assertNotEmpty($api->Linkshell()->get($ls)->Results); + self::assertNotEmpty($api->Linkshell()->get(id: $ls, locale: $locale)->Results); self::assertNotEmpty($api->PvPTeam()->get($pvp)->Results); self::assertNotEmpty($api->Character()->search($expectedUserName)->Results); self::assertNotEmpty($api->FreeCompany()->search('a')->Results);