Skip to content

Commit

Permalink
Merge pull request #374 from totten/master-symfony
Browse files Browse the repository at this point in the history
composer.lock - Update typical Symfony versions
  • Loading branch information
totten authored Nov 27, 2024
2 parents 7e99d15 + ad62ec4 commit 22b6a5f
Show file tree
Hide file tree
Showing 27 changed files with 383 additions and 131 deletions.
450 changes: 350 additions & 100 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/AbstractAddPageCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected function configure() {
->addArgument('<web/path>', InputArgument::REQUIRED, 'The path which maps to this page (eg "civicrm/my-page")');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
if (!preg_match('/^civicrm\//', $input->getArgument('<web/path>'))) {
throw new Exception("Web path must begin with 'civicrm/'");
}
Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/AddAngularDirectiveCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected function configure() {
For more, see https://docs.angularjs.org/guide/directive');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$this->assertCurrentFormat();

//// Figure out template data ////
Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/AddAngularModuleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected function configure() {
->addOption('am', NULL, InputOption::VALUE_REQUIRED, 'Name of the Angular module (default: match the Civi module name)');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$this->assertCurrentFormat();

//// Figure out template data ////
Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/AddAngularPageCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected function configure() {
For more, see https://docs.angularjs.org/guide');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$this->assertCurrentFormat();

//// Figure out template data ////
Expand Down
4 changes: 2 additions & 2 deletions src/CRM/CivixBundle/Command/AddApiCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ protected function configure() {
');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$io = new SymfonyStyle($input, $output);

// load Civi to get access to civicrm_api_get_function_name
Civix::boot(['output' => $output]);
$civicrm_api3 = Civix::api3();
if (!$civicrm_api3 || !$civicrm_api3->local) {
$output->writeln("<error>--copy requires access to local CiviCRM source tree. Configure civicrm_api3_conf_path.</error>");
return;
return 1;
}

$this->assertCurrentFormat();
Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/AddCaseTypeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected function configure() {
->addArgument('<Name>', InputArgument::OPTIONAL, 'Code name of the case type (Default: Derive from <Label>)');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
// load Civi to get access to civicrm_api_get_function_name
Civix::boot(['output' => $output]);
$civicrm_api3 = Civix::api3();
Expand Down
6 changes: 3 additions & 3 deletions src/CRM/CivixBundle/Command/AddCustomDataCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ protected function configure() {
->addOption('force', 'f', InputOption::VALUE_NONE, 'Overwrite existing files');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
// load Civi to get access to civicrm_api_get_function_name
Civix::boot(['output' => $output]);
$civicrm_api3 = Civix::api3();
if (!$civicrm_api3 || !$civicrm_api3->local) {
$output->writeln("<error>generate:custom-xml requires access to local CiviCRM instance. Configure civicrm_api3_conf_path.</error>");
return;
return 1;
}

$this->assertCurrentFormat();
Expand All @@ -56,7 +56,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
}
if (!$input->getOption('data') && !$input->getOption('uf')) {
$output->writeln("<error>generate:custom-xml requires --data and/or --uf</error>");
return;
return 1;
}
$customDataXML = new CustomDataXML(
$input->getOption('data') ? explode(',', $input->getOption('data')) : [],
Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/AddEntityCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected function configure() {

}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
// load Civi to get access to civicrm_api_get_function_name
Civix::boot(['output' => $output]);
$civicrm_api3 = Civix::api3();
Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/AddManagedEntityCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected function configure() {
');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$this->assertCurrentFormat();

$entityName = $input->getArgument('<EntityName>');
Expand Down
4 changes: 2 additions & 2 deletions src/CRM/CivixBundle/Command/AddReportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected function configure() {
->addOption('copy', NULL, InputOption::VALUE_OPTIONAL, 'Full class name of an existing report which should be copied (eg "CRM_Report_Form_Activity")');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$this->assertCurrentFormat();

//// Figure out template data and put it in $ctx ////
Expand Down Expand Up @@ -102,7 +102,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$civicrm_api3 = Civix::api3();
if (!$civicrm_api3 || !$civicrm_api3->local) {
$output->writeln("<error>--copy requires access to local CiviCRM source tree. Configure civicrm_api3_conf_path.</error>");
return;
return 1;
}

$origTplFile = 'templates/' . preg_replace('/_/', '/', $srcClassName) . '.tpl';
Expand Down
4 changes: 2 additions & 2 deletions src/CRM/CivixBundle/Command/AddSearchCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected function configure() {
->addOption('copy', NULL, InputOption::VALUE_OPTIONAL, 'Full class name of an existing search which should be copied (eg "CRM_Contact_Form_Search_Custom_ZipCodeRange")');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$this->assertCurrentFormat();

//// Figure out template data ////
Expand Down Expand Up @@ -81,7 +81,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$civicrm_api3 = Civix::api3();
if (!$civicrm_api3 || !$civicrm_api3->local) {
$output->writeln("<error>--copy requires access to local CiviCRM source tree. Configure civicrm_api3_conf_path.</error>");
return;
return 1;
}

if (self::findTpl($srcClassName) == self::GENERIC_SEARCH_TEMPLATE) {
Expand Down
4 changes: 3 additions & 1 deletion src/CRM/CivixBundle/Command/AddServiceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected function configure() {
parent::configure();
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$gen = \Civix::generator();
$gen->addMixins(['[email protected]']);

Expand Down Expand Up @@ -57,6 +57,8 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$gen->addClass($className, 'service.php.php', [
'service' => $serviceName,
], 'ask');

return 0;
}

}
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/AddTestCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ classes/functions
->addArgument('<CRM_Full_ClassName>', InputArgument::REQUIRED, 'The full class name (eg "CRM_Myextension_MyTest" or "Civi\Myextension\MyTest")');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$this->assertCurrentFormat();

$ctx = [];
Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/AddThemeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected function configure() {
');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$this->assertCurrentFormat();

//// Figure out template data ////
Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/AddUpgraderCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ protected function configure() {
->setDescription('Add an example upgrader class to a CiviCRM Module-Extension');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$this->assertCurrentFormat();
Civix::generator()->addUpgrader('if-forced');
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/BuildCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected function configure() {
->setDescription('Build a zip file for a CiviCRM Extension');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$this->assertCurrentFormat();

$ctx = [];
Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/ConfigGetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected function configure() {
->addArgument('parameter', InputArgument::OPTIONAL, 'Parameter name');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$config = Civix::config();
foreach ($this->getInterestingParameters() as $key) {
printf("%-40s \"%s\"\n", $key, @$config['parameters'][$key]);
Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/ConfigSetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected function configure() {
->addArgument('value', InputArgument::REQUIRED, 'Parameter value');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$ctx = [];
$ext = new Collection();

Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/ConvertEntityCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected function configure() {
parent::configure();
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
Civix::boot(['output' => $output]);
$this->assertCurrentFormat();

Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/InfoGetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected function configure() {
Common fields:\n * " . implode("\n * ", $fields) . "\n");
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$basedir = new Path(\CRM\CivixBundle\Application::findExtDir());
$info = new Info($basedir->string('info.xml'));
$ctx = [];
Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/InfoSetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function configure() {
* " . implode("\n * ", $fields) . "\n");
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$basedir = new Path(\CRM\CivixBundle\Application::findExtDir());
$info = new Info($basedir->string('info.xml'));
$ctx = [];
Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/InitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected function configure() {
parent::configure();
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
Civix::boot(['output' => $output]);

$ctx = [];
Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/MixinCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected function configure() {
parent::configure();
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$this->assertCurrentFormat();

$ctx = [];
Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/PingCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ protected function configure() {
->setDescription('Test whether the CiviCRM client is properly configured');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
Civix::boot(['output' => $output]);
$civicrm_api3 = Civix::api3();
if ($civicrm_api3->Contact->Get(['option.limit' => 1])) {
Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/TestRunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected function configure() {
->addOption('debug', NULL, InputOption::VALUE_NONE, 'Run PHPUnit in debug mode.');
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
Civix::boot(['output' => $output]);
$basedir = new Path(getcwd());

Expand Down
2 changes: 1 addition & 1 deletion src/CRM/CivixBundle/Command/UpgradeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected function configure() {
parent::configure();
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$startVer = $input->getOption('start');
if ($startVer !== 'current') {
$verAliases = ['0' => '13.10.0'];
Expand Down

0 comments on commit 22b6a5f

Please sign in to comment.