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

Sculpin Vendor bin script errors #358

Open
RedactedProfile opened this issue Jan 22, 2018 · 6 comments
Open

Sculpin Vendor bin script errors #358

RedactedProfile opened this issue Jan 22, 2018 · 6 comments

Comments

@RedactedProfile
Copy link

RedactedProfile commented Jan 22, 2018

Hi there,

Following the getting started guide, when I try to execute any of the script, it either errors out or just outputs the content of the file.

Environment:
OS: Windows 10
PHP: PHP 7.1
Shell: Windows Command Prompt and Powershell 6.0

For example,


Command: .\vendor\bin\sculpin.bat generate
Output:

PHP Fatal error:  Uncaught Error: Call to a member function getPrettyVersion() on null in C:\Users\kharrison\IdeaProjects\bestofblog\vendor\sculpin\sculpin\src\Sculpin\Bundle\SculpinBundle\Console\Application.php:57
Stack trace:
#0 C:\Users\kharrison\IdeaProjects\bestofblog\vendor\sculpin\sculpin\bin\sculpin.php(74): Sculpin\Bundle\SculpinBundle\Console\Application->__construct(Object(Sculpin\Bundle\SculpinBundle\HttpKernel\DefaultKernel), Object(Dflydev\EmbeddedComposer\Cor
e\EmbeddedComposer))
#1 C:\Users\kharrison\IdeaProjects\bestofblog\vendor\sculpin\sculpin\bin\sculpin(21): include('C:\\Users\\kharri...')
#2 {main}
  thrown in C:\Users\kharrison\IdeaProjects\bestofblog\vendor\sculpin\sculpin\src\Sculpin\Bundle\SculpinBundle\Console\Application.php on line 57

Fatal error: Uncaught Error: Call to a member function getPrettyVersion() on null in C:\Users\kharrison\IdeaProjects\bestofblog\vendor\sculpin\sculpin\src\Sculpin\Bundle\SculpinBundle\Console\Application.php:57
Stack trace:
#0 C:\Users\kharrison\IdeaProjects\bestofblog\vendor\sculpin\sculpin\bin\sculpin.php(74): Sculpin\Bundle\SculpinBundle\Console\Application->__construct(Object(Sculpin\Bundle\SculpinBundle\HttpKernel\DefaultKernel), Object(Dflydev\EmbeddedComposer\Cor
e\EmbeddedComposer))
#1 C:\Users\kharrison\IdeaProjects\bestofblog\vendor\sculpin\sculpin\bin\sculpin(21): include('C:\\Users\\kharri...')
#2 {main}
  thrown in C:\Users\kharrison\IdeaProjects\bestofblog\vendor\sculpin\sculpin\src\Sculpin\Bundle\SculpinBundle\Console\Application.php on line 57


Command: php .\vendor\bin\sculpin.php generate
Output:

dir=$(cd "${0%[/\\]*}" > /dev/null; cd "../sculpin/sculpin/bin" && pwd)

if [ -d /proc/cygdrive ] && [[ $(which php) == $(readlink -n /proc/cygdrive)/* ]]; then
   # We are in Cgywin using Windows php, so the path must be translated
   dir=$(cygpath -m "$dir");
fi

"${dir}/sculpin.php" "$@"


Command: .\vendor\bin\sculpin.php.bat generate
Output:

PHP Fatal error:  Uncaught Error: Class 'Symfony\Component\Console\Input\ArgvInput' not found in C:\Users\kharrison\IdeaProjects\bestofgeneralcontacts\vendor\sculpin\sculpin\bin\sculpin.php:47
Stack trace:
#0 {main}
  thrown in C:\Users\kharrison\IdeaProjects\bestofgeneralcontacts\vendor\sculpin\sculpin\bin\sculpin.php on line 47

Fatal error: Uncaught Error: Class 'Symfony\Component\Console\Input\ArgvInput' not found in C:\Users\kharrison\IdeaProjects\bestofgeneralcontacts\vendor\sculpin\sculpin\bin\sculpin.php:47
Stack trace:
#0 {main}
  thrown in C:\Users\kharrison\IdeaProjects\bestofgeneralcontacts\vendor\sculpin\sculpin\bin\sculpin.php on line 47
@Tejes
Copy link
Contributor

Tejes commented Feb 16, 2018

Use the develop branch (which was meant to be 3.0 some time I guess), they dropped embedded Composer there. It works for me on Win10 with Git-Bash and PHP 7.1.

@beryllium
Copy link
Member

Work is now happening on 3.0.x in sculpin's dev-master. Maybe this issue can be closed? I don't currently have a Windows instance to test on.

@Tejes
Copy link
Contributor

Tejes commented Apr 6, 2018

Following the getting started guide and installing the blog skeleton throws no error now, only a lot of deprecations as described in sculpin/sculpin-blog-skeleton#49. This way the user gets 2.1.1 as of now.

Requiring Sculpin itself in a brand new project still not works straightforward however. Composer sets the version requirement to ^2.1 with stability defaulting to stable. When I try to first run composer install it cannot resolve:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - sculpin/sculpin v2.1.1 requires dflydev/embedded-composer ^1.0@dev -> satisfiable by dflydev/embedded-composer[1.0.x-dev] but these conflict with your requirements or minimum-stability.
    - sculpin/sculpin v2.1.0 requires dflydev/embedded-composer ^1.0@dev -> satisfiable by dflydev/embedded-composer[1.0.x-dev] but these conflict with your requirements or minimum-stability.
    - Installation request for sculpin/sculpin ^2.1 -> satisfiable by sculpin/sculpin[v2.1.0, v2.1.1].

If one manually requires dflydev/embedded-composer ^1.0@dev xor sculpin/sculpin ^3.0@dev, sculpin versions 2.1.1 and dev-develop adee090 get installed respectively without any error.

OP's problem seems to be solved, but a new stable release is required with the recent fixes to make everyone happy I think. Keep up the good work! :)

@beryllium
Copy link
Member

Hmm, dev-develop adee090 being installed for ^3.0@dev is not what I intended. I had hoped it would grab dev-master. I might need to fix the branch aliases in composer.json to remove dev-develop's setting of 3.1.x-dev.

@stof
Copy link

stof commented Apr 24, 2018

This issue has been fixed in dflydev/dflydev-embedded-composer#22 for people using Sculpin 2.x

@dbu
Copy link
Contributor

dbu commented Mar 29, 2019

@beryllium i think this can be closed now

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

No branches or pull requests

5 participants