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 support for Symfony 5 #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ccjjmartin
Copy link

@ccjjmartin ccjjmartin commented Jan 26, 2020

Purpose:

  • When running composer install after a fresh clone down of the repository errors are thrown.

Fixes:

Solution:

  • Force fresh installs to use Symfony version less than 5.

@ccjjmartin
Copy link
Author

Fixes #51

@joachim-n
Copy link
Owner

Thanks for the PR!

Should we update this to work with Symfony 5 instead?

It's meant to run as a standalone thing, so there's no conflict with whatever Drupal is using.

@ccjjmartin
Copy link
Author

@joachim-n Maybe, my original thought is that this project would be consistent with the version of Symfony that Drupal supports. Currently Drupal 9 supports 4.x, looks like there is a desire to make it work with 5.x but we aren't there yet: https://www.drupal.org/project/drupal/issues/3055180

@ccjjmartin
Copy link
Author

@joachim-n Testing some changes to make it compatible anyway.

@ccjjmartin
Copy link
Author

Looks like some more changes are necessary to the other commands that are missing return statements. Example is the apply command, looking into it.

@joachim-n
Copy link
Owner

It looks like we just need to return a 0 status code from commands? If Symfony < 5 doesn't mind this, then it seems like an easy win.

You might want to make a different PR for this new approach though, rather than have the commits that change the composer.json kicking around.

Thanks for looking into this!

@ccjjmartin
Copy link
Author

Yeah, should be an easy win and won't break anything on less than Symfony 5. I will squash the commits once everything appears to be working.

@ccjjmartin
Copy link
Author

@joachim-n Ok, I squashed the commits and force pushed the changes to the branch on my fork so everything is cleaned up now.

I will say that of the commands I was able to test manually with the project I am working on everything appears to be functional. I would still recommend a power user checks these before merging:

  1. Before updating to Symfony 5, pull these changes down
  2. Verify all of the commands still function as expected with a Symfony version less than 5
  3. Run composer update locally and verify that Symfony 5.x gets installed
  4. Verify that with the new version of Symfony all of the commands still function as expected

When someone has a chance to test this I look forward to your feedback.

@ccjjmartin ccjjmartin changed the title Limit Symfony version to less than 5 Add support for Symfony 5 Jan 27, 2020
@mdlutz24
Copy link

This looks good to me, we had to do the same thing in core, because Symfony 4 started throwing deprecation errors if commands didn't return an int. I had considered creating a class constant to represent COMMAND_SUCCESS or something, but we return 0 in core and symfony returns 0, so I just stick with 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not compatible with Symfony 5
3 participants