Replace PHP_EOL with "\n" in ReflectionMethod::isEmpty() #84

merged 1 commit into from Aug 31, 2012


None yet
3 participants

zeebinz commented May 18, 2012

Exploding on PHP_EOL doesn't work as expected on WIndows here, so the method name can't be parsed properly.

PHPSpec\Specification\Result\Error: list(,$path,) = explode(PHP_EOL, (string)$method);
PHP Notice: Undefined offset: 1

@zeebinz zeebinz Replace PHP_EOL with "\n" when exploding $method
This doesn't work on Windows otherwise.

zeebinz commented Jun 23, 2012

Just to be clear: this is a bug that completely prevents phpspec from running under Windows. If pull requests aren't welcome, then I won't make any more.


adrianmoya commented Aug 31, 2012

I can confirm the fix solves the problem, under Windows and Linux at least.


MarcelloDuarte commented Aug 31, 2012

Thanks, I am merging it as a hotfix and will include in the next build. Hey @zeebinz, please don't be discouraged, we are a very small community and contribute when we find time.

@MarcelloDuarte MarcelloDuarte added a commit that referenced this pull request Aug 31, 2012

@MarcelloDuarte MarcelloDuarte Merge pull request #84 from zeebinz/patch-1
Replace PHP_EOL with "\n" in ReflectionMethod::isEmpty()

@MarcelloDuarte MarcelloDuarte merged commit 7145beb into phpspec:develop Aug 31, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment