윈도우 환경에서 artisan xe:update 실행시 버전인식 못하는 문제 해결 #1141
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
문제 재현 방법
문제의 원인
어떤게 원인 이었나요?
윈도우에서 PHP_EOL로 explode 하는 함수가 작동하지 않았고, PHP_EOL과 버전정보문서(versions.txt)간의 new line 문자가 다른 것으로 추정
패치 내역
어떤걸 수정했나요?
윈도우 리눅스 양쪽에서 호환되도록 PHP_EOL 을 \n으로 변경하는 대신 array_map("rtrim"으로 윈도우 new line 문자들을 제거
(Stackoverflow 참고함 https://stackoverflow.com/questions/4975411/when-do-i-use-php-eol-instead-of-n-and-vice-versa-ajax-jquery-client-problem)