Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4e3236a
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 5, 2023
75a09c3
Add DevContainer configuration
bumbummen99 Nov 20, 2024
3a385ce
Use GitHub Action to upload coverage to Scruntinizer
bumbummen99 Nov 20, 2024
2ee9b79
Merge pull request #682 from Austinb/bumbummen99-devcontainer
bumbummen99 Nov 20, 2024
026c796
Update Tests.yml
bumbummen99 Nov 20, 2024
a7e42da
Update README.md
bumbummen99 Nov 20, 2024
e9a315a
Merge pull request #728 from Austinb/bumbummen99-patch-1
bumbummen99 Nov 20, 2024
dc00fae
Merge pull request #714 from Austinb/dependabot/github_actions/v3/act…
bumbummen99 Nov 29, 2024
37cdd6d
Solve warnings and remove deprecated code (#729)
bumbummen99 Nov 30, 2024
e623f39
Initial class for Stationeers protocol for #659 with tests. (#660)
Austinb Dec 1, 2024
bf0201d
QoL for Visual Studio Code (#732)
bumbummen99 Dec 2, 2024
adbfd0f
[Change] Apply code style using PHP Coding Standards Fixer (#733)
bumbummen99 Dec 2, 2024
bdcea91
Allow local phpunit.xml (#734)
bumbummen99 Dec 2, 2024
7706af8
Bump actions/cache from 3 to 4 (#735)
dependabot[bot] Dec 2, 2024
d16c7e0
[Add[ GitHub Workflows extension for VSCode to DevContainer configura…
bumbummen99 Dec 4, 2024
c734cb0
[Add] apigen helper script to run dockerized ApiGen, (#738)
bumbummen99 Dec 4, 2024
fd2b811
[Fix] Ensure ApiGen job ran before GitHub Pages (#739)
bumbummen99 Dec 4, 2024
1697c56
Try to prevent overwriting checkout in GitHub Pages workflow (#740)
bumbummen99 Dec 4, 2024
fea6416
Use seperate paths for checking out pages & source (#741)
bumbummen99 Dec 4, 2024
286f4ec
[Add] Link to API documentation to Readme (#742)
bumbummen99 Dec 4, 2024
3249beb
Added Epic Online Services and ARK: Survival Ascended protocols (#731)
RouatbiH Jan 22, 2025
836575f
Revert "Added Epic Online Services and ARK: Survival Ascended protoco…
bumbummen99 Jan 22, 2025
105154b
Added Epic Online Services and ARK: Survival Ascended protocols (#749)
RouatbiH Jan 23, 2025
2ea13cc
[Fix] Epic Online Services protocol beforeSend signature compatibilit…
bumbummen99 Feb 14, 2025
347cf58
[Fix] Set proper permissions when creating provider directory (#746)
RouatbiH Feb 19, 2025
e3d857a
Merge remote-tracking branch 'upstream/v3' into boy132/upstream-changes
Boy132 Jan 5, 2026
184e2b7
fixes after merge
Boy132 Jan 5, 2026
7b62d25
fixes and cleanup
Boy132 Jan 6, 2026
6c484a6
remove apigen
Boy132 Jan 6, 2026
59dcd30
more cleanup and fixes
Boy132 Jan 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/php
{
"name": "PHP",
"build": {
"dockerfile": "docker/Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"customizations": {
"vscode": {
"extensions": [
"junstyle.php-cs-fixer",
"GitHub.vscode-github-actions"
],
"settings": {
"php-cs-fixer.onsave": true,
"[php]": {
"editor.defaultFormatter": "junstyle.php-cs-fixer"
}
}
}
},
"postCreateCommand": ".devcontainer/postCreate.sh",
"remoteUser": "vscode"
}
44 changes: 44 additions & 0 deletions .devcontainer/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
########################## Base ###########################
# Create & configure the base for this DevContainer image #
###########################################################

# Define the DevContainer template to be used as the base
ARG PHP=8.3
ARG DISTRO=bullseye

FROM mcr.microsoft.com/vscode/devcontainers/php:$PHP-$DISTRO

# Add global Composer /bin to PATH for vscode
USER vscode

RUN echo "export PATH=\$(XDEBUG_MODE=off composer global config bin-dir --absolute --quiet):\$PATH" >> ~/.bashrc

# Add global Composer /bin to PATH for root
USER root

RUN echo "export PATH=\$(XDEBUG_MODE=off composer global config bin-dir --absolute --quiet):\$PATH" >> ~/.bashrc

##################### Dependencies #####################
# Add any dependencies required to develop the project #
########################################################

# Update the registry once
RUN apt-get update

# Install ext-bz2
RUN apt-get install -y libbz2-dev \
&& docker-php-ext-configure bz2 \
&& docker-php-ext-install bz2


###################### Tools ######################
# Install tools that are required for development #
###################################################

# Install act
RUN curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash -s -- -b /usr/local/bin

# Install PHP Code Sniffer Fixer
USER vscode

RUN composer global require friendsofphp/php-cs-fixer
6 changes: 6 additions & 0 deletions .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

# Install dependencies using Composer
if [ ! -f composer.lock ]; then
composer install
fi
9 changes: 4 additions & 5 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,37 @@ jobs:
php: [8.1, 8.2, 8.3]
ocular: [^1.9]
experimental: [false]
composer-extra: ['']
composer-extra: [""]
include:
- php: 8.4
experimental: true
env:
PHP_VERSION: ${{ matrix.php }}
name: PHP ${{ matrix.php }}
steps:

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: bz2,xml,curl

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 10

- name: Validate composer.json
run: composer validate

- name: Cache composer files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Install dependencies using composer
run: composer install --prefer-dist --no-interaction ${{ matrix.composer-extra }}

- name: PHP CodeStyle
run: |
mkdir -p build/logs
Expand Down
26 changes: 21 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
# Development
/remotes/
test.php
/.buildpath
/.project
/.settings/*
vendor

# JetBrains
/.idea
.phpunit.result.cache
*.iml

# Composer
vendor
composer.lock
composer.phar

# ApiGen
build/apigen

# PHPUnit
phpunit.xml
.phpunit.result.cache
coverage/
build/logs/*
!build/logs/.gitkeep
build/logs/
test.php
*.iml

# PHP Code Sniffer Fixer
.php-cs-fixer.cache
29 changes: 29 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

$finder = (new PhpCsFixer\Finder())
->in([
__DIR__.'/src',
__DIR__.'/tests',
])
;

return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => true,

/* Imports / use */
'no_unused_imports' => true,
'no_unneeded_import_alias' => true,
'no_leading_import_slash' => true,
'ordered_imports' => true,

/* Comments */
'single_line_comment_style' => true,

/* Blank lines */
'no_extra_blank_lines' => [
'tokens' => ['curly_brace_block']
]
])
->setFinder($finder)
;
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"junstyle.php-cs-fixer",
"github.vscode-github-actions"
]
}
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug Tests",
"type": "php",
"request": "launch",
"port": 0,
"cwd": "${workspaceFolder}",
"runtimeArgs": [
"-dxdebug.mode=debug,develop",
"-dxdebug.client_port=${port}",
"-dxdebug.start_with_request=yes"
],
"program": "${workspaceFolder}/vendor/bin/phpunit",
}
]
}
72 changes: 72 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Test",
"isTestCommand": true,
"dependsOrder": "sequence",
"dependsOn": [
"PHP Code Sniffer",
"PHP Mess Detector",
"PHPUnit"
]
},
{
"label": "PHP Code Sniffer",
"type": "shell",
"command": "vendor/bin/phpcs",
"args": [
"src",
"tests",
"--extensions=php",
"--ignore=bootstrap",
"--report=checkstyle",
"--report-file=build/logs/checkstyle.xml",
"--standard=build/config/phpcs.xml",
"-v"
]
},
{
"label": "PHP Coding Standards Fixer",
"type": "shell",
"command": "php-cs-fixer",
"args": [
"fix"
]
},
{
"label": "PHP Mess Detector",
"type": "shell",
"command": "vendor/bin/phpmd",
"args": [
"src,tests",
"xml",
"build/config/phpmd.xml"
]
},
{
"label": "PHPUnit",
"type": "shell",
"command": "vendor/bin/phpunit"
},
{
"label": "GitHub Workflows",
"type": "shell",
"command": "act",
"args": [
"--platform=ubuntu-latest=catthehacker/ubuntu:act-latest",
"--job=${input:GitHubWorkflowsJob}"
]
},
],
"inputs": [
{
"id": "GitHubWorkflowsJob",
"type": "promptString",
"description": "Job:",
"default": "CI"
}
]
}
8 changes: 8 additions & 0 deletions GameQ.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"folders": [
{
"path": "."
}
],
"settings": {}
}
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# GameQ Fork by Krymo Software

[![CI](https://github.com/KrymoSoftware/GameQ/actions/workflows/Tests.yml/badge.svg)](https://github.com/KrymoSoftware/GameQ/actions/workflows/Tests.yml)
[![License](https://img.shields.io/badge/license-LGPL-blue.svg?style=flat)](https://packagist.org/packages/krymosoftware/gameq)

Expand All @@ -8,11 +9,14 @@ This repository is a maintained fork of [Austinb/GameQ](https://github.com/Austi
While we don't plan to add new games for now, we'll ensure compatibility with the latest PHP versions and fix issues as they arise.

## Requirements

* PHP 8.1+ - [Tested](https://github.com/KrymoSoftware/GameQ/actions/workflows/Tests.yml) in PHP 8.1, 8.2 and 8.3
* [Bzip2](http://www.php.net/manual/en/book.bzip2.php) - Used for A2S compressed responses

## Installation

#### [Composer](https://getcomposer.org/)

This method assumes you already have composer [installed](https://getcomposer.org/doc/00-intro.md) and working properly. Add `krymosoftware/gameq` as a requirement to composer.json by using `composer require krymosoftware/gameq:^4.0.0` or by manually adding the following to the *composer.json* file in the **require** section:

```json
Expand All @@ -22,14 +26,17 @@ This method assumes you already have composer [installed](https://getcomposer.or
Update your packages with `composer update` or install with `composer install`.

#### Standalone Library

Download the [latest version](https://github.com/KrymoSoftware/GameQ/releases) of the library and unpack it into your project. Add the following to your bootstrap file:

```php
require_once('/path/to/src/GameQ/Autoloader.php');
```

The `Autoloader.php` file provides the same autoloading functionality as the Composer installation.

## Example
## Useage

```php
$GameQ = new \GameQ\GameQ();
$GameQ->addServer([
Expand All @@ -38,13 +45,15 @@ $GameQ->addServer([
]);
$results = $GameQ->process();
```
Need more? See [Examples](https://github.com/Austinb/GameQ/wiki/Examples-v3).

## Contributing

Need more? See the [Examples](https://github.com/Austinb/GameQ/wiki/Examples-v3) as well as the [Documentation](https://austinb.github.io/GameQ/api/).

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## License

See [LICENSE](LICENSE.lgpl) for more information

## Third Party Provider
Expand Down
26 changes: 0 additions & 26 deletions phpunit.xml

This file was deleted.

1 change: 0 additions & 1 deletion src/GameQ/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* See: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader-examples.md
*/
spl_autoload_register(static function ($class) {

// project-specific namespace prefix
$prefix = 'GameQ\\';

Expand Down
Loading