Closed khunemz closed 7 years ago
Hi, @khunemz
Could you please try install with the following command and let me know the result?
composer install --no-dev
Thanks, Nam.
@khunemz Sorry that I didn't explain well in previous comment,
For the issue, I'm guessing that the cause may came from the name of the file ?limit=1-get.json
that some OS doesn't allow to name the file with ?
character.
Please let me know if you still stuck with the same error after run the above command.
Thank you, Nam.
I have followed with your instruction but it still shows the same error above. Please consider my scenario ,
rm -rf composer.lock
2.5 cleared cache composer clear-cache
composer update
same as me
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing omise/omise-php (dev-master c7a49d4)
Downloading: 100%
Failed to download omise/omise-php from dist: Could not delete /var/www/html/vendor/omise/omise-php/892e6aaa1a6152b59085e11250afcb33:
Now trying to download from source
- Installing omise/omise-php (dev-master c7a49d4)
Cloning c7a49d442a7bbf20b280bd85e9dc1ba17ddc54c4
c7a49d442a7bbf20b280bd85e9dc1ba17ddc54c4 is gone (history was rewritten?)
[RuntimeException]
Failed to execute git checkout 'c7a49d442a7bbf20b280bd85e9dc1ba17ddc54c4' -- && git reset --hard 'c7a49d442a7bbf20b280bd85e9dc1ba17ddc54c4' --
Note: checking out 'c7a49d442a7bbf20b280bd85e9dc1ba17ddc54c4'.
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 c7a49d4... Merge pull request #37 from omise/code-revise
error: unable to create file tests/fixtures/api.omise.co/customers/cust_test_5234fzk37pi2mz0cen3/cards/?limit=1-get.json (Protocol error)
fatal: Could not reset index file to revision 'c7a49d442a7bbf20b280bd85e9dc1ba17ddc54c4'.
but it works if use composer install --no-dev
Try this command composer require omise/omise-php dev-master
@chaiwatmat thanks for your suggestion but it still doesn't work. and after I found it doesn't compatible with Laravel I better write my own CURL request. no point to wasted more time to install this.
Hi, @iicmaster @khunemz
Thanks for reported back to us. I've created one issue ticket that related with this issue. Here https://github.com/omise/omise-php/issues/48
You could follow the progress from there.
Cheers! Nam
Hi again @iicmaster š
For Laravel issue, you could add Omise-PHP to composer.json
and use by add \
in front of class name.
For example,
<?php
namespace Acme\Controllers;
class Something extends Controllers
{
public function sweet()
{
$charge = \OmiseCharge::create();
}
}
Anyway, I also have created the project tasks for implement namespace
to Omise-PHP. Here https://github.com/omise/omise-php/projects/1
This one would give a fully support for PSR-4 standard, and also, Laravel.
Please feel free to throw any idea/suggestion that I could help you to improve for the next Omise-PHP version!
Cheers š» Nam
Hi @guzzilar,
This is maybe a little off-topic, but do you have any contribution guideline? I want to help contribute to the new version of this library in anyway I can.
Thanks.
Hi @thanapongp,
Thank you very much that you are giving the effort for the contribution. This is very helpful and value for us.
In general, you can create the pull request to improve in any parts of the project or submit the issue that you found.
For the new version of this project, currently, it is on the process of code review. You can help to provide the comment, the better solution, testing on your convenient environment, the other parts that it should be covered or etc. These feedbacks are useful and they can be discussed.
Thanks for you answer @nimid, I will try and contribute to this project in anyway I can.
Tried to install omise for php Command on PowerShell
composer install
Errors log:
composer.json
How could I fix it , how to prevent this in the future ?