Move TwitterOAuth to Composer : part 2b #510

Merged
MrPetovan merged 2 commits from task/4116-move-twitteroauth-to-composer into develop 2018-01-29 06:47:16 +01:00
MrPetovan commented 2018-01-29 04:37:06 +01:00 (Migrated from github.com)

Part of https://github.com/friendica/friendica/issues/4116
Redux of #508
Follow-up to #505

An error suppression operator cost @annando and me a ton of time to find the error.

In the end I found the issue and I had to add a condition to include OAUth1.php in two different addons. Previously, the collision was managed not on the class name level, but on the file path level through require_once.

This would have greatly benefitted from an autoloader, but the ship has sailed for addons.

Part of https://github.com/friendica/friendica/issues/4116 Redux of #508 Follow-up to #505 An error suppression operator cost @annando and me a ton of time to find the error. In the end I found the issue and I had to add a condition to include OAUth1.php in two different addons. Previously, the collision was managed not on the class name level, but on the file path level through `require_once`. This would have greatly benefitted from an autoloader, but the ship has sailed for addons.
tobiasd commented 2018-01-29 07:19:44 +01:00 (Migrated from github.com)

Why is the ship sailed? Is there no way to have two autoloaders for the addons?

Why is the ship sailed? Is there no way to have two autoloaders for the addons?
MrPetovan commented 2018-01-29 13:38:49 +01:00 (Migrated from github.com)

@tobiasd Oh no it’s possible, but I’m personally reluctant because:

  1. We use obsolete libraries that would need work to migrate to Packagist-available ones. Especially for addons, it would require me to go out of my way to test optional features I don’t normally use.
  2. It would require an extra install/update step for common addon Composer dependencies.
  • OR -
  1. It would duplicate yet more code in multiple addons if we go for versioned vendor folder like in the twitter add-on.

I still have a last task I want to try though, by converting the venerable and ubiquitous OAuth1.php to classes that can be autoloaded. Since it’s used by the main site, addons could piggy-back off it without having to include a copy in their respective folders.

@tobiasd Oh no it’s possible, but I’m personally reluctant because: 1. We use obsolete libraries that would need work to migrate to Packagist-available ones. Especially for addons, it would require me to go out of my way to test optional features I don’t normally use. 2. It would require an extra install/update step for common addon Composer dependencies. - OR - 2. It would duplicate yet more code in multiple addons if we go for versioned vendor folder like in the `twitter` add-on. I still have a last task I want to try though, by converting the venerable and ubiquitous `OAuth1.php` to classes that can be autoloaded. Since it’s used by the main site, addons could piggy-back off it without having to include a copy in their respective folders.
tobiasd commented 2018-01-29 15:45:56 +01:00 (Migrated from github.com)

@tobiasd Oh no it’s possible, but I’m personally reluctant because:

Ah - ok. Thankis for the explanation!

> @tobiasd Oh no it’s possible, but I’m personally reluctant because: Ah - ok. Thankis for the explanation!
Sign in to join this conversation.
No description provided.