orchestral / testbench

Laravel Testing Helper for Packages Development
https://packages.tools/testbench
MIT License
2.09k stars 136 forks source link

Does not load dependencies correctly #7

Closed inkrement closed 11 years ago

inkrement commented 11 years ago

I want to use Unittests within a new package and therefore I added

"require-dev": {
        "orchestra/testbench": "2.0.*@dev"
}

to my composer.json. After an composer update and a phpunit I get the following error.

PHP Fatal error:  Class 'Illuminate\Foundation\Testing\TestCase' not found in /home/chris/code/l4-survey/vendor/orchestra/testbench/src/Orchestra/Testbench/TestCase.php on line 10

It seems like the dependencies are not loaded correctly - maybe there is a missing requirement.

inkrement commented 11 years ago

Just re-installed everything. Now it seems to work like expected. great work!

crynobone commented 11 years ago

I keep seeing people having problem installing testbench with it's dependencies. Can you share your dev platform and whether you're using it with workbench or standalone

On Friday, July 26, 2013, Christian Hotz-Behofsits wrote:

Just re-installed everything. Now it seems to work like expected. great work!

— Reply to this email directly or view it on GitHubhttps://github.com/orchestral/testbench/issues/7#issuecomment-21615934 .

inkrement commented 11 years ago

I think the problem was the following: First I got an error message, that there is no ./src/controllers folder and therefore the installation/update process stops immediately. Later I got a different error. Something like:

 - Removing orchestra/testbench (v2.0.0-BETA3)
 - Installing orchestra/testbench (dev-master 9345262)
   Cloning 93452626ff3f2d11e080bf25d2091696264d4888

  [InvalidArgumentException]                                            
  Package is not installed: illuminate/support-4.0.9999999.9999999-dev  

I use Ubuntu 13.04, Composer version 6a1262e675b5c1c2c7b1cc58a14028f67885b880

and

~/c/l4-messenger git:master ❯❯❯ php -v
PHP 5.4.9-4ubuntu2.2 (cli) (built: Jul 15 2013 18:23:35) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans
crynobone commented 11 years ago

Thank for the info, i'll try to solve this "mystery"

On Friday, July 26, 2013, Christian Hotz-Behofsits wrote:

I think the problem was the following: First I got an error message, that there is no ./src/controllers folder and therefore the installation/update process stops immediately. Later I got a different error. Something like:

  • Removing orchestra/testbench (v2.0.0-BETA3)
  • Installing orchestra/testbench (dev-master 9345262) Cloning 93452626ff3f2d11e080bf25d2091696264d4888

    [InvalidArgumentException] Package is not installed: illuminate/support-4.0.9999999.9999999-dev

I use Ubuntu 13.04, Composer version 6a1262ehttps://github.com/orchestral/testbench/commit/6a1262e675b5c1c2c7b1cc58a14028f67885b880

and

~/c/l4-messenger git:master ❯❯❯ php -v PHP 5.4.9-4ubuntu2.2 (cli) (built: Jul 15 2013 18:23:35) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans

— Reply to this email directly or view it on GitHubhttps://github.com/orchestral/testbench/issues/7#issuecomment-21616895 .

ahmadshah commented 11 years ago

Emm... I'm getting the same error

Fatal error: Class 'Illuminate\Foundation\Testing\TestCase' not found in /Users/jesan/Debian/Lembubintik/laravel/workbench/elphie/panel/vendor/orchestra/testbench/src/Orchestra/Testbench/TestCase.php on line 10

I'm using the testbench with workbench and this is the bench composer.json

"require-dev": {
        "orchestra/testbench": "2.0.*",
        "mockery/mockery": "dev-master"
    },
crynobone commented 11 years ago

@sudoers can you share your "require" dependencies.

ahmadshah commented 11 years ago

This is the require part. Nothing was changed for this part

 "require": {
        "php": ">=5.3.0",
        "illuminate/support": "4.0.x"
    },
crynobone commented 11 years ago

Found that "illuminate/support": "4.0.x" conflict with laravel/framework requirement. If this is a laravel only package, you can freely remove that dependency from require.

ahmadshah commented 11 years ago

Cool.. working now thanks :)