danielstjules / Stringy

A PHP string manipulation library with multibyte support
MIT License
2.46k stars 216 forks source link

CreateTest test case fails PHP 5.4 Linter #127

Closed jamiechong closed 8 years ago

jamiechong commented 8 years ago

I'm using a project that uses your project :) I'm attempting to submit my project to a repository that has a commit hook that checks all php code against a PHP 5.4 Linter (wordpress.org). Although Stringy supports PHP 5.6 shortcuts, it doesn't seem to require it as the lint test is only failing for one of your test cases that is using use function. Any possibility that the test case can be rewritten to use the Stringy\Stringy::create instead?

danielstjules commented 8 years ago

Sorry, that test exists specifically to test that file and function since it's part of the public API, and is only ran with PHP 5.6: https://github.com/danielstjules/Stringy/blob/master/phpunit.xml.dist#L11 We already have another test for Stringy\Stringy::create.

Is the linter just being annoying, or is it preventing you from submitting an app or project?

It might be solved if I just tag a new release, thanks to https://github.com/danielstjules/Stringy/commit/a3dde38a2f8ccfb9b62ddef84d9b9bd504469bc8 which will exclude tests.

jamiechong commented 8 years ago

I appreciate your reply. Yeah the linter was preventing me from submitting, but I've added the vendor/**/tests to the .gitignore in my project (which also reduces a lot of bloat).

danielstjules commented 8 years ago

Sweet, glad things worked out!