diff --git a/composer.json b/composer.json index 22d4aba..7945eaa 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,6 @@ "goteo/benzina": "^0.5", "guzzlehttp/psr7": "^2.8", "jolicode/automapper": "^9.2", - "mpratt/embera": "~2.0", "nelmio/cors-bundle": "^2.3", "phpdocumentor/reflection-docblock": "^5.3", "phpstan/phpdoc-parser": "^1.24", diff --git a/composer.lock b/composer.lock index 4464c22..10fc3b9 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": "19fa0902b062f1449ae15c2d002ede49", + "content-hash": "ae8f53f2074433fb0f88f2c628c53d25", "packages": [ { "name": "api-platform/doctrine-common", @@ -3628,77 +3628,6 @@ ], "time": "2025-03-24T10:02:05+00:00" }, - { - "name": "mpratt/embera", - "version": "2.0.42", - "source": { - "type": "git", - "url": "https://github.com/mpratt/Embera.git", - "reference": "afa728339c6f078c803c9277a5054ca241b3c469" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mpratt/Embera/zipball/afa728339c6f078c803c9277a5054ca241b3c469", - "reference": "afa728339c6f078c803c9277a5054ca241b3c469", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": ">=5.6" - }, - "require-dev": { - "phpstan/phpstan": "^1.4", - "phpunit/phpunit": "^9.0||^10.0", - "symfony/yaml": "^2.1" - }, - "suggest": { - "ext-curl": "Fetch data using curl instead of using file_get_contents" - }, - "type": "library", - "autoload": { - "psr-4": { - "Embera\\": "src/Embera" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Pratt", - "email": "yo@michael-pratt.com", - "homepage": "http://www.michael-pratt.com", - "role": "Author/Developer" - } - ], - "description": "Oembed consumer library. Converts urls into their html embed code. Supports 150+ sites, such as Youtube, Twitter, vimeo, Instagram etc.", - "homepage": "https://github.com/mpratt/Embera", - "keywords": [ - "Auto embed", - "Embed Text", - "Responsive Embeds", - "Url Embed", - "embed", - "instagram", - "oembed", - "twitter", - "vimeo", - "vine", - "youtube" - ], - "support": { - "issues": "https://github.com/mpratt/Embera/issues", - "source": "https://github.com/mpratt/Embera/tree/2.0.42" - }, - "funding": [ - { - "url": "https://paypal.me/mtpratt", - "type": "paypal" - } - ], - "time": "2025-01-04T06:07:59+00:00" - }, { "name": "nelmio/cors-bundle", "version": "2.5.0", diff --git a/config/services.yaml b/config/services.yaml index f3679dc..21b8f07 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -22,10 +22,6 @@ services: tags: ['app.matchfunding.formula'] App\Matchfunding\Rule\RuleInterface: tags: ['app.matchfunding.rule'] - App\Service\Embed\Filter\EmbedFilterInterface: - tags: ['app.embed.embed_filter'] - App\Service\Embed\Provider\EmbedProviderFactoryInterface: - tags: ['app.embed.provider_factory'] AutoMapper\Provider\ProviderInterface: tags: ['app.mapping.map_provider'] AutoMapper\Transformer\PropertyTransformer\PropertyTransformerInterface: @@ -85,11 +81,6 @@ services: arguments: - '%kernel.default_locale%' - App\Service\Embed\Provider\PeertubeEmbedProviderFactory: - bind: - $hosts: - - 'peertube.plataformess.org' - App\State\MoneyTotalStateProvider: arguments: - !tagged 'api_platform.doctrine.orm.query_extension.collection' diff --git a/src/Service/Embed/Filter/EmbedFilterInterface.php b/src/Service/Embed/Filter/EmbedFilterInterface.php deleted file mode 100644 index 0a360d9..0000000 --- a/src/Service/Embed/Filter/EmbedFilterInterface.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ - public function createProviders(): array; -} diff --git a/src/Service/Embed/Provider/PeertubeEmbedProvider.php b/src/Service/Embed/Provider/PeertubeEmbedProvider.php deleted file mode 100644 index 47fbcf0..0000000 --- a/src/Service/Embed/Provider/PeertubeEmbedProvider.php +++ /dev/null @@ -1,63 +0,0 @@ -currentHost = $host; - - return true; - } - - return false; - } - - public function getEndpoint(): string - { - return \sprintf('https://%s%s', $this->currentHost, $this->endpoint); - } - - /** inline {@inheritdoc} */ - public function normalizeUrl(Url $url): Url - { - $url->convertToHttps(); - $url->removeQueryString(); - $url->removeLastSlash(); - - return $url; - } -} diff --git a/src/Service/Embed/Provider/PeertubeEmbedProviderFactory.php b/src/Service/Embed/Provider/PeertubeEmbedProviderFactory.php deleted file mode 100644 index 3658d04..0000000 --- a/src/Service/Embed/Provider/PeertubeEmbedProviderFactory.php +++ /dev/null @@ -1,40 +0,0 @@ - $this->hosts]; - } - - /** - * @return array - */ - public function createProviders(): array - { - $providers = []; - - foreach ($this->hosts as $host) { - $providers[$host] = PeertubeEmbedProvider::class; - } - - return $providers; - } -}