omise / omise-php

Omise PHP library
https://docs.opn.ooo
MIT License
67 stars 41 forks source link

Error extracting file `?limit=1-get.json` via composer on Windows OS. #48

Closed guzzilar closed 7 years ago

guzzilar commented 7 years ago

Issue

In Omise-PHP, there has one test file that the name is ?limit=1-get.json which is, Windows OS doesn't support ? sign on a filename. It would make an error like below (or similar as below) when you try run composer install or composer update

Package operations: 1 install, 0 updates, 0 removals
  - Installing omise/omise-php (dev-master d68cb6b)
    Cloning d68cb6b12e9f7884f47c50f51a2a9b0d53b46e1b from cache
    d68cb6b12e9f7884f47c50f51a2a9b0d53b46e1b is gone (history was rewritten?)
    Failed to download omise/omise-php from source: Failed to execute git checkout "d68cb6b12e9f7884f47c50f51a2a9b0d53b46e1b" -- && git reset --hard "d68cb6b12e9f7884f47c50f51a2a9b0d53b46e1b" --

Note: checking out 'd68cb6b12e9f7884f47c50f51a2a9b0d53b46e1b'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at d68cb6b... Merge pull request #42 from oaattia/add_phpunit_conf
error: unable to create file tests/fixtures/api.omise.co/customers/cust_test_5234fzk37pi2mz0cen3/cards/?limit=1-get.json: Invalid argument
fatal: Could not reset index file to revision 'd68cb6b12e9f7884f47c50f51a2a9b0d53b46e1b'.

Note: this issue would happen to all windows users.

tested on: Windows 10

Workaround

For Windows user, I'd recommended that please download Omise-PHP directly from the link below. https://github.com/omise/omise-php/archive/master.zip

.. Sorry for any inconvenience 🙇 . Nam

guzzilar commented 7 years ago

Note, a solution was introduced in PR #55

guzzilar commented 7 years ago

note, the issue has been solved in v2.7.0. Release note: https://github.com/omise/omise-php/releases/tag/v2.7.0