diff --git a/.editorconfig b/.editorconfig index ef6e90b2..8565b274 100644 --- a/.editorconfig +++ b/.editorconfig @@ -27,6 +27,3 @@ indent_size = 2 [*.json] indent_style = space indent_size = 2 - -[composer.json] -indent_size = 4 diff --git a/.woodpecker/.code_standards_check.yml b/.woodpecker/.code_standards_check.yml index 60a1bd2a..9d59dc08 100644 --- a/.woodpecker/.code_standards_check.yml +++ b/.woodpecker/.code_standards_check.yml @@ -1,12 +1,9 @@ skip_clone: true -steps: +pipeline: clone_friendica_base: image: alpine/git commands: - - git config --global user.email "no-reply@friendi.ca" - - git config --global user.name "Friendica" - - git config --global --add safe.directory $CI_WORKSPACE - git clone https://github.com/friendica/friendica.git . - git checkout $CI_COMMIT_BRANCH when: @@ -16,7 +13,7 @@ steps: commands: - git config --global user.email "no-reply@friendi.ca" - git config --global user.name "Friendica" - - git clone $CI_REPO_CLONE_URL addon + - git clone $CI_REPO_LINK addon - cd addon/ - git checkout $CI_COMMIT_BRANCH - git fetch origin $CI_COMMIT_REF @@ -56,10 +53,6 @@ steps: - /tmp/drone-cache:/tmp/cache when: event: pull_request - phpstan: - image: friendicaci/php8.3:php8.3.3 - commands: - - ./bin/composer.phar run phpstan; check: image: friendicaci/php-cs commands: diff --git a/.woodpecker/.continuous-deployment.yml b/.woodpecker/.continuous-deployment.yml index d6d8a22a..ab6e07e9 100644 --- a/.woodpecker/.continuous-deployment.yml +++ b/.woodpecker/.continuous-deployment.yml @@ -5,13 +5,10 @@ labels: skip_clone: true -steps: +pipeline: clone_friendica_base: image: alpine/git commands: - - git config --global user.email "no-reply@friendi.ca" - - git config --global user.name "Friendica" - - git config --global --add safe.directory $CI_WORKSPACE - git clone https://github.com/friendica/friendica.git . - git checkout $CI_COMMIT_BRANCH when: @@ -23,7 +20,7 @@ steps: commands: - git config --global user.email "no-reply@friendi.ca" - git config --global user.name "Friendica" - - git clone $CI_REPO_CLONE_URL addon + - git clone $CI_REPO_LINK addon - cd addon/ - git checkout $CI_COMMIT_BRANCH - git fetch origin $CI_COMMIT_REF @@ -48,7 +45,7 @@ steps: branch: [ develop, '*-rc' ] event: push composer_install: - image: friendicaci/php8.2:php8.2.28 + image: friendicaci/php7.4:php7.4.33 commands: - export COMPOSER_HOME=.composer - composer validate diff --git a/.woodpecker/.messages.po_check.yml b/.woodpecker/.messages.po_check.yml index e0239dcd..f5691e00 100644 --- a/.woodpecker/.messages.po_check.yml +++ b/.woodpecker/.messages.po_check.yml @@ -1,12 +1,9 @@ skip_clone: true -steps: +pipeline: clone_friendica_base: image: alpine/git commands: - - git config --global user.email "no-reply@friendi.ca" - - git config --global user.name "Friendica" - - git config --global --add safe.directory $CI_WORKSPACE - git clone https://github.com/friendica/friendica.git . - git checkout $CI_COMMIT_BRANCH when: @@ -16,7 +13,7 @@ steps: commands: - git config --global user.email "no-reply@friendi.ca" - git config --global user.name "Friendica" - - git clone $CI_REPO_CLONE_URL addon + - git clone $CI_REPO_LINK addon - cd addon/ - git checkout $CI_COMMIT_BRANCH - git fetch origin $CI_COMMIT_REF diff --git a/.woodpecker/.phpunit.yml b/.woodpecker/.phpunit.yml index b0745ad0..a6c5db09 100644 --- a/.woodpecker/.phpunit.yml +++ b/.woodpecker/.phpunit.yml @@ -5,13 +5,9 @@ matrix: - PHP_MAJOR_VERSION: 8.0 PHP_VERSION: 8.0.30 - PHP_MAJOR_VERSION: 8.1 - PHP_VERSION: 8.1.31 + PHP_VERSION: 8.1.23 - PHP_MAJOR_VERSION: 8.2 - PHP_VERSION: 8.2.28 - - PHP_MAJOR_VERSION: 8.3 - PHP_VERSION: 8.3.17 - - PHP_MAJOR_VERSION: 8.4 - PHP_VERSION: 8.4.5 + PHP_VERSION: 8.2.11 # This forces PHP Unit executions at the "opensocial" labeled location (because of much more power...) labels: @@ -19,13 +15,10 @@ labels: skip_clone: true -steps: +pipeline: clone_friendica_base: image: alpine/git commands: - - git config --global user.email "no-reply@friendi.ca" - - git config --global user.name "Friendica" - - git config --global --add safe.directory $CI_WORKSPACE - git clone https://github.com/friendica/friendica.git . - git checkout $CI_COMMIT_BRANCH clone_friendica_addon: @@ -33,7 +26,7 @@ steps: commands: - git config --global user.email "no-reply@friendi.ca" - git config --global user.name "Friendica" - - git clone $CI_REPO_CLONE_URL addon + - git clone $CI_REPO_LINK addon - cd addon/ - git checkout $CI_COMMIT_BRANCH - git fetch origin $CI_COMMIT_REF @@ -83,7 +76,7 @@ steps: - cp config/local-sample.config.php config/local.config.php - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql - - if [ "${PHP_MAJOR_VERSION}" = "8.2" -a "${CI_REPO}" = "friendica/friendica-addons" ]; then + - if [ "${PHP_MAJOR_VERSION}" = "7.4" -a "${CI_REPO}" = "friendica/friendica-addons" ]; then phpenmod xdebug; export XDEBUG_MODE=coverage; phpunit --configuration tests/phpunit-addons.xml --coverage-clover clover.xml; @@ -94,15 +87,15 @@ steps: image: friendicaci/codecov when: matrix: - PHP_MAJOR_VERSION: 8.2 - PHP_VERSION: 8.2.16 + PHP_MAJOR_VERSION: 7.4 + PHP_VERSION: 7.4.33 repo: - friendica/friendica-addons commands: - codecov -R '.' -Z -f 'clover.xml' - environment: - CODECOV_TOKEN: - from_secret: codecov-token + secrets: + - source: codecov-token + target: codecov_token services: mariadb: diff --git a/.woodpecker/.releaser.yml b/.woodpecker/.releaser.yml index 7407f2bc..4a661937 100644 --- a/.woodpecker/.releaser.yml +++ b/.woodpecker/.releaser.yml @@ -5,13 +5,10 @@ labels: skip_clone: true -steps: +pipeline: clone_friendica_base: image: alpine/git commands: - - git config --global user.email "no-reply@friendi.ca" - - git config --global user.name "Friendica" - - git config --global --add safe.directory $CI_WORKSPACE - git clone https://github.com/friendica/friendica.git . - git checkout $CI_COMMIT_BRANCH when: @@ -22,7 +19,7 @@ steps: commands: - git config --global user.email "no-reply@friendi.ca" - git config --global user.name "Friendica" - - git clone $CI_REPO_CLONE_URL addon + - git clone $CI_REPO_LINK addon - cd addon/ - git checkout $CI_COMMIT_BRANCH - git fetch origin $CI_COMMIT_REF @@ -45,7 +42,7 @@ steps: repo: friendica/friendica-addons event: tag composer_install: - image: friendicaci/php8.2:php8.2.28 + image: friendicaci/php7.4:php7.4.33 commands: - export COMPOSER_HOME=.composer - composer validate diff --git a/advancedcontentfilter/advancedcontentfilter.js b/advancedcontentfilter/advancedcontentfilter.js index a8fc1c65..fcf7b096 100644 --- a/advancedcontentfilter/advancedcontentfilter.js +++ b/advancedcontentfilter/advancedcontentfilter.js @@ -54,7 +54,7 @@ new Vue({ self.rules.push(responseJSON.rule); self.resetForm(); }, function (response) { - self.errorMessage = response.responseJSON.exception[0].message; + self.errorMessage = response.responseJSON.message; }); } }, @@ -74,7 +74,7 @@ new Vue({ self.rules[self.editedIndex] = rule; self.resetForm(); }, function (response) { - self.errorMessage = response.responseJSON.exception[0].message; + self.errorMessage = response.responseJSON.message; }); }, diff --git a/advancedcontentfilter/advancedcontentfilter.php b/advancedcontentfilter/advancedcontentfilter.php index 53cb9ebe..f2927f57 100644 --- a/advancedcontentfilter/advancedcontentfilter.php +++ b/advancedcontentfilter/advancedcontentfilter.php @@ -33,13 +33,16 @@ * */ +use Friendica\App; use Friendica\BaseModule; use Friendica\Content\Text\Markdown; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\Database\DBStructure; use Friendica\DI; +use Friendica\Model\Item; use Friendica\Model\Post; use Friendica\Model\Tag; use Friendica\Model\User; @@ -61,7 +64,7 @@ function advancedcontentfilter_install() Hook::add('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition'); DBStructure::performUpdate(); - DI::logger()->notice('installed advancedcontentfilter'); + Logger::notice('installed advancedcontentfilter'); } /* @@ -120,22 +123,21 @@ function advancedcontentfilter_prepare_body_content_filter(&$hook_data) $expressionLanguage = new ExpressionLanguage\ExpressionLanguage(); } - $uid = $hook_data['uid'] ?? DI::userSession()->getLocalUserId(); - if (!$uid) { + if (!DI::userSession()->getLocalUserId()) { return; } $vars = advancedcontentfilter_get_filter_fields($hook_data['item']); - $rules = DI::cache()->get('rules_' . $uid); + $rules = DI::cache()->get('rules_' . DI::userSession()->getLocalUserId()); if (!isset($rules)) { $rules = DBA::toArray(DBA::select( 'advancedcontentfilter_rules', ['name', 'expression', 'serialized'], - ['uid' => $uid, 'active' => true] + ['uid' => DI::userSession()->getLocalUserId(), 'active' => true] )); - DI::cache()->set('rules_' . $uid, $rules); + DI::cache()->set('rules_' . DI::userSession()->getLocalUserId(), $rules); } if ($rules) { @@ -188,32 +190,11 @@ function advancedcontentfilter_module() {} function advancedcontentfilter_init() { if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'api') { - $slim = \Slim\Factory\AppFactory::create(); + $slim = new \Slim\App(); - /** - * The routing middleware should be added before the ErrorMiddleware - * Otherwise exceptions thrown from it will not be handled - */ - $slim->addRoutingMiddleware(); - - $slim->addErrorMiddleware(true, true, true, DI::logger()); - - // register routes - $slim->group('/advancedcontentfilter/api', function (\Slim\Routing\RouteCollectorProxy $app) { - $app->group('/rules', function (\Slim\Routing\RouteCollectorProxy $app) { - $app->get('', 'advancedcontentfilter_get_rules'); - $app->post('', 'advancedcontentfilter_post_rules'); - - $app->get('/{id}', 'advancedcontentfilter_get_rules_id'); - $app->put('/{id}', 'advancedcontentfilter_put_rules_id'); - $app->delete('/{id}', 'advancedcontentfilter_delete_rules_id'); - }); - - $app->group('/variables', function (\Slim\Routing\RouteCollectorProxy $app) { - $app->get('/{guid}', 'advancedcontentfilter_get_variables_guid'); - }); - }); + require __DIR__ . '/src/middlewares.php'; + require __DIR__ . '/src/routes.php'; $slim->run(); exit; @@ -271,8 +252,8 @@ function advancedcontentfilter_content() 'rule_expression' => DI::l10n()->t('Rule Expression'), 'cancel' => DI::l10n()->t('Cancel'), ], - '$current_theme' => DI::appHelper()->getCurrentTheme(), - '$rules' => DBA::toArray(DBA::select('advancedcontentfilter_rules', [], ['uid' => DI::userSession()->getLocalUserId()])), + '$current_theme' => DI::app()->getCurrentTheme(), + '$rules' => advancedcontentfilter_get_rules(), '$form_security_token' => BaseModule::getFormSecurityToken() ]); } @@ -324,7 +305,7 @@ function advancedcontentfilter_build_fields($data) * API */ -function advancedcontentfilter_get_rules(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface +function advancedcontentfilter_get_rules() { if (!DI::userSession()->getLocalUserId()) { throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method')); @@ -332,8 +313,7 @@ function advancedcontentfilter_get_rules(ServerRequestInterface $request, Respon $rules = DBA::toArray(DBA::select('advancedcontentfilter_rules', [], ['uid' => DI::userSession()->getLocalUserId()])); - $response->getBody()->write(json_encode($rules)); - return $response->withHeader('Content-Type', 'application/json'); + return json_encode($rules); } function advancedcontentfilter_get_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args) @@ -344,11 +324,10 @@ function advancedcontentfilter_get_rules_id(ServerRequestInterface $request, Res $rule = DBA::selectFirst('advancedcontentfilter_rules', [], ['id' => $args['id'], 'uid' => DI::userSession()->getLocalUserId()]); - $response->getBody()->write(json_encode($rule)); - return $response->withHeader('Content-Type', 'application/json'); + return json_encode($rule); } -function advancedcontentfilter_post_rules(ServerRequestInterface $request, ResponseInterface $response) +function advancedcontentfilter_post_rules(ServerRequestInterface $request) { if (!DI::userSession()->getLocalUserId()) { throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method')); @@ -381,8 +360,7 @@ function advancedcontentfilter_post_rules(ServerRequestInterface $request, Respo DI::cache()->delete('rules_' . DI::userSession()->getLocalUserId()); - $response->getBody()->write(json_encode(['message' => DI::l10n()->t('Rule successfully added'), 'rule' => $rule])); - return $response->withHeader('Content-Type', 'application/json'); + return json_encode(['message' => DI::l10n()->t('Rule successfully added'), 'rule' => $rule]); } function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args) @@ -413,8 +391,7 @@ function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, Res DI::cache()->delete('rules_' . DI::userSession()->getLocalUserId()); - $response->getBody()->write(json_encode(['message' => DI::l10n()->t('Rule successfully updated')])); - return $response->withHeader('Content-Type', 'application/json'); + return json_encode(['message' => DI::l10n()->t('Rule successfully updated')]); } function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args) @@ -437,8 +414,7 @@ function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request, DI::cache()->delete('rules_' . DI::userSession()->getLocalUserId()); - $response->getBody()->write(json_encode(['message' => DI::l10n()->t('Rule successfully deleted')])); - return $response->withHeader('Content-Type', 'application/json'); + return json_encode(['message' => DI::l10n()->t('Rule successfully deleted')]); } function advancedcontentfilter_get_variables_guid(ServerRequestInterface $request, ResponseInterface $response, $args) @@ -461,8 +437,7 @@ function advancedcontentfilter_get_variables_guid(ServerRequestInterface $reques $return = advancedcontentfilter_get_filter_fields(advancedcontentfilter_prepare_item_row($item_row)); - $response->getBody()->write(json_encode(['variables' => str_replace('\\\'', '\'', var_export($return, true))])); - return $response->withHeader('Content-Type', 'application/json'); + return json_encode(['variables' => str_replace('\\\'', '\'', var_export($return, true))]); } /** diff --git a/advancedcontentfilter/composer.json b/advancedcontentfilter/composer.json index b9ab1900..93b19cd5 100644 --- a/advancedcontentfilter/composer.json +++ b/advancedcontentfilter/composer.json @@ -1,27 +1,25 @@ { - "name": "friendica-addons/advancedcontentfilter", - "description": "Advanced Content Filter addon for Friendica", - "type": "friendica-addon", - "authors": [ - { - "name": "Hypolite Petovan", - "email": "hypolite@mrpetovan.com", - "homepage": "https://friendica.mrpetovan.com/profile/hypolite", - "role": "Developer" - } - ], - "require": { - "slim/slim": "^4", - "symfony/expression-language": "^3.4" - }, - "license": "3-clause BSD license", - "minimum-stability": "stable", - "config": { - "platform": { - "php": "7.4" - }, - "optimize-autoloader": true, - "autoloader-suffix": "AdvancedContentFilterAddon", - "preferred-install": "dist" - } + "name": "friendica-addons/advancedcontentfilter", + "description": "Advanced Content Filter addon for Friendica", + "type": "friendica-addon", + "authors": [ + { + "name": "Hypolite Petovan", + "email": "hypolite@mrpetovan.com", + "homepage": "https://friendica.mrpetovan.com/profile/hypolite", + "role": "Developer" + } + ], + "require": { + "php": ">=5.6.0", + "slim/slim": "^3.1", + "symfony/expression-language": "^3.4" + }, + "license": "3-clause BSD license", + "minimum-stability": "stable", + "config": { + "optimize-autoloader": true, + "autoloader-suffix": "AdvancedContentFilterAddon", + "preferred-install": "dist" + } } diff --git a/advancedcontentfilter/composer.lock b/advancedcontentfilter/composer.lock index 6dbd17ba..774b5ec8 100644 --- a/advancedcontentfilter/composer.lock +++ b/advancedcontentfilter/composer.lock @@ -4,8 +4,40 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a7276eb2d2108a26699f69c750d02d27", + "content-hash": "d0e3662dd9d910ffe4f71d325bc39319", "packages": [ + { + "name": "container-interop/container-interop", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/container-interop/container-interop.git", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "shasum": "" + }, + "require": { + "psr/container": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Interop\\Container\\": "src/Interop/Container/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", + "homepage": "https://github.com/container-interop/container-interop", + "abandoned": "psr/container", + "time": "2017-02-14T19:40:03+00:00" + }, { "name": "nikic/fast-route", "version": "v1.3.0", @@ -52,6 +84,56 @@ ], "time": "2018-02-13T20:26:39+00:00" }, + { + "name": "pimple/pimple", + "version": "v3.2.3", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Pimple.git", + "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32", + "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/container": "^1.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "^3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "autoload": { + "psr-0": { + "Pimple": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "http://pimple.sensiolabs.org", + "keywords": [ + "container", + "dependency injection" + ], + "time": "2018-01-21T07:42:36+00:00" + }, { "name": "psr/cache", "version": "1.0.1", @@ -100,22 +182,27 @@ }, { "name": "psr/container", - "version": "1.1.2", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", "shasum": "" }, "require": { - "php": ">=7.4.0" + "php": ">=5.3.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -128,7 +215,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common Container Interface (PHP FIG PSR-11)", @@ -140,25 +227,24 @@ "container-interop", "psr" ], - "time": "2021-11-05T16:50:12+00:00" + "time": "2017-02-14T16:28:37+00:00" }, { - "name": "psr/http-factory", - "version": "1.0.2", + "name": "psr/http-message", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0 || ^2.0" + "php": ">=5.3.0" }, "type": "library", "extra": { @@ -178,58 +264,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "time": "2023-04-10T20:10:41+00:00" - }, - { - "name": "psr/http-message", - "version": "2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -242,126 +277,20 @@ "request", "response" ], - "time": "2023-04-04T09:54:51+00:00" - }, - { - "name": "psr/http-server-handler", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-handler.git", - "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4", - "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side request handler", - "keywords": [ - "handler", - "http", - "http-interop", - "psr", - "psr-15", - "psr-7", - "request", - "response", - "server" - ], - "time": "2023-04-10T20:06:20+00:00" - }, - { - "name": "psr/http-server-middleware", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-middleware.git", - "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829", - "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0", - "psr/http-server-handler": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side middleware", - "keywords": [ - "http", - "http-interop", - "middleware", - "psr", - "psr-15", - "psr-7", - "request", - "response" - ], - "time": "2023-04-11T06:14:47+00:00" + "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", - "version": "1.1.4", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", + "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", "shasum": "" }, "require": { @@ -385,7 +314,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for logging libraries", @@ -395,55 +324,84 @@ "psr", "psr-3" ], - "time": "2021-05-03T11:20:27+00:00" + "time": "2019-11-01T11:05:21+00:00" }, { - "name": "slim/slim", - "version": "4.13.0", + "name": "psr/simple-cache", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/slimphp/Slim.git", - "reference": "038fd5713d5a41636fdff0e8dcceedecdd17fc17" + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/038fd5713d5a41636fdff0e8dcceedecdd17fc17", - "reference": "038fd5713d5a41636fdff0e8dcceedecdd17fc17", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "shasum": "" }, "require": { - "ext-json": "*", - "nikic/fast-route": "^1.3", - "php": "^7.4 || ^8.0", - "psr/container": "^1.0 || ^2.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "psr/http-server-handler": "^1.0", - "psr/http-server-middleware": "^1.0", - "psr/log": "^1.1 || ^2.0 || ^3.0" + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" + }, + { + "name": "slim/slim", + "version": "3.9.2", + "source": { + "type": "git", + "url": "https://github.com/slimphp/Slim.git", + "reference": "4086d0106cf5a7135c69fce4161fe355a8feb118" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slimphp/Slim/zipball/4086d0106cf5a7135c69fce4161fe355a8feb118", + "reference": "4086d0106cf5a7135c69fce4161fe355a8feb118", + "shasum": "" + }, + "require": { + "container-interop/container-interop": "^1.2", + "nikic/fast-route": "^1.0", + "php": ">=5.5.0", + "pimple/pimple": "^3.0", + "psr/container": "^1.0", + "psr/http-message": "^1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" }, "require-dev": { - "adriansuter/php-autoload-override": "^1.4", - "ext-simplexml": "*", - "guzzlehttp/psr7": "^2.6", - "httpsoft/http-message": "^1.1", - "httpsoft/http-server-request": "^1.1", - "laminas/laminas-diactoros": "^2.17 || ^3", - "nyholm/psr7": "^1.8", - "nyholm/psr7-server": "^1.1", - "phpspec/prophecy": "^1.19", - "phpspec/prophecy-phpunit": "^2.1", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9.6", - "slim/http": "^1.3", - "slim/psr7": "^1.6", - "squizlabs/php_codesniffer": "^3.9" - }, - "suggest": { - "ext-simplexml": "Needed to support XML format in BodyParsingMiddleware", - "ext-xml": "Needed to support XML format in BodyParsingMiddleware", - "php-di/php-di": "PHP-DI is the recommended container library to be used with Slim", - "slim/psr7": "Slim PSR-7 implementation. See https://www.slimframework.com/docs/v4/start/installation.html for more information." + "phpunit/phpunit": "^4.0", + "squizlabs/php_codesniffer": "^2.5" }, "type": "library", "autoload": { @@ -456,100 +414,77 @@ "MIT" ], "authors": [ - { - "name": "Josh Lockhart", - "email": "hello@joshlockhart.com", - "homepage": "https://joshlockhart.com" - }, - { - "name": "Andrew Smith", - "email": "a.smith@silentworks.co.uk", - "homepage": "http://silentworks.co.uk" - }, { "name": "Rob Allen", "email": "rob@akrabat.com", "homepage": "http://akrabat.com" }, { - "name": "Pierre Berube", - "email": "pierre@lgse.com", - "homepage": "http://www.lgse.com" + "name": "Josh Lockhart", + "email": "hello@joshlockhart.com", + "homepage": "https://joshlockhart.com" }, { "name": "Gabriel Manricks", "email": "gmanricks@me.com", "homepage": "http://gabrielmanricks.com" + }, + { + "name": "Andrew Smith", + "email": "a.smith@silentworks.co.uk", + "homepage": "http://silentworks.co.uk" } ], "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs", - "homepage": "https://www.slimframework.com", + "homepage": "https://slimframework.com", "keywords": [ "api", "framework", "micro", "router" ], - "funding": [ - { - "url": "https://opencollective.com/slimphp", - "type": "open_collective" - }, - { - "url": "https://tidelift.com/funding/github/packagist/slim/slim", - "type": "tidelift" - } - ], - "time": "2024-03-03T21:25:30+00:00" + "time": "2017-11-26T19:13:09+00:00" }, { "name": "symfony/cache", - "version": "v4.4.48", + "version": "v3.4.36", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "3b98ed664887ad197b8ede3da2432787212eb915" + "reference": "3d9f46a6960fd5cd7f030f86adc5b4b63bcfa4e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/3b98ed664887ad197b8ede3da2432787212eb915", - "reference": "3b98ed664887ad197b8ede3da2432787212eb915", + "url": "https://api.github.com/repos/symfony/cache/zipball/3d9f46a6960fd5cd7f030f86adc5b4b63bcfa4e3", + "reference": "3d9f46a6960fd5cd7f030f86adc5b4b63bcfa4e3", "shasum": "" }, "require": { - "php": ">=7.1.3", - "psr/cache": "^1.0|^2.0", - "psr/log": "^1|^2|^3", - "symfony/cache-contracts": "^1.1.7|^2", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.2|^5.0" + "php": "^5.5.9|>=7.0.8", + "psr/cache": "~1.0", + "psr/log": "~1.0", + "psr/simple-cache": "^1.0", + "symfony/polyfill-apcu": "~1.1" }, "conflict": { - "doctrine/dbal": "<2.7", - "symfony/dependency-injection": "<3.4", - "symfony/http-kernel": "<4.4|>=5.0", - "symfony/var-dumper": "<4.4" + "symfony/var-dumper": "<3.3" }, "provide": { - "psr/cache-implementation": "1.0|2.0", - "psr/simple-cache-implementation": "1.0|2.0", - "symfony/cache-implementation": "1.0|2.0" + "psr/cache-implementation": "1.0", + "psr/simple-cache-implementation": "1.0" }, "require-dev": { "cache/integration-tests": "dev-master", - "doctrine/cache": "^1.6|^2.0", - "doctrine/dbal": "^2.7|^3.0", - "predis/predis": "^1.1", - "psr/simple-cache": "^1.0|^2.0", - "symfony/config": "^4.2|^5.0", - "symfony/dependency-injection": "^3.4|^4.1|^5.0", - "symfony/filesystem": "^4.4|^5.0", - "symfony/http-kernel": "^4.4", - "symfony/var-dumper": "^4.4|^5.0" + "doctrine/cache": "~1.6", + "doctrine/dbal": "~2.4", + "predis/predis": "~1.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, "autoload": { "psr-4": { "Symfony\\Component\\Cache\\": "" @@ -572,188 +507,38 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", + "description": "Symfony Cache component with PSR-6, PSR-16, and tags", "homepage": "https://symfony.com", "keywords": [ "caching", "psr6" ], - "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": "2022-10-17T20:21:54+00:00" - }, - { - "name": "symfony/cache-contracts", - "version": "v2.5.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache-contracts.git", - "reference": "64be4a7acb83b6f2bf6de9a02cee6dad41277ebc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/64be4a7acb83b6f2bf6de9a02cee6dad41277ebc", - "reference": "64be4a7acb83b6f2bf6de9a02cee6dad41277ebc", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/cache": "^1.0|^2.0|^3.0" - }, - "suggest": { - "symfony/cache-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\\Cache\\": "" - } - }, - "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 caching", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "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": "2022-01-02T09:53:40+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.5.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-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", - "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": "2022-01-02T09:53:40+00:00" + "time": "2019-12-01T10:45:41+00:00" }, { "name": "symfony/expression-language", - "version": "v3.4.47", + "version": "v3.4.8", "source": { "type": "git", "url": "https://github.com/symfony/expression-language.git", - "reference": "de38e66398fca1fcb9c48e80279910e6889cb28f" + "reference": "867e4d1f5d4e52435a8ffff6b24fd6a801582241" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/expression-language/zipball/de38e66398fca1fcb9c48e80279910e6889cb28f", - "reference": "de38e66398fca1fcb9c48e80279910e6889cb28f", + "url": "https://api.github.com/repos/symfony/expression-language/zipball/867e4d1f5d4e52435a8ffff6b24fd6a801582241", + "reference": "867e4d1f5d4e52435a8ffff6b24fd6a801582241", "shasum": "" }, "require": { "php": "^5.5.9|>=7.0.8", - "symfony/cache": "~3.1|~4.0", - "symfony/polyfill-php70": "~1.6" + "symfony/cache": "~3.1|~4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, "autoload": { "psr-4": { "Symfony\\Component\\ExpressionLanguage\\": "" @@ -778,345 +563,37 @@ ], "description": "Symfony ExpressionLanguage Component", "homepage": "https://symfony.com", - "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": "2020-10-24T10:57:07+00:00" + "time": "2018-01-03T07:37:34+00:00" }, { - "name": "symfony/polyfill-php70", - "version": "v1.20.0", + "name": "symfony/polyfill-apcu", + "version": "v1.13.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" + "url": "https://github.com/symfony/polyfill-apcu.git", + "reference": "a8e961c841b9ec52927a87914f8820a1ad8f8116" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", + "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/a8e961c841b9ec52927a87914f8820a1ad8f8116", + "reference": "a8e961c841b9ec52927a87914f8820a1ad8f8116", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "type": "metapackage", - "extra": { - "branch-alias": { - "dev-main": "1.20-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "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 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "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": "2020-10-23T14:02:19+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.29.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "21bd091060673a1177ae842c0ef8fe30893114d2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2", - "reference": "21bd091060673a1177ae842c0ef8fe30893114d2", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "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 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-29T20:11:03+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.29.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "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" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-29T20:11:03+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": "" + "php": ">=5.3.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "dev-master": "1.13-dev" } }, "autoload": { "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "Symfony\\Polyfill\\Apcu\\": "" }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "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": "2022-05-30T19:17:29+00:00" - }, - { - "name": "symfony/var-exporter", - "version": "v5.4.35", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-exporter.git", - "reference": "abb0a151b62d6b07e816487e20040464af96cae7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/abb0a151b62d6b07e816487e20040464af96cae7", - "reference": "abb0a151b62d6b07e816487e20040464af96cae7", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "symfony/var-dumper": "^4.4.9|^5.0.9|^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\VarExporter\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1133,31 +610,16 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "description": "Symfony polyfill backporting apcu_* functions to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ - "clone", - "construct", - "export", - "hydrate", - "instantiate", - "serialize" + "apcu", + "compatibility", + "polyfill", + "portable", + "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-23T13:51:25+00:00" + "time": "2019-11-27T13:56:44+00:00" } ], "packages-dev": [], @@ -1166,10 +628,8 @@ "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, - "platform": [], - "platform-dev": [], - "platform-overrides": { - "php": "7.4" + "platform": { + "php": ">=5.6.0" }, - "plugin-api-version": "1.1.0" + "platform-dev": [] } diff --git a/advancedcontentfilter/lang/it/messages.po b/advancedcontentfilter/lang/it/messages.po index 325be52c..f32c5b94 100644 --- a/advancedcontentfilter/lang/it/messages.po +++ b/advancedcontentfilter/lang/it/messages.po @@ -5,7 +5,7 @@ # # Translators: # fabrixxm , 2018 -# Sylke Vicious , 2023 +# Sylke Vicious , 2021 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-05-11 08:54-0400\n" "PO-Revision-Date: 2018-05-24 06:41+0000\n" -"Last-Translator: Sylke Vicious , 2023\n" +"Last-Translator: Sylke Vicious , 2021\n" "Language-Team: Italian (https://app.transifex.com/Friendica/teams/12172/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -125,7 +125,7 @@ msgstr "Annulla" #: advancedcontentfilter.php:295 msgid "This addon requires this node having at least one post" -msgstr "Questo addon richiede che questo nodo abbia almeno un messaggio" +msgstr "" #: advancedcontentfilter.php:325 advancedcontentfilter.php:336 #: advancedcontentfilter.php:347 advancedcontentfilter.php:383 diff --git a/advancedcontentfilter/lang/it/strings.php b/advancedcontentfilter/lang/it/strings.php index d47d7a5a..5cc01739 100644 --- a/advancedcontentfilter/lang/it/strings.php +++ b/advancedcontentfilter/lang/it/strings.php @@ -27,7 +27,6 @@ $a->strings['Add new rule'] = 'Aggiungi nuova regola'; $a->strings['Rule Name'] = 'Nome Regola'; $a->strings['Rule Expression'] = 'Espressione Regola'; $a->strings['Cancel'] = 'Annulla'; -$a->strings['This addon requires this node having at least one post'] = 'Questo addon richiede che questo nodo abbia almeno un messaggio'; $a->strings['You must be logged in to use this method'] = 'Devi essere autenticato per usare questo metodo'; $a->strings['Invalid form security token, please refresh the page.'] = 'Token di sicurezza invalido, aggiorna la pagina.'; $a->strings['The rule name and expression are required.'] = 'Il nome e l\'espressione della regola sono richiesti.'; diff --git a/advancedcontentfilter/src/middlewares.php b/advancedcontentfilter/src/middlewares.php new file mode 100644 index 00000000..dffb9363 --- /dev/null +++ b/advancedcontentfilter/src/middlewares.php @@ -0,0 +1,51 @@ +. + * + */ + +use Friendica\DI; + +$container = $slim->getContainer(); + +// Error handler based off https://stackoverflow.com/a/48135009/757392 +$container['errorHandler'] = function () { + return function(Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, Exception $exception) + { + $responseCode = 500; + + if (is_a($exception, 'Friendica\Network\HTTPException')) { + $responseCode = $exception->getCode(); + } + + $errors['message'] = $exception->getMessage(); + + $errors['responseCode'] = $responseCode; + + return $response + ->withStatus($responseCode) + ->withJson($errors); + }; +}; + +$container['notFoundHandler'] = function () { + return function () + { + throw new \Friendica\Network\HTTPException\NotFoundException(DI::l10n()->t('Method not found')); + }; +}; diff --git a/advancedcontentfilter/src/routes.php b/advancedcontentfilter/src/routes.php new file mode 100644 index 00000000..09077bda --- /dev/null +++ b/advancedcontentfilter/src/routes.php @@ -0,0 +1,39 @@ +. + * + */ + +/* @var $slim Slim\App */ +$slim->group('/advancedcontentfilter/api', function () { + /* @var $this Slim\App */ + $this->group('/rules', function () { + /* @var $this Slim\App */ + $this->get('', 'advancedcontentfilter_get_rules'); + $this->post('', 'advancedcontentfilter_post_rules'); + + $this->get('/{id}', 'advancedcontentfilter_get_rules_id'); + $this->put('/{id}', 'advancedcontentfilter_put_rules_id'); + $this->delete('/{id}', 'advancedcontentfilter_delete_rules_id'); + }); + + $this->group('/variables', function () { + /* @var $this Slim\App */ + $this->get('/{guid}', 'advancedcontentfilter_get_variables_guid'); + }); +}); diff --git a/advancedcontentfilter/templates/settings.tpl b/advancedcontentfilter/templates/settings.tpl index 8b82e595..c9dfbe3a 100644 --- a/advancedcontentfilter/templates/settings.tpl +++ b/advancedcontentfilter/templates/settings.tpl @@ -3,7 +3,7 @@
- - -
-

- {{$title}} - {{$page}} ({{$count}}) - -

-
- - - - - - - {{foreach $th_users as $k=>$th}} - {{if $k < 2 || $order_users == $th.1 || ($k==4 && !in_array($order_users,[$th_users.2.1, $th_users.3.1, $th_users.5.1])) }} - - {{/if}} - {{/foreach}} - - - - - {{foreach $users as $u}} - - - - - - {{if $order_users == $th_users.2.1}} - - {{/if}} - - {{if $order_users == $th_users.3.1}} - - {{/if}} - - {{if $order_users == $th_users.5.1}} - - {{/if}} - - {{if !in_array($order_users,[$th_users.2.1, $th_users.3.1, $th_users.5.1]) }} - - {{/if}} - - - - - - - - - {{/foreach}} - -
- - {{if $order_users == $th.1}} - {{if $order_direction_users == "+"}} - ↓ - {{else}} - ↑ - {{/if}} - {{else}} - ↕ - {{/if}} - {{$th.0}} - -
{{$u.name}}{{$u.email}}{{$u.register_date}}{{$u.login_date}} - - - {{if $u.page_flags_raw==0 && $u.account_type_raw > 0}} - - {{/if}} - {{if $u.is_admin}}{{/if}} - {{if $u.account_expired}}{{/if}} - {{$u.lastitem_date}} - -
- {{$pager nofilter}} -
-
diff --git a/rendertime/rendertime.php b/rendertime/rendertime.php index 4523d911..731cf003 100644 --- a/rendertime/rendertime.php +++ b/rendertime/rendertime.php @@ -7,6 +7,7 @@ * */ +use Friendica\App; use Friendica\Core\Hook; use Friendica\Core\Renderer; use Friendica\DI; @@ -59,7 +60,7 @@ function rendertime_page_end(string &$o) if (DI::userSession()->isSiteAdmin() && (($_GET['mode'] ?? '') != 'minimal') && !DI::mode()->isMobile() && !DI::mode()->isMobile() && !$ignored) { - $o = $o . '