Skip to content
Snippets Groups Projects
Commit 7844f086 authored by Georgi's avatar Georgi
Browse files

[BUGFIX] Add dependencies fallback for legacy (classic, non-composer) mode

parent 00d2bf96
No related branches found
No related tags found
1 merge request!11Add PHAR archive as a fallback for the dependencies
......@@ -25,11 +25,27 @@
***************************************************************/
namespace SGalinski\SgVimeo\Service;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerAwareTrait;
use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;
// Fallback to the PHAR archive containing the dependency on the vimeo API in case
// this is a legacy installation - not in composer mode
try {
if (!class_exists('\Vimeo\Exceptions\VimeoRequestException')) {
require_once 'phar://' . ExtensionManagementUtility::extPath(
'sg_vimeo'
) . 'Libraries/vimeo-api.phar/autoload.php';
}
} catch (\Exception $e) {
require_once 'phar://' . ExtensionManagementUtility::extPath(
'sg_vimeo'
) . 'Libraries/vimeo-api.phar/autoload.php';
}
use Vimeo\Exceptions\VimeoRequestException;
use Vimeo\Vimeo;
......
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment