-
Notifications
You must be signed in to change notification settings - Fork 27
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
PSR-4 Namespacing and Additional Classes and Changes #11
Conversation
…ing with composer
Update for php5.3 && improvments to make the lib ready for composer usage
This pull request solves a bug I have been victim of, where PHPSkills fails with the following error message: ```PHP Fatal error: Class 'Moserware\\Skills\\Exception' not found in [redacted]/PHPSkills/Skills/SkillCalculator.php on line 73 ```
SkillCalculator calls Exception in wrong namespace
Modify bugs.
…nforming to PSR-4
…rectly, didn't do any of the crazy insane math stuff (99.9% of the effort here)
@moserware The code that throws InvalidOperationException, I'm hoping you can explain why it might be thrown? I'm not really a math guy so I'm incredibly grateful for the work you've done here. Just hoping you can explain that bit to me. Also, any ideas what might be causing the fails in the tests to happen? The expected results vs the actual results seem to be quite close and just a little off. Thoughts on what can be done to correct? |
Some of the changes I made on #12 were inspired by your PR. This PR is not applicable anymore - but thank you! |
Changes
Composer
PSR-4
src/
directory has been changed to Skills.tests/
directory and namespaced as Skills\Tests.require
statements have been removed and replaced withuse
statements.Tests Status
Failures
There were 3 failures:
Failed asserting that 1221.225511069717 matches expected 1196.25.
/Users/les.peabody/Projects/PHPSkills/tests/Elo/EloAssert.php:38
/Users/les.peabody/Projects/PHPSkills/tests/Elo/FideEloCalculatorTest.php:18
/Users/les.peabody/Projects/PHPSkills/vendor/phpunit/phpunit/phpunit:47
Failed asserting that 1207.5 matches expected 1192.5.
/Users/les.peabody/Projects/PHPSkills/tests/Elo/EloAssert.php:38
/Users/les.peabody/Projects/PHPSkills/tests/Elo/FideEloCalculatorTest.php:28
/Users/les.peabody/Projects/PHPSkills/vendor/phpunit/phpunit/phpunit:47
Failed asserting that 29.793996854587391 matches expected 32.012.
/Users/les.peabody/Projects/PHPSkills/tests/TrueSkill/TrueSkillCalculatorTests.php:991
/Users/les.peabody/Projects/PHPSkills/tests/TrueSkill/TrueSkillCalculatorTests.php:435
/Users/les.peabody/Projects/PHPSkills/tests/TrueSkill/TrueSkillCalculatorTests.php:41
/Users/les.peabody/Projects/PHPSkills/tests/TrueSkill/TwoTeamTrueSkillCalculatorTest.php:16
/Users/les.peabody/Projects/PHPSkills/vendor/phpunit/phpunit/phpunit:47
Errors
There was 1 error:
Skills\InvalidOperationException:
/Users/les.peabody/Projects/PHPSkills/src/TrueSkill/Layers/IteratedTeamDifferencesInnerLayer.php:51
/Users/les.peabody/Projects/PHPSkills/src/TrueSkill/TrueSkillFactorGraph.php:102
/Users/les.peabody/Projects/PHPSkills/src/TrueSkill/TrueSkillFactorGraph.php:72
/Users/les.peabody/Projects/PHPSkills/src/TrueSkill/FactorGraphTrueSkillCalculator.php:40
/Users/les.peabody/Projects/PHPSkills/tests/TrueSkill/TrueSkillCalculatorTests.php:87
/Users/les.peabody/Projects/PHPSkills/tests/TrueSkill/TrueSkillCalculatorTests.php:20
/Users/les.peabody/Projects/PHPSkills/tests/TrueSkill/FactorGraphTeamTrueSkillCalculatorTest.php:13
/Users/les.peabody/Projects/PHPSkills/vendor/phpunit/phpunit/phpunit:47