Dariux
Dariux

Reputation: 4253

Could not open input file: bin/codecept

I am trying to install codeception on symfony 3 framework following steps from here:

http://codeception.com/for/symfony

When I run

php bin/codecept bootstrap --empty

I get error

Could not open input file: bin/codecept

I tried installing it on windows command line as administrator.

But from the output it looks that because of warning the file codecept in bin directory was not created:

E:\projektai\php projektai\htdocs\timetracker>composer require codeception/codec
eption --dev
Warning: This development build of composer is over 60 days old. It is recommend
ed to update it by running "C:\ProgramData\Composer\bin\composer.phar self-updat
e" to get the latest version.
Using version ^2.2 for codeception/codeception
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
> Incenteev\ParameterHandler\ScriptHandler::buildParameters
Updating the "app/config/parameters.yml" file
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache

 // Clearing the cache for the dev environment with debug
 // true

 [OK] Cache for the "dev" environment (debug=true) was successfully cleared.

> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets

 Trying to install assets as relative symbolic links.

 --------- ----------------- ------------------
            Bundle            Method / Error
 --------- ----------------- ------------------
  WARNING   FrameworkBundle   absolute symlink
 --------- ----------------- ------------------

 [OK] All assets were successfully installed.

> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFi
le
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarg
et

How can I use the codeception in this case?

Upvotes: 3

Views: 4044

Answers (2)

Tomas U.
Tomas U.

Reputation: 11

Copy codecept file from vendor(vendor/codeception/codeception/codecept) to bin directory and change require_once line to :

require_once __DIR__.'/../vendor/autoload.php';

Upvotes: 1

Dariux
Dariux

Reputation: 4253

After experimenting bit more found out that I can run that command this way:

php vendor/codeception/codeception/codecept bootstrap --empty

Still would be good that it would be added to bin folder as was in instructions.

Upvotes: 6

Related Questions