From 6839c45400210a54406db04f8ee46195ee87c2f4 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 25 Oct 2024 18:24:08 +0200 Subject: [PATCH 1/3] Change sizes of (default) labels & Add GatherPress (ugly WIP :( ) --- composer.json | 3 +- composer.lock | 168 ++++++++++++++++++++++++++++++- inc/label-printing/namespace.php | 21 ++-- 3 files changed, 181 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 72db67a..7e1d5ab 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,8 @@ "require": { "figuren-theater/label-printing": "0.3.5", "figuren-theater/theater-production-blocks": "0.2.0", - "figuren-theater/theater-production-subsites": "^0.1.1" + "figuren-theater/theater-production-subsites": "^0.1.1", + "wpackagist-plugin/gatherpress": "*" }, "require-dev": { "figuren-theater/code-quality": "^1.1" diff --git a/composer.lock b/composer.lock index ce1b43f..facd1a8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,154 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9d975e16e511078263cdfa4809971568", + "content-hash": "6fdac8a041ed8d690a3c882eb9c009f2", "packages": [ + { + "name": "composer/installers", + "version": "v2.3.0", + "source": { + "type": "git", + "url": "https://github.com/composer/installers.git", + "reference": "12fb2dfe5e16183de69e784a7b84046c43d97e8e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/installers/zipball/12fb2dfe5e16183de69e784a7b84046c43d97e8e", + "reference": "12fb2dfe5e16183de69e784a7b84046c43d97e8e", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "composer/composer": "^1.10.27 || ^2.7", + "composer/semver": "^1.7.2 || ^3.4.0", + "phpstan/phpstan": "^1.11", + "phpstan/phpstan-phpunit": "^1", + "symfony/phpunit-bridge": "^7.1.1", + "symfony/process": "^5 || ^6 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "Composer\\Installers\\Plugin", + "branch-alias": { + "dev-main": "2.x-dev" + }, + "plugin-modifies-install-path": true + }, + "autoload": { + "psr-4": { + "Composer\\Installers\\": "src/Composer/Installers" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kyle Robinson Young", + "email": "kyle@dontkry.com", + "homepage": "https://github.com/shama" + } + ], + "description": "A multi-framework Composer library installer", + "homepage": "https://composer.github.io/installers/", + "keywords": [ + "Dolibarr", + "Eliasis", + "Hurad", + "ImageCMS", + "Kanboard", + "Lan Management System", + "MODX Evo", + "MantisBT", + "Mautic", + "Maya", + "OXID", + "Plentymarkets", + "Porto", + "RadPHP", + "SMF", + "Starbug", + "Thelia", + "Whmcs", + "WolfCMS", + "agl", + "annotatecms", + "attogram", + "bitrix", + "cakephp", + "chef", + "cockpit", + "codeigniter", + "concrete5", + "concreteCMS", + "croogo", + "dokuwiki", + "drupal", + "eZ Platform", + "elgg", + "expressionengine", + "fuelphp", + "grav", + "installer", + "itop", + "known", + "kohana", + "laravel", + "lavalite", + "lithium", + "magento", + "majima", + "mako", + "matomo", + "mediawiki", + "miaoxing", + "modulework", + "modx", + "moodle", + "osclass", + "pantheon", + "phpbb", + "piwik", + "ppi", + "processwire", + "puppet", + "pxcms", + "reindex", + "roundcube", + "shopware", + "silverstripe", + "sydes", + "sylius", + "tastyigniter", + "wordpress", + "yawik", + "zend", + "zikula" + ], + "support": { + "issues": "https://github.com/composer/installers/issues", + "source": "https://github.com/composer/installers/tree/v2.3.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-06-24T20:46:46+00:00" + }, { "name": "figuren-theater/label-printing", "version": "0.3.5", @@ -188,6 +334,24 @@ "source": "https://github.com/figuren-theater/theater-production-subsites" }, "time": "2024-02-29T01:35:44+00:00" + }, + { + "name": "wpackagist-plugin/gatherpress", + "version": "0.31.0", + "source": { + "type": "svn", + "url": "https://plugins.svn.wordpress.org/gatherpress/", + "reference": "tags/0.31.0" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/plugin/gatherpress.0.31.0.zip" + }, + "require": { + "composer/installers": "^1.0 || ^2.0" + }, + "type": "wordpress-plugin", + "homepage": "https://wordpress.org/plugins/gatherpress/" } ], "packages-dev": [ @@ -1985,5 +2149,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/inc/label-printing/namespace.php b/inc/label-printing/namespace.php index 1b3d180..8486b1d 100644 --- a/inc/label-printing/namespace.php +++ b/inc/label-printing/namespace.php @@ -16,7 +16,7 @@ use function is_network_admin; use function is_user_admin; -const BASENAME = 'label-printing/plugin.php'; +const BASENAME = 'label-printing/label-printing.php'; const PLUGINPATH = '/figuren-theater/' . BASENAME; // const PLUGINPATH = '/wpackagist-plugin/' . BASENAME; // Not yet, see #6. @@ -35,7 +35,6 @@ function bootstrap(): void { * @return void */ function load_plugin(): void { - $config = Figuren_Theater\get_config()['modules']['theater']; if ( ! $config['label-printing'] ) { return; @@ -48,7 +47,6 @@ function load_plugin(): void { if ( is_network_admin() || is_user_admin() ) { return; } - require_once FT_VENDOR_DIR . PLUGINPATH; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant add_filter( @@ -65,7 +63,7 @@ function load_plugin(): void { * @return array> */ function filter_default_labels( array $default_labels ): array { - $default_labels = [ + return [ [ 'name' => 'A6 Landscape (4 Stück)', 'width' => 148, @@ -84,8 +82,8 @@ function filter_default_labels( array $default_labels ): array { ], [ 'name' => 'HERMA Neon No. 5147 (8 Stück)', - 'width' => 96, - 'height' => 67, + 'width' => 99, + 'height' => 68, 'a4_border_tb' => 14, 'a4_border_lr' => 9, 'orientation' => 'portrait', @@ -94,10 +92,17 @@ function filter_default_labels( array $default_labels ): array { 'name' => 'LABELident (64 Stück)', 'width' => 48, 'height' => 17, - 'a4_border_tb' => 13, + 'a4_border_tb' => 14, // 13 / 15 / 14 'a4_border_lr' => 8, 'orientation' => 'portrait', ], + [ + 'name' => 'AVERY 6122 (24 Stück)', + 'width' => 70, + 'height' => 36, + 'a4_border_tb' => 14, + 'a4_border_lr' => 7, + 'orientation' => 'portrait', + ], ]; - return $default_labels; } From 43939edfce55fc7c9ef3bfdca2fe1477ad023166 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 25 Oct 2024 18:29:25 +0200 Subject: [PATCH 2/3] Remove non-existent /tests folder from phpstan exclusion list --- phpstan.neon | 1 - 1 file changed, 1 deletion(-) diff --git a/phpstan.neon b/phpstan.neon index dc6c2f5..6451906 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -13,7 +13,6 @@ parameters: # when package is tested # and not running within ft-platform - wp-content/ - - tests/ ignoreErrors: # Find a nicer way instead of ignoring this Error on every ft-module - '#Function Altis\\register_module not found\.#' From 8e3ea15ea54702892cb545e54e6c3405696bd21b Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 25 Oct 2024 18:30:54 +0200 Subject: [PATCH 3/3] Add GatherPress to README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 89fdbde..0de7a19 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,8 @@ This is the long desc This package contains the following plugins. Thoose are completely managed by code and lack of their typical UI. +* [GatherPress](https://github.com/GatherPress/gatherpress) + Powering our community's event management needs. * [figuren-theater/label-printing](https://github.com/figuren-theater/label-printing) Create printable labels with blocks * [figuren-theater/theater-production-blocks](https://github.com/figuren-theater/theater-production-blocks)