From 8a3b022132263fb48c331f3e88a56cf0833dc6a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nu=C5=A1a=20Puk=C5=A1i=C4=8D?= Date: Wed, 30 Jul 2025 14:34:59 +0200 Subject: [PATCH] Downsizing: remove Mercure --- .env.dist | 14 -- compose.override.yaml | 3 - compose.yaml | 11 - composer.json | 1 - composer.lock | 381 +------------------------------ config/bundles.php | 1 - config/packages/mercure.yaml | 8 - symfony.lock | 12 - templates/base.html.twig | 2 - templates/pages/author.html.twig | 33 --- 10 files changed, 1 insertion(+), 465 deletions(-) delete mode 100644 config/packages/mercure.yaml diff --git a/.env.dist b/.env.dist index 2c4a6aa..2eba61c 100644 --- a/.env.dist +++ b/.env.dist @@ -34,20 +34,6 @@ MYSQL_CHARSET=utf8mb4 DATABASE_URL="mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@database:3306/${MYSQL_DATABASE}?serverVersion=${MYSQL_VERSION}&charset=${MYSQL_CHARSET}" ###< doctrine/doctrine-bundle ### -###> symfony/mercure-bundle ### -# See https://symfony.com/doc/current/mercure.html#configuration -# The URL of the Mercure hub, used by the app to publish updates (can be a local URL) -MERCURE_URL=https://unfold-php/.well-known/mercure -# The public URL of the Mercure hub, used by the browser to connect -MERCURE_PUBLIC_URL="https://${SERVER_NAME}/.well-known/mercure" -# The secret used to sign the JWTs -MERCURE_JWT_SECRET="!NotSoSecretMercureHubJWTSecretKey!" -###< symfony/mercure-bundle ### -###> LNBits ### -LNBITS_URL=https://legend.lnbits.com -LNBITS_API_KEY= -###< LNBits ### - ###> magazine settings ### MAGAZINE_NPUB= MAGAZINE_D_TAG= diff --git a/compose.override.yaml b/compose.override.yaml index 0fa616c..8142731 100644 --- a/compose.override.yaml +++ b/compose.override.yaml @@ -21,9 +21,6 @@ services: - host.docker.internal:host-gateway tty: true -###> symfony/mercure-bundle ### -###< symfony/mercure-bundle ### - ###> doctrine/doctrine-bundle ### database: restart: always diff --git a/compose.yaml b/compose.yaml index 908893a..ca7be7e 100644 --- a/compose.yaml +++ b/compose.yaml @@ -7,14 +7,8 @@ services: environment: APP_ENV: ${APP_ENV:-dev} SERVER_NAME: ${SERVER_NAME:-localhost}, php:80 - MERCURE_PUBLISHER_JWT_KEY: ${MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} - MERCURE_SUBSCRIBER_JWT_KEY: ${MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} # Run "composer require symfony/orm-pack" to install and configure Doctrine ORM DATABASE_URL: mysql://${MYSQL_USER:-app}:${MYSQL_PASSWORD:-!ChangeMe!}@database:3306/${MYSQL_DATABASE:-app}?serverVersion=${MYSQL_VERSION:-8.0}&charset=${MYSQL_CHARSET:-utf8mb4} - # Run "composer require symfony/mercure-bundle" to install and configure the Mercure integration - MERCURE_URL: ${MERCURE_URL:-http://php/.well-known/mercure} - MERCURE_PUBLIC_URL: ${MERCURE_PUBLIC_URL:-https://${SERVER_NAME:-localhost}/.well-known/mercure} - MERCURE_JWT_SECRET: ${MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} volumes: - caddy_data:/data - caddy_config:/config @@ -32,9 +26,6 @@ services: published: ${HTTP3_PORT:-443} protocol: udp -# Mercure is installed as a Caddy module, prevent the Flex recipe from installing another service -###> symfony/mercure-bundle ### -###< symfony/mercure-bundle ### ###> doctrine/doctrine-bundle ### database: @@ -66,8 +57,6 @@ services: volumes: caddy_data: caddy_config: -###> symfony/mercure-bundle ### -###< symfony/mercure-bundle ### ###> doctrine/doctrine-bundle ### database_data: diff --git a/composer.json b/composer.json index f91d346..74d0e3b 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,6 @@ "symfony/html-sanitizer": "7.1.*", "symfony/http-foundation": "7.1.*", "symfony/intl": "7.1.*", - "symfony/mercure-bundle": "^0.3.9", "symfony/property-access": "7.1.*", "symfony/property-info": "7.1.*", "symfony/runtime": "7.1.*", diff --git a/composer.lock b/composer.lock index 3beacfe..fa822d1 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": "0cd33192da4ef60028e3b2dab8d92170", + "content-hash": "210ea2a31ffe95d3b02f9a5b177fdda3", "packages": [ { "name": "bacon/bacon-qr-code", @@ -1967,79 +1967,6 @@ ], "time": "2025-05-05T16:03:34+00:00" }, - { - "name": "lcobucci/jwt", - "version": "5.5.0", - "source": { - "type": "git", - "url": "https://github.com/lcobucci/jwt.git", - "reference": "a835af59b030d3f2967725697cf88300f579088e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/a835af59b030d3f2967725697cf88300f579088e", - "reference": "a835af59b030d3f2967725697cf88300f579088e", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "ext-sodium": "*", - "php": "~8.2.0 || ~8.3.0 || ~8.4.0", - "psr/clock": "^1.0" - }, - "require-dev": { - "infection/infection": "^0.29", - "lcobucci/clock": "^3.2", - "lcobucci/coding-standard": "^11.0", - "phpbench/phpbench": "^1.2", - "phpstan/extension-installer": "^1.2", - "phpstan/phpstan": "^1.10.7", - "phpstan/phpstan-deprecation-rules": "^1.1.3", - "phpstan/phpstan-phpunit": "^1.3.10", - "phpstan/phpstan-strict-rules": "^1.5.0", - "phpunit/phpunit": "^11.1" - }, - "suggest": { - "lcobucci/clock": ">= 3.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Lcobucci\\JWT\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Luís Cobucci", - "email": "lcobucci@gmail.com", - "role": "Developer" - } - ], - "description": "A simple library to work with JSON Web Token and JSON Web Signature", - "keywords": [ - "JWS", - "jwt" - ], - "support": { - "issues": "https://github.com/lcobucci/jwt/issues", - "source": "https://github.com/lcobucci/jwt/tree/5.5.0" - }, - "funding": [ - { - "url": "https://github.com/lcobucci", - "type": "github" - }, - { - "url": "https://www.patreon.com/lcobucci", - "type": "patreon" - } - ], - "time": "2025-01-26T21:29:45+00:00" - }, { "name": "league/commonmark", "version": "2.7.1", @@ -4017,62 +3944,6 @@ }, "time": "2023-04-04T09:54:51+00:00" }, - { - "name": "psr/link", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/link.git", - "reference": "84b159194ecfd7eaa472280213976e96415433f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/link/zipball/84b159194ecfd7eaa472280213976e96415433f7", - "reference": "84b159194ecfd7eaa472280213976e96415433f7", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "suggest": { - "fig/link-util": "Provides some useful PSR-13 utilities" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Link\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for HTTP links", - "homepage": "https://github.com/php-fig/link", - "keywords": [ - "http", - "http-link", - "link", - "psr", - "psr-13", - "rest" - ], - "support": { - "source": "https://github.com/php-fig/link/tree/2.0.1" - }, - "time": "2021-03-11T23:00:27+00:00" - }, { "name": "psr/log", "version": "3.0.2", @@ -6471,173 +6342,6 @@ ], "time": "2024-11-08T15:46:42+00:00" }, - { - "name": "symfony/mercure", - "version": "v0.6.5", - "source": { - "type": "git", - "url": "https://github.com/symfony/mercure.git", - "reference": "304cf84609ef645d63adc65fc6250292909a461b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/mercure/zipball/304cf84609ef645d63adc65fc6250292909a461b", - "reference": "304cf84609ef645d63adc65fc6250292909a461b", - "shasum": "" - }, - "require": { - "php": ">=7.1.3", - "symfony/deprecation-contracts": "^2.0|^3.0|^4.0", - "symfony/http-client": "^4.4|^5.0|^6.0|^7.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0|^7.0", - "symfony/polyfill-php80": "^1.22", - "symfony/web-link": "^4.4|^5.0|^6.0|^7.0" - }, - "require-dev": { - "lcobucci/jwt": "^3.4|^4.0|^5.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0|^7.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0|^7.0", - "symfony/phpunit-bridge": "^5.2|^6.0|^7.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0|^7.0", - "twig/twig": "^2.0|^3.0|^4.0" - }, - "suggest": { - "symfony/stopwatch": "Integration with the profiler performances" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/dunglas/mercure", - "name": "dunglas/mercure" - }, - "branch-alias": { - "dev-main": "0.6.x-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Mercure\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kévin Dunglas", - "email": "dunglas@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Mercure Component", - "homepage": "https://symfony.com", - "keywords": [ - "mercure", - "push", - "sse", - "updates" - ], - "support": { - "issues": "https://github.com/symfony/mercure/issues", - "source": "https://github.com/symfony/mercure/tree/v0.6.5" - }, - "funding": [ - { - "url": "https://github.com/dunglas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/mercure", - "type": "tidelift" - } - ], - "time": "2024-04-08T12:51:34+00:00" - }, - { - "name": "symfony/mercure-bundle", - "version": "v0.3.9", - "source": { - "type": "git", - "url": "https://github.com/symfony/mercure-bundle.git", - "reference": "77435d740b228e9f5f3f065b6db564f85f2cdb64" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/mercure-bundle/zipball/77435d740b228e9f5f3f065b6db564f85f2cdb64", - "reference": "77435d740b228e9f5f3f065b6db564f85f2cdb64", - "shasum": "" - }, - "require": { - "lcobucci/jwt": "^3.4|^4.0|^5.0", - "php": ">=7.1.3", - "symfony/config": "^4.4|^5.0|^6.0|^7.0", - "symfony/dependency-injection": "^4.4|^5.4|^6.0|^7.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0|^7.0", - "symfony/mercure": "^0.6.1", - "symfony/web-link": "^4.4|^5.0|^6.0|^7.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "^4.3.7|^5.0|^6.0|^7.0", - "symfony/stopwatch": "^4.3.7|^5.0|^6.0|^7.0", - "symfony/ux-turbo": "*", - "symfony/var-dumper": "^4.3.7|^5.0|^6.0|^7.0" - }, - "suggest": { - "symfony/messenger": "To use the Messenger integration" - }, - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-main": "0.3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Bundle\\MercureBundle\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kévin Dunglas", - "email": "dunglas@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony MercureBundle", - "homepage": "https://symfony.com", - "keywords": [ - "mercure", - "push", - "sse", - "updates" - ], - "support": { - "issues": "https://github.com/symfony/mercure-bundle/issues", - "source": "https://github.com/symfony/mercure-bundle/tree/v0.3.9" - }, - "funding": [ - { - "url": "https://github.com/dunglas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/mercure-bundle", - "type": "tidelift" - } - ], - "time": "2024-05-31T09:07:18+00:00" - }, { "name": "symfony/options-resolver", "version": "v7.1.9", @@ -9197,89 +8901,6 @@ ], "time": "2024-09-25T14:20:29+00:00" }, - { - "name": "symfony/web-link", - "version": "v7.1.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/web-link.git", - "reference": "383aa7566f25e3a1ab323732c2cc6a1748120d3a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/web-link/zipball/383aa7566f25e3a1ab323732c2cc6a1748120d3a", - "reference": "383aa7566f25e3a1ab323732c2cc6a1748120d3a", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "psr/link": "^1.1|^2.0" - }, - "conflict": { - "symfony/http-kernel": "<6.4" - }, - "provide": { - "psr/link-implementation": "1.0|2.0" - }, - "require-dev": { - "symfony/http-kernel": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\WebLink\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kévin Dunglas", - "email": "dunglas@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Manages links between resources", - "homepage": "https://symfony.com", - "keywords": [ - "dns-prefetch", - "http", - "http2", - "link", - "performance", - "prefetch", - "preload", - "prerender", - "psr13", - "push" - ], - "support": { - "source": "https://github.com/symfony/web-link/tree/v7.1.6" - }, - "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-09-25T14:20:29+00:00" - }, { "name": "symfony/workflow", "version": "v7.1.6", diff --git a/config/bundles.php b/config/bundles.php index 4fcbc82..e93e3ed 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -4,7 +4,6 @@ return [ Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], - Symfony\Bundle\MercureBundle\MercureBundle::class => ['all' => true], Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true], Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true], diff --git a/config/packages/mercure.yaml b/config/packages/mercure.yaml deleted file mode 100644 index f2a7395..0000000 --- a/config/packages/mercure.yaml +++ /dev/null @@ -1,8 +0,0 @@ -mercure: - hubs: - default: - url: '%env(MERCURE_URL)%' - public_url: '%env(MERCURE_PUBLIC_URL)%' - jwt: - secret: '%env(MERCURE_JWT_SECRET)%' - publish: '*' diff --git a/symfony.lock b/symfony.lock index 9e52560..3ae56e3 100644 --- a/symfony.lock +++ b/symfony.lock @@ -119,18 +119,6 @@ "ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f" } }, - "symfony/mercure-bundle": { - "version": "0.3", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "0.3", - "ref": "528285147494380298f8f991ee8c47abebaf79db" - }, - "files": [ - "./config/packages/mercure.yaml" - ] - }, "symfony/phpunit-bridge": { "version": "7.2", "recipe": { diff --git a/templates/base.html.twig b/templates/base.html.twig index 161af02..fcb2bb2 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -11,8 +11,6 @@ - - {% block ogtags %} diff --git a/templates/pages/author.html.twig b/templates/pages/author.html.twig index 5644fc9..888410b 100644 --- a/templates/pages/author.html.twig +++ b/templates/pages/author.html.twig @@ -21,39 +21,6 @@ {# {% endfor %}#} {# {% endif %}#} - -{# {% if app.user and app.user.userIdentifier is same as npub %}#} -{#
#} -{#

Purchase Search Credits

#} - -{#
#} -{#

Amount: {{ amount ?? 0 }} sats

#} -{#

Status: Pending

#} -{#
#} - -{# #}{# You can access the width and height via the matrix #} -{# #}{# Replace the string with the invoice #} -{# {% set qrCode = qr_code_result('My QR Code') %}#} -{# invoice-qr#} - -{#
#} -{# #} - -{# #} -{#
#} -{# {% endif %}#} - {% endblock %}