andres-montanez / Magallanes

The PHP Deployment Tool
https://magephp.com
MIT License
691 stars 169 forks source link

Use fallback for posix_getpwuid on Windows #427

Closed fritzmg closed 2 years ago

fritzmg commented 6 years ago

With one other adjustment (see https://github.com/andres-montanez/Magallanes/issues/306#issuecomment-419921293) Magallanes seems to work without an issue under Windows, at least under the Windows Git Bash.

The only change I had to make in the source of Magallanes is to provide this fallback for posix_getpwuid, which is of course not present on the Windows platform.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.1%) to 99.887% when pulling df248dd1b00f759e017793c0b576e97f5e024afe on fritzmg:patch-1 into e30de6b719c923d70917a9f9364efdb29b7e9362 on andres-montanez:master.

t-fritsch commented 5 years ago

any chance this PR would be merged ?

fritzmg commented 5 years ago

@tfritsch-km the project does not seem to be maintained anymore. Also I should still change the tests, so that this change is covered.

fritzmg commented 5 years ago

@tfritsch-km my fork now contains a branch that includes all windows fixes so far: https://github.com/fritzmg/Magallanes/tree/windows-fixes

You could add that as a repository in your global composer.json and then require "andres-montanez/magallanes": "dev-windows-fixes".

{
    "require": {
        "andres-montanez/magallanes": "dev-windows-fixes"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/fritzmg/Magallanes"
        }
    ]
}
iannacone commented 3 years ago

the alternatives are:

btw i honestly do not understand why the coverage decrease of the 0.1%. imo under windows it throws an exception which means as now it is not cover 100% all the cases. could you please be so gentle and explicit share what cases do not meet the requirements?

andres-montanez commented 3 years ago

Hi @iannacone , the coverage decreases because there is no test entering inside the if added for the feature. Magallanes has never been too kind with windows, however, I will take a look at this in the next weeks to improve compatibility.

Take care!

andres-montanez commented 2 years ago

Thanks @fritzmg , this improvement will be available on v5!