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

How to build codeception.phar? #1197

Closed
pablopaul opened this issue Jul 11, 2014 · 11 comments
Closed

How to build codeception.phar? #1197

pablopaul opened this issue Jul 11, 2014 · 11 comments
Labels

Comments

@pablopaul
Copy link
Contributor

How can I build codeception.phar from current branch?
I saw in commit log that the interactive console will be fixed in 2.0.3 but want to test it before 2.0.3 now if possible.

Thanks

@DavertMik
Copy link
Member

You need robo task runner and run robo build:phar, latest update of installation page contains this instructions

@samdark samdark added the docs label Jul 11, 2014
@samdark
Copy link
Collaborator

samdark commented Jul 11, 2014

Could be documented somehow.

@DavertMik
Copy link
Member

It is see 2 latest lines on a page :)

As you asked it is documented somehow )
If there are proposals how to document it better... I could write a blogpost for instance

@samdark
Copy link
Collaborator

samdark commented Jul 11, 2014

That's a good enough hint, I think.

@samdark samdark closed this as completed Jul 11, 2014
@pablopaul
Copy link
Contributor Author

@DavertMik is there any reason to worry about the following output after running

robo build:phar
…
Warning: Unexpected character in input:  '' (ASCII=14) state=0 in phar:///usr/bin/robo/src/Task/PackPhar.php on line 167

Call Stack:
    0.0003     249064   1. {main}() /usr/bin/robo:0
    0.0239     599728   2. Robo\Runner->execute() /usr/bin/robo:21
    0.0669    3163280   3. Symfony\Component\Console\Application->run() phar:///usr/bin/robo/src/Runner.php:93
    0.0744    3366688   4. Symfony\Component\Console\Application->doRun() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Application.php:124
    0.0745    3367424   5. Symfony\Component\Console\Application->doRunCommand() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Application.php:193
    0.0747    3367936   6. Symfony\Component\Console\Command\Command->run() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Application.php:887
    0.0750    3371920   7. call_user_func() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:250
    0.0750    3371952   8. Robo\Runner->Robo\{closure}() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:250
    0.0751    3374056   9. call_user_func_array() phar:///usr/bin/robo/src/Runner.php:86
    0.0751    3374392  10. RoboFile->buildPhar() phar:///usr/bin/robo/src/Runner.php:86
    4.0248    6248760  11. Robo\Task\PackPharTask->addStripped() /Library/WebServer/Documents/codeception-github/RoboFile.php:163
    4.0253    6269160  12. Robo\Task\PackPharTask->stripWhitespace() phar:///usr/bin/robo/src/Task/PackPhar.php:135
    4.0253    6269256  13. token_get_all() phar:///usr/bin/robo/src/Task/PackPhar.php:167


Warning: Unexpected character in input:  '' (ASCII=28) state=0 in phar:///usr/bin/robo/src/Task/PackPhar.php on line 167

Call Stack:
    0.0003     249064   1. {main}() /usr/bin/robo:0
    0.0239     599728   2. Robo\Runner->execute() /usr/bin/robo:21
    0.0669    3163280   3. Symfony\Component\Console\Application->run() phar:///usr/bin/robo/src/Runner.php:93
    0.0744    3366688   4. Symfony\Component\Console\Application->doRun() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Application.php:124
    0.0745    3367424   5. Symfony\Component\Console\Application->doRunCommand() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Application.php:193
    0.0747    3367936   6. Symfony\Component\Console\Command\Command->run() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Application.php:887
    0.0750    3371920   7. call_user_func() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:250
    0.0750    3371952   8. Robo\Runner->Robo\{closure}() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:250
    0.0751    3374056   9. call_user_func_array() phar:///usr/bin/robo/src/Runner.php:86
    0.0751    3374392  10. RoboFile->buildPhar() phar:///usr/bin/robo/src/Runner.php:86
    4.0248    6248760  11. Robo\Task\PackPharTask->addStripped() /Library/WebServer/Documents/codeception-github/RoboFile.php:163
    4.0253    6269160  12. Robo\Task\PackPharTask->stripWhitespace() phar:///usr/bin/robo/src/Task/PackPhar.php:135
    4.0253    6269256  13. token_get_all() phar:///usr/bin/robo/src/Task/PackPhar.php:167


Warning: Unexpected character in input:  '' (ASCII=30) state=0 in phar:///usr/bin/robo/src/Task/PackPhar.php on line 167

Call Stack:
    0.0003     249064   1. {main}() /usr/bin/robo:0
    0.0239     599728   2. Robo\Runner->execute() /usr/bin/robo:21
    0.0669    3163280   3. Symfony\Component\Console\Application->run() phar:///usr/bin/robo/src/Runner.php:93
    0.0744    3366688   4. Symfony\Component\Console\Application->doRun() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Application.php:124
    0.0745    3367424   5. Symfony\Component\Console\Application->doRunCommand() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Application.php:193
    0.0747    3367936   6. Symfony\Component\Console\Command\Command->run() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Application.php:887
    0.0750    3371920   7. call_user_func() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:250
    0.0750    3371952   8. Robo\Runner->Robo\{closure}() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:250
    0.0751    3374056   9. call_user_func_array() phar:///usr/bin/robo/src/Runner.php:86
    0.0751    3374392  10. RoboFile->buildPhar() phar:///usr/bin/robo/src/Runner.php:86
    4.0248    6248760  11. Robo\Task\PackPharTask->addStripped() /Library/WebServer/Documents/codeception-github/RoboFile.php:163
    4.0253    6269160  12. Robo\Task\PackPharTask->stripWhitespace() phar:///usr/bin/robo/src/Task/PackPhar.php:135
    4.0253    6269256  13. token_get_all() phar:///usr/bin/robo/src/Task/PackPhar.php:167


Warning: Unexpected character in input:  '
                                          ' (ASCII=11) state=0 in phar:///usr/bin/robo/src/Task/PackPhar.php on line 167

Call Stack:
    0.0003     249064   1. {main}() /usr/bin/robo:0
    0.0239     599728   2. Robo\Runner->execute() /usr/bin/robo:21
    0.0669    3163280   3. Symfony\Component\Console\Application->run() phar:///usr/bin/robo/src/Runner.php:93
    0.0744    3366688   4. Symfony\Component\Console\Application->doRun() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Application.php:124
    0.0745    3367424   5. Symfony\Component\Console\Application->doRunCommand() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Application.php:193
    0.0747    3367936   6. Symfony\Component\Console\Command\Command->run() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Application.php:887
    0.0750    3371920   7. call_user_func() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:250
    0.0750    3371952   8. Robo\Runner->Robo\{closure}() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:250
    0.0751    3374056   9. call_user_func_array() phar:///usr/bin/robo/src/Runner.php:86
    0.0751    3374392  10. RoboFile->buildPhar() phar:///usr/bin/robo/src/Runner.php:86
    4.0248    6248760  11. Robo\Task\PackPharTask->addStripped() /Library/WebServer/Documents/codeception-github/RoboFile.php:163
    4.0253    6269160  12. Robo\Task\PackPharTask->stripWhitespace() phar:///usr/bin/robo/src/Task/PackPhar.php:135
    4.0253    6269256  13. token_get_all() phar:///usr/bin/robo/src/Task/PackPhar.php:167


Warning: Unexpected character in input:  '' (ASCII=4) state=0 in phar:///usr/bin/robo/src/Task/PackPhar.php on line 167

Call Stack:
    0.0003     249064   1. {main}() /usr/bin/robo:0
    0.0239     599728   2. Robo\Runner->execute() /usr/bin/robo:21
    0.0669    3163280   3. Symfony\Component\Console\Application->run() phar:///usr/bin/robo/src/Runner.php:93
    0.0744    3366688   4. Symfony\Component\Console\Application->doRun() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Application.php:124
    0.0745    3367424   5. Symfony\Component\Console\Application->doRunCommand() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Application.php:193
    0.0747    3367936   6. Symfony\Component\Console\Command\Command->run() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Application.php:887
    0.0750    3371920   7. call_user_func() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:250
    0.0750    3371952   8. Robo\Runner->Robo\{closure}() phar:///usr/bin/robo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:250
    0.0751    3374056   9. call_user_func_array() phar:///usr/bin/robo/src/Runner.php:86
    0.0751    3374392  10. RoboFile->buildPhar() phar:///usr/bin/robo/src/Runner.php:86
    4.0248    6248760  11. Robo\Task\PackPharTask->addStripped() /Library/WebServer/Documents/codeception-github/RoboFile.php:163
    4.0253    6269160  12. Robo\Task\PackPharTask->stripWhitespace() phar:///usr/bin/robo/src/Task/PackPhar.php:135
    4.0253    6269256  13. token_get_all() phar:///usr/bin/robo/src/Task/PackPhar.php:167
…
ERROR: Unexpected character in input:  '' (ASCII=31) state=0 
in phar:///usr/bin/robo/src/Task/PackPhar.php:167

? Codecept.phar got still created and first short try running the interactive console looks also promising.

@onshop
Copy link

onshop commented Jul 10, 2015

In 2.0.10, if I go into the vendor/codeception/codeception folder and run robo build:phar I get:

ERROR: require_once(): Failed opening required '/Users/user1/extranet.local/vendor/codeception/codeception/vendor/autoload.php' (include_path='.:') 
in /Users/user1/sites/extranet.local/vendor/codeception/codeception/RoboFile.php:2

It is calling

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

Which suggests that I should running it from the root folder above vendor but I cannot run it from the command from the root folder. I am either missing something in the install instructions or something else.

If I point it to a relative path it builds codecept.phar but then cannot compile it.

I have not logged this as a bug because the error suggest something I am doing wrong or I interpreted the install instructions incorrectly.

@Naktibalda
Copy link
Member

clone this repo and run robo.phar in the main directory of it.

@onshop
Copy link

onshop commented Jul 10, 2015

@Naktibalda . Thanks. Will try that.

@onshop
Copy link

onshop commented Jul 10, 2015

Robo will still be looking for DIR.'/vendor/autoload.php'; in RoboFile.php and this path does not exist relative to the main directory. Have I completely missed something fundamental here?

@Naktibalda
Copy link
Member

composer install

@onshop
Copy link

onshop commented Jul 10, 2015

Codeception was installed using 'composer install' into the /vendor directory but, as I wrote in the original post, RoboFile.php is trying to load relative path DIR.'/vendor/autoload.php'.

cd ./vendor/codeception/codeception
sudo /usr/bin/robo build:phar

 ERROR: require_once(): Failed opening required '/Users/user1/extranet.local/vendor/codeception/codeception/vendor/autoload.php' (include_path='.:') 
in /Users/user1/sites/extranet.local/vendor/codeception/codeception/RoboFile.php:2

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

No branches or pull requests

5 participants