467,161 Members | 839 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,161 developers. It's quick & easy.

phpspecs is not working from command line, Windows

O have tried somple Laravel project.

phpspecs is not working.

It is installed on:
C:\Users\Gintare\AppData\Roaming\Composer\vendor\p hpspec
But there is no phpspec file in:
C:\Users\Gintare\AppData\Roaming\Composer\vendor\b in

It is also installed to my project:

there is phpspec file in:
C:\Bitnami\wampstack-5.5.30-0\apache2\htdocs\lar_prog\comp\vendor\phpspec\phps pec\bin

but it does not work from the command line:

c:\Bitnami\wampstack-5.5.30-0\apache2\htdocs\lar_prog\comp> \vendor\phpspec\phps
The system cannot find the path specified.

c:\Bitnami\wampstack-5.5.30-0\apache2\htdocs\lar_prog\comp> .\vendor\phpspec\php
'.\vendor\phpspec\phpspec\bin\phpspec' is not recognized as an internal or exter
nal command,
operable program or batch file.

I have also tried forward slashes and directory like "vendor/phpspec/phpspec/bin/phpspec. Nothing works.

PhpUnit is working, but it i can see its file in
C:\Users\Gintare\AppData\Roaming\Composer\vendor\b in

What can be done?
Oct 23 '15 #1
  • viewed: 1385
1 Reply
The solution was to reinstall phpspecs in Windows.

In the command line change working path to the folder "C:\Users\Gintare\AppData\Roaming\Composer". Your user will be not Gintare, but some other name.
Expand|Select|Wrap|Line Numbers
  1. c:\Bitnami\wampstack-5.5.30-0\apache2\htdocs\lar_prog\comp>cd C:\Users\Gintare\AppData\Roaming\Composer
Add a line describing the latest phpspec version to "C:\Users\Gintare\AppData\Roaming\Composer]composer.json"
Expand|Select|Wrap|Line Numbers
  1. {
  2.     "require": {
  3. ...
  4.         "phpspec/phpspec": "~2.1"
  5.     }
  6. }
Run composer update from the %APPDATA folder:
Expand|Select|Wrap|Line Numbers
  1. C:\Users\Gintare\AppData\Roaming\Composer>composer update
And, of course, add the folder "C:\Users\Gintare\AppData\Roaming\Composer\vendor\ bin" to your windows PATH environment variable.

Now phpspecs command will run from any folder, thus you can change back to the project and run it

Expand|Select|Wrap|Line Numbers
  1. C:\Users\Gintare\AppData\Roaming\Composer>cd c:\Bit*\wamp*\apac*\ht*\lar_prog\co
  2. mp
  4. c:\Bitnami\wampstack-5.5.30-0\apache2\htdocs\lar_prog\comp>phpspec
  5. phpspec version 2.3.0
  7. Usage:
  8.   command [options] [arguments]
  10. Options:
  11.   -h, --help            Display this help message
  12.   -q, --quiet           Do not output any message
  13.   -V, --version         Display this application version
  14.       --ansi            Force ANSI output
  15.       --no-ansi         Disable ANSI output
  16.   -n, --no-interaction  Do not ask any interactive question (disables code gener
  17. ation).
  18.   -c, --config=CONFIG   Specify a custom location for the configuration file
  19.   -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output,
  20.  2 for more verbose output and 3 for debug
  22. Available commands:
  23.   describe  Creates a specification for a class
  24.   help      Displays help for a command
  25.   list      Lists commands
  26.   run       Runs specifications
Oct 23 '15 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Christian Long | last post: by
4 posts views Thread by Frank Rizzo | last post: by
40 posts views Thread by raphfrk@netscape.net | last post: by
6 posts views Thread by 31337one@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.