diff --git a/composer.json b/composer.json index 511ec417..f04136f8 100644 --- a/composer.json +++ b/composer.json @@ -4,20 +4,20 @@ "license": "GPL-3.0-or-later", "homepage": "https://www.phpservermonitor.org", "require": { - "php": "^5.5.9|>=7.0.8", + "php": ">=8.1.0", "ext-curl": "*", "ext-json": "*", "ext-pdo": "*", "ext-xml": "*", - "phpmailer/phpmailer": ">=6.5.0 ~6.0", - "symfony/config": "~3.4", - "symfony/dependency-injection": "~3.4", - "symfony/event-dispatcher": "~3.4", - "symfony/http-foundation": ">=3.4.35 ~3.4", - "symfony/filesystem": "~3.4", - "php-pushover/php-pushover": "dev-master", - "paragonie/random_compat": "^2.0", - "twig/twig": "~1.35", + "phpmailer/phpmailer": "^6.9", + "symfony/config": "^4.4", + "symfony/dependency-injection": "^4.4", + "symfony/event-dispatcher": "^5.4", + "symfony/http-foundation": "^6.4", + "symfony/filesystem": "^5.4", + "php-pushover/php-pushover": "^1.0", + "paragonie/random_compat": "^9.99", + "twig/twig": "^3.8", "jaxl/jaxl": "^3.1", "viharm/psm-ldap-auth": "^1.1" }, @@ -29,5 +29,10 @@ "psr-4": { "psm\\": "src/psm/" } + }, + "config": { + "allow-plugins": { + "mnsami/composer-custom-directory-installer": true + } } } \ No newline at end of file diff --git a/composer.lock b/composer.lock index 0ac4f53c..313e0ed3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c967e1466fd2a2effd7f76650bba60d7", + "content-hash": "083c1eada4c6f99210f4eacc76ce8b5f", "packages": [ { "name": "jaxl/jaxl", @@ -142,33 +142,29 @@ }, { "name": "paragonie/random_compat", - "version": "v2.0.20", + "version": "v9.99.100", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "0f1f60250fccffeaf5dda91eea1c018aed1adc2a" + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0f1f60250fccffeaf5dda91eea1c018aed1adc2a", - "reference": "0f1f60250fccffeaf5dda91eea1c018aed1adc2a", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", "shasum": "" }, "require": { - "php": ">=5.2.0" + "php": ">= 7" }, "require-dev": { - "phpunit/phpunit": "4.*|5.*" + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" }, "suggest": { "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." }, "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -192,23 +188,22 @@ "issues": "https://github.com/paragonie/random_compat/issues", "source": "https://github.com/paragonie/random_compat" }, - "time": "2021-04-17T09:33:01+00:00" + "time": "2020-10-15T08:29:30+00:00" }, { "name": "php-pushover/php-pushover", - "version": "dev-master", + "version": "v1.0.1", "source": { "type": "git", "url": "https://github.com/cschalenborgh/php-pushover.git", - "reference": "ef1df985bf3acb17b1f1f8fe2df2c3c9a16bef32" + "reference": "b2d060efacf48e4c6821427691b19db0315ccedd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cschalenborgh/php-pushover/zipball/ef1df985bf3acb17b1f1f8fe2df2c3c9a16bef32", - "reference": "ef1df985bf3acb17b1f1f8fe2df2c3c9a16bef32", + "url": "https://api.github.com/repos/cschalenborgh/php-pushover/zipball/b2d060efacf48e4c6821427691b19db0315ccedd", + "reference": "b2d060efacf48e4c6821427691b19db0315ccedd", "shasum": "" }, - "default-branch": true, "type": "library", "autoload": { "files": [ @@ -227,20 +222,20 @@ "issues": "https://github.com/cschalenborgh/php-pushover/issues", "source": "https://github.com/cschalenborgh/php-pushover/tree/master" }, - "time": "2021-01-12T12:43:39+00:00" + "time": "2019-09-26T19:38:11+00:00" }, { "name": "phpmailer/phpmailer", - "version": "v6.5.0", + "version": "v6.9.1", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c" + "reference": "039de174cd9c17a8389754d3b877a2ed22743e18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a5b5c43e50b7fba655f793ad27303cd74c57363c", - "reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/039de174cd9c17a8389754d3b877a2ed22743e18", + "reference": "039de174cd9c17a8389754d3b877a2ed22743e18", "shasum": "" }, "require": { @@ -250,20 +245,25 @@ "php": ">=5.5.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "doctrine/annotations": "^1.2", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "doctrine/annotations": "^1.2.6 || ^1.13.3", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.5.6", - "yoast/phpunit-polyfills": "^0.2.0" + "squizlabs/php_codesniffer": "^3.7.2", + "yoast/phpunit-polyfills": "^1.0.4" }, "suggest": { + "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", + "ext-openssl": "Needed for secure SMTP sending and DKIM signing", + "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", "league/oauth2-google": "Needed for Google XOAUTH2 authentication", "psr/log": "For optional PSR-3 debug logging", - "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", - "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)", + "thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication" }, "type": "library", "autoload": { @@ -295,7 +295,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.0" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.1" }, "funding": [ { @@ -303,24 +303,24 @@ "type": "github" } ], - "time": "2021-06-16T14:33:43+00:00" + "time": "2023-11-25T22:23:28+00:00" }, { "name": "psr/container", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", "autoload": { @@ -349,38 +349,90 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { - "name": "symfony/config", - "version": "v3.4.47", + "name": "psr/event-dispatcher", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f" + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f", - "reference": "bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/filesystem": "~2.8|~3.0|~4.0", - "symfony/polyfill-ctype": "~1.8" + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "symfony/config", + "version": "v4.4.44", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "ed42f8f9da528d2c6cae36fe1f380b0c1d8f0658" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/ed42f8f9da528d2c6cae36fe1f380b0c1d8f0658", + "reference": "ed42f8f9da528d2c6cae36fe1f380b0c1d8f0658", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "symfony/filesystem": "^3.4|^4.0|^5.0", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php80": "^1.16", + "symfony/polyfill-php81": "^1.22" }, "conflict": { - "symfony/dependency-injection": "<3.3", - "symfony/finder": "<3.3" + "symfony/finder": "<3.4" }, "require-dev": { - "symfony/dependency-injection": "~3.3|~4.0", - "symfony/event-dispatcher": "~3.3|~4.0", - "symfony/finder": "~3.3|~4.0", - "symfony/yaml": "~3.0|~4.0" + "symfony/event-dispatcher": "^3.4|^4.0|^5.0", + "symfony/finder": "^3.4|^4.0|^5.0", + "symfony/messenger": "^4.1|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/yaml": "^3.4|^4.0|^5.0" }, "suggest": { "symfony/yaml": "To use the yaml reference dumper" @@ -408,10 +460,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Config Component", + "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v3.4.47" + "source": "https://github.com/symfony/config/tree/v4.4.44" }, "funding": [ { @@ -427,39 +479,42 @@ "type": "tidelift" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2022-07-20T09:59:04+00:00" }, { "name": "symfony/dependency-injection", - "version": "v3.4.47", + "version": "v4.4.49", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "51d2a2708c6ceadad84393f8581df1dcf9e5e84b" + "reference": "9065fe97dbd38a897e95ea254eb5ddfe1310f734" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/51d2a2708c6ceadad84393f8581df1dcf9e5e84b", - "reference": "51d2a2708c6ceadad84393f8581df1dcf9e5e84b", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/9065fe97dbd38a897e95ea254eb5ddfe1310f734", + "reference": "9065fe97dbd38a897e95ea254eb5ddfe1310f734", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "psr/container": "^1.0" + "php": ">=7.1.3", + "psr/container": "^1.0", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1.6|^2" }, "conflict": { - "symfony/config": "<3.3.7", - "symfony/finder": "<3.3", + "symfony/config": "<4.3|>=5.0", + "symfony/finder": "<3.4", "symfony/proxy-manager-bridge": "<3.4", - "symfony/yaml": "<3.4" + "symfony/yaml": "<4.4.26" }, "provide": { - "psr/container-implementation": "1.0" + "psr/container-implementation": "1.0", + "symfony/service-implementation": "1.0|2.0" }, "require-dev": { - "symfony/config": "~3.3|~4.0", - "symfony/expression-language": "~2.8|~3.0|~4.0", - "symfony/yaml": "~3.4|~4.0" + "symfony/config": "^4.3", + "symfony/expression-language": "^3.4|^4.0|^5.0", + "symfony/yaml": "^4.4.26|^5.0" }, "suggest": { "symfony/config": "", @@ -491,10 +546,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony DependencyInjection Component", + "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v3.4.47" + "source": "https://github.com/symfony/dependency-injection/tree/v4.4.49" }, "funding": [ { @@ -510,35 +565,111 @@ "type": "tidelift" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2022-11-16T16:18:09+00:00" }, { - "name": "symfony/event-dispatcher", - "version": "v3.4.47", + "name": "symfony/deprecation-contracts", + "version": "v3.4.0", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "31fde73757b6bad247c54597beef974919ec6860" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/31fde73757b6bad247c54597beef974919ec6860", - "reference": "31fde73757b6bad247c54597beef974919ec6860", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "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": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.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": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v5.4.26", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5dcc00e03413f05c1e7900090927bb7247cb0aac", + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/event-dispatcher-contracts": "^2|^3", + "symfony/polyfill-php80": "^1.16" }, "conflict": { - "symfony/dependency-injection": "<3.3" + "symfony/dependency-injection": "<4.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0|~4.0", - "symfony/debug": "~3.4|~4.4", - "symfony/dependency-injection": "~3.3|~4.0", - "symfony/expression-language": "~2.8|~3.0|~4.0", - "symfony/stopwatch": "~2.8|~3.0|~4.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/http-foundation": "^4.4|^5.0|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/stopwatch": "^4.4|^5.0|^6.0" }, "suggest": { "symfony/dependency-injection": "", @@ -567,10 +698,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony EventDispatcher Component", + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v3.4.47" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.26" }, "funding": [ { @@ -586,25 +717,103 @@ "type": "tidelift" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2023-07-06T06:34:20+00:00" }, { - "name": "symfony/filesystem", - "version": "v3.4.47", + "name": "symfony/event-dispatcher-contracts", + "version": "v3.4.0", "source": { "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "e58d7841cddfed6e846829040dca2cca0ebbbbb3" + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/e58d7841cddfed6e846829040dca2cca0ebbbbb3", - "reference": "e58d7841cddfed6e846829040dca2cca0ebbbbb3", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-ctype": "~1.8" + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "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 dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.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": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.4.25", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8", + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -629,10 +838,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Filesystem Component", + "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v3.4.47" + "source": "https://github.com/symfony/filesystem/tree/v5.4.25" }, "funding": [ { @@ -648,29 +857,40 @@ "type": "tidelift" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2023-05-31T13:04:02+00:00" }, { "name": "symfony/http-foundation", - "version": "v3.4.47", + "version": "v6.4.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "b9885fcce6fe494201da4f70a9309770e9d13dc8" + "reference": "44a6d39a9cc11e154547d882d5aac1e014440771" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b9885fcce6fe494201da4f70a9309770e9d13dc8", - "reference": "b9885fcce6fe494201da4f70a9309770e9d13dc8", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/44a6d39a9cc11e154547d882d5aac1e014440771", + "reference": "44a6d39a9cc11e154547d882d5aac1e014440771", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php70": "~1.6" + "symfony/polyfill-php83": "^1.27" + }, + "conflict": { + "symfony/cache": "<6.3" }, "require-dev": { - "symfony/expression-language": "~2.8|~3.0|~4.0" + "doctrine/dbal": "^2.13.1|^3|^4", + "predis/predis": "^1.1|^2.0", + "symfony/cache": "^6.3|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4|^7.0", + "symfony/mime": "^5.4|^6.0|^7.0", + "symfony/rate-limiter": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -695,10 +915,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony HttpFoundation Component", + "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v3.4.47" + "source": "https://github.com/symfony/http-foundation/tree/v6.4.0" }, "funding": [ { @@ -714,32 +934,35 @@ "type": "tidelift" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2023-11-20T16:41:16+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-ctype": "*" + }, "suggest": { "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -747,12 +970,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -777,7 +1000,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -793,32 +1016,35 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.23.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1", - "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, "suggest": { "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -826,12 +1052,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -857,7 +1083,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -873,35 +1099,290 @@ "type": "tidelift" } ], - "time": "2021-05-27T09:27:20+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { - "name": "symfony/polyfill-php70", - "version": "v1.20.0", + "name": "symfony/polyfill-php80", + "version": "v1.28.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", "shasum": "" }, "require": { "php": ">=7.1" }, - "type": "metapackage", + "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" } }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "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.28.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": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-php81", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "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": "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.28.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": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-php83", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php83.git", + "reference": "b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11", + "reference": "b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-php80": "^1.14" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php83\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "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": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php83/tree/v1.28.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": "2023-08-16T06:22:46+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" + }, + "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" @@ -916,16 +1397,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "description": "Generic abstractions related to writing services", "homepage": "https://symfony.com", "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" ], "support": { - "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" }, "funding": [ { @@ -941,40 +1424,34 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2022-05-30T19:17:29+00:00" }, { "name": "twig/twig", - "version": "v1.44.4", + "version": "v3.8.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "4d400421528e9fa40caaffcf7824c172526dd99d" + "reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/4d400421528e9fa40caaffcf7824c172526dd99d", - "reference": "4d400421528e9fa40caaffcf7824c172526dd99d", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/9d15f0ac07f44dc4217883ec6ae02fd555c6f71d", + "reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/polyfill-ctype": "^1.8" + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php80": "^1.22" }, "require-dev": { - "psr/container": "^1.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9" + "psr/container": "^1.0|^2.0", + "symfony/phpunit-bridge": "^5.4.9|^6.3|^7.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.44-dev" - } - }, "autoload": { - "psr-0": { - "Twig_": "lib/" - }, "psr-4": { "Twig\\": "src/" } @@ -1007,7 +1484,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v1.44.4" + "source": "https://github.com/twigphp/Twig/tree/v3.8.0" }, "funding": [ { @@ -1019,7 +1496,7 @@ "type": "tidelift" } ], - "time": "2021-05-16T12:11:20+00:00" + "time": "2023-11-21T18:54:41+00:00" }, { "name": "viharm/php-db-auth", @@ -1219,18 +1696,16 @@ "packages-dev": [], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "php-pushover/php-pushover": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^5.5.9|>=7.0.8", + "php": ">=8.1.0", "ext-curl": "*", "ext-json": "*", "ext-pdo": "*", "ext-xml": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.6.0" } diff --git a/cron/status.cron.php b/cron/status.cron.php index 0151d202..64a1bbac 100644 --- a/cron/status.cron.php +++ b/cron/status.cron.php @@ -63,7 +63,7 @@ namespace { } $cron_timeout = PSM_CRON_TIMEOUT; -// parse a couple of arguments + // parse a couple of arguments if (!empty($_SERVER['argv'])) { foreach ($_SERVER['argv'] as $argv) { $argi = explode('=', ltrim($argv, '--')); @@ -83,10 +83,10 @@ namespace { } } -// prevent cron from running twice at the same time -// however if the cron has been running for X mins, we'll assume it died and run anyway -// if you want to change PSM_CRON_TIMEOUT, have a look in src/includes/psmconfig.inc.php. -// or you can provide the --timeout=x argument + // prevent cron from running twice at the same time + // however if the cron has been running for X mins, we'll assume it died and run anyway + // if you want to change PSM_CRON_TIMEOUT, have a look in src/includes/psmconfig.inc.php. + // or you can provide the --timeout=x argument $status = null; if (PHP_SAPI === 'cli') { diff --git a/img/alert.jpg b/img/alert.jpg new file mode 100644 index 00000000..14276824 Binary files /dev/null and b/img/alert.jpg differ diff --git a/img/alert.png b/img/alert.png new file mode 100644 index 00000000..5b0551eb Binary files /dev/null and b/img/alert.png differ diff --git a/src/config/services.xml b/src/config/services.xml index 43446dcd..4b3f3e24 100644 --- a/src/config/services.xml +++ b/src/config/services.xml @@ -42,16 +42,16 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/sc %db.port% - + - + %path.templates%/%config.theme% - + diff --git a/src/includes/functions.inc.php b/src/includes/functions.inc.php index 85e11b3c..65f4b1b9 100644 --- a/src/includes/functions.inc.php +++ b/src/includes/functions.inc.php @@ -489,20 +489,19 @@ namespace { $time = strtotime($time); } if ($time < strtotime(date('Y-m-d 00:00:00')) - 60 * 60 * 24 * 3) { - $format = psm_get_lang('system', (date('Y') !== date('Y', $time)) ? - 'long_day_format' : 'short_day_format'); + $format = psm_get_lang('system', (date('Y') !== date('Y', $time) ? 'long_day_format' : 'short_day_format')); // Check for Windows to find and replace the %e // modifier correctly if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { $format = preg_replace('#(?= 60 * 60 * 24) { $format = psm_get_lang('system', (date('l', time() - 60 * 60 * 24) == date('l', $time)) ? - 'yesterday_format' : 'other_day_format'); - return strftime($format, $time); + 'yesterday_format' : 'other_day_format'); + return date(strftime_format_to_date_format($format), $time); } if ($d >= 60 * 60 * 2) { return sprintf(psm_get_lang('system', 'hours_ago'), intval($d / (60 * 60))); @@ -533,7 +532,7 @@ namespace { if (empty($time) || $time == '0000-00-00 00:00:00') { return psm_get_lang('system', 'never'); } - return strftime('%x %X', strtotime($time)); + return date(strftime_format_to_date_format('%x %X'), strtotime($time)); } /** @@ -1006,13 +1005,43 @@ namespace { return $decrypted; } - + /** - * Send notification to Telegram - * - * @return string - * @author Tim Zandbergen + * Convert strftime format to php date format + * @param $strftimeformat + * @return string|string[] + * @throws Exception */ + function strftime_format_to_date_format($strftimeformat){ + $unsupported = ['%U', '%V', '%C', '%g', '%G']; + $foundunsupported = []; + foreach($unsupported as $unsup){ + if (strpos($strftimeformat, $unsup) !== false){ + $foundunsupported[] = $unsup; + } + } + if (!empty($foundunsupported)){ + throw new \Exception("Found these unsupported chars: ".implode(",", $foundunsupported).' in '.$strftimeformat); + } + // It is important to note that some do not translate accurately ie. lowercase L is supposed to convert to number with a preceding space if it is under 10, there is no accurate conversion so we just use 'g' + $phpdateformat = str_replace( + ['%a','%A','%d','%e','%u','%w','%W','%b','%h','%B','%m','%y','%Y', '%D', '%F', '%x', '%n', '%t', '%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r' /* %I:%M:%S %p */, '%R' /* %H:%M */, '%S', '%T' /* %H:%M:%S */, '%X', '%z', '%Z', + '%c', '%s', + '%%'], + ['D','l', 'd', 'j', 'N', 'w', 'W', 'M', 'M', 'F', 'm', 'y', 'Y', 'm/d/y', 'Y-m-d', 'm/d/y',"\n","\t", 'H', 'G', 'h', 'g', 'i', 'A', 'a', 'h:i:s A', 'H:i', 's', 'H:i:s', 'H:i:s', 'O', 'T', + 'D M j H:i:s Y' /*Tue Feb 5 00:45:10 2009*/, 'U', + '%'], + $strftimeformat + ); + return $phpdateformat; + } + + /** + * Send notification to Telegram + * + * @return string + * @author Tim Zandbergen + */ class Telegram { private $token; diff --git a/src/psm/Module/AbstractController.php b/src/psm/Module/AbstractController.php index d5cc0187..fb5d2be9 100644 --- a/src/psm/Module/AbstractController.php +++ b/src/psm/Module/AbstractController.php @@ -109,7 +109,7 @@ abstract class AbstractController implements ControllerInterface /** * Twig object - * @var \Twig_Environment $twig + * @var \Twig\Environment $twig */ protected $twig; @@ -146,7 +146,7 @@ abstract class AbstractController implements ControllerInterface */ protected $xhr = false; - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { $this->db = $db; $this->twig = $twig; diff --git a/src/psm/Module/Config/Controller/ConfigController.php b/src/psm/Module/Config/Controller/ConfigController.php index 5285ea70..fecd4eff 100644 --- a/src/psm/Module/Config/Controller/ConfigController.php +++ b/src/psm/Module/Config/Controller/ConfigController.php @@ -114,7 +114,7 @@ class ConfigController extends AbstractController private $default_tab = 'general'; - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); diff --git a/src/psm/Module/ControllerInterface.php b/src/psm/Module/ControllerInterface.php index 672fbe1a..d16fa5bd 100644 --- a/src/psm/Module/ControllerInterface.php +++ b/src/psm/Module/ControllerInterface.php @@ -35,7 +35,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; interface ControllerInterface extends ContainerAwareInterface { - public function __construct(Database $db, \Twig_Environment $twig); + public function __construct(Database $db, \Twig\Environment $twig); /** * Run the controller diff --git a/src/psm/Module/Error/Controller/ErrorController.php b/src/psm/Module/Error/Controller/ErrorController.php index 83d4a0fe..23c1ac20 100644 --- a/src/psm/Module/Error/Controller/ErrorController.php +++ b/src/psm/Module/Error/Controller/ErrorController.php @@ -35,7 +35,7 @@ use psm\Service\Database; class ErrorController extends AbstractController { - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); diff --git a/src/psm/Module/Install/Controller/InstallController.php b/src/psm/Module/Install/Controller/InstallController.php index 7afd97f1..c8bc5dd6 100644 --- a/src/psm/Module/Install/Controller/InstallController.php +++ b/src/psm/Module/Install/Controller/InstallController.php @@ -47,7 +47,7 @@ class InstallController extends AbstractController */ protected $path_config_old; - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); diff --git a/src/psm/Module/Server/Controller/AbstractServerController.php b/src/psm/Module/Server/Controller/AbstractServerController.php index 8ae2968c..5b24a0e4 100644 --- a/src/psm/Module/Server/Controller/AbstractServerController.php +++ b/src/psm/Module/Server/Controller/AbstractServerController.php @@ -81,7 +81,7 @@ abstract class AbstractServerController extends AbstractController `s`.`active`, `s`.`email`, `s`.`sms`, - `s`.`discord`, + `s`.`discord`, `s`.`webhook`, `s`.`pushover`, `s`.`telegram`, diff --git a/src/psm/Module/Server/Controller/LogController.php b/src/psm/Module/Server/Controller/LogController.php index 39817695..2f68f79b 100644 --- a/src/psm/Module/Server/Controller/LogController.php +++ b/src/psm/Module/Server/Controller/LogController.php @@ -36,7 +36,7 @@ use psm\Service\Database; class LogController extends AbstractServerController { - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); diff --git a/src/psm/Module/Server/Controller/ServerController.php b/src/psm/Module/Server/Controller/ServerController.php index cb08e5fc..53ab97ab 100644 --- a/src/psm/Module/Server/Controller/ServerController.php +++ b/src/psm/Module/Server/Controller/ServerController.php @@ -42,7 +42,7 @@ class ServerController extends AbstractServerController */ protected $server_id; - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); @@ -518,14 +518,14 @@ class ServerController extends AbstractServerController 'label' => $server_available['label'], ); } - + $tpl_data['last_output_truncated'] = $tpl_data['last_output']; $tpl_data['last_error_output_truncated'] = $tpl_data['last_error_output']; - + if (strlen($tpl_data['last_output']) > 255) { $tpl_data['last_output_truncated'] = substr($tpl_data['last_output'], 0, 255) . '...'; } - + if (strlen($tpl_data['last_error_output']) > 255) { $tpl_data['last_error_output_truncated'] = substr($tpl_data['last_error_output'], 0, 255) . '...'; } diff --git a/src/psm/Module/Server/Controller/StatusController.php b/src/psm/Module/Server/Controller/StatusController.php index d4ee083d..43dbf2c3 100644 --- a/src/psm/Module/Server/Controller/StatusController.php +++ b/src/psm/Module/Server/Controller/StatusController.php @@ -37,7 +37,7 @@ use psm\Service\Database; class StatusController extends AbstractServerController { - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); @@ -70,6 +70,13 @@ class StatusController extends AbstractServerController 'layout' => $layout, 'url_save' => psm_build_url(array('mod' => 'server', 'action' => 'edit')), ); + + $auto_refresh_seconds = psm_get_conf('auto_refresh_servers'); + if (intval($auto_refresh_seconds) > 0) { + $this->twig->addGlobal('auto_refresh', true); + $this->twig->addGlobal('auto_refresh_seconds', $auto_refresh_seconds); + } + $this->setHeaderAccessories($this->twig->render('module/server/status/header.tpl.html', $layout_data)); $this->addFooter(false); @@ -107,12 +114,6 @@ class StatusController extends AbstractServerController } } - $auto_refresh_seconds = psm_get_conf('auto_refresh_servers'); - if (intval($auto_refresh_seconds) > 0) { - $this->twig->addGlobal('auto_refresh', true); - $this->twig->addGlobal('auto_refresh_seconds', $auto_refresh_seconds); - } - if ($this->isXHR() || isset($_SERVER["HTTP_X_REQUESTED_WITH"])) { $this->xhr = true; //disable auto refresh in ajax return html diff --git a/src/psm/Module/Server/Controller/UpdateController.php b/src/psm/Module/Server/Controller/UpdateController.php index d2addcac..8b92c7b9 100644 --- a/src/psm/Module/Server/Controller/UpdateController.php +++ b/src/psm/Module/Server/Controller/UpdateController.php @@ -36,7 +36,7 @@ use psm\Service\Database; class UpdateController extends AbstractController { - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); diff --git a/src/psm/Module/User/Controller/LoginController.php b/src/psm/Module/User/Controller/LoginController.php index 4c50272d..4026ff83 100644 --- a/src/psm/Module/User/Controller/LoginController.php +++ b/src/psm/Module/User/Controller/LoginController.php @@ -35,7 +35,7 @@ use psm\Service\Database; class LoginController extends AbstractController { - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); diff --git a/src/psm/Module/User/Controller/ProfileController.php b/src/psm/Module/User/Controller/ProfileController.php index 6b9b0cf1..2c285a43 100644 --- a/src/psm/Module/User/Controller/ProfileController.php +++ b/src/psm/Module/User/Controller/ProfileController.php @@ -41,7 +41,7 @@ class ProfileController extends AbstractController protected $profile_fields = array('name', 'user_name', 'email', 'mobile', 'pushover_key', 'pushover_device', 'discord', 'webhook_url', 'webhook_json', 'telegram_id', 'jabber'); - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); diff --git a/src/psm/Module/User/Controller/UserController.php b/src/psm/Module/User/Controller/UserController.php index ba55a0e2..5423eee0 100644 --- a/src/psm/Module/User/Controller/UserController.php +++ b/src/psm/Module/User/Controller/UserController.php @@ -39,7 +39,7 @@ class UserController extends AbstractController { public $servers = array(); - public function __construct(Database $db, \Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { parent::__construct($db, $twig); diff --git a/src/psm/Router.php b/src/psm/Router.php index 41533989..5ed5c634 100644 --- a/src/psm/Router.php +++ b/src/psm/Router.php @@ -231,7 +231,7 @@ class Router } $twig->addFunction( - new \Twig_SimpleFunction( + new \Twig\TwigFunction( 'csrf_token', function ($lock_to = null) use ($session) { if (empty($lock_to)) { diff --git a/src/psm/Util/Module/Modal.php b/src/psm/Util/Module/Modal.php index 21176096..ce5e4c9e 100644 --- a/src/psm/Util/Module/Modal.php +++ b/src/psm/Util/Module/Modal.php @@ -67,11 +67,11 @@ class Modal implements ModalInterface /** * Twig environment - * @var \Twig_Environment $twig + * @var \Twig\Environment $twig */ protected $twig; - public function __construct(\Twig_Environment $twig, $modal_id = 'main', $type = self::MODAL_TYPE_OK) + public function __construct(\Twig\Environment $twig, $modal_id = 'main', $type = self::MODAL_TYPE_OK) { $this->modal_id = $modal_id; $this->twig = $twig; @@ -142,7 +142,7 @@ class Modal implements ModalInterface } } - $tpl = $this->twig->loadTemplate('util/module/modal.tpl.html'); + $tpl = $this->twig->load('util/module/modal.tpl.html'); $html = $tpl->render(array( 'modal_id' => $this->modal_id, 'modal_title' => !empty($this->title) ? $this->title : psm_get_conf('site_title', psm_get_lang('system', 'title')), diff --git a/src/psm/Util/Module/ModalInterface.php b/src/psm/Util/Module/ModalInterface.php index a7d79bb3..e5c0d2c6 100644 --- a/src/psm/Util/Module/ModalInterface.php +++ b/src/psm/Util/Module/ModalInterface.php @@ -32,7 +32,7 @@ namespace psm\Util\Module; interface ModalInterface { - public function __construct(\Twig_Environment $twig); + public function __construct(\Twig\Environment $twig); public function getModalID(); public function createHTML(); diff --git a/src/psm/Util/Module/Sidebar.php b/src/psm/Util/Module/Sidebar.php index 26f05c0d..ae16726d 100644 --- a/src/psm/Util/Module/Sidebar.php +++ b/src/psm/Util/Module/Sidebar.php @@ -57,7 +57,7 @@ class Sidebar implements SidebarInterface */ protected $twig; - public function __construct(\Twig_Environment $twig) + public function __construct(\Twig\Environment $twig) { $this->twig = $twig; } @@ -182,7 +182,7 @@ class Sidebar implements SidebarInterface } } - $tpl = $this->twig->loadTemplate('util/module/sidebar.tpl.html'); + $tpl = $this->twig->load('util/module/sidebar.tpl.html'); $html = $tpl->render($tpl_data); return $html; diff --git a/src/psm/Util/Module/SidebarInterface.php b/src/psm/Util/Module/SidebarInterface.php index f99775a7..a7e4eb4b 100644 --- a/src/psm/Util/Module/SidebarInterface.php +++ b/src/psm/Util/Module/SidebarInterface.php @@ -31,7 +31,7 @@ namespace psm\Util\Module; interface SidebarInterface { - public function __construct(\Twig_Environment $twig); + public function __construct(\Twig\Environment $twig); public function createHTML(); } diff --git a/src/psm/Util/Server/HistoryGraph.php b/src/psm/Util/Server/HistoryGraph.php index 11425e8b..2f285b67 100644 --- a/src/psm/Util/Server/HistoryGraph.php +++ b/src/psm/Util/Server/HistoryGraph.php @@ -32,7 +32,7 @@ namespace psm\Util\Server; use DateTime; use psm\Service\Database; use Twig\Error\Error; -use Twig_Environment; +use Twig\Environment; /** * History util, create HTML for server graphs @@ -52,7 +52,7 @@ class HistoryGraph */ protected $twig; - public function __construct(Database $db, Twig_Environment $twig) + public function __construct(Database $db, \Twig\Environment $twig) { $this->db = $db; $this->twig = $twig; @@ -294,7 +294,7 @@ class HistoryGraph // Previous datapoint was offline : ['x' => $time_ms, 'y' => null]; // new outage start - $lines['offline'][] = ['x' => $time_ms, 'y' => $highest_latency]; + $lines['offline'][] = ['x' => $time_ms, 'y' => 0]; if ($prev_downtime === 0) { $prev_downtime = $time; @@ -306,7 +306,7 @@ class HistoryGraph // Previous datapoint was online ? ['x' => $time_ms, 'y' => null] // Previous datapoint was offline - : ['x' => $time_ms, 'y' => $highest_latency]; + : ['x' => $time_ms, 'y' => 0]; $lines['online'][] = ['x' => $time_ms, 'y' => round($record['latency'] * 1000, 3)]; if ($prev_downtime !== 0) { diff --git a/src/templates/default/module/server/server/view.tpl.html b/src/templates/default/module/server/server/view.tpl.html index e6d37498..76be3990 100644 --- a/src/templates/default/module/server/server/view.tpl.html +++ b/src/templates/default/module/server/server/view.tpl.html @@ -237,7 +237,7 @@
  • {{ label_last_output }}:
    -
    {{ last_output_truncated|nl2br }}
    +
    {{ last_output_truncated|raw|nl2br }}
    {% if last_output_truncated != last_output %}
    @@ -420,7 +420,7 @@