diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..9a1bec9 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,20 @@ +![alt XOOPS CMS](https://xoops.org/images/logoXoopsPhp81.png) +# Contributing to [XOOPS CMS](https://xoops.org) +[![XOOPS CMS Module](https://img.shields.io/badge/XOOPS%20CMS-Module-blue.svg)](https://xoops.org) +[![Software License](https://img.shields.io/badge/license-GPL-brightgreen.svg?style=flat)](https://www.gnu.org/licenses/gpl-2.0.html) + +Contributions are **welcome** and will be fully **credited**. + +We accept contributions via Pull Requests on [GitHub](https://github.com/XoopsModules25x/mymenus). + +## Pull Requests + +- **[PSR-12 Coding Standard](https://www.php-fig.org/psr/psr-12/)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer). +- **Add tests!** - We encourage providing tests for your contributions. +- **Document any change in behavior** - Make sure the `/docs/changelog.txt` and any other relevant documentation are up-to-date. +- **Consider our release cycle** - We try to follow [Semantic Versioning v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option. +- **Create feature branches** - Don't ask us to pull from your master branch. +- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. +- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting. + +Happy coding, and **_May the Source be with You_**! diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000..ba4c492 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,40 @@ +name: Bug Report +description: Report a bug or error, providing details about the issue, steps to reproduce, and your environment setup. +title: "[Bug]: " +labels: ['Triage', 'Bug'] +body: +- type: input + attributes: + label: XOOPS Version + description: Provide the XOOPS version that you are using. + value: 2.5.12 + validations: + required: true +- type: dropdown + attributes: + label: PHP Version + description: Provide the PHP version that you are using. + options: [ '7.4', '8.0','8.1','8.2','8.3', '8.4' ] + multiple: true + validations: + required: true +- type: dropdown + attributes: + label: Operating System + description: Provide the operating system that you are using. + options: ['Linux', 'MacOS', 'Windows', 'Other'] + multiple: true + validations: + required: true +- type: textarea + attributes: + label: Description + description: Please provide a detailed description of the issue you are running into. + validations: + required: true +- type: textarea + attributes: + label: Steps to Reproduce + description: Please provide detailed steps on how we can reproduce the issue you are reporting. For a shot at getting our "Perfect Storm" label, submit a PR with a failing test! + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000..0c6d3aa --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,17 @@ +name: Feature Request +description: XMF (XOOPS Module Framework) is a work in progress! Let us know about a feature you would like to see in the module. +title: "[Feature Request]: " +labels: ['Triage', 'Feature Request'] +body: +- type: textarea + attributes: + label: Description + description: Please provide a detailed description of the feature you would like to see added. + validations: + required: true +- type: textarea + attributes: + label: Benefits + description: Please provide some thoughts on how this feature may benefit others using the module. + validations: + required: true diff --git a/.github/workflows/pr_tests.yml b/.github/workflows/pr_tests.yml index 33fbae8..ebab65c 100644 --- a/.github/workflows/pr_tests.yml +++ b/.github/workflows/pr_tests.yml @@ -27,7 +27,7 @@ jobs: strategy: fail-fast: false matrix: - php_version: ["8.1", "8.2", "8.3"] + php_version: ["8.1", "8.2", "8.3" ] runs-on: ubuntu-latest steps: @@ -47,7 +47,7 @@ jobs: strategy: fail-fast: false matrix: - php_version: ["8.2", "8.3"] + php_version: ["8.2", "8.3", "8.4"] runs-on: ubuntu-latest steps: diff --git a/.travis.yml b/.travis.yml index 49f7b44..d758495 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ php: - 8.1 - 8.2 - 8.3 +- 8.4 matrix: allow_failures: diff --git a/composer.json b/composer.json index a0ae181..20fe2e9 100644 --- a/composer.json +++ b/composer.json @@ -10,8 +10,8 @@ }, "require": { "php": ">=7.4.0", - "kint-php/kint": "^5.1.1", - "symfony/yaml": "^5.4.39", + "kint-php/kint": "^6.0", + "symfony/yaml": "^5.4.45", "paragonie/random_compat": "^9.99.100", "firebase/php-jwt": "^6.10.0", "webmozart/assert": "^1.11.0" diff --git a/docs/changelog.md b/docs/changelog.md index 8d8544f..4f75dbc 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,6 +1,14 @@ xmf ChangeLog ============= +Nov 27, 2024 v1.2.31 +------------------ +* updated Debug for Kint changes (mamba) +* added Issues Template (mamba) +* PHP 8.4 Implicitly nullable parameters (mamba) +* Update PhpUnit versions (mamba) +* upgrade Smarty to 4.5.5 + May 30, 2024 v1.2.30 ------------------ * upgrade Smarty to 4.5.3 diff --git a/src/Debug.php b/src/Debug.php index 450e552..66a38c7 100644 --- a/src/Debug.php +++ b/src/Debug.php @@ -11,6 +11,7 @@ namespace Xmf; +use Kint\Kint; /** * Debugging tools for developers * @@ -22,7 +23,7 @@ * @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html) * @link https://xoops.org */ -class Debug extends \Kint +class Debug extends Kint { /** * doOnce - do some local housekeeping on first use. Any method needing this @@ -39,7 +40,7 @@ private static function doOnce() parent::$aliases[] = array($class, 'dump'); parent::$aliases[] = array($class, 'backtrace'); parent::$enabled_mode = true; - parent::$mode_default = \Kint::MODE_RICH; + parent::$mode_default = Kint::MODE_RICH; // display output inline ::folder = false, true puts all output at bottom of window \Kint\Renderer\RichRenderer::$folder = false; // options: 'original' (default), 'solarized', 'solarized-dark' and 'aante-light' @@ -50,16 +51,14 @@ private static function doOnce() /** * Dump one or more variables * - * @param mixed $data variable(s) to dump - * + * @psalm-param array ...$args * @return void */ - public static function dump($data = null) + public static function dump(...$args) { - $args = func_get_args(); static::doOnce(); - forward_static_call_array(array('parent', 'dump'), $args); + parent::dump(...$args); } /** diff --git a/src/Jwt/KeyFactory.php b/src/Jwt/KeyFactory.php index de6387c..a90e429 100644 --- a/src/Jwt/KeyFactory.php +++ b/src/Jwt/KeyFactory.php @@ -38,7 +38,7 @@ class KeyFactory * * @throws \InvalidArgumentException on unusable key name */ - public static function build($keyName, StorageInterface $storage = null) + public static function build($keyName, ?StorageInterface $storage = null) { if (empty($keyName) || !is_string($keyName)) { throw new \InvalidArgumentException('keyName must be a non-empty string');