Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,30 @@ jobs:
strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"
symfony-version:
- "4.4.x"
- "5.4.x"
- "6.0.x"
- "7.0.x"
- "8.0.x"
dependencies:
- "highest"
include:
- dependencies: "lowest"
php-version: "7.2"
php-version: "8.0"
symfony-version: "4.4.*"
- dependencies: "highest"
php-version: "8.4"
symfony-version: "8.0.x"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v6"
with:
fetch-depth: 2

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ vendor/*
composer.lock
composer.phar
.phpunit.result.cache
.phpunit.cache
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
CHANGELOG
=========

### 2025-01-XX

* Added Symfony 8.0 and PHP 8.4 compatibility
* [BC BREAK] Dropped PHP 7.x support (PHP 7.4 reached end-of-life in November 2022)
* Migrated service definitions from XML to YAML format (required for Symfony 8 compatibility, but YAML works with all supported Symfony versions)
* Modernized `FeedDumpCommand` to use `AsCommand` attribute instead of deprecated `$defaultName` property
* Updated CI workflow to test against PHP 8.1, 8.2, 8.3, 8.4 and Symfony 8.0.x
* Minimum PHP version requirement changed from `^7.2 || ^8.0` to `^8.0`

### 2013-07-13

* [BC BREAK] We have introduced the `ChannelField` to add custom fields to your feed's main channel
Expand Down
6 changes: 3 additions & 3 deletions Command/FeedDumpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
namespace Eko\FeedBundle\Command;

use Eko\FeedBundle\Service\FeedDumpService;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
Expand All @@ -25,9 +26,9 @@
*
* @author Vincent Composieux <composieux@ekino.com>
*/
#[AsCommand('eko:feed:dump', 'Generate (dump) a feed in an XML file')]
class FeedDumpCommand extends Command
{
protected static $defaultName = 'eko:feed:dump';

/**
* @var RouterInterface
Expand All @@ -53,7 +54,6 @@ public function __construct(RouterInterface $router, FeedDumpService $feedDumpSe
protected function configure()
{
$this
->setDescription('Generate (dump) a feed in an XML file')
->addOption('name', null, InputOption::VALUE_REQUIRED, 'Feed name defined in eko_feed configuration')
->addOption('entity', null, InputOption::VALUE_REQUIRED, 'Entity to use to generate the feed')
->addOption('filename', null, InputOption::VALUE_REQUIRED, 'Defines feed filename')
Expand Down Expand Up @@ -100,6 +100,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$output->writeln('<comment>done!</comment>');
$output->writeln(sprintf('<info>Feed has been dumped and located in "%s"</info>', $this->feedDumpService->getRootDir().$filename));

return 0;
return Command::SUCCESS;
}
}
13 changes: 7 additions & 6 deletions DependencyInjection/EkoFeedExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

/**
* EkoFeedExtension.
*
* This class loads services.xml file and tree configuration
* This class loads services.yaml files and tree configuration
*
* @author Vincent Composieux <vincent.composieux@gmail.com>
*/
Expand All @@ -35,11 +36,11 @@ public function load(array $configs, ContainerBuilder $container)
{
$config = $this->processConfiguration(new Configuration(), $configs);

$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('feed.xml');
$loader->load('formatter.xml');
$loader->load('hydrator.xml');
$loader->load('command.xml');
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('feed.yaml');
$loader->load('formatter.yaml');
$loader->load('hydrator.yaml');
$loader->load('command.yaml');

$container->setParameter('eko_feed.config', $config);
$container->setParameter('eko_feed.translation_domain', $config['translation_domain']);
Expand Down
15 changes: 0 additions & 15 deletions Resources/config/command.xml

This file was deleted.

9 changes: 9 additions & 0 deletions Resources/config/command.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
Eko\FeedBundle\Command\FeedDumpCommand:
autowire: false
tags:
- { name: 'console.command' }
arguments:
- '@router'
- '@?Eko\FeedBundle\Service\FeedDumpService'

34 changes: 0 additions & 34 deletions Resources/config/feed.xml

This file was deleted.

32 changes: 32 additions & 0 deletions Resources/config/feed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
services:
Eko\FeedBundle\Feed\FeedManager:
public: true
autowire: false
arguments:
- '@router'
- '%eko_feed.config%'
- []

Eko\FeedBundle\Service\FeedDumpService:
public: true
autowire: false
arguments:
- '@Eko\FeedBundle\Feed\FeedManager'
- '@doctrine.orm.entity_manager'
- '@filesystem'
calls:
- setRootDir: ['%kernel.project_dir%']

Eko\FeedBundle\Feed\Reader:
public: true
autowire: false

Eko\FeedBundle\Feed\Feed:
public: true
autowire: false
arguments:
- []
- []
calls:
- setRouter: ['@router']

23 changes: 0 additions & 23 deletions Resources/config/formatter.xml

This file was deleted.

17 changes: 17 additions & 0 deletions Resources/config/formatter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
services:
Eko\FeedBundle\Formatter\RssFormatter:
autowire: false
tags:
- { name: 'eko_feed.formatter', format: 'rss' }
arguments:
- '@translator'
- '%eko_feed.translation_domain%'

Eko\FeedBundle\Formatter\AtomFormatter:
autowire: false
tags:
- { name: 'eko_feed.formatter', format: 'atom' }
arguments:
- '@translator'
- '%eko_feed.translation_domain%'

11 changes: 0 additions & 11 deletions Resources/config/hydrator.xml

This file was deleted.

4 changes: 4 additions & 0 deletions Resources/config/hydrator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
services:
Eko\FeedBundle\Hydrator\DefaultHydrator:
autowire: false

6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
}
],
"require": {
"php": "^7.2 || ^8.0",
"symfony/framework-bundle": "^4.4|^5.3|^6.0|^7.0",
"symfony/translation": "^4.4|^5.3|^6.0|^7.0",
"php": "^8.0",
"symfony/framework-bundle": "^4.4|^5.3|^6.0|^7.0|^8.0",
"symfony/translation": "^4.4|^5.3|^6.0|^7.0|^8.0",
"laminas/laminas-feed": "^2.4"
},
"require-dev": {
Expand Down