Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Symfony 6 compatibility remove Symfony 2-3-4 #127

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
🎨 [Deprecations] Fix return types
  • Loading branch information
NilsRec committed Dec 8, 2023
commit 768db53ea441043b1b2d4a9cd0e70206426af70f
8 changes: 4 additions & 4 deletions src/Command/DeployCommand.php
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ public function __construct(FileLocator $fileLocator, string $projectDir, string
parent::__construct();
}

protected function configure()
protected function configure(): void
{
$this
->setName('deploy')
@@ -50,20 +50,20 @@ protected function configure()
;
}

protected function initialize(InputInterface $input, OutputInterface $output)
protected function initialize(InputInterface $input, OutputInterface $output): void
{
$customConfigPath = $input->getOption('configuration');
if (null !== $customConfigPath && !is_readable($customConfigPath)) {
throw new \RuntimeException(sprintf("The given configuration file ('%s') does not exist or it's not readable.", $customConfigPath));
}

if (null !== $customConfigPath && is_readable($customConfigPath)) {
return $this->configFilePath = $customConfigPath;
$this->configFilePath = $customConfigPath;
}

$defaultConfigPath = SymfonyConfigPathGuesser::guess($this->projectDir, $input->getArgument('stage'));
if (is_readable($defaultConfigPath)) {
return $this->configFilePath = $defaultConfigPath;
$this->configFilePath = $defaultConfigPath;
}

$this->createDefaultConfigFile($input, $output, $defaultConfigPath, $input->getArgument('stage'));
8 changes: 4 additions & 4 deletions src/Command/RollbackCommand.php
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ public function __construct(string $projectDir, string $logDir)
parent::__construct();
}

protected function configure()
protected function configure(): void
{
$this
->setName('rollback')
@@ -45,20 +45,20 @@ protected function configure()
;
}

protected function initialize(InputInterface $input, OutputInterface $output)
protected function initialize(InputInterface $input, OutputInterface $output): void
{
$customConfigPath = $input->getOption('configuration');
if (null !== $customConfigPath && !is_readable($customConfigPath)) {
throw new \RuntimeException(sprintf("The given configuration file ('%s') does not exist or it's not readable.", $customConfigPath));
}

if (null !== $customConfigPath && is_readable($customConfigPath)) {
return $this->configFilePath = $customConfigPath;
$this->configFilePath = $customConfigPath;
}

$defaultConfigPath = SymfonyConfigPathGuesser::guess($this->projectDir, $input->getArgument('stage'));
if (is_readable($defaultConfigPath)) {
return $this->configFilePath = $defaultConfigPath;
$this->configFilePath = $defaultConfigPath;
}

throw new \RuntimeException(sprintf("The default configuration file does not exist or it's not readable, and no custom configuration file was given either. Create the '%s' configuration file and run this command again.", $defaultConfigPath));
2 changes: 1 addition & 1 deletion src/DependencyInjection/EasyDeployExtension.php
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@

class EasyDeployExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container)
public function load(array $configs, ContainerBuilder $container): void
{
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.xml');