mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-03 18:04:08 +02:00
php 8 compat
This commit is contained in:
parent
1da2fa48fa
commit
47cdcaa00b
9 changed files with 260 additions and 93 deletions
|
|
@ -4,17 +4,20 @@
|
||||||
"vlucas/phpdotenv": "^1.1",
|
"vlucas/phpdotenv": "^1.1",
|
||||||
"ircmaxell/random-lib": "^1.1",
|
"ircmaxell/random-lib": "^1.1",
|
||||||
"ehesp/steam-login": "^1.2",
|
"ehesp/steam-login": "^1.2",
|
||||||
"koraktor/steam-condenser": "^1.3",
|
"koraktor/steam-condenser": "dev-master#92dde9e3b462e93cc498fe795a712c61eec7051e",
|
||||||
"guzzlehttp/guzzle": "^6.5",
|
"guzzlehttp/guzzle": "^6.5",
|
||||||
"doctrine/dbal": "^2.12",
|
"doctrine/dbal": "^3.0",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-apcu": "*"
|
"ext-apcu": "*"
|
||||||
},
|
},
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/koraktor/steam-condenser-php"
|
||||||
|
}
|
||||||
|
],
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
|
||||||
"vendor/koraktor/steam-condenser/lib/steam-condenser.php"
|
|
||||||
],
|
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Demostf\\API\\": "src/",
|
"Demostf\\API\\": "src/",
|
||||||
"Demostf\\API\\Test\\": "test/"
|
"Demostf\\API\\Test\\": "test/"
|
||||||
|
|
|
||||||
318
composer.lock
generated
318
composer.lock
generated
|
|
@ -4,8 +4,81 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "791d7aaf6f23f9510fc5066bce35884f",
|
"content-hash": "ac55003b64c70a99522f1db90c0c28e3",
|
||||||
"packages": [
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "composer/package-versions-deprecated",
|
||||||
|
"version": "1.11.99.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/composer/package-versions-deprecated.git",
|
||||||
|
"reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/7413f0b55a051e89485c5cb9f765fe24bb02a7b6",
|
||||||
|
"reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"composer-plugin-api": "^1.1.0 || ^2.0",
|
||||||
|
"php": "^7 || ^8"
|
||||||
|
},
|
||||||
|
"replace": {
|
||||||
|
"ocramius/package-versions": "1.11.99"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"composer/composer": "^1.9.3 || ^2.0@dev",
|
||||||
|
"ext-zip": "^1.13",
|
||||||
|
"phpunit/phpunit": "^6.5 || ^7"
|
||||||
|
},
|
||||||
|
"type": "composer-plugin",
|
||||||
|
"extra": {
|
||||||
|
"class": "PackageVersions\\Installer",
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"PackageVersions\\": "src/PackageVersions"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Marco Pivetta",
|
||||||
|
"email": "ocramius@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jordi Boggiano",
|
||||||
|
"email": "j.boggiano@seld.be"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/composer/package-versions-deprecated/issues",
|
||||||
|
"source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://packagist.com",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/composer",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2020-11-11T10:22:58+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/cache",
|
"name": "doctrine/cache",
|
||||||
"version": "1.10.2",
|
"version": "1.10.2",
|
||||||
|
|
@ -108,28 +181,29 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/dbal",
|
"name": "doctrine/dbal",
|
||||||
"version": "2.12.1",
|
"version": "3.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/doctrine/dbal.git",
|
"url": "https://github.com/doctrine/dbal.git",
|
||||||
"reference": "adce7a954a1c2f14f85e94aed90c8489af204086"
|
"reference": "ee6d1260d5cc20ec506455a585945d7bdb98662c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/doctrine/dbal/zipball/adce7a954a1c2f14f85e94aed90c8489af204086",
|
"url": "https://api.github.com/repos/doctrine/dbal/zipball/ee6d1260d5cc20ec506455a585945d7bdb98662c",
|
||||||
"reference": "adce7a954a1c2f14f85e94aed90c8489af204086",
|
"reference": "ee6d1260d5cc20ec506455a585945d7bdb98662c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
"composer/package-versions-deprecated": "^1.11.99",
|
||||||
"doctrine/cache": "^1.0",
|
"doctrine/cache": "^1.0",
|
||||||
"doctrine/event-manager": "^1.0",
|
"doctrine/event-manager": "^1.0",
|
||||||
"ext-pdo": "*",
|
"php": "^7.3 || ^8.0"
|
||||||
"php": "^7.3 || ^8"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"doctrine/coding-standard": "^8.1",
|
"doctrine/coding-standard": "^8.1",
|
||||||
"jetbrains/phpstorm-stubs": "^2019.1",
|
"jetbrains/phpstorm-stubs": "^2019.1",
|
||||||
"phpstan/phpstan": "^0.12.40",
|
"phpstan/phpstan": "^0.12.40",
|
||||||
|
"phpstan/phpstan-strict-rules": "^0.12.2",
|
||||||
"phpunit/phpunit": "^9.4",
|
"phpunit/phpunit": "^9.4",
|
||||||
"psalm/plugin-phpunit": "^0.10.0",
|
"psalm/plugin-phpunit": "^0.10.0",
|
||||||
"symfony/console": "^2.0.5|^3.0|^4.0|^5.0",
|
"symfony/console": "^2.0.5|^3.0|^4.0|^5.0",
|
||||||
|
|
@ -149,7 +223,7 @@
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Doctrine\\DBAL\\": "lib/Doctrine/DBAL"
|
"Doctrine\\DBAL\\": "src"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
|
@ -192,14 +266,13 @@
|
||||||
"queryobject",
|
"queryobject",
|
||||||
"sasql",
|
"sasql",
|
||||||
"sql",
|
"sql",
|
||||||
"sqlanywhere",
|
|
||||||
"sqlite",
|
"sqlite",
|
||||||
"sqlserver",
|
"sqlserver",
|
||||||
"sqlsrv"
|
"sqlsrv"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/doctrine/dbal/issues",
|
"issues": "https://github.com/doctrine/dbal/issues",
|
||||||
"source": "https://github.com/doctrine/dbal/tree/2.12.1"
|
"source": "https://github.com/doctrine/dbal/tree/3.0.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
|
@ -215,7 +288,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-11-14T20:26:58+00:00"
|
"time": "2020-11-15T18:20:41+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/event-manager",
|
"name": "doctrine/event-manager",
|
||||||
|
|
@ -669,29 +742,30 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "koraktor/steam-condenser",
|
"name": "koraktor/steam-condenser",
|
||||||
"version": "1.3.10",
|
"version": "dev-master",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/koraktor/steam-condenser-php.git",
|
"url": "https://github.com/koraktor/steam-condenser-php",
|
||||||
"reference": "a75269e9ff9444d3bf1dfd49a0dfe072316373e6"
|
"reference": "92dde9e3b462e93cc498fe795a712c61eec7051e"
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/koraktor/steam-condenser-php/zipball/a75269e9ff9444d3bf1dfd49a0dfe072316373e6",
|
|
||||||
"reference": "a75269e9ff9444d3bf1dfd49a0dfe072316373e6",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.0.0"
|
"monolog/monolog": "~1.10",
|
||||||
|
"php": ">=5.4.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "~3.7.0"
|
"phpdocumentor/phpdocumentor": "~2.6.1",
|
||||||
|
"phpunit/phpunit": "~4.1.3"
|
||||||
},
|
},
|
||||||
|
"default-branch": true,
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"autoload": {
|
||||||
"include-path": [
|
"files": [
|
||||||
"lib/"
|
"lib/SteamCondenser.php"
|
||||||
],
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"SteamCondenser\\": "lib/SteamCondenser"
|
||||||
|
}
|
||||||
|
},
|
||||||
"license": [
|
"license": [
|
||||||
"BSD-3-Clause"
|
"BSD-3-Clause"
|
||||||
],
|
],
|
||||||
|
|
@ -717,7 +791,7 @@
|
||||||
"source": "https://github.com/koraktor/steam-condenser-php",
|
"source": "https://github.com/koraktor/steam-condenser-php",
|
||||||
"wiki": "https://github.com/koraktor/steam-condenser/wiki"
|
"wiki": "https://github.com/koraktor/steam-condenser/wiki"
|
||||||
},
|
},
|
||||||
"time": "2015-03-19T09:43:24+00:00"
|
"time": "2015-11-05T07:13:44+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mikecao/flight",
|
"name": "mikecao/flight",
|
||||||
|
|
@ -766,6 +840,92 @@
|
||||||
},
|
},
|
||||||
"time": "2020-01-23T05:33:11+00:00"
|
"time": "2020-01-23T05:33:11+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "monolog/monolog",
|
||||||
|
"version": "1.26.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/Seldaek/monolog.git",
|
||||||
|
"reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/2209ddd84e7ef1256b7af205d0717fb62cfc9c33",
|
||||||
|
"reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.0",
|
||||||
|
"psr/log": "~1.0"
|
||||||
|
},
|
||||||
|
"provide": {
|
||||||
|
"psr/log-implementation": "1.0.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
|
||||||
|
"doctrine/couchdb": "~1.0@dev",
|
||||||
|
"graylog2/gelf-php": "~1.0",
|
||||||
|
"php-amqplib/php-amqplib": "~2.4",
|
||||||
|
"php-console/php-console": "^3.1.3",
|
||||||
|
"phpstan/phpstan": "^0.12.59",
|
||||||
|
"phpunit/phpunit": "~4.5",
|
||||||
|
"ruflin/elastica": ">=0.90 <3.0",
|
||||||
|
"sentry/sentry": "^0.13",
|
||||||
|
"swiftmailer/swiftmailer": "^5.3|^6.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
|
||||||
|
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
|
||||||
|
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
|
||||||
|
"ext-mongo": "Allow sending log messages to a MongoDB server",
|
||||||
|
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
|
||||||
|
"mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver",
|
||||||
|
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
|
||||||
|
"php-console/php-console": "Allow sending log messages to Google Chrome",
|
||||||
|
"rollbar/rollbar": "Allow sending log messages to Rollbar",
|
||||||
|
"ruflin/elastica": "Allow sending log messages to an Elastic Search server",
|
||||||
|
"sentry/sentry": "Allow sending log messages to a Sentry server"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Monolog\\": "src/Monolog"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Jordi Boggiano",
|
||||||
|
"email": "j.boggiano@seld.be",
|
||||||
|
"homepage": "http://seld.be"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
|
||||||
|
"homepage": "http://github.com/Seldaek/monolog",
|
||||||
|
"keywords": [
|
||||||
|
"log",
|
||||||
|
"logging",
|
||||||
|
"psr-3"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/Seldaek/monolog/issues",
|
||||||
|
"source": "https://github.com/Seldaek/monolog/tree/1.26.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/Seldaek",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2020-12-14T12:56:38+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/http-message",
|
"name": "psr/http-message",
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
|
|
@ -819,6 +979,56 @@
|
||||||
},
|
},
|
||||||
"time": "2016-08-06T14:39:51+00:00"
|
"time": "2016-08-06T14:39:51+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/log",
|
||||||
|
"version": "1.1.3",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/log.git",
|
||||||
|
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
|
||||||
|
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.1.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Psr\\Log\\": "Psr/Log/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP-FIG",
|
||||||
|
"homepage": "http://www.php-fig.org/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Common interface for logging libraries",
|
||||||
|
"homepage": "https://github.com/php-fig/log",
|
||||||
|
"keywords": [
|
||||||
|
"log",
|
||||||
|
"psr",
|
||||||
|
"psr-3"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/php-fig/log/tree/1.1.3"
|
||||||
|
},
|
||||||
|
"time": "2020-03-23T09:12:05+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ralouphie/getallheaders",
|
"name": "ralouphie/getallheaders",
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
|
|
@ -2722,56 +2932,6 @@
|
||||||
},
|
},
|
||||||
"time": "2019-01-08T18:20:26+00:00"
|
"time": "2019-01-08T18:20:26+00:00"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "psr/log",
|
|
||||||
"version": "1.1.3",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/php-fig/log.git",
|
|
||||||
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
|
|
||||||
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.3.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.1.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Psr\\Log\\": "Psr/Log/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "PHP-FIG",
|
|
||||||
"homepage": "http://www.php-fig.org/"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Common interface for logging libraries",
|
|
||||||
"homepage": "https://github.com/php-fig/log",
|
|
||||||
"keywords": [
|
|
||||||
"log",
|
|
||||||
"psr",
|
|
||||||
"psr-3"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"source": "https://github.com/php-fig/log/tree/1.1.3"
|
|
||||||
},
|
|
||||||
"time": "2020-03-23T09:12:05+00:00"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "sebastian/cli-parser",
|
"name": "sebastian/cli-parser",
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
|
|
@ -5118,7 +5278,9 @@
|
||||||
],
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"stability-flags": [],
|
"stability-flags": {
|
||||||
|
"koraktor/steam-condenser": 20
|
||||||
|
},
|
||||||
"prefer-stable": false,
|
"prefer-stable": false,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ use Ehesp\SteamLogin\SteamLogin;
|
||||||
use Flight;
|
use Flight;
|
||||||
use flight\net\Request;
|
use flight\net\Request;
|
||||||
use flight\net\Response;
|
use flight\net\Response;
|
||||||
use SteamId;
|
use SteamCondenser\Community\SteamId;
|
||||||
|
|
||||||
class AuthController extends BaseController {
|
class AuthController extends BaseController {
|
||||||
private UserProvider $userProvider;
|
private UserProvider $userProvider;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ namespace Demostf\API\Providers;
|
||||||
|
|
||||||
use Doctrine\DBAL\Connection;
|
use Doctrine\DBAL\Connection;
|
||||||
use RandomLib\Generator;
|
use RandomLib\Generator;
|
||||||
use SteamId;
|
use SteamCondenser\Community\SteamId;
|
||||||
|
|
||||||
class AuthProvider extends BaseProvider {
|
class AuthProvider extends BaseProvider {
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class DemoListProvider extends BaseProvider {
|
||||||
|
|
||||||
$result = $query->execute();
|
$result = $query->execute();
|
||||||
$userId = $result->fetch(PDO::FETCH_COLUMN);
|
$userId = $result->fetch(PDO::FETCH_COLUMN);
|
||||||
$result->closeCursor();
|
$result->free();
|
||||||
|
|
||||||
$where['uploader'] = $userId;
|
$where['uploader'] = $userId;
|
||||||
|
|
||||||
|
|
@ -48,7 +48,7 @@ class DemoListProvider extends BaseProvider {
|
||||||
unset($where['players']);
|
unset($where['players']);
|
||||||
$result = $query->execute();
|
$result = $query->execute();
|
||||||
$userIds = $result->fetchAll(PDO::FETCH_COLUMN);
|
$userIds = $result->fetchAll(PDO::FETCH_COLUMN);
|
||||||
$result->closeCursor();
|
$result->free();
|
||||||
|
|
||||||
$query = $this->getQueryBuilder();
|
$query = $this->getQueryBuilder();
|
||||||
$query->select('p.demo_id')
|
$query->select('p.demo_id')
|
||||||
|
|
@ -77,7 +77,7 @@ class DemoListProvider extends BaseProvider {
|
||||||
|
|
||||||
$result = $query->execute();
|
$result = $query->execute();
|
||||||
$demoIds = $result->fetchAll(PDO::FETCH_COLUMN);
|
$demoIds = $result->fetchAll(PDO::FETCH_COLUMN);
|
||||||
$result->closeCursor();
|
$result->free();
|
||||||
|
|
||||||
$query = $this->getQueryBuilder();
|
$query = $this->getQueryBuilder();
|
||||||
$query->select('*')
|
$query->select('*')
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ class DemoProvider extends BaseProvider {
|
||||||
->from('demos')
|
->from('demos')
|
||||||
->where($query->expr()->eq('hash', $query->createNamedParameter($hash)));
|
->where($query->expr()->eq('hash', $query->createNamedParameter($hash)));
|
||||||
|
|
||||||
return (int) $query->execute()->fetchColumn();
|
return (int) $query->execute()->fetchOne();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function storeDemo(Demo $demo, string $backend, string $path): int {
|
public function storeDemo(Demo $demo, string $backend, string $path): int {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ use Demostf\API\Data\User;
|
||||||
use Doctrine\DBAL\Connection;
|
use Doctrine\DBAL\Connection;
|
||||||
use PDO;
|
use PDO;
|
||||||
use RandomLib\Generator;
|
use RandomLib\Generator;
|
||||||
use SteamId;
|
use SteamCondenser\Community\SteamId;
|
||||||
|
|
||||||
class UserProvider extends BaseProvider {
|
class UserProvider extends BaseProvider {
|
||||||
/**
|
/**
|
||||||
|
|
@ -177,7 +177,7 @@ class UserProvider extends BaseProvider {
|
||||||
return $existing->getId();
|
return $existing->getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->store(new SteamId($steamId, false), $name);
|
$this->store(new SteamId($steamId), $name);
|
||||||
|
|
||||||
return $this->get($steamId)->getId();
|
return $this->get($steamId)->getId();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ use Demostf\API\Data\Player;
|
||||||
use Demostf\API\Providers\PlayerProvider;
|
use Demostf\API\Providers\PlayerProvider;
|
||||||
use Demostf\API\Providers\UserProvider;
|
use Demostf\API\Providers\UserProvider;
|
||||||
use Demostf\API\Test\TestCase;
|
use Demostf\API\Test\TestCase;
|
||||||
|
use SteamCondenser\Community\SteamId;
|
||||||
|
|
||||||
class UserProviderTest extends TestCase {
|
class UserProviderTest extends TestCase {
|
||||||
/** @var UserProvider */
|
/** @var UserProvider */
|
||||||
|
|
@ -15,7 +16,7 @@ class UserProviderTest extends TestCase {
|
||||||
/** @var PlayerProvider */
|
/** @var PlayerProvider */
|
||||||
private $playerProvider;
|
private $playerProvider;
|
||||||
|
|
||||||
/** @var \SteamId */
|
/** @var SteamId */
|
||||||
private $steamId;
|
private $steamId;
|
||||||
|
|
||||||
public function setUp(): void {
|
public function setUp(): void {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ namespace Demostf\API\Test;
|
||||||
|
|
||||||
use Doctrine\DBAL\Connection;
|
use Doctrine\DBAL\Connection;
|
||||||
use Doctrine\DBAL\DriverManager;
|
use Doctrine\DBAL\DriverManager;
|
||||||
|
use SteamCondenser\Community\SteamId;
|
||||||
|
|
||||||
abstract class TestCase extends \PHPUnit\Framework\TestCase {
|
abstract class TestCase extends \PHPUnit\Framework\TestCase {
|
||||||
/** @var Connection */
|
/** @var Connection */
|
||||||
|
|
@ -60,6 +61,6 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getSteamId($steamId, $_name) {
|
protected function getSteamId($steamId, $_name) {
|
||||||
return new \SteamId($steamId, false);
|
return new SteamId($steamId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue