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

PHP Fatal Error: Return value of LocalSetup::execute must be of the type int, "NULL" returned. #54

Open
dungahk opened this issue May 1, 2020 · 6 comments · May be fixed by #55
Open

Comments

@dungahk
Copy link

dungahk commented May 1, 2020

I'm getting this error message when trying to run dorgflow {ISSUE_URL}:

Hello, this is Dorgflow!
Detected master branch 8.x-1.x.
Fetching node 3132912 from drupal.org.
Created feature branch 3132912-Override-getIdealConditionsLimit-and-make-it-configurable.
There are no patches to apply.
PHP Fatal error:  Uncaught TypeError: Return value of "Dorgflow\Command\LocalSetup::execute()" must be of the type int, "NULL" returned. in /home/emerson/drupal/contrib/dorgflow/vendor/symfony/console/Command/Command.php:258
Stack trace:
#0 /home/emerson/drupal/contrib/dorgflow/vendor/symfony/console/Application.php(912): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /home/emerson/drupal/contrib/dorgflow/vendor/symfony/console/Application.php(264): Symfony\Component\Console\Application->doRunCommand(Object(Dorgflow\Command\LocalSetup), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /home/emerson/drupal/contrib/dorgflow/vendor/symfony/console/Application.php(140): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /home/emerson/drupal/contrib/dorgflow/dor in /home/emerson/drupal/contrib/dorgflow/vendor/symfony/console/Command/Command.php on line 258

php --version

PHP 7.2.29-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Mar 20 2020 13:54:39) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.29-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v2.9.3, Copyright (c) 2002-2020, by Derick Rethans
@joachim-n
Copy link
Owner

Is this due to a change in Symfony Console?

@dungahk
Copy link
Author

dungahk commented May 2, 2020

I'm not sure, the version I have installed here is 5.0.8 and the composer.json says >=3.2. Maybe we need to lock the versions? I can see the version for all the other dependencies are all higher than the one in composer.json as well.

Something like this

"require": {
    "symfony/dependency-injection": ">=3.2 <4",
    "symfony/console": ">=3.2 <4"
  },
  "require-dev": {
    "phpunit/phpunit": ">=6.0 <7",
    "symfony/var-dumper": ">=2.8 <3"
  },

I checked with Snyk and no known vulnerabilities were found with those version constraints.

Or maybe commit your composer.lock file?

@dungahk
Copy link
Author

dungahk commented May 2, 2020

Forgot to mention, but doing those changes in the version constraints works.

@dumityty
Copy link

dumityty commented May 3, 2020

Had the exact same issue today on a fresh install (running php 7.2 as well) and the version constraint update from above fixed it.

@andycarlberg
Copy link

Also had this issue today on macOS with PHP 7.4. Can also confirm that the version constraints above fixed the issue after removing vendor and composer.lock and re-installing.

PHP 7.4.0 (cli) (built: Nov 29 2019 16:18:30) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.0, Copyright (c), by Zend Technologies

@dungahk
Copy link
Author

dungahk commented Jun 26, 2020

raised #56 to add the constraints

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 a pull request may close this issue.

4 participants