Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Files API
    • Labels:
      None
    • Rank:
      41011

      Description

      Dan says in MDL-33032 that stored_file::$repository should not be public.

        Activity

        Hide
        Martin Dougiamas added a comment -

        Dongsheng, can you please look into this and talk to Dan about his concern if necessary?

        Show
        Martin Dougiamas added a comment - Dongsheng, can you please look into this and talk to Dan about his concern if necessary?
        Hide
        Dan Poltawski added a comment -

        Dongsheng - thats great - but is it safe for us to change this?

        Show
        Dan Poltawski added a comment - Dongsheng - thats great - but is it safe for us to change this?
        Hide
        Dongsheng Cai added a comment -

        I only found we use repository variable in phpunit, so it should be safe.

        Show
        Dongsheng Cai added a comment - I only found we use repository variable in phpunit, so it should be safe.
        Hide
        Dan Poltawski added a comment -

        Doesn't look like it:

        PHP Fatal error: Cannot access private property stored_file::$repository in /Users/danp/git/integration/lib/filestorage/tests/file_storage_test.php on line 186
        PHP Stack trace:
        PHP 1.

        {main}() /usr/local/Cellar/php/5.3.10/bin/phpunit:0
        PHP 2. PHPUnit_TextUI_Command::main() /usr/local/Cellar/php/5.3.10/bin/phpunit:46
        PHP 3. PHPUnit_TextUI_Command->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/TextUI/Command.php:130
        PHP 4. PHPUnit_TextUI_TestRunner->doRun() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/TextUI/Command.php:192
        PHP 5. PHPUnit_Framework_TestSuite->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/TextUI/TestRunner.php:325
        PHP 6. PHPUnit_Framework_TestSuite->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestSuite.php:705
        PHP 7. PHPUnit_Framework_TestSuite->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestSuite.php:705
        PHP 8. PHPUnit_Framework_TestSuite->runTest() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestSuite.php:745
        PHP 9. PHPUnit_Framework_TestCase->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestSuite.php:772
        PHP 10. PHPUnit_Framework_TestResult->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestCase.php:751
        PHP 11. advanced_testcase->runBare() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestResult.php:649
        PHP 12. PHPUnit_Framework_TestCase->runBare() /Users/danp/git/integration/lib/phpunit/classes/advanced_testcase.php:76
        PHP 13. PHPUnit_Framework_TestCase->runTest() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestCase.php:804
        PHP 14. ReflectionMethod->invokeArgs() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestCase.php:942
        PHP 15. filestoragelib_testcase->test_create_file_from_reference() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestCase.php:942

        Fatal error: Cannot access private property stored_file::$repository in /Users/danp/git/integration/lib/filestorage/tests/file_storage_test.php on line 186

        Call Stack:
        0.0009 627104 1. {main}

        () /usr/local/Cellar/php/5.3.10/bin/phpunit:0
        0.0055 1179712 2. PHPUnit_TextUI_Command::main() /usr/local/Cellar/php/5.3.10/bin/phpunit:46
        0.0055 1180440 3. PHPUnit_TextUI_Command->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/TextUI/Command.php:130
        4.0503 188872256 4. PHPUnit_TextUI_TestRunner->doRun() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/TextUI/Command.php:192
        4.0550 189127296 5. PHPUnit_Framework_TestSuite->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/TextUI/TestRunner.php:325
        74.8047 224733952 6. PHPUnit_Framework_TestSuite->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestSuite.php:705
        74.8048 224734304 7. PHPUnit_Framework_TestSuite->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestSuite.php:705
        75.7366 224068704 8. PHPUnit_Framework_TestSuite->runTest() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestSuite.php:745
        75.7366 224068704 9. PHPUnit_Framework_TestCase->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestSuite.php:772
        75.7367 224068704 10. PHPUnit_Framework_TestResult->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestCase.php:751
        75.7367 224069696 11. advanced_testcase->runBare() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestResult.php:649
        75.7370 224090896 12. PHPUnit_Framework_TestCase->runBare() /Users/danp/git/integration/lib/phpunit/classes/advanced_testcase.php:76
        75.7371 224132016 13. PHPUnit_Framework_TestCase->runTest() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestCase.php:804
        75.7371 224133504 14. ReflectionMethod->invokeArgs() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestCase.php:942
        75.7371 224133536 15. filestoragelib_testcase->test_create_file_from_reference() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestCase.php:942

        Show
        Dan Poltawski added a comment - Doesn't look like it: PHP Fatal error: Cannot access private property stored_ file::$repository in /Users/danp/git/integration/lib/filestorage/tests/file_storage_test.php on line 186 PHP Stack trace: PHP 1. {main}() /usr/local/Cellar/php/5.3.10/bin/phpunit:0 PHP 2. PHPUnit_TextUI_Command::main() /usr/local/Cellar/php/5.3.10/bin/phpunit:46 PHP 3. PHPUnit_TextUI_Command->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/TextUI/Command.php:130 PHP 4. PHPUnit_TextUI_TestRunner->doRun() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/TextUI/Command.php:192 PHP 5. PHPUnit_Framework_TestSuite->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/TextUI/TestRunner.php:325 PHP 6. PHPUnit_Framework_TestSuite->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestSuite.php:705 PHP 7. PHPUnit_Framework_TestSuite->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestSuite.php:705 PHP 8. PHPUnit_Framework_TestSuite->runTest() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestSuite.php:745 PHP 9. PHPUnit_Framework_TestCase->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestSuite.php:772 PHP 10. PHPUnit_Framework_TestResult->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestCase.php:751 PHP 11. advanced_testcase->runBare() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestResult.php:649 PHP 12. PHPUnit_Framework_TestCase->runBare() /Users/danp/git/integration/lib/phpunit/classes/advanced_testcase.php:76 PHP 13. PHPUnit_Framework_TestCase->runTest() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestCase.php:804 PHP 14. ReflectionMethod->invokeArgs() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestCase.php:942 PHP 15. filestoragelib_testcase->test_create_file_from_reference() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestCase.php:942 Fatal error: Cannot access private property stored_ file::$repository in /Users/danp/git/integration/lib/filestorage/tests/file_storage_test.php on line 186 Call Stack: 0.0009 627104 1. {main} () /usr/local/Cellar/php/5.3.10/bin/phpunit:0 0.0055 1179712 2. PHPUnit_TextUI_Command::main() /usr/local/Cellar/php/5.3.10/bin/phpunit:46 0.0055 1180440 3. PHPUnit_TextUI_Command->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/TextUI/Command.php:130 4.0503 188872256 4. PHPUnit_TextUI_TestRunner->doRun() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/TextUI/Command.php:192 4.0550 189127296 5. PHPUnit_Framework_TestSuite->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/TextUI/TestRunner.php:325 74.8047 224733952 6. PHPUnit_Framework_TestSuite->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestSuite.php:705 74.8048 224734304 7. PHPUnit_Framework_TestSuite->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestSuite.php:705 75.7366 224068704 8. PHPUnit_Framework_TestSuite->runTest() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestSuite.php:745 75.7366 224068704 9. PHPUnit_Framework_TestCase->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestSuite.php:772 75.7367 224068704 10. PHPUnit_Framework_TestResult->run() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestCase.php:751 75.7367 224069696 11. advanced_testcase->runBare() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestResult.php:649 75.7370 224090896 12. PHPUnit_Framework_TestCase->runBare() /Users/danp/git/integration/lib/phpunit/classes/advanced_testcase.php:76 75.7371 224132016 13. PHPUnit_Framework_TestCase->runTest() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestCase.php:804 75.7371 224133504 14. ReflectionMethod->invokeArgs() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestCase.php:942 75.7371 224133536 15. filestoragelib_testcase->test_create_file_from_reference() /usr/local/Cellar/php/5.3.10/lib/php/PHPUnit/Framework/TestCase.php:942
        Hide
        Dongsheng Cai added a comment -

        Fixed unit test, please review.

        Show
        Dongsheng Cai added a comment - Fixed unit test, please review.
        Hide
        Dan Poltawski added a comment -

        OK, well i've integrated that now based on the principle that its best to be done early and we'll find the regressions through QA testing.

        I hope we will.

        Show
        Dan Poltawski added a comment - OK, well i've integrated that now based on the principle that its best to be done early and we'll find the regressions through QA testing. I hope we will.
        Hide
        Dan Poltawski added a comment -

        I did testing and couldn't find any obvious breakage

        Show
        Dan Poltawski added a comment - I did testing and couldn't find any obvious breakage
        Hide
        Eloy Lafuente (stronk7) added a comment -

        This issue has been integrated upstream and is now available both via git and cvs (and in some hours, via mirrors and downloads).

        Thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - This issue has been integrated upstream and is now available both via git and cvs (and in some hours, via mirrors and downloads). Thanks!

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: