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

VendorExposeCommand execute is missing a return type. #82

Closed
2 tasks done
nlighteneddesign opened this issue Sep 30, 2024 · 6 comments
Closed
2 tasks done

VendorExposeCommand execute is missing a return type. #82

nlighteneddesign opened this issue Sep 30, 2024 · 6 comments

Comments

@nlighteneddesign
Copy link

nlighteneddesign commented Sep 30, 2024

Module version(s) affected

2.0.3

Description

When the build is running in CI I get this error:

Fatal error: Declaration of SilverStripe\VendorPlugin\Console\VendorExposeCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int in /app/vendor/silverstripe/vendor-plugin/src/Console/VendorExposeCommand.php on line 36

W: PHP Fatal error:  Declaration of SilverStripe\VendorPlugin\Console\VendorExposeCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int in /app/vendor/silverstripe/vendor-plugin/src/Console/VendorExposeCommand.php on line 36

How to reproduce

Build in platform.sh
I'm not sure why this isn't the same as running it locally.

Possible Solution

Add missing return type int

Additional Context

No response

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)

Related issue

PR

@nlighteneddesign
Copy link
Author

I'll create a PR soon

@emteknetnz
Copy link
Member

emteknetnz commented Oct 22, 2024

Our CI is working fine for vendor-plugin - https://github.com/silverstripe/vendor-plugin/actions/runs/11432614774

CMS 6 uses symfony 7 and vendor-plugin 2, we're not seeing any issues with the method signature used in vendor-plugin - https://github.com/silverstripe/silverstripe-framework/blob/6/composer.json#L43

That CI build linked installed symfony 6.4 - is your CI doing the same or is it installing something more recent?

Based on silverstripe/recipe-plugin#46 I'm going to assume that you're installing symfony 7

@nlighteneddesign
Copy link
Author

The ci is installing Symfony console 6, however I think the conflict is actually with composer greater than 2.6.6 according to support. I admit it is strange, cause I see symfony console 7 being installed as a prebuild step for composer dependencies, then composer installs my dependencies which include symfony console 6.

The site then won't build due to missing signatures.

@emteknetnz
Copy link
Member

Seems like there's probably an issue with the composer dependencies in your project/ci then? As mentioned we are not seeing any issues with method signatures in the CI builds for either CMS 5 or CMS 6, both of which are using silverstripe/vendor-plugin:^2

As there doesn't appear to be an issue at this end I'll close this issue

@GuySartorelli
Copy link
Member

See silverstripe/recipe-plugin#46 (comment) for why I think we should make this change

@GuySartorelli
Copy link
Member

Closing as a duplicate of silverstripe/.github#325

@GuySartorelli GuySartorelli closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants