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

Issue with path slashes on Windows #1133

Closed
lcharette opened this issue Dec 29, 2020 · 2 comments
Closed

Issue with path slashes on Windows #1133

lcharette opened this issue Dec 29, 2020 · 2 comments
Assignees
Labels
confirmed bug Something isn't working Windows
Milestone

Comments

@lcharette
Copy link
Member

lcharette commented Dec 29, 2020

See test result : https://github.com/userfrosting/UserFrosting/runs/1622445785?check_suite_focus=true#step:7:1098

There was 1 failure:

1) UserFrosting\Sprinkle\Core\Tests\Integration\Filesystem\FilesystemTest::testAddingAdapter
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'D:/a/UserFrosting/UserFrosting/app/storage/testingDriver/'
+'D:/a/UserFrosting/UserFrosting/app/storage/testingDriver\'

D:\a\UserFrosting\UserFrosting\app\sprinkles\core\tests\Integration\Filesystem\FilesystemTest.php:150

This should be linked to the above :

23) UserFrosting\Sprinkle\Core\Tests\Integration\I18n\SiteLocaleTest::testgetAvailableOptions
UserFrosting\Support\Exception\FileNotFoundException: The repository file 'locale://fr_FR/locale.yaml' could not be found.

D:\a\UserFrosting\UserFrosting\app\vendor\userfrosting\support\src\Repository\Loader\FileRepositoryLoader.php:81
D:\a\UserFrosting\UserFrosting\app\vendor\userfrosting\support\src\Repository\Loader\FileRepositoryLoader.php:58
D:\a\UserFrosting\UserFrosting\app\vendor\userfrosting\i18n\src\Locale.php:62
D:\a\UserFrosting\UserFrosting\app\vendor\userfrosting\i18n\src\Locale.php:51
D:\a\UserFrosting\UserFrosting\app\sprinkles\core\src\I18n\SiteLocale.php:47
D:\a\UserFrosting\UserFrosting\app\sprinkles\core\src\I18n\SiteLocale.php:76
D:\a\UserFrosting\UserFrosting\app\sprinkles\core\tests\Integration\I18n\SiteLocaleTest.php:101

@abdullahseba Had you found a fix for this ?

@lcharette lcharette added confirmed bug Something isn't working Windows labels Dec 29, 2020
@lcharette lcharette self-assigned this Dec 29, 2020
@lcharette lcharette added this to the 4.4.5 milestone Dec 29, 2020
lcharette added a commit to userfrosting/i18n that referenced this issue Dec 29, 2020
@lcharette
Copy link
Member Author

lcharette commented Dec 29, 2020

So locale issue was fixed in 5313fe6. It was failing because of a conflict between absolute and relative path on Windows. A test has been added in i18n to replicate the issue and should not impact main app : https://github.com/userfrosting/i18n/blob/be51a4c3e62567737cd598afed8a3e614b30e2a2/tests/LocaleTest.php#L247-L275

Which is now failing there instead : https://github.com/userfrosting/i18n/runs/1623644778?check_suite_focus=true#step:5:18

@lcharette
Copy link
Member Author

lcharette commented Dec 29, 2020

As for the path issue, flysystem Local adapter replace any trailing slashes with the DIRECTORY_SEPARATOR constant. I changed it in 0c6cca2 so we expect what flysystem adaptor returns. At some point our \UserFrosting\DS should probably use that constant too, but this would maker a lot of mess all around UF code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed bug Something isn't working Windows
Projects
None yet
Development

No branches or pull requests

1 participant