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

Fix composer scripts for windows #194

Merged
merged 4 commits into from Feb 6, 2019
Merged

Fix composer scripts for windows #194

merged 4 commits into from Feb 6, 2019

Conversation

villfa
Copy link
Collaborator

@villfa villfa commented Jan 27, 2019

On Windows the command composer test produces the following error:

'vendor' is not recognized as an internal or external command

Removing vendor/bin/ from the commands fixes this problem.

I also noticed some namespaces were wrong in the unit tests files so I fixed them.

@codecov
Copy link

codecov bot commented Jan 27, 2019

Codecov Report

Merging #194 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #194   +/-   ##
=========================================
  Coverage     76.08%   76.08%           
  Complexity      109      109           
=========================================
  Files            17       17           
  Lines           322      322           
=========================================
  Hits            245      245           
  Misses           77       77

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c2c920...d9c271b. Read the comment docs.

Copy link
Contributor

@localheinz localheinz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

composer.json Outdated
"phpmd src text phpmd.xml",
"phploc src",
"phpcpd src",
"phpunit --debug --coverage-clover=coverage.xml",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://getcomposer.org/doc/articles/scripts.md#writing-custom-commands:

Note: Before executing scripts, Composer's bin-dir is temporarily pushed on top of the PATH environment variable so that binaries of dependencies are easily accessible. In this example no matter if the phpunit binary is actually in vendor/bin/phpunit or bin/phpunit it will be found and executed.

@villfa
Copy link
Collaborator Author

villfa commented Feb 3, 2019

@bmitch I've open this PR as a first step to fix #71 .
FYI, some tests related to the FileManager class don't pass. I tried to take a look but I couldn't come up with an easy fix so I let this PR as is.
If it's ok for you I'll try to fix the broken tests in another PR when I'll have time.

@bmitch bmitch merged commit 32832a3 into bmitch:master Feb 6, 2019
@bmitch
Copy link
Owner

bmitch commented Feb 6, 2019

Thanks @villfa - all the tests passed as far as I can see. I don't see any failing for FileManager but if I am missing something please feel free to open an issue and/or pull request!

@villfa
Copy link
Collaborator Author

villfa commented Feb 6, 2019

@bmitch I should have specified that the tests fail only on windows.
I'll keep you posted if I make them pass.

@bmitch
Copy link
Owner

bmitch commented Feb 6, 2019

Ah makes sense! Perfect thank you @villfa !

@villfa villfa deleted the fix-71-windows-compat branch September 28, 2020 18:23
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.

None yet

3 participants