sveawebpay / php-integration

SDK for Sveas payment methods (standalone and Svea Checkout)
Other
15 stars 19 forks source link

* Make inclusion of autoload independent from current working directory #97

Open timint opened 3 years ago

alexanderwiden95 commented 3 years ago

Since the structure still is relative to the current working directory we don't really see how this is making any difference with or without __DIR__. Could you elaborate?

timint commented 3 years ago

Yeah, in CLI it will try to access the folder of the command prompt. I used composer and executed the CLI command:

php example\yadayada.php and it aborted with a fatal error.

I don't see a purpose why it must locked to a certain CWD.

Do you see a problem with making CWD irrelevant?

alexanderwiden95 commented 3 years ago

There is no problem with adding __DIR__, we just didn't expect anyone to use this from an CLI. We'll include this in the example files later on

timint commented 3 years ago

Wonderful to hear 👍. CLI is an excellent way for testing the examples. I made so much use of it.

The next thing is adding PHP_EOL and strip_tags to the output. I will do a recommendation in another ticket for that.

image