Skip to content

Commit

Permalink
Test Symfony 7 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Jul 16, 2024
1 parent 8e2bd9a commit d4a0eb0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- php-version: '8.3'
elasticsearch-version: '7.11.1'
elasticsearch-package-constraint: '~7.11.0'
phpcr-transport: jackrabbit
phpcr-transport: doctrinedbal
dependency-versions: 'highest'
php-extensions: 'ctype, iconv, mysql, imagick'
tools: 'composer:v2'
Expand Down
4 changes: 2 additions & 2 deletions Command/ArticleExportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ public function __construct(ArticleExportInterface $articleExporter)
$this->articleExporter = $articleExporter;
}

protected function configure()
protected function configure(): void
{
$this->addArgument('target', InputArgument::REQUIRED, 'export.xliff')
->addArgument('locale', InputArgument::REQUIRED)
->addOption('format', 'f', InputOption::VALUE_REQUIRED, '', '1.2.xliff')
->setDescription('Export article translations from given language into xliff file for translating into a new language.');
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$target = $input->getArgument('target');
if (0 === !\strpos($target, '/')) {

Check failure on line 49 in Command/ArticleExportCommand.php

View workflow job for this annotation

GitHub Actions / PHP Lint

Parameter #1 $haystack of function strpos expects string, mixed given.
Expand Down
4 changes: 2 additions & 2 deletions Command/ArticleImportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct(ArticleImportInterface $articleImporter, ?LoggerInte
$this->logger = $logger ?: new NullLogger();
}

protected function configure()
protected function configure(): void
{
$this->addArgument('file', InputArgument::REQUIRED, 'export.xliff')
->addArgument('locale', InputArgument::REQUIRED)
Expand All @@ -55,7 +55,7 @@ protected function configure()
->setDescription('Import article translations from xliff file into a specific language.');
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$filePath = $input->getArgument('file');
if (0 === !\strpos($filePath, '/')) {

Check failure on line 61 in Command/ArticleImportCommand.php

View workflow job for this annotation

GitHub Actions / PHP Lint

Parameter #1 $haystack of function strpos expects string, mixed given.
Expand Down
4 changes: 2 additions & 2 deletions Command/ReindexCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ public function __construct(
$this->suluContext = $suluContext;
}

public function configure()
public function configure(): void
{
$this->setDescription('Rebuild elastic-search index for articles');
$this->setHelp('This command will load all articles and index them to elastic-search indexes.');
$this->addOption('drop', null, InputOption::VALUE_NONE, 'Drop and recreate index before reindex');
$this->addOption('clear', null, InputOption::VALUE_NONE, 'Clear all articles of index before reindex');
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$startTime = \microtime(true);

Expand Down
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,17 @@
"homepage": "https://github.com/sulu/SuluArticleBundle/contributors"
}
],
"repositories": [
{
"type": "vcs",
"url": "git@github.com:alexander-schranz/ElasticsearchBundle.git"
}
],
"require": {
"php": "^7.3 || ^8.0",
"ext-json": "*",
"elasticsearch/elasticsearch": "^5.0 || ^6.0 || ^7.0",
"handcraftedinthealps/elasticsearch-bundle": "^5.2.6.4",
"handcraftedinthealps/elasticsearch-bundle": "dev-feature/symfony-7-upgrade as 5.999",
"handcraftedinthealps/elasticsearch-dsl": "^5.0.7.1 || ^6.2.0.1 || ^7.2.0.1",
"jms/serializer": "^3.3",
"jms/serializer-bundle": "^3.3 || ^4.0 || ^5.0",
Expand Down

0 comments on commit d4a0eb0

Please sign in to comment.