joomla-framework / string

Joomla Framework String Package
GNU General Public License v2.0
14 stars 16 forks source link

Prevent "overhead" of data #4

Closed jfusion closed 3 years ago

jfusion commented 9 years ago

Hello, not sure if there should be a better place to talk about this.

anyhow it goes for all the repos.. (i think, tho i have not looked at all of them..)

http://stackoverflow.com/questions/17049313/how-to-ignore-directories-with-composer

Given that there are no ways to do this in composer, could this workaround be added? normally development would not be using composer anyway and the so if the testing code could be excluded that would be nice.

----- quote from above link -----

When you run the update or install command with --prefer-dist, Composer tries to download the archive on github. You can remove the test directory from the archives by putting this in a .gitattributes file in the root directory of your project:

Tests/ export-ignore

Composer will only use the tags on github. Just temporary remove the tests directory when creating a tag will also do the trick.

if i should raice this in another way/location let me know.

-Thanks

mbabker commented 9 years ago

We already have .gitattributes files for most of the repos, they just need updates if we want to exclude this stuff.

jfusion commented 9 years ago

But is this something that would be acceptable? if so i would be more than happey to make pull requests

mbabker commented 9 years ago

Can't think of a reason why it wouldn't be.

jfusion commented 9 years ago

ok i'll put it on my todo list =) for next week =)

jfusion commented 9 years ago

I assume if the .gitattributes is not there i can add it correct?

mbabker commented 9 years ago

Correct. And thanks :-)

jfusion commented 9 years ago

as a side note we might want this as well .. https://getcomposer.org/doc/04-schema.md#autoload-dev

moving the autoloader for "tests" in to in autoload-dev?

mbabker commented 9 years ago

Ya, that'd be a good idea too. I didn't even know about the autoload-dev param honestly.

jfusion commented 9 years ago

me neather i am new to composer. we/i have starter making jfusion so it can be used standalone. still work in progress.

https://packagist.org/packages/jfusion/

fanno commented 9 years ago

should i be adding files like phpunit.xml.dist also?

I assume we need README.md and LICENSE

fanno commented 9 years ago

also i need a but of guidance on what to exclude from cache and session

session also has _Tests and build

cache has build..

-Thanks

mbabker commented 9 years ago

Basically, if it isn't production code, the license, or the README, it's safe to assume that it can be excluded.

fanno commented 9 years ago

I ask here because i do not know cache and session I don't know if they are build/_Tests is production code.

mbabker commented 9 years ago

Production code is all under /src aside from a couple of packages with open pull requests to restructure from PSR-0 to PSR-4.

fanno commented 9 years ago

Hello Once again sorry for bombarding you !!!

I am kind of new to phpunit

I ran it on application after all the changes i did i know i did not really "change" anything, but still ...

is this a valid result: Time: 6 seconds, Memory: 10.50Mb

OK, but incomplete or skipped tests! Tests: 205, Assertions: 319, Incomplete: 3, Skipped: 13.

Process finished with exit code 0

-Thanks

mbabker commented 9 years ago

Yes, that's valid. We have tests flagged in there as skipped or incomplete. It would be an issue if there were test errors or failures.

fanno commented 9 years ago

ok, I will start testing and commit and creating pull request's =)

fanno commented 9 years ago

ok done testing, i have a few results i need help with. (sorry !)

Data returns: (Done 22 / 45) test__construct_scalar Process finished with exit code 255

Database returns (Done 236 / 623) testSetDboWithBadInput Process finished with exit code 255

-Thanks!!!!

mbabker commented 9 years ago

Can you check your PHP error logs for any messages and ensure your reporting is set to not hide anything? Seems like there's an error that's being masked.

fanno commented 9 years ago

no errors logged. =( not sure what is wrong.

also i forgot about this falior: PHPUnit_Framework_ExpectationFailedException : Failed asserting that exception of type "\RuntimeException" is thrown.

0 phar://C:/Users/fanno/data/Projects/workspaces/phpunit/phpunit-lts.phar/phpunit/Framework/Constraint.php(91): PHPUnit_Framework_Constraint->fail(NULL, '')

1 phar://C:/Users/fanno/data/Projects/workspaces/phpunit/phpunit-lts.phar/phpunit/Framework/Assert.php(2134): PHPUnit_Framework_Constraint->evaluate(NULL, '')

2 phar://C:/Users/fanno/data/Projects/workspaces/phpunit/phpunit-lts.phar/phpunit/Framework/TestCase.php(1048): PHPUnit_Framework_Assert::assertThat(NULL, Object(PHPUnit_Framework_Constraint_Exception))

3 phar://C:/Users/fanno/data/Projects/workspaces/phpunit/phpunit-lts.phar/phpunit/Framework/TestCase.php(838): PHPUnit_Framework_TestCase->runTest()

4 phar://C:/Users/fanno/data/Projects/workspaces/phpunit/phpunit-lts.phar/phpunit/Framework/TestResult.php(648): PHPUnit_Framework_TestCase->runBare()

5 phar://C:/Users/fanno/data/Projects/workspaces/phpunit/phpunit-lts.phar/phpunit/Framework/TestCase.php(783): PHPUnit_Framework_TestResult->run(Object(Joomla\Cache\Tests\FileTest))

6 phar://C:/Users/fanno/data/Projects/workspaces/phpunit/phpunit-lts.phar/phpunit/Framework/TestSuite.php(779): PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_TestResult))

7 phar://C:/Users/fanno/data/Projects/workspaces/phpunit/phpunit-lts.phar/phpunit/Framework/TestSuite.php(749): PHPUnit_Framework_TestSuite->runTest(Object(Joomla\Cache\Tests\FileTest), Object(PHPUnit_Framework_TestResult))

8 phar://C:/Users/fanno/data/Projects/workspaces/phpunit/phpunit-lts.phar/phpunit/Framework/TestSuite.php(709): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)

9 phar://C:/Users/fanno/data/Projects/workspaces/phpunit/phpunit-lts.phar/phpunit/TextUI/TestRunner.php(350): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)

10 phar://C:/Users/fanno/data/Projects/workspaces/phpunit/phpunit-lts.phar/phpunit/TextUI/Command.php(176): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)

11 C:\Users\fanno\AppData\Local\Temp\ide-phpunit.php(268): PHPUnit_TextUI_Command->run(Array, true)

12 C:\Users\fanno\AppData\Local\Temp\ide-phpunit.php(506): IDE_Base_PHPUnit_TextUI_Command::main()

13 {main}

nibra commented 3 years ago

See pull request http#31