Skip to content
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

Fixes autoloading, plugins and tests on Windows #61

Merged
merged 26 commits into from
Jun 5, 2020

Conversation

dimitrioskarvounaris
Copy link
Contributor

Based on #41 and all tests for test:unit pass under Windows and Linux.

It fixes issues, where otherwise some features wouldn't load or work at all under Windows.

@nunomaduro
Copy link
Member

Sounds a fantastic job. Do you know why tests are failing?

@dimitrioskarvounaris
Copy link
Contributor Author

Do you know why tests are failing?

You mean, if I know, why the tests were failing? Yes, I debugged the code and figured the reason for each one. Some things are posted in Discord.

Often - besides the linebreaks - it was that paths would not match, and as such, working on strings where part of path would be replaced or something added, would no longer happen or not happen correctly. Especially, when $rootPath was used. This would even lead to things as having the wrong output next to "PASS", traits not autoloading or plugins not even initializing with the "invalid path exception" when Plugin::uses() (as it sets ->in($rootPath)) was used.

dimitrioskarvounaris and others added 5 commits June 5, 2020 17:38
basename() will strip full path information on some systems.
What is needed is to use both dirname() & basename() on paths,
as recognized by all systems, and only afterwards do any
replacements.
src/PendingObjects/UsesCall.php Outdated Show resolved Hide resolved
tests/Visual/SingleTestOrDirectory.php Outdated Show resolved Hide resolved
@nunomaduro nunomaduro merged commit 7d7c5f1 into pestphp:master Jun 5, 2020
@nunomaduro
Copy link
Member

@dimitrioskarvounaris @Pierstoval Huge thanks! <3

@dimitrioskarvounaris dimitrioskarvounaris deleted the windows-gitbash branch June 5, 2020 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants