From f2785bca0310a973bcb04a0c1cbe56fa5ab95762 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Thu, 17 Dec 2020 22:30:19 +0100 Subject: [PATCH 01/18] Clear Smarty compiled templates before controller tests In order to avoid permission errors --- tests/ControllerTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/ControllerTest.php b/tests/ControllerTest.php index ee3ce16..6229ccf 100644 --- a/tests/ControllerTest.php +++ b/tests/ControllerTest.php @@ -13,6 +13,7 @@ use Alltube\Controller\FrontController; use Alltube\Exception\ConfigException; use Alltube\Exception\DependencyException; use Slim\Http\Response; +use Slim\Views\Smarty; use SmartyException; /** @@ -52,6 +53,12 @@ abstract class ControllerTest extends ContainerTest ->setName('locale'); $router->map(['GET'], '/redirect', [$downloadController, 'download']) ->setName('download'); + + /** @var Smarty $view */ + $view = $this->container->get('view'); + + // Make sure we start the tests without compiled templates. + $view->getSmarty()->clearCompiledTemplate(); } /** From 05311ac7b6b2f175c9dd02076734d818cf0cb3c3 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Thu, 17 Dec 2020 22:43:05 +0100 Subject: [PATCH 02/18] Add return types --- classes/Config.php | 8 ++++---- classes/Controller/BaseController.php | 8 ++++---- classes/Controller/DownloadController.php | 14 +++++++------- classes/Controller/FrontController.php | 18 +++++++++--------- classes/Controller/JsonController.php | 2 +- classes/Factory/ConfigFactory.php | 2 +- classes/Factory/LocaleManagerFactory.php | 4 ++-- classes/Factory/LoggerFactory.php | 2 +- classes/Factory/SessionFactory.php | 2 +- classes/Factory/ViewFactory.php | 4 ++-- classes/Locale.php | 10 +++++----- classes/LocaleManager.php | 8 ++++---- classes/Middleware/CspMiddleware.php | 2 +- classes/Middleware/LocaleMiddleware.php | 4 ++-- classes/Stream/PlaylistArchiveStream.php | 22 +++++++++++----------- classes/Stream/YoutubeChunkStream.php | 20 ++++++++++---------- classes/UglyRouter.php | 4 ++-- tests/BaseTest.php | 2 +- tests/ControllerTest.php | 2 +- tests/LocaleMiddlewareTest.php | 14 ++++++++++---- tests/VideoTest.php | 10 +++++----- 21 files changed, 84 insertions(+), 78 deletions(-) diff --git a/classes/Config.php b/classes/Config.php index 666b741..da7a10a 100644 --- a/classes/Config.php +++ b/classes/Config.php @@ -187,7 +187,7 @@ class Config * * @return string */ - public static function addHttpToFormat(string $format) + public static function addHttpToFormat(string $format): string { $newFormat = []; foreach (explode('/', $format) as $subformat) { @@ -266,7 +266,7 @@ class Config * @return Config * @throws ConfigException */ - public static function fromFile(string $file) + public static function fromFile(string $file): Config { if (is_file($file)) { return new self(Yaml::parse(strval(file_get_contents($file)))); @@ -293,7 +293,7 @@ class Config * * @return Downloader */ - public function getDownloader() + public function getDownloader(): Downloader { return new Downloader( $this->youtubedl, @@ -308,7 +308,7 @@ class Config /** * @return string */ - public function getAppVersion() + public function getAppVersion(): string { $version = PrettyVersions::getRootPackageVersion(); diff --git a/classes/Controller/BaseController.php b/classes/Controller/BaseController.php index f57b0aa..f773bc1 100644 --- a/classes/Controller/BaseController.php +++ b/classes/Controller/BaseController.php @@ -111,7 +111,7 @@ abstract class BaseController * * @return string format */ - protected function getFormat(Request $request) + protected function getFormat(Request $request): string { $format = $request->getQueryParam('format'); if (!isset($format)) { @@ -126,9 +126,9 @@ abstract class BaseController * * @param Request $request PSR-7 request * - * @return string Password + * @return string|null Password */ - protected function getPassword(Request $request) + protected function getPassword(Request $request): ?string { $url = $request->getQueryParam('url'); @@ -151,7 +151,7 @@ abstract class BaseController * * @return Response HTTP response */ - protected function displayError(Request $request, Response $response, string $message) + protected function displayError(Request $request, Response $response, string $message): Response { $controller = new FrontController($this->container); diff --git a/classes/Controller/DownloadController.php b/classes/Controller/DownloadController.php index b80890f..78e8b77 100644 --- a/classes/Controller/DownloadController.php +++ b/classes/Controller/DownloadController.php @@ -38,7 +38,7 @@ class DownloadController extends BaseController * @return Response HTTP response * @throws AlltubeLibraryException */ - public function download(Request $request, Response $response) + public function download(Request $request, Response $response): Response { $url = $request->getQueryParam('url'); @@ -99,7 +99,7 @@ class DownloadController extends BaseController * @return Response HTTP response * @throws AlltubeLibraryException */ - private function getConvertedAudioResponse(Request $request, Response $response) + private function getConvertedAudioResponse(Request $request, Response $response): Response { $from = null; $to = null; @@ -135,7 +135,7 @@ class DownloadController extends BaseController * @throws PasswordException * @throws WrongPasswordException */ - private function getAudioResponse(Request $request, Response $response) + private function getAudioResponse(Request $request, Response $response): Response { if (!empty($request->getQueryParam('from')) || !empty($request->getQueryParam('to'))) { // Force convert when we need to seek. @@ -174,7 +174,7 @@ class DownloadController extends BaseController * @return Response HTTP response * @throws AlltubeLibraryException */ - private function getStream(Request $request, Response $response) + private function getStream(Request $request, Response $response): Response { if (isset($this->video->entries)) { if ($this->config->convert && $request->getQueryParam('audio')) { @@ -240,7 +240,7 @@ class DownloadController extends BaseController * @return Response HTTP response * @throws AlltubeLibraryException */ - private function getRemuxStream(Request $request, Response $response) + private function getRemuxStream(Request $request, Response $response): Response { if (!$this->config->remux) { throw new RemuxException('You need to enable remux mode to merge two formats.'); @@ -267,7 +267,7 @@ class DownloadController extends BaseController * @return Response HTTP response * @throws AlltubeLibraryException */ - private function getDownloadResponse(Request $request, Response $response) + private function getDownloadResponse(Request $request, Response $response): Response { try { $videoUrls = $this->video->getUrl(); @@ -306,7 +306,7 @@ class DownloadController extends BaseController * @throws YoutubedlException * @throws PopenStreamException */ - private function getConvertedResponse(Request $request, Response $response) + private function getConvertedResponse(Request $request, Response $response): Response { $response = $response->withHeader( 'Content-Disposition', diff --git a/classes/Controller/FrontController.php b/classes/Controller/FrontController.php index 38040b8..e091705 100644 --- a/classes/Controller/FrontController.php +++ b/classes/Controller/FrontController.php @@ -52,7 +52,7 @@ class FrontController extends BaseController * * @return Response HTTP response */ - public function index(Request $request, Response $response) + public function index(Request $request, Response $response): Response { $this->view->render( $response, @@ -78,7 +78,7 @@ class FrontController extends BaseController * * @return Response */ - public function locale(Request $request, Response $response, array $data) + public function locale(Request $request, Response $response, array $data): Response { $this->localeManager->setLocale(new Locale($data['locale'])); @@ -94,7 +94,7 @@ class FrontController extends BaseController * @return Response HTTP response * @throws AlltubeLibraryException */ - public function extractors(Request $request, Response $response) + public function extractors(Request $request, Response $response): Response { $this->view->render( $response, @@ -119,7 +119,7 @@ class FrontController extends BaseController * * @return Response HTTP response */ - public function password(Request $request, Response $response) + public function password(Request $request, Response $response): Response { $this->view->render( $response, @@ -199,7 +199,7 @@ class FrontController extends BaseController * @return Response HTTP response * @throws AlltubeLibraryException */ - public function info(Request $request, Response $response) + public function info(Request $request, Response $response): Response { $url = $request->getQueryParam('url') ?: $request->getQueryParam('v'); @@ -228,7 +228,7 @@ class FrontController extends BaseController * * @return Response HTTP response */ - protected function displayError(Request $request, Response $response, string $message) + protected function displayError(Request $request, Response $response, string $message): Response { $this->view->render( $response, @@ -248,7 +248,7 @@ class FrontController extends BaseController * @param Response $response * @return Response */ - public function notFound(Request $request, Response $response) + public function notFound(Request $request, Response $response): Response { return $this->displayError($request, $response, $this->localeManager->t('Page not found')) ->withStatus(StatusCode::HTTP_NOT_FOUND); @@ -259,7 +259,7 @@ class FrontController extends BaseController * @param Response $response * @return Response */ - public function notAllowed(Request $request, Response $response) + public function notAllowed(Request $request, Response $response): Response { return $this->displayError($request, $response, $this->localeManager->t('Method not allowed')) ->withStatus(StatusCode::HTTP_METHOD_NOT_ALLOWED); @@ -274,7 +274,7 @@ class FrontController extends BaseController * * @return Response HTTP response */ - public function error(Request $request, Response $response, Throwable $error) + public function error(Request $request, Response $response, Throwable $error): Response { $this->logger->error($error); diff --git a/classes/Controller/JsonController.php b/classes/Controller/JsonController.php index 1247c6b..9f916bc 100644 --- a/classes/Controller/JsonController.php +++ b/classes/Controller/JsonController.php @@ -25,7 +25,7 @@ class JsonController extends BaseController * @return Response HTTP response * @throws AlltubeLibraryException */ - public function json(Request $request, Response $response) + public function json(Request $request, Response $response): Response { $url = $request->getQueryParam('url'); diff --git a/classes/Factory/ConfigFactory.php b/classes/Factory/ConfigFactory.php index 29cd0d7..c408b0e 100644 --- a/classes/Factory/ConfigFactory.php +++ b/classes/Factory/ConfigFactory.php @@ -20,7 +20,7 @@ class ConfigFactory * @return Config * @throws ConfigException */ - public static function create(Container $container) + public static function create(Container $container): Config { $configPath = __DIR__ . '/../../config/config.yml'; if (is_file($configPath)) { diff --git a/classes/Factory/LocaleManagerFactory.php b/classes/Factory/LocaleManagerFactory.php index 22fa261..30df471 100644 --- a/classes/Factory/LocaleManagerFactory.php +++ b/classes/Factory/LocaleManagerFactory.php @@ -15,10 +15,10 @@ class LocaleManagerFactory /** * @param Container $container - * @return LocaleManager|null + * @return LocaleManager * @throws DependencyException */ - public static function create(Container $container) + public static function create(Container $container): LocaleManager { if (!class_exists('Locale')) { throw new DependencyException('You need to install the intl extension for PHP.'); diff --git a/classes/Factory/LoggerFactory.php b/classes/Factory/LoggerFactory.php index 87cae0e..fe85133 100644 --- a/classes/Factory/LoggerFactory.php +++ b/classes/Factory/LoggerFactory.php @@ -18,7 +18,7 @@ class LoggerFactory * @param Container $container * @return Logger */ - public static function create(Container $container) + public static function create(Container $container): Logger { $config = $container->get('config'); if ($config->debug) { diff --git a/classes/Factory/SessionFactory.php b/classes/Factory/SessionFactory.php index b819b2f..05bb796 100644 --- a/classes/Factory/SessionFactory.php +++ b/classes/Factory/SessionFactory.php @@ -21,7 +21,7 @@ class SessionFactory * @param Container $container * @return Session */ - public static function create(Container $container) + public static function create(Container $container): Session { $session_factory = new \Aura\Session\SessionFactory(); $session = $session_factory->newInstance($_COOKIE); diff --git a/classes/Factory/ViewFactory.php b/classes/Factory/ViewFactory.php index d7048b7..1cc09e2 100644 --- a/classes/Factory/ViewFactory.php +++ b/classes/Factory/ViewFactory.php @@ -26,7 +26,7 @@ class ViewFactory * * @return string URL */ - private static function getCanonicalUrl(Request $request) + private static function getCanonicalUrl(Request $request): string { /** @var Uri $uri */ $uri = $request->getUri(); @@ -45,7 +45,7 @@ class ViewFactory * @return Smarty * @throws SmartyException */ - public static function create(ContainerInterface $container, Request $request = null) + public static function create(ContainerInterface $container, Request $request = null): Smarty { if (!isset($request)) { $request = $container->get('request'); diff --git a/classes/Locale.php b/classes/Locale.php index 9e81180..bacfc9d 100644 --- a/classes/Locale.php +++ b/classes/Locale.php @@ -48,7 +48,7 @@ class Locale * * @return string ISO 15897 code */ - public function __toString() + public function __toString(): string { return $this->getIso15897(); } @@ -58,7 +58,7 @@ class Locale * * @return string */ - public function getFullName() + public function getFullName(): string { return PHPLocale::getDisplayName($this->getIso15897(), $this->getIso15897()); } @@ -68,7 +68,7 @@ class Locale * * @return string */ - public function getIso15897() + public function getIso15897(): string { if (isset($this->region)) { return $this->language . '_' . $this->region; @@ -82,7 +82,7 @@ class Locale * * @return string */ - public function getBcp47() + public function getBcp47(): string { if (isset($this->region)) { return $this->language . '-' . $this->region; @@ -96,7 +96,7 @@ class Locale * * @return string */ - public function getIso3166() + public function getIso3166(): string { return strtolower($this->region); } diff --git a/classes/LocaleManager.php b/classes/LocaleManager.php index f3f7919..884579e 100644 --- a/classes/LocaleManager.php +++ b/classes/LocaleManager.php @@ -80,7 +80,7 @@ class LocaleManager * * @return Locale[] */ - public function getSupportedLocales() + public function getSupportedLocales(): array { $return = [ new Locale('en_US') @@ -103,7 +103,7 @@ class LocaleManager * * @return Locale|null */ - public function getLocale() + public function getLocale(): ?Locale { return $this->curLocale; } @@ -140,7 +140,7 @@ class LocaleManager * * @return string Translated string */ - public function smartyTranslate(array $params, string $text = null) + public function smartyTranslate(array $params, string $text = null): string { if (isset($params['params'])) { return $this->t($text, $params['params']); @@ -157,7 +157,7 @@ class LocaleManager * @param mixed[] $params * @return string Translated string */ - public function t(string $string = null, array $params = []) + public function t(string $string = null, array $params = []): string { if (isset($string)) { return $this->translator->trans($string, $params); diff --git a/classes/Middleware/CspMiddleware.php b/classes/Middleware/CspMiddleware.php index c3c72ff..3449df3 100644 --- a/classes/Middleware/CspMiddleware.php +++ b/classes/Middleware/CspMiddleware.php @@ -34,7 +34,7 @@ class CspMiddleware * @param Response $response * @return MessageInterface */ - public function applyHeader(Response $response) + public function applyHeader(Response $response): MessageInterface { $csp = new CSPBuilder(); $csp->addDirective('default-src', []) diff --git a/classes/Middleware/LocaleMiddleware.php b/classes/Middleware/LocaleMiddleware.php index b28f357..418ee7d 100644 --- a/classes/Middleware/LocaleMiddleware.php +++ b/classes/Middleware/LocaleMiddleware.php @@ -42,7 +42,7 @@ class LocaleMiddleware * * @return Locale|null Locale if chosen, nothing otherwise */ - public function testLocale(array $proposedLocale) + public function testLocale(array $proposedLocale): ?Locale { foreach ($this->localeManager->getSupportedLocales() as $locale) { $parsedLocale = AcceptLanguage::parse($locale); @@ -67,7 +67,7 @@ class LocaleMiddleware * * @return Response */ - public function __invoke(Request $request, Response $response, callable $next) + public function __invoke(Request $request, Response $response, callable $next): Response { $headers = $request->getHeader('Accept-Language'); $curLocale = $this->localeManager->getLocale(); diff --git a/classes/Stream/PlaylistArchiveStream.php b/classes/Stream/PlaylistArchiveStream.php index 1bf08ff..065a57b 100644 --- a/classes/Stream/PlaylistArchiveStream.php +++ b/classes/Stream/PlaylistArchiveStream.php @@ -113,7 +113,7 @@ class PlaylistArchiveStream extends ZipArchive implements StreamInterface * * @return int|null */ - public function getSize() + public function getSize(): ?int { return null; } @@ -123,7 +123,7 @@ class PlaylistArchiveStream extends ZipArchive implements StreamInterface * * @return bool */ - public function isSeekable() + public function isSeekable(): bool { return true; } @@ -143,7 +143,7 @@ class PlaylistArchiveStream extends ZipArchive implements StreamInterface * * @return bool */ - public function isWritable() + public function isWritable(): bool { return true; } @@ -153,7 +153,7 @@ class PlaylistArchiveStream extends ZipArchive implements StreamInterface * * @return bool */ - public function isReadable() + public function isReadable(): bool { return true; } @@ -173,7 +173,7 @@ class PlaylistArchiveStream extends ZipArchive implements StreamInterface * * @param string|null $key string $key Specific metadata to retrieve. * - * @return array|mixed|null + * @return mixed|null */ public function getMetadata($key = null) { @@ -208,7 +208,7 @@ class PlaylistArchiveStream extends ZipArchive implements StreamInterface * * @return string */ - public function __toString() + public function __toString(): string { $this->rewind(); @@ -243,7 +243,7 @@ class PlaylistArchiveStream extends ZipArchive implements StreamInterface * * @return bool */ - public function eof() + public function eof(): bool { return $this->isComplete && feof($this->buffer); } @@ -272,12 +272,12 @@ class PlaylistArchiveStream extends ZipArchive implements StreamInterface /** * Read data from the stream. * - * @param mixed $count Number of bytes to read + * @param mixed $length Number of bytes to read * * @return string|false * @throws AlltubeLibraryException */ - public function read($count) + public function read($length) { // If the archive is complete, we only read the remaining buffer. if (!$this->isComplete) { @@ -297,7 +297,7 @@ class PlaylistArchiveStream extends ZipArchive implements StreamInterface } } else { // Continue streaming the current video. - $this->stream_file_part($this->curVideoStream->read($count)); + $this->stream_file_part($this->curVideoStream->read($length)); } } else { // Start streaming the first video. @@ -305,7 +305,7 @@ class PlaylistArchiveStream extends ZipArchive implements StreamInterface } } - return fread($this->buffer, $count); + return fread($this->buffer, $length); } /** diff --git a/classes/Stream/YoutubeChunkStream.php b/classes/Stream/YoutubeChunkStream.php index bf64c0a..bb95138 100644 --- a/classes/Stream/YoutubeChunkStream.php +++ b/classes/Stream/YoutubeChunkStream.php @@ -39,7 +39,7 @@ class YoutubeChunkStream implements StreamInterface * * @return string */ - public function read($length) + public function read($length): string { $size = intval($this->response->getHeader('Content-Length')[0]); if ($size - $this->tell() < $length) { @@ -53,7 +53,7 @@ class YoutubeChunkStream implements StreamInterface /** * Reads all data from the stream into a string, from the beginning to end. */ - public function __toString() + public function __toString(): string { return (string)$this->response->getBody(); } @@ -83,7 +83,7 @@ class YoutubeChunkStream implements StreamInterface * * @return int|null */ - public function getSize() + public function getSize(): ?int { return $this->response->getBody()->getSize(); } @@ -93,7 +93,7 @@ class YoutubeChunkStream implements StreamInterface * * @return int */ - public function tell() + public function tell(): int { return $this->response->getBody()->tell(); } @@ -103,7 +103,7 @@ class YoutubeChunkStream implements StreamInterface * * @return bool */ - public function eof() + public function eof(): bool { return $this->response->getBody()->eof(); } @@ -113,7 +113,7 @@ class YoutubeChunkStream implements StreamInterface * * @return bool */ - public function isSeekable() + public function isSeekable(): bool { return $this->response->getBody()->isSeekable(); } @@ -146,7 +146,7 @@ class YoutubeChunkStream implements StreamInterface * * @return bool */ - public function isWritable() + public function isWritable(): bool { return $this->response->getBody()->isWritable(); } @@ -168,7 +168,7 @@ class YoutubeChunkStream implements StreamInterface * * @return bool */ - public function isReadable() + public function isReadable(): bool { return $this->response->getBody()->isReadable(); } @@ -178,7 +178,7 @@ class YoutubeChunkStream implements StreamInterface * * @return string */ - public function getContents() + public function getContents(): string { return $this->response->getBody()->getContents(); } @@ -188,7 +188,7 @@ class YoutubeChunkStream implements StreamInterface * * @param string|null $key Specific metadata to retrieve. * - * @return array|mixed|null + * @return mixed|null */ public function getMetadata($key = null) { diff --git a/classes/UglyRouter.php b/classes/UglyRouter.php index 95a60cf..51f080f 100644 --- a/classes/UglyRouter.php +++ b/classes/UglyRouter.php @@ -26,7 +26,7 @@ class UglyRouter extends Router * * @link https://github.com/nikic/FastRoute/blob/master/src/Dispatcher.php */ - public function dispatch(ServerRequestInterface $request) + public function dispatch(ServerRequestInterface $request): array { $params = $request->getQueryParams(); $uri = new Uri('', ''); @@ -53,7 +53,7 @@ class UglyRouter extends Router * @throws InvalidArgumentException If required data not provided * @throws RuntimeException If named route does not exist */ - public function pathFor($name, array $data = [], array $queryParams = []) + public function pathFor($name, array $data = [], array $queryParams = []): string { $queryParams['page'] = $name; $url = Uri::createFromString($this->relativePathFor($name, $data, $queryParams))->withPath(''); diff --git a/tests/BaseTest.php b/tests/BaseTest.php index 7aa5351..3d41d6a 100644 --- a/tests/BaseTest.php +++ b/tests/BaseTest.php @@ -18,7 +18,7 @@ abstract class BaseTest extends TestCase * * @return string Path to file */ - protected function getConfigFile() + protected function getConfigFile(): string { return __DIR__ . '/../config/config_test.yml'; } diff --git a/tests/ControllerTest.php b/tests/ControllerTest.php index 6229ccf..40396bf 100644 --- a/tests/ControllerTest.php +++ b/tests/ControllerTest.php @@ -69,7 +69,7 @@ abstract class ControllerTest extends ContainerTest * * @return Response HTTP response */ - protected function getRequestResult(string $request, array $params) + protected function getRequestResult(string $request, array $params): Response { return $this->controller->$request( $this->container->get('request')->withQueryParams($params), diff --git a/tests/LocaleMiddlewareTest.php b/tests/LocaleMiddlewareTest.php index b9a45cd..3452fdc 100644 --- a/tests/LocaleMiddlewareTest.php +++ b/tests/LocaleMiddlewareTest.php @@ -85,26 +85,32 @@ class LocaleMiddlewareTest extends ContainerTest * Check that the request contains an Accept-Language header. * * @param Request $request PSR-7 request + * @param Response $response * - * @return void + * @return Response */ - public function assertHeader(Request $request) + public function assertHeader(Request $request, Response $response): Response { $header = $request->getHeader('Accept-Language'); $this->assertEquals('foo-BAR', $header[0]); + + return $response; } /** * Check that the request contains no Accept-Language header. * * @param Request $request PSR-7 request + * @param Response $response * - * @return void + * @return Response */ - public function assertNoHeader(Request $request) + public function assertNoHeader(Request $request, Response $response): Response { $header = $request->getHeader('Accept-Language'); $this->assertEmpty($header); + + return $response; } /** diff --git a/tests/VideoTest.php b/tests/VideoTest.php index 6a26801..2107375 100644 --- a/tests/VideoTest.php +++ b/tests/VideoTest.php @@ -157,7 +157,7 @@ class VideoTest extends ContainerTest * * @return array[] */ - public function urlProvider() + public function urlProvider(): array { return [ [ @@ -193,7 +193,7 @@ class VideoTest extends ContainerTest * * @return array[] */ - public function remuxUrlProvider() + public function remuxUrlProvider(): array { return [ [ @@ -210,7 +210,7 @@ class VideoTest extends ContainerTest * * @return array[] */ - public function m3uUrlProvider() + public function m3uUrlProvider(): array { return [ [ @@ -227,7 +227,7 @@ class VideoTest extends ContainerTest * * @return array[] */ - public function rtmpUrlProvider() + public function rtmpUrlProvider(): array { return [ [ @@ -244,7 +244,7 @@ class VideoTest extends ContainerTest * * @return array[] */ - public function errorUrlProvider() + public function errorUrlProvider(): array { return [ ['http://example.com/video'], From 5d550a100dcdfb968a85a4e7c2c107b27d850b40 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 2 Feb 2021 00:27:24 +0100 Subject: [PATCH 03/18] Disable coverage in phpunit It causes an error on Travis and it is not used anymore --- phpunit.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 9080073..8893c4a 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -10,8 +10,4 @@ tests/ - - - - From 58f79c50128ca1bf39a1001e87c8a6177f7affbd Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 2 Feb 2021 21:25:47 +0100 Subject: [PATCH 04/18] Use enlightn/security-checker instead of sensiolabs/security-checker (fixes #342) --- composer.json | 2 +- composer.lock | 475 ++++++++++++++++---------------------------------- 2 files changed, 152 insertions(+), 325 deletions(-) diff --git a/composer.json b/composer.json index 154f14e..9f2b878 100644 --- a/composer.json +++ b/composer.json @@ -41,13 +41,13 @@ }, "require-dev": { "consolidation/robo": "^2.1", + "enlightn/security-checker": "^1.4", "ergebnis/composer-normalize": "^2.6", "insite/composer-dangling-locked-deps": "^0.2.1", "php-mock/php-mock-mockery": "^1.3", "phpro/grumphp": "^1.1", "phpstan/phpstan": "^0.12.25", "phpunit/phpunit": "^8.4", - "sensiolabs/security-checker": "^6.0", "smarty-gettext/smarty-gettext": "^1.6", "squizlabs/php_codesniffer": "^3.5", "symfony/error-handler": "^5.0", diff --git a/composer.lock b/composer.lock index 147318c..540be18 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6902afc1fff243b16cd33396a2603e2e", + "content-hash": "aacbcefea720bab616e7236caa0ae3e7", "packages": [ { "name": "aura/session", @@ -1399,16 +1399,16 @@ }, { "name": "symfony/console", - "version": "v5.1.7", + "version": "v5.2.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "ae789a8a2ad189ce7e8216942cdb9b77319f5eb8" + "reference": "d62ec79478b55036f65e2602e282822b8eaaff0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/ae789a8a2ad189ce7e8216942cdb9b77319f5eb8", - "reference": "ae789a8a2ad189ce7e8216942cdb9b77319f5eb8", + "url": "https://api.github.com/repos/symfony/console/zipball/d62ec79478b55036f65e2602e282822b8eaaff0a", + "reference": "d62ec79478b55036f65e2602e282822b8eaaff0a", "shasum": "" }, "require": { @@ -1445,11 +1445,6 @@ "symfony/process": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" @@ -1472,9 +1467,15 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Console Component", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", - "time": "2020-10-07T15:23:00+00:00" + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "time": "2021-01-27T10:15:41+00:00" }, { "name": "symfony/finder", @@ -1527,20 +1528,20 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.18.1", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-ctype": "For best performance" @@ -1548,7 +1549,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1585,24 +1586,24 @@ "polyfill", "portable" ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.18.1", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "b740103edbdcc39602239ee8860f0f45a8eb9aa5" + "reference": "267a9adeb8ecb8071040a740930e077cdfb987af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b740103edbdcc39602239ee8860f0f45a8eb9aa5", - "reference": "b740103edbdcc39602239ee8860f0f45a8eb9aa5", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/267a9adeb8ecb8071040a740930e077cdfb987af", + "reference": "267a9adeb8ecb8071040a740930e077cdfb987af", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-intl": "For best performance" @@ -1610,7 +1611,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1649,25 +1650,25 @@ "portable", "shim" ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.17.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a" + "reference": "0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3bff59ea7047e925be6b7f2059d60af31bb46d6a", - "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44", + "reference": "0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44", "shasum": "" }, "require": { - "php": ">=5.3.3", - "symfony/polyfill-mbstring": "^1.3", + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", "symfony/polyfill-php72": "^1.10" }, "suggest": { @@ -1676,7 +1677,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1696,6 +1701,10 @@ "name": "Laurent Bassin", "email": "laurent@bassin.info" }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" @@ -1711,24 +1720,24 @@ "portable", "shim" ], - "time": "2020-05-12T16:47:27+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.18.1", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" + "reference": "6e971c891537eb617a00bb07a43d182a6915faba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", - "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/6e971c891537eb617a00bb07a43d182a6915faba", + "reference": "6e971c891537eb617a00bb07a43d182a6915faba", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-intl": "For best performance" @@ -1736,7 +1745,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1778,24 +1787,24 @@ "portable", "shim" ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2021-01-07T17:09:11+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.18.1", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" + "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", - "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", + "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-mbstring": "For best performance" @@ -1803,7 +1812,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1841,29 +1850,33 @@ "portable", "shim" ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.17.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "f048e612a3905f34931127360bdd2def19a5e582" + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582", - "reference": "f048e612a3905f34931127360bdd2def19a5e582", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1896,29 +1909,29 @@ "portable", "shim" ], - "time": "2020-05-12T16:47:27+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.18.1", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", - "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1958,29 +1971,29 @@ "portable", "shim" ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.17.1", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2" + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4a5b6bba3259902e386eb80dd1956181ee90b5b2", - "reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", "shasum": "" }, "require": { - "php": ">=7.0.8" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2024,7 +2037,7 @@ "portable", "shim" ], - "time": "2020-06-06T08:46:27+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/process", @@ -2140,16 +2153,16 @@ }, { "name": "symfony/string", - "version": "v5.1.7", + "version": "v5.2.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "4a9afe9d07bac506f75bcee8ed3ce76da5a9343e" + "reference": "c95468897f408dd0aca2ff582074423dd0455122" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/4a9afe9d07bac506f75bcee8ed3ce76da5a9343e", - "reference": "4a9afe9d07bac506f75bcee8ed3ce76da5a9343e", + "url": "https://api.github.com/repos/symfony/string/zipball/c95468897f408dd0aca2ff582074423dd0455122", + "reference": "c95468897f408dd0aca2ff582074423dd0455122", "shasum": "" }, "require": { @@ -2167,11 +2180,6 @@ "symfony/var-exporter": "^4.4|^5.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\String\\": "" @@ -2197,7 +2205,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony String component", + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", "homepage": "https://symfony.com", "keywords": [ "grapheme", @@ -2207,7 +2215,7 @@ "utf-8", "utf8" ], - "time": "2020-09-15T12:23:47+00:00" + "time": "2021-01-25T15:14:59+00:00" }, { "name": "symfony/translation", @@ -3505,6 +3513,66 @@ ], "time": "2019-10-21T16:45:58+00:00" }, + { + "name": "enlightn/security-checker", + "version": "v1.4", + "source": { + "type": "git", + "url": "https://github.com/enlightn/security-checker.git", + "reference": "378b2493cb3bc7961c836ad164b3393c33a20754" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/enlightn/security-checker/zipball/378b2493cb3bc7961c836ad164b3393c33a20754", + "reference": "378b2493cb3bc7961c836ad164b3393c33a20754", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-zip": "*", + "guzzlehttp/guzzle": "^6.3|^7.0", + "php": ">=5.6", + "symfony/console": "^3.4|^4|^5", + "symfony/finder": "^3|^4|^5", + "symfony/yaml": "^3.4|^4|^5" + }, + "require-dev": { + "phpunit/phpunit": "^5.5|^6|^7|^8|^9" + }, + "bin": [ + "security-checker" + ], + "type": "library", + "autoload": { + "psr-4": { + "Enlightn\\SecurityChecker\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paras Malhotra", + "email": "paras@laravel-enlightn.com" + }, + { + "name": "Miguel Piedrafita", + "email": "soy@miguelpiedrafita.com" + } + ], + "description": "A PHP dependency vulnerabilities scanner based on the Security Advisories Database.", + "keywords": [ + "package", + "php", + "scanner", + "security", + "security advisories", + "vulnerability scanner" + ], + "time": "2021-02-01T13:49:38+00:00" + }, { "name": "ergebnis/composer-normalize", "version": "2.6.0", @@ -6118,54 +6186,6 @@ ], "time": "2020-08-25T06:56:57+00:00" }, - { - "name": "sensiolabs/security-checker", - "version": "v6.0.3", - "source": { - "type": "git", - "url": "https://github.com/sensiolabs/security-checker.git", - "reference": "a576c01520d9761901f269c4934ba55448be4a54" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/a576c01520d9761901f269c4934ba55448be4a54", - "reference": "a576c01520d9761901f269c4934ba55448be4a54", - "shasum": "" - }, - "require": { - "php": ">=7.1.3", - "symfony/console": "^2.8|^3.4|^4.2|^5.0", - "symfony/http-client": "^4.3|^5.0", - "symfony/mime": "^4.3|^5.0", - "symfony/polyfill-ctype": "^1.11" - }, - "bin": [ - "security-checker" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.0-dev" - } - }, - "autoload": { - "psr-4": { - "SensioLabs\\Security\\": "SensioLabs/Security" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien.potencier@gmail.com" - } - ], - "description": "A security checker for your composer.lock", - "time": "2019-11-01T13:20:14+00:00" - }, { "name": "smarty-gettext/smarty-gettext", "version": "1.6.1", @@ -6761,198 +6781,6 @@ "homepage": "https://symfony.com", "time": "2020-09-27T14:02:37+00:00" }, - { - "name": "symfony/http-client", - "version": "v5.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-client.git", - "reference": "aae28b613d7a88e529df46e617f046be0236ab54" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/aae28b613d7a88e529df46e617f046be0236ab54", - "reference": "aae28b613d7a88e529df46e617f046be0236ab54", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/log": "^1.0", - "symfony/http-client-contracts": "^2.1.1", - "symfony/polyfill-php73": "^1.11", - "symfony/polyfill-php80": "^1.15", - "symfony/service-contracts": "^1.0|^2" - }, - "provide": { - "php-http/async-client-implementation": "*", - "php-http/client-implementation": "*", - "psr/http-client-implementation": "1.0", - "symfony/http-client-implementation": "1.1" - }, - "require-dev": { - "amphp/http-client": "^4.2.1", - "amphp/http-tunnel": "^1.0", - "amphp/socket": "^1.1", - "guzzlehttp/promises": "^1.3.1", - "nyholm/psr7": "^1.0", - "php-http/httplug": "^1.0|^2.0", - "psr/http-client": "^1.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/http-kernel": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpClient\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony HttpClient component", - "homepage": "https://symfony.com", - "time": "2020-06-11T21:20:02+00:00" - }, - { - "name": "symfony/http-client-contracts", - "version": "v2.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "f8bed25edc964d015bcd87f1fec5734963931910" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/f8bed25edc964d015bcd87f1fec5734963931910", - "reference": "f8bed25edc964d015bcd87f1fec5734963931910", - "shasum": "" - }, - "require": { - "php": ">=7.2.5" - }, - "suggest": { - "symfony/http-client-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\HttpClient\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to HTTP clients", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "time": "2020-05-25T17:37:45+00:00" - }, - { - "name": "symfony/mime", - "version": "v5.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/mime.git", - "reference": "c0c418f05e727606e85b482a8591519c4712cf45" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/c0c418f05e727606e85b482a8591519c4712cf45", - "reference": "c0c418f05e727606e85b482a8591519c4712cf45", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.15" - }, - "conflict": { - "symfony/mailer": "<4.4" - }, - "require-dev": { - "egulias/email-validator": "^2.1.10", - "symfony/dependency-injection": "^4.4|^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Mime\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A library to manipulate MIME messages", - "homepage": "https://symfony.com", - "keywords": [ - "mime", - "mime-type" - ], - "time": "2020-06-09T15:07:35+00:00" - }, { "name": "symfony/options-resolver", "version": "v5.1.7", @@ -7129,12 +6957,12 @@ "version": "1.6.0", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", + "url": "https://github.com/webmozarts/assert.git", "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", "shasum": "" }, @@ -7186,6 +7014,5 @@ "platform-dev": [], "platform-overrides": { "php": "7.3.11" - }, - "plugin-api-version": "1.1.0" + } } From 5c0ed594f3674531f8e9cdb1c30292d5106e52ad Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sat, 6 Feb 2021 15:00:26 +0100 Subject: [PATCH 05/18] Debug bar --- classes/App.php | 14 +++++-- classes/Factory/DebugBarFactory.php | 46 ++++++++++++++++++++ classes/Factory/LoggerFactory.php | 11 +++-- classes/Factory/ViewFactory.php | 8 ++++ classes/Middleware/CspMiddleware.php | 10 +++-- composer.json | 1 + composer.lock | 63 +++++++++++++++++++++++++++- templates/inc/footer.tpl | 3 ++ templates/inc/head.tpl | 4 ++ 9 files changed, 149 insertions(+), 11 deletions(-) create mode 100644 classes/Factory/DebugBarFactory.php diff --git a/classes/App.php b/classes/App.php index a2b8434..551a2fa 100644 --- a/classes/App.php +++ b/classes/App.php @@ -8,6 +8,7 @@ use Alltube\Controller\JsonController; use Alltube\Exception\ConfigException; use Alltube\Exception\DependencyException; use Alltube\Factory\ConfigFactory; +use Alltube\Factory\DebugBarFactory; use Alltube\Factory\LocaleManagerFactory; use Alltube\Factory\LoggerFactory; use Alltube\Factory\SessionFactory; @@ -16,6 +17,7 @@ use Alltube\Middleware\CspMiddleware; use Alltube\Middleware\LinkHeaderMiddleware; use Alltube\Middleware\LocaleMiddleware; use Alltube\Middleware\RouterPathMiddleware; +use DebugBar\DebugBarException; use Slim\Container; use SmartyException; @@ -26,6 +28,7 @@ class App extends \Slim\App * @throws ConfigException * @throws DependencyException * @throws SmartyException + * @throws DebugBarException */ public function __construct() { @@ -43,12 +46,17 @@ class App extends \Slim\App // Locales. $container['locale'] = LocaleManagerFactory::create($container); - // Smarty. - $container['view'] = ViewFactory::create($container); - // Logger. $container['logger'] = LoggerFactory::create($container); + if ($container->get('config')->debug) { + // Debug bar. + $container['debugbar'] = DebugBarFactory::create($container); + } + + // Smarty. + $container['view'] = ViewFactory::create($container); + // Middlewares. $this->add(new LocaleMiddleware($container)); $this->add(new CspMiddleware($container)); diff --git a/classes/Factory/DebugBarFactory.php b/classes/Factory/DebugBarFactory.php new file mode 100644 index 0000000..adf3286 --- /dev/null +++ b/classes/Factory/DebugBarFactory.php @@ -0,0 +1,46 @@ +get('config'))); + + $debugBar->addCollector(new PhpInfoCollector()) + ->addCollector(new MessagesCollector()) + ->addCollector($requestCollector) + ->addCollector(new MemoryCollector()) + ->addCollector($configCollector); + + $container->get('logger')->add('debugbar', $debugBar->getCollector('messages')); + + $requestCollector->useHtmlVarDumper(); + $configCollector->useHtmlVarDumper(); + + return $debugBar; + } +} diff --git a/classes/Factory/LoggerFactory.php b/classes/Factory/LoggerFactory.php index fe85133..da52c1d 100644 --- a/classes/Factory/LoggerFactory.php +++ b/classes/Factory/LoggerFactory.php @@ -3,6 +3,7 @@ namespace Alltube\Factory; use Consolidation\Log\Logger; +use Consolidation\Log\LoggerManager; use Consolidation\Log\LogOutputStyler; use Slim\Container; use Symfony\Component\Console\Output\ConsoleOutput; @@ -16,9 +17,9 @@ class LoggerFactory /** * @param Container $container - * @return Logger + * @return LoggerManager */ - public static function create(Container $container): Logger + public static function create(Container $container): LoggerManager { $config = $container->get('config'); if ($config->debug) { @@ -27,9 +28,13 @@ class LoggerFactory $verbosity = ConsoleOutput::VERBOSITY_NORMAL; } + $loggerManager = new LoggerManager(); + $logger = new Logger(new ConsoleOutput($verbosity)); $logger->setLogOutputStyler(new LogOutputStyler()); - return $logger; + $loggerManager->add('default', $logger); + + return $loggerManager; } } diff --git a/classes/Factory/ViewFactory.php b/classes/Factory/ViewFactory.php index 1cc09e2..ffb1a7b 100644 --- a/classes/Factory/ViewFactory.php +++ b/classes/Factory/ViewFactory.php @@ -85,6 +85,14 @@ class ViewFactory $view->offsetSet('config', $container->get('config')); $view->offsetSet('domain', $uri->withBasePath('')->getBaseUrl()); + if ($container->has('debugbar')) { + $view->offsetSet( + 'debug_render', + $container->get('debugbar') + ->getJavascriptRenderer($uri->getBaseUrl() . '/vendor/maximebf/debugbar/src/DebugBar/Resources/') + ); + } + return $view; } } diff --git a/classes/Middleware/CspMiddleware.php b/classes/Middleware/CspMiddleware.php index 3449df3..88ecccf 100644 --- a/classes/Middleware/CspMiddleware.php +++ b/classes/Middleware/CspMiddleware.php @@ -37,7 +37,8 @@ class CspMiddleware public function applyHeader(Response $response): MessageInterface { $csp = new CSPBuilder(); - $csp->addDirective('default-src', []) + $csp->disableOldBrowserSupport() + ->addDirective('default-src', []) ->addDirective('font-src', ['self' => true]) ->addDirective('style-src', ['self' => true]) ->addDirective('manifest-src', ['self' => true]) @@ -47,9 +48,10 @@ class CspMiddleware ->addSource('img-src', '*'); if ($this->config->debug) { - // So symfony/debug and symfony/error-handler can work. - $csp->setDirective('script-src', ['unsafe-inline' => true]) - ->setDirective('style-src', ['self' => true, 'unsafe-inline' => true]); + // So maximebf/debugbar, symfony/debug and symfony/error-handler can work. + $csp->setDirective('script-src', ['self' => true, 'unsafe-inline' => true]) + ->setDirective('style-src', ['self' => true, 'unsafe-inline' => true]) + ->addSource('img-src', 'data:'); } return $csp->injectCSPHeader($response); diff --git a/composer.json b/composer.json index 9f2b878..884a1d3 100644 --- a/composer.json +++ b/composer.json @@ -44,6 +44,7 @@ "enlightn/security-checker": "^1.4", "ergebnis/composer-normalize": "^2.6", "insite/composer-dangling-locked-deps": "^0.2.1", + "maximebf/debugbar": "^1.16", "php-mock/php-mock-mockery": "^1.3", "phpro/grumphp": "^1.1", "phpstan/phpstan": "^0.12.25", diff --git a/composer.lock b/composer.lock index 540be18..d42376a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "aacbcefea720bab616e7236caa0ae3e7", + "content-hash": "8f0982143c6c873f68d41017e195387a", "packages": [ { "name": "aura/session", @@ -4181,6 +4181,67 @@ ], "time": "2019-12-17T07:42:37+00:00" }, + { + "name": "maximebf/debugbar", + "version": "v1.16.5", + "source": { + "type": "git", + "url": "https://github.com/maximebf/php-debugbar.git", + "reference": "6d51ee9e94cff14412783785e79a4e7ef97b9d62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/6d51ee9e94cff14412783785e79a4e7ef97b9d62", + "reference": "6d51ee9e94cff14412783785e79a4e7ef97b9d62", + "shasum": "" + }, + "require": { + "php": "^7.1|^8", + "psr/log": "^1.0", + "symfony/var-dumper": "^2.6|^3|^4|^5" + }, + "require-dev": { + "phpunit/phpunit": "^7.5.20 || ^9.4.2" + }, + "suggest": { + "kriswallsmith/assetic": "The best way to manage assets", + "monolog/monolog": "Log using Monolog", + "predis/predis": "Redis storage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.16-dev" + } + }, + "autoload": { + "psr-4": { + "DebugBar\\": "src/DebugBar/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maxime Bouroumeau-Fuseau", + "email": "maxime.bouroumeau@gmail.com", + "homepage": "http://maximebf.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Debug bar in the browser for php application", + "homepage": "https://github.com/maximebf/php-debugbar", + "keywords": [ + "debug", + "debugbar" + ], + "time": "2020-12-07T11:07:24+00:00" + }, { "name": "mockery/mockery", "version": "1.2.2", diff --git a/templates/inc/footer.tpl b/templates/inc/footer.tpl index 322e3e8..fe770c2 100644 --- a/templates/inc/footer.tpl +++ b/templates/inc/footer.tpl @@ -37,5 +37,8 @@ +{if isset($debug_render)} + {$debug_render->render()} +{/if} diff --git a/templates/inc/head.tpl b/templates/inc/head.tpl index d214316..4e5d68d 100644 --- a/templates/inc/head.tpl +++ b/templates/inc/head.tpl @@ -22,6 +22,10 @@ + + {if isset($debug_render)} + {$debug_render->renderHead()} + {/if}
From bba5090ec327a5aaaf7e233441e0240413c4c3fd Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sat, 6 Feb 2021 18:22:19 +0100 Subject: [PATCH 06/18] We can't be sure of the class of the logger --- classes/Controller/BaseController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Controller/BaseController.php b/classes/Controller/BaseController.php index f773bc1..164686e 100644 --- a/classes/Controller/BaseController.php +++ b/classes/Controller/BaseController.php @@ -11,8 +11,8 @@ use Alltube\Library\Downloader; use Alltube\Library\Video; use Alltube\LocaleManager; use Aura\Session\Segment; -use Consolidation\Log\Logger; use Psr\Container\ContainerInterface; +use Psr\Log\LoggerInterface; use Slim\Http\Request; use Slim\Http\Response; use Slim\Router; @@ -72,7 +72,7 @@ abstract class BaseController protected $downloader; /** - * @var Logger + * @var LoggerInterface */ protected $logger; From 9af922f3f1f49ed1ad84572dab10f97ee25f11c1 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sun, 7 Feb 2021 00:03:37 +0100 Subject: [PATCH 07/18] Add Smarty collector to debug bar --- classes/Factory/ViewFactory.php | 10 ++++++-- composer.json | 1 + composer.lock | 45 +++++++++++++++++++++++++++++++-- 3 files changed, 52 insertions(+), 4 deletions(-) diff --git a/classes/Factory/ViewFactory.php b/classes/Factory/ViewFactory.php index ffb1a7b..e941663 100644 --- a/classes/Factory/ViewFactory.php +++ b/classes/Factory/ViewFactory.php @@ -7,6 +7,7 @@ namespace Alltube\Factory; use Alltube\LocaleManager; +use Junker\DebugBar\Bridge\SmartyCollector; use Psr\Container\ContainerInterface; use Slim\Http\Request; use Slim\Http\Uri; @@ -86,10 +87,15 @@ class ViewFactory $view->offsetSet('domain', $uri->withBasePath('')->getBaseUrl()); if ($container->has('debugbar')) { + $debugBar = $container->get('debugbar'); + + $debugBar->addCollector(new SmartyCollector($view->getSmarty())); + $view->offsetSet( 'debug_render', - $container->get('debugbar') - ->getJavascriptRenderer($uri->getBaseUrl() . '/vendor/maximebf/debugbar/src/DebugBar/Resources/') + $debugBar->getJavascriptRenderer( + $uri->getBaseUrl() . '/vendor/maximebf/debugbar/src/DebugBar/Resources/' + ) ); } diff --git a/composer.json b/composer.json index 884a1d3..4b894d4 100644 --- a/composer.json +++ b/composer.json @@ -44,6 +44,7 @@ "enlightn/security-checker": "^1.4", "ergebnis/composer-normalize": "^2.6", "insite/composer-dangling-locked-deps": "^0.2.1", + "junker/debugbar-smarty": "dev-master", "maximebf/debugbar": "^1.16", "php-mock/php-mock-mockery": "^1.3", "phpro/grumphp": "^1.1", diff --git a/composer.lock b/composer.lock index d42376a..7929ca6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8f0982143c6c873f68d41017e195387a", + "content-hash": "ce151882c06d9b14d20fee47cb22be42", "packages": [ { "name": "aura/session", @@ -3999,6 +3999,45 @@ "description": "Detect dangling Composer locked dependencies", "time": "2020-11-16T13:45:00+00:00" }, + { + "name": "junker/debugbar-smarty", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/Junker/php-debugbar-smarty.git", + "reference": "82fb0d47799d2e030ecaa95cb16ad0ad53261e79" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Junker/php-debugbar-smarty/zipball/82fb0d47799d2e030ecaa95cb16ad0ad53261e79", + "reference": "82fb0d47799d2e030ecaa95cb16ad0ad53261e79", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Junker": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dmitry Kosenkov", + "email": "dk-junker@ya.ru" + } + ], + "description": "Smarty Collector for PHP DebugBar", + "keywords": [ + "PHP debugbar", + "collector", + "debugbar", + "smarty" + ], + "time": "2021-02-06T14:00:09+00:00" + }, { "name": "justinrainbow/json-schema", "version": "5.2.10", @@ -7064,7 +7103,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "junker/debugbar-smarty": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From 50fe879f16f7bcef6fb74305b3f20aec45796fc9 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sun, 7 Feb 2021 12:24:16 +0100 Subject: [PATCH 08/18] Add route info to debug bar --- classes/Factory/DebugBarFactory.php | 4 ++- composer.json | 1 + composer.lock | 49 ++++++++++++++++++++++++++++- 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/classes/Factory/DebugBarFactory.php b/classes/Factory/DebugBarFactory.php index adf3286..13070e5 100644 --- a/classes/Factory/DebugBarFactory.php +++ b/classes/Factory/DebugBarFactory.php @@ -9,6 +9,7 @@ use DebugBar\DataCollector\PhpInfoCollector; use DebugBar\DataCollector\RequestDataCollector; use DebugBar\DebugBar; use DebugBar\DebugBarException; +use Kitchenu\Debugbar\DataCollector\SlimRouteCollector; use Slim\Container; /** @@ -34,7 +35,8 @@ class DebugBarFactory ->addCollector(new MessagesCollector()) ->addCollector($requestCollector) ->addCollector(new MemoryCollector()) - ->addCollector($configCollector); + ->addCollector($configCollector) + ->addCollector(new SlimRouteCollector($container->get('router'), $container->get('request'))); $container->get('logger')->add('debugbar', $debugBar->getCollector('messages')); diff --git a/composer.json b/composer.json index 4b894d4..55f1fa6 100644 --- a/composer.json +++ b/composer.json @@ -45,6 +45,7 @@ "ergebnis/composer-normalize": "^2.6", "insite/composer-dangling-locked-deps": "^0.2.1", "junker/debugbar-smarty": "dev-master", + "kitchenu/slim-debugbar": "^1.1", "maximebf/debugbar": "^1.16", "php-mock/php-mock-mockery": "^1.3", "phpro/grumphp": "^1.1", diff --git a/composer.lock b/composer.lock index 7929ca6..4b2fe6a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ce151882c06d9b14d20fee47cb22be42", + "content-hash": "d67f3db130b0bdbf050c34630c130cab", "packages": [ { "name": "aura/session", @@ -4104,6 +4104,53 @@ ], "time": "2020-05-27T16:41:55+00:00" }, + { + "name": "kitchenu/slim-debugbar", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/kitchenu/Slim-DebugBar.git", + "reference": "906dcecd1f85239ef262312c276b1e8e5663ad50" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kitchenu/Slim-DebugBar/zipball/906dcecd1f85239ef262312c276b1e8e5663ad50", + "reference": "906dcecd1f85239ef262312c276b1e8e5663ad50", + "shasum": "" + }, + "require": { + "maximebf/debugbar": "^1.12.0", + "php": ">=5.5.0", + "psr/http-message": "^1.0", + "slim/slim": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Kitchenu\\Debugbar\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitchenu" + } + ], + "description": "PHP Debugbar integration for Slim 3", + "keywords": [ + "debug", + "debugbar", + "framework", + "slim" + ], + "time": "2018-07-29T16:58:54+00:00" + }, { "name": "league/container", "version": "2.4.1", From 36ba1474303cfbf23a1f2a541c1acc3711db54e7 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sun, 7 Feb 2021 12:42:03 +0100 Subject: [PATCH 09/18] phpstan update --- classes/Stream/PlaylistArchiveStream.php | 9 ++++++++- composer.json | 2 +- composer.lock | 14 +++++++------- tests/UglyRouterTest.php | 13 +++++++++++-- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/classes/Stream/PlaylistArchiveStream.php b/classes/Stream/PlaylistArchiveStream.php index 065a57b..5c9ed4a 100644 --- a/classes/Stream/PlaylistArchiveStream.php +++ b/classes/Stream/PlaylistArchiveStream.php @@ -301,7 +301,14 @@ class PlaylistArchiveStream extends ZipArchive implements StreamInterface } } else { // Start streaming the first video. - $this->startVideoStream(current($this->videos)); + $video = current($this->videos); + if ($video) { + $this->startVideoStream($video); + } else { + $this->push_error('Playlist was empty'); + $this->finish(); + $this->isComplete = true; + } } } diff --git a/composer.json b/composer.json index 55f1fa6..33b47b8 100644 --- a/composer.json +++ b/composer.json @@ -49,7 +49,7 @@ "maximebf/debugbar": "^1.16", "php-mock/php-mock-mockery": "^1.3", "phpro/grumphp": "^1.1", - "phpstan/phpstan": "^0.12.25", + "phpstan/phpstan": "^0.12.72", "phpunit/phpunit": "^8.4", "smarty-gettext/smarty-gettext": "^1.6", "squizlabs/php_codesniffer": "^3.5", diff --git a/composer.lock b/composer.lock index 4b2fe6a..c5245d5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d67f3db130b0bdbf050c34630c130cab", + "content-hash": "92c9a9ffac023cb7e7d0d1603a3e0d65", "packages": [ { "name": "aura/session", @@ -5247,20 +5247,20 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.25", + "version": "0.12.72", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "9619551d68b2d4c0d681a8df73f3c847c798ee64" + "reference": "ae32fb1c5e97979f424c3ccec4ee435a35754769" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9619551d68b2d4c0d681a8df73f3c847c798ee64", - "reference": "9619551d68b2d4c0d681a8df73f3c847c798ee64", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ae32fb1c5e97979f424c3ccec4ee435a35754769", + "reference": "ae32fb1c5e97979f424c3ccec4ee435a35754769", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -5285,7 +5285,7 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", - "time": "2020-05-10T20:36:16+00:00" + "time": "2021-02-06T18:34:03+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/tests/UglyRouterTest.php b/tests/UglyRouterTest.php index a70fc98..f0f9f79 100644 --- a/tests/UglyRouterTest.php +++ b/tests/UglyRouterTest.php @@ -37,7 +37,16 @@ class UglyRouterTest extends ContainerTest parent::setUp(); $this->router = new UglyRouter(); - $this->router->map(['GET'], '/foo', 'print')->setName('foo'); + $this->router->map(['GET'], '/foo', [$this, 'fakeHandler'])->setName('foo'); + } + + /** + * Empty function that only exists so that our route can have a handler. + * + * @return void + */ + private function fakeHandler() + { } /** @@ -54,7 +63,7 @@ class UglyRouterTest extends ContainerTest Environment::mock( [ 'REQUEST_METHOD' => 'GET', - 'QUERY_STRING' => 'page=foo', + 'QUERY_STRING' => 'page=foo', ] ) ) From 9a27e7764a019b393c314feee539999ebd7924a9 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sun, 7 Feb 2021 13:40:02 +0100 Subject: [PATCH 10/18] Upgrade grumphp to 1.3 In order to use the new securitychecker_enlightn task --- composer.json | 2 +- composer.lock | 227 +++++++++++++++++++++----------------------------- grumphp.yml | 2 +- 3 files changed, 99 insertions(+), 132 deletions(-) diff --git a/composer.json b/composer.json index 33b47b8..09fe502 100644 --- a/composer.json +++ b/composer.json @@ -48,7 +48,7 @@ "kitchenu/slim-debugbar": "^1.1", "maximebf/debugbar": "^1.16", "php-mock/php-mock-mockery": "^1.3", - "phpro/grumphp": "^1.1", + "phpro/grumphp": "^1.3", "phpstan/phpstan": "^0.12.72", "phpunit/phpunit": "^8.4", "smarty-gettext/smarty-gettext": "^1.6", diff --git a/composer.lock b/composer.lock index c5245d5..62a80af 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "92c9a9ffac023cb7e7d0d1603a3e0d65", + "content-hash": "23e282a60abf091cf5171fa3628de398", "packages": [ { "name": "aura/session", @@ -1399,16 +1399,16 @@ }, { "name": "symfony/console", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "d62ec79478b55036f65e2602e282822b8eaaff0a" + "reference": "89d4b176d12a2946a1ae4e34906a025b7b6b135a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/d62ec79478b55036f65e2602e282822b8eaaff0a", - "reference": "d62ec79478b55036f65e2602e282822b8eaaff0a", + "url": "https://api.github.com/repos/symfony/console/zipball/89d4b176d12a2946a1ae4e34906a025b7b6b135a", + "reference": "89d4b176d12a2946a1ae4e34906a025b7b6b135a", "shasum": "" }, "require": { @@ -1475,7 +1475,7 @@ "console", "terminal" ], - "time": "2021-01-27T10:15:41+00:00" + "time": "2021-01-28T22:06:19+00:00" }, { "name": "symfony/finder", @@ -2041,16 +2041,16 @@ }, { "name": "symfony/process", - "version": "v5.1.7", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "d3a2e64866169586502f0cd9cab69135ad12cee9" + "reference": "313a38f09c77fbcdc1d223e57d368cea76a2fd2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/d3a2e64866169586502f0cd9cab69135ad12cee9", - "reference": "d3a2e64866169586502f0cd9cab69135ad12cee9", + "url": "https://api.github.com/repos/symfony/process/zipball/313a38f09c77fbcdc1d223e57d368cea76a2fd2f", + "reference": "313a38f09c77fbcdc1d223e57d368cea76a2fd2f", "shasum": "" }, "require": { @@ -2058,11 +2058,6 @@ "symfony/polyfill-php80": "^1.15" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" @@ -2085,9 +2080,9 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", - "time": "2020-09-02T16:23:27+00:00" + "time": "2021-01-27T10:15:41+00:00" }, { "name": "symfony/service-contracts", @@ -2153,7 +2148,7 @@ }, { "name": "symfony/string", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", @@ -2486,16 +2481,16 @@ "packages-dev": [ { "name": "amphp/amp", - "version": "v2.5.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "f220a51458bf4dd0dedebb171ac3457813c72bbc" + "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/f220a51458bf4dd0dedebb171ac3457813c72bbc", - "reference": "f220a51458bf4dd0dedebb171ac3457813c72bbc", + "url": "https://api.github.com/repos/amphp/amp/zipball/efca2b32a7580087adb8aabbff6be1dc1bb924a9", + "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9", "shasum": "" }, "require": { @@ -2560,7 +2555,7 @@ "non-blocking", "promise" ], - "time": "2020-07-14T21:47:18+00:00" + "time": "2021-01-10T17:06:37+00:00" }, { "name": "amphp/byte-stream", @@ -2694,21 +2689,21 @@ }, { "name": "amphp/parallel-functions", - "version": "v0.1.3", + "version": "v1.0.0", "source": { "type": "git", "url": "https://github.com/amphp/parallel-functions.git", - "reference": "12e6c602e067b02f78ddf5b720c17e9aa01ad4b4" + "reference": "af9795d51abfafc3676cbe7e17965479491abaad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel-functions/zipball/12e6c602e067b02f78ddf5b720c17e9aa01ad4b4", - "reference": "12e6c602e067b02f78ddf5b720c17e9aa01ad4b4", + "url": "https://api.github.com/repos/amphp/parallel-functions/zipball/af9795d51abfafc3676cbe7e17965479491abaad", + "reference": "af9795d51abfafc3676cbe7e17965479491abaad", "shasum": "" }, "require": { "amphp/amp": "^2.0.3", - "amphp/parallel": "^0.1.8 || ^0.2 || ^1", + "amphp/parallel": "^1.1", "opis/closure": "^3.0.7", "php": ">=7" }, @@ -2737,7 +2732,7 @@ } ], "description": "Parallel processing made simple.", - "time": "2018-10-28T15:29:02+00:00" + "time": "2020-07-10T17:05:35+00:00" }, { "name": "amphp/parser", @@ -3759,16 +3754,16 @@ }, { "name": "gitonomy/gitlib", - "version": "v1.2.2", + "version": "v1.2.3", "source": { "type": "git", "url": "https://github.com/gitonomy/gitlib.git", - "reference": "d1fe4676bf1347c08dec84a14a4c5e7110740d72" + "reference": "d22f212b97fdb631ac73dfae65c194dc4cb0d227" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/gitonomy/gitlib/zipball/d1fe4676bf1347c08dec84a14a4c5e7110740d72", - "reference": "d1fe4676bf1347c08dec84a14a4c5e7110740d72", + "url": "https://api.github.com/repos/gitonomy/gitlib/zipball/d22f212b97fdb631ac73dfae65c194dc4cb0d227", + "reference": "d22f212b97fdb631ac73dfae65c194dc4cb0d227", "shasum": "" }, "require": { @@ -3815,7 +3810,7 @@ } ], "description": "Library for accessing git", - "time": "2020-07-30T14:54:11+00:00" + "time": "2020-12-29T16:48:45+00:00" }, { "name": "grasmash/expander", @@ -4395,16 +4390,16 @@ }, { "name": "monolog/monolog", - "version": "2.1.1", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5" + "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f9eee5cec93dfb313a38b6b288741e84e53f02d5", - "reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1cb1cde8e8dd0f70cc0fe51354a59acad9302084", + "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084", "shasum": "" }, "require": { @@ -4417,16 +4412,17 @@ "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^6.0", + "elasticsearch/elasticsearch": "^7", "graylog2/gelf-php": "^1.4.2", + "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", - "php-parallel-lint/php-parallel-lint": "^1.0", "phpspec/prophecy": "^1.6.1", + "phpstan/phpstan": "^0.12.59", "phpunit/phpunit": "^8.5", "predis/predis": "^1.1", "rollbar/rollbar": "^1.3", - "ruflin/elastica": ">=0.90 <3.0", + "ruflin/elastica": ">=0.90 <7.0.1", "swiftmailer/swiftmailer": "^5.3|^6.0" }, "suggest": { @@ -4446,7 +4442,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-main": "2.x-dev" } }, "autoload": { @@ -4462,17 +4458,17 @@ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "homepage": "https://seld.be" } ], "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", + "homepage": "https://github.com/Seldaek/monolog", "keywords": [ "log", "logging", "psr-3" ], - "time": "2020-07-23T08:41:23+00:00" + "time": "2020-12-14T13:15:25+00:00" }, { "name": "myclabs/deep-copy", @@ -4592,16 +4588,16 @@ }, { "name": "opis/closure", - "version": "3.6.0", + "version": "3.6.1", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "c547f8262a5fa9ff507bd06cc394067b83a75085" + "reference": "943b5d70cc5ae7483f6aff6ff43d7e34592ca0f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/c547f8262a5fa9ff507bd06cc394067b83a75085", - "reference": "c547f8262a5fa9ff507bd06cc394067b83a75085", + "url": "https://api.github.com/repos/opis/closure/zipball/943b5d70cc5ae7483f6aff6ff43d7e34592ca0f5", + "reference": "943b5d70cc5ae7483f6aff6ff43d7e34592ca0f5", "shasum": "" }, "require": { @@ -4649,7 +4645,7 @@ "serialization", "serialize" ], - "time": "2020-10-11T21:42:15+00:00" + "time": "2020-11-07T02:01:34+00:00" }, { "name": "phar-io/manifest", @@ -5073,22 +5069,22 @@ }, { "name": "phpro/grumphp", - "version": "v1.1.0", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/phpro/grumphp.git", - "reference": "8c0b39169ea83e6c7bdd3573ba351dd0d52a42fa" + "reference": "7df8f36481b9cdb5b21fedb1cdb2999234eac3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpro/grumphp/zipball/8c0b39169ea83e6c7bdd3573ba351dd0d52a42fa", - "reference": "8c0b39169ea83e6c7bdd3573ba351dd0d52a42fa", + "url": "https://api.github.com/repos/phpro/grumphp/zipball/7df8f36481b9cdb5b21fedb1cdb2999234eac3e5", + "reference": "7df8f36481b9cdb5b21fedb1cdb2999234eac3e5", "shasum": "" }, "require": { "amphp/amp": "^2.4", "amphp/parallel": "^1.4", - "amphp/parallel-functions": "^0.1.3", + "amphp/parallel-functions": "^1.0", "composer-plugin-api": "~1.0 || ~2.0", "doctrine/collections": "^1.6.7", "ext-json": "*", @@ -5096,7 +5092,7 @@ "monolog/monolog": "~1.16 || ^2.0", "ondram/ci-detector": "^3.5", "opis/closure": "^3.5", - "php": "^7.3", + "php": "^7.3 || ^8.0", "psr/container": "^1.0", "seld/jsonlint": "~1.1", "symfony/config": "~4.4 || ~5.0", @@ -5111,8 +5107,8 @@ "symfony/yaml": "~4.4 || ~5.0" }, "require-dev": { - "brianium/paratest": "^4.1", - "composer/composer": "~1.9 || ^2.0@dev", + "brianium/paratest": "^6.1.1", + "composer/composer": "^1.10.11 || ^2.0.1", "nikic/php-parser": "~4.0", "php-parallel-lint/php-parallel-lint": "^1.2", "phpspec/phpspec": "^6.2", @@ -5127,6 +5123,7 @@ "consolidation/robo": "Lets GrumPHP run your automated PHP tasks.", "designsecurity/progpilot": "Lets GrumPHP be sure that there are no vulnerabilities in your code.", "doctrine/orm": "Lets GrumPHP validate your Doctrine mapping files.", + "enlightn/security-checker": "Lets GrumPHP be sure that there are no known security issues.", "ergebnis/composer-normalize": "Lets GrumPHP tidy and normalize your composer.json file.", "friendsofphp/php-cs-fixer": "Lets GrumPHP automatically fix your codestyle.", "friendsoftwig/twigcs": "Lets GrumPHP check Twig coding standard.", @@ -5146,7 +5143,6 @@ "povils/phpmnd": "Lets GrumPHP help you detect magic numbers in PHP code.", "roave/security-advisories": "Lets GrumPHP be sure that there are no known security issues.", "sebastian/phpcpd": "Lets GrumPHP find duplicated code.", - "sensiolabs/security-checker": "Lets GrumPHP be sure that there are no known security issues.", "squizlabs/php_codesniffer": "Lets GrumPHP sniff on your code.", "sstalle/php7cc": "Lets GrumPHP check PHP 5.3 - 5.6 code compatibility with PHP 7.", "symfony/phpunit-bridge": "Lets GrumPHP run your unit tests with the phpunit-bridge of Symfony.", @@ -5180,7 +5176,7 @@ } ], "description": "A composer plugin that enables source code quality checks.", - "time": "2020-10-30T11:36:42+00:00" + "time": "2021-02-04T06:26:46+00:00" }, { "name": "phpspec/prophecy", @@ -6286,16 +6282,16 @@ }, { "name": "seld/jsonlint", - "version": "1.8.2", + "version": "1.8.3", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "590cfec960b77fd55e39b7d9246659e95dd6d337" + "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/590cfec960b77fd55e39b7d9246659e95dd6d337", - "reference": "590cfec960b77fd55e39b7d9246659e95dd6d337", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57", + "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57", "shasum": "" }, "require": { @@ -6331,7 +6327,7 @@ "parser", "validator" ], - "time": "2020-08-25T06:56:57+00:00" + "time": "2020-11-11T09:19:24+00:00" }, { "name": "smarty-gettext/smarty-gettext", @@ -6441,16 +6437,16 @@ }, { "name": "symfony/config", - "version": "v5.1.7", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "6ad8be6e1280f6734150d8a04a9160dd34ceb191" + "reference": "50e0e1314a3b2609d32b6a5a0d0fb5342494c4ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/6ad8be6e1280f6734150d8a04a9160dd34ceb191", - "reference": "6ad8be6e1280f6734150d8a04a9160dd34ceb191", + "url": "https://api.github.com/repos/symfony/config/zipball/50e0e1314a3b2609d32b6a5a0d0fb5342494c4ab", + "reference": "50e0e1314a3b2609d32b6a5a0d0fb5342494c4ab", "shasum": "" }, "require": { @@ -6474,11 +6470,6 @@ "symfony/yaml": "To use the yaml reference dumper" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Config\\": "" @@ -6501,22 +6492,22 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Config Component", + "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", - "time": "2020-09-02T16:23:27+00:00" + "time": "2021-01-27T10:15:41+00:00" }, { "name": "symfony/dependency-injection", - "version": "v5.1.7", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "2dea4a3ef2eb79138354c1d49e9372cc921af20b" + "reference": "62f72187be689540385dce6c68a5d4c16f034139" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/2dea4a3ef2eb79138354c1d49e9372cc921af20b", - "reference": "2dea4a3ef2eb79138354c1d49e9372cc921af20b", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/62f72187be689540385dce6c68a5d4c16f034139", + "reference": "62f72187be689540385dce6c68a5d4c16f034139", "shasum": "" }, "require": { @@ -6549,11 +6540,6 @@ "symfony/yaml": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\DependencyInjection\\": "" @@ -6576,9 +6562,9 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony DependencyInjection Component", + "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", - "time": "2020-10-01T12:14:45+00:00" + "time": "2021-01-27T12:56:27+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6632,16 +6618,16 @@ }, { "name": "symfony/dotenv", - "version": "v5.1.7", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/dotenv.git", - "reference": "f406eaad1231415bf753fbef5aef267a787af4e5" + "reference": "783f12027c6b40ab0e93d6136d9f642d1d67cd6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dotenv/zipball/f406eaad1231415bf753fbef5aef267a787af4e5", - "reference": "f406eaad1231415bf753fbef5aef267a787af4e5", + "url": "https://api.github.com/repos/symfony/dotenv/zipball/783f12027c6b40ab0e93d6136d9f642d1d67cd6b", + "reference": "783f12027c6b40ab0e93d6136d9f642d1d67cd6b", "shasum": "" }, "require": { @@ -6652,11 +6638,6 @@ "symfony/process": "^4.4|^5.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Dotenv\\": "" @@ -6686,7 +6667,7 @@ "env", "environment" ], - "time": "2020-09-02T16:23:27+00:00" + "time": "2021-01-27T10:01:46+00:00" }, { "name": "symfony/error-handler", @@ -6745,16 +6726,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v5.1.7", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "d5de97d6af175a9e8131c546db054ca32842dd0f" + "reference": "4f9760f8074978ad82e2ce854dff79a71fe45367" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d5de97d6af175a9e8131c546db054ca32842dd0f", - "reference": "d5de97d6af175a9e8131c546db054ca32842dd0f", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4f9760f8074978ad82e2ce854dff79a71fe45367", + "reference": "4f9760f8074978ad82e2ce854dff79a71fe45367", "shasum": "" }, "require": { @@ -6785,11 +6766,6 @@ "symfony/http-kernel": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" @@ -6812,9 +6788,9 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony EventDispatcher Component", + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", - "time": "2020-09-18T14:27:32+00:00" + "time": "2021-01-27T10:36:42+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -6880,16 +6856,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.1.7", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "1a8697545a8d87b9f2f6b1d32414199cc5e20aae" + "reference": "262d033b57c73e8b59cd6e68a45c528318b15038" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/1a8697545a8d87b9f2f6b1d32414199cc5e20aae", - "reference": "1a8697545a8d87b9f2f6b1d32414199cc5e20aae", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/262d033b57c73e8b59cd6e68a45c528318b15038", + "reference": "262d033b57c73e8b59cd6e68a45c528318b15038", "shasum": "" }, "require": { @@ -6897,11 +6873,6 @@ "symfony/polyfill-ctype": "~1.8" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Filesystem\\": "" @@ -6924,35 +6895,31 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Filesystem Component", + "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", - "time": "2020-09-27T14:02:37+00:00" + "time": "2021-01-27T10:01:46+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.1.7", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "4c7e155bf7d93ea4ba3824d5a14476694a5278dd" + "reference": "5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4c7e155bf7d93ea4ba3824d5a14476694a5278dd", - "reference": "4c7e155bf7d93ea4ba3824d5a14476694a5278dd", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce", + "reference": "5d0f633f9bbfcf7ec642a2b5037268e61b0a62ce", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php73": "~1.0", "symfony/polyfill-php80": "^1.15" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\OptionsResolver\\": "" @@ -6975,14 +6942,14 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony OptionsResolver Component", + "description": "Provides an improved replacement for the array_replace PHP function", "homepage": "https://symfony.com", "keywords": [ "config", "configuration", "options" ], - "time": "2020-09-27T03:44:28+00:00" + "time": "2021-01-27T12:56:27+00:00" }, { "name": "symfony/var-dumper", diff --git a/grumphp.yml b/grumphp.yml index 52e357b..9ae9c11 100644 --- a/grumphp.yml +++ b/grumphp.yml @@ -10,7 +10,7 @@ grumphp: xmllint: ~ yamllint: ~ composer: ~ - securitychecker: ~ + securitychecker_enlightn: ~ composer_normalize: ~ composer_dangling_locked_deps: ~ phpcs: From f2be3a7e5b40ca38bfbdf1fcb702938a32715cf4 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 9 Feb 2021 22:17:29 +0100 Subject: [PATCH 11/18] Use relative paths on debug error page --- classes/App.php | 15 +++++++++++++++ classes/Controller/FrontController.php | 2 +- classes/ErrorHandler.php | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/classes/App.php b/classes/App.php index 551a2fa..3d352b9 100644 --- a/classes/App.php +++ b/classes/App.php @@ -37,6 +37,8 @@ class App extends \Slim\App /** @var Container $container */ $container = $this->getContainer(); + $container['root_path'] = $this->getRootPath(); + // Config. $container['config'] = ConfigFactory::create($container); @@ -110,4 +112,17 @@ class App extends \Slim\App [$jsonController, 'json'] )->setName('json'); } + + /** + * @return string|null + */ + private function getRootPath(): ?string + { + // realpath() can return false but we prefer using null. + if ($rootPath = realpath(__DIR__ . '/../')) { + return $rootPath; + } + + return null; + } } diff --git a/classes/Controller/FrontController.php b/classes/Controller/FrontController.php index e091705..c8c4b45 100644 --- a/classes/Controller/FrontController.php +++ b/classes/Controller/FrontController.php @@ -285,7 +285,7 @@ class FrontController extends BaseController $response = $cspMiddleware->applyHeader($response); if ($this->config->debug) { - $renderer = new HtmlErrorRenderer(true); + $renderer = new HtmlErrorRenderer(true, null, null, $this->container->get('root_path')); $exception = $renderer->render($error); $response->getBody()->write($exception->getAsString()); diff --git a/classes/ErrorHandler.php b/classes/ErrorHandler.php index 4111da9..ec52bbc 100644 --- a/classes/ErrorHandler.php +++ b/classes/ErrorHandler.php @@ -23,7 +23,7 @@ class ErrorHandler if (class_exists(HtmlErrorRenderer::class)) { // If dev dependencies are loaded, we can use symfony/error-handler. - $renderer = new HtmlErrorRenderer(true); + $renderer = new HtmlErrorRenderer(true, null, null, dirname(__DIR__)); $exception = $renderer->render($e); http_response_code($exception->getStatusCode()); From 1e17dff21e9f8ac174eebf84027d93898f2243ce Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 9 Feb 2021 22:35:32 +0100 Subject: [PATCH 12/18] Use the new root_path service to make some code more portable --- classes/Factory/ConfigFactory.php | 2 +- classes/Factory/ViewFactory.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Factory/ConfigFactory.php b/classes/Factory/ConfigFactory.php index c408b0e..beab456 100644 --- a/classes/Factory/ConfigFactory.php +++ b/classes/Factory/ConfigFactory.php @@ -22,7 +22,7 @@ class ConfigFactory */ public static function create(Container $container): Config { - $configPath = __DIR__ . '/../../config/config.yml'; + $configPath = $container->get('root_path') . '/config/config.yml'; if (is_file($configPath)) { $config = Config::fromFile($configPath); } else { diff --git a/classes/Factory/ViewFactory.php b/classes/Factory/ViewFactory.php index e941663..591369d 100644 --- a/classes/Factory/ViewFactory.php +++ b/classes/Factory/ViewFactory.php @@ -52,7 +52,7 @@ class ViewFactory $request = $container->get('request'); } - $view = new Smarty(__DIR__ . '/../../templates/'); + $view = new Smarty($container->get('root_path') . '/templates/'); /** @var Uri $uri */ $uri = $request->getUri(); From 3cfd450258e9400973082254763837c9546fb6f7 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Thu, 11 Feb 2021 19:36:11 +0100 Subject: [PATCH 13/18] Use a stable release of debugbar-smarty --- composer.json | 2 +- composer.lock | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index 09fe502..fa7bcf3 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ "enlightn/security-checker": "^1.4", "ergebnis/composer-normalize": "^2.6", "insite/composer-dangling-locked-deps": "^0.2.1", - "junker/debugbar-smarty": "dev-master", + "junker/debugbar-smarty": "^0.1.0", "kitchenu/slim-debugbar": "^1.1", "maximebf/debugbar": "^1.16", "php-mock/php-mock-mockery": "^1.3", diff --git a/composer.lock b/composer.lock index 62a80af..3f41608 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "23e282a60abf091cf5171fa3628de398", + "content-hash": "0a9125b1ada00d075fb697f43816a054", "packages": [ { "name": "aura/session", @@ -3996,16 +3996,16 @@ }, { "name": "junker/debugbar-smarty", - "version": "dev-master", + "version": "0.1.0", "source": { "type": "git", "url": "https://github.com/Junker/php-debugbar-smarty.git", - "reference": "82fb0d47799d2e030ecaa95cb16ad0ad53261e79" + "reference": "cf43c79e25770884cf22036ee461b8585588cd19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Junker/php-debugbar-smarty/zipball/82fb0d47799d2e030ecaa95cb16ad0ad53261e79", - "reference": "82fb0d47799d2e030ecaa95cb16ad0ad53261e79", + "url": "https://api.github.com/repos/Junker/php-debugbar-smarty/zipball/cf43c79e25770884cf22036ee461b8585588cd19", + "reference": "cf43c79e25770884cf22036ee461b8585588cd19", "shasum": "" }, "type": "library", @@ -4031,7 +4031,7 @@ "debugbar", "smarty" ], - "time": "2021-02-06T14:00:09+00:00" + "time": "2021-02-10T07:02:47+00:00" }, { "name": "justinrainbow/json-schema", @@ -7117,9 +7117,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "junker/debugbar-smarty": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From 104a866188d78917f60d958828ee0de49b68ad5d Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Mon, 22 Feb 2021 21:10:29 +0100 Subject: [PATCH 14/18] Japanese translation --- i18n/ja_JP/LC_MESSAGES/Alltube.po | 216 ++++++++++++++++++++++++++++++ 1 file changed, 216 insertions(+) create mode 100644 i18n/ja_JP/LC_MESSAGES/Alltube.po diff --git a/i18n/ja_JP/LC_MESSAGES/Alltube.po b/i18n/ja_JP/LC_MESSAGES/Alltube.po new file mode 100644 index 0000000..08b47ae --- /dev/null +++ b/i18n/ja_JP/LC_MESSAGES/Alltube.po @@ -0,0 +1,216 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8\n" + +#: templates/inc/footer.tpl:8 +msgid "Code by @dev" +msgstr "作成: @dev" + +#: templates/inc/footer.tpl:16 +msgid "Design by @designer" +msgstr "デザイン: @designer" + +#: templates/inc/footer.tpl:21 +msgid "Get the code" +msgstr "ソースコード" + +#: templates/inc/footer.tpl:29 +msgid "Based on @youtubedl" +msgstr "このソフトは@youtubedlを基に作成されています。" + +#: templates/inc/footer.tpl:33 +msgid "Donate using Liberapay" +msgstr "Liberapayで寄付" + +#: templates/inc/footer.tpl:35 +msgid "Donate" +msgstr "寄付" + +#: templates/inc/header.tpl:4 +msgid "Switch language" +msgstr "言語の変更" + +#: templates/inc/header.tpl:8 +msgid "Set language" +msgstr "言語を設定" + +#: templates/info.tpl:11 +msgid "You are going to download @title." +msgstr "ダウンロードの対象: @title." + +#: templates/info.tpl:29 +msgid "Available formats:" +msgstr "ダウンロード可能な形式" + +#: templates/info.tpl:31 +msgid "Generic formats" +msgstr "一般的な形式" + +#: templates/info.tpl:35 +msgid "Best" +msgstr "最高品質" + +#: templates/info.tpl:36 +msgid "Remux best video with best audio" +msgstr "最高品質に再エンコード" + +#: templates/info.tpl:37 +msgid "Worst" +msgstr "最低品質" + +#: templates/info.tpl:42 +msgid "Detailed formats" +msgstr "形式の一覧" + +#: templates/info.tpl:86 +msgid "Stream the video through the server" +msgstr "ビデオをサーバーに設置" + +#: templates/info.tpl:92 +msgid "Convert into a custom format:" +msgstr "指定した形式への変換" + +#: templates/info.tpl:93 +msgid "Custom format" +msgstr "カスタム形式" + +#: templates/info.tpl:93 +msgid "Format to convert to" +msgstr "形式を変換" + +#: templates/info.tpl:98 +msgid "with" +msgstr "と" + +#: templates/info.tpl:99 +msgid "Bit rate" +msgstr "ビットレート" + +#: templates/info.tpl:100 +msgid "Custom bitrate" +msgstr "カスタム・ビットレート" + +#: templates/info.tpl:103 +msgid "kbit/s audio" +msgstr "kbps 音声" + +#: templates/info.tpl:107 templates/playlist.tpl:38 templates/password.tpl:11 +#: templates/index.tpl:19 +msgid "Download" +msgstr "ダウンロード" + +#: templates/playlist.tpl:12 +msgid "Videos extracted from @title:" +msgstr "デコードの対象:" + +#: templates/playlist.tpl:39 +msgid "More options" +msgstr "詳細設定" + +#: templates/extractors.tpl:4 classes/Controller/FrontController.php:111 +msgid "Supported websites" +msgstr "ダウンロード可能なサイト" + +#: templates/error.tpl:5 +msgid "An error occurred" +msgstr "エラーが発生しました" + +#: templates/password.tpl:5 +msgid "This video is protected" +msgstr "このビデオには制限がかかっています。" + +#: templates/password.tpl:6 +msgid "You need a password in order to download this video." +msgstr "このビデオをダウンロードするにはパスワードが必要です。" + +#: templates/password.tpl:8 +msgid "Video password" +msgstr "閲覧用パスワード" + +#: templates/index.tpl:8 +msgid "Copy here the URL of your video (YouTube, Dailymotion, etc.)" +msgstr "動画のリンク(URL)を入力欄に入力してください。(例:Youtube,Dailymotion等。)" + +#: templates/index.tpl:25 +msgid "Audio only (MP3)" +msgstr "音声のみのダウンロード(mp3形式)" + +#: templates/index.tpl:29 +msgid "From" +msgstr "から" + +#: templates/index.tpl:32 +msgid "to" +msgstr "へ" + +#: templates/index.tpl:41 +msgid "See all supported websites" +msgstr "ダウンロード可能なサイトの一覧" + +#: templates/index.tpl:43 +msgid "Drag this to your bookmarks bar:" +msgstr "ブックマークに登録" + +#: templates/index.tpl:45 +msgid "Bookmarklet" +msgstr "ブックマークボタン" + +#: classes/Controller/DownloadController.php:64 +#: classes/Controller/FrontController.php:166 +msgid "Wrong password" +msgstr "パスワードが間違っています。" + +#: classes/Controller/DownloadController.php:69 +msgid "Conversion of playlists is not supported." +msgstr "プレイリストの読み出しに失敗しました。非対応の形式です。" + +#: classes/Controller/DownloadController.php:76 +msgid "Conversion of M3U8 files is not supported." +msgstr "HLS(m3u8)プレイリストファイルの読み出しに失敗しました。非対応の形式です。" + +#: classes/Controller/DownloadController.php:82 +msgid "Conversion of DASH segments is not supported." +msgstr "MPEG DASHストリーミングは非対応の形式です。" + +#: classes/Controller/FrontController.php:65 +msgid "" +"Easily download videos from YouTube, Dailymotion, Vimeo and other websites." +msgstr "Youtubeから動画を簡単にダウンロード!、DailymotionやVimeo等にも対応しております。" + +#: classes/Controller/FrontController.php:112 +msgid "" +"List of all supported websites from which AllTube Download can extract video " +"or audio files" +msgstr "AllTubeでダウンロードに対応している音声または動画ファイルのサイト" + +#: classes/Controller/FrontController.php:138 +msgid "Password prompt" +msgstr "パスワード画面" + +#: classes/Controller/FrontController.php:140 +msgid "" +"You need a password in order to download this video with AllTube Download" +msgstr "" + +#: classes/Controller/FrontController.php:174 +msgid "Video download" +msgstr "動画ダウンロード" + +#: classes/Controller/FrontController.php:176 +msgid "Download video from @extractor" +msgstr "@extractor からダウンロードします。" + +#: classes/Controller/FrontController.php:182 +msgid "Download @title from @extractor" +msgstr "@extractor から @title をダウンロードします" + +#: classes/Controller/FrontController.php:255 +msgid "Error" +msgstr "エラーが発生しました。" + +#: classes/Controller/FrontController.php:271 +msgid "Page not found" +msgstr "このページは存在しません。" + +#: classes/Controller/FrontController.php:282 +msgid "Method not allowed" +msgstr "パラメーターが誤っています。" From 9688244285dcfef11ae0bbf872d02b6224f483dc Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Mon, 22 Feb 2021 21:12:23 +0100 Subject: [PATCH 15/18] Remove donation links --- README.md | 2 -- resources/FAQ.md | 1 - templates/inc/footer.tpl | 7 ------- 3 files changed, 10 deletions(-) diff --git a/README.md b/README.md index 90cc05e..9e0a79f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # AllTube Download -[![Donate using Liberapay](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/Rudloff/donate) - HTML GUI for youtube-dl ([alltubedownload.net](http://alltubedownload.net/)) ![Screenshot](img/screenshot.png "AllTube GUI screenshot") diff --git a/resources/FAQ.md b/resources/FAQ.md index 4044ea0..3f13846 100644 --- a/resources/FAQ.md +++ b/resources/FAQ.md @@ -13,7 +13,6 @@ so it has low RAM and CPU. AllTube probably won't switch to a more expensive hosting because this project does not earn any financial resources -(although [donations are welcome](https://liberapay.com/Rudloff/)) and you are encouraged to host it yourself. ## alltubedownload.net often says "An error occurred in the application…" diff --git a/templates/inc/footer.tpl b/templates/inc/footer.tpl index fe770c2..545d16b 100644 --- a/templates/inc/footer.tpl +++ b/templates/inc/footer.tpl @@ -27,13 +27,6 @@ youtube-dl "} {t params=['@youtubedl'=>$youtubedl]}Based on @youtubedl{/t} - - · - - - {t}Donate{/t} -
From 73e4fc1b1352868d6f7c75c329cfa0db1365ad4c Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Mon, 22 Feb 2021 21:16:29 +0100 Subject: [PATCH 16/18] Missing root_path service in tests --- tests/ContainerTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ContainerTest.php b/tests/ContainerTest.php index 3be8ae3..70a3019 100644 --- a/tests/ContainerTest.php +++ b/tests/ContainerTest.php @@ -40,6 +40,7 @@ abstract class ContainerTest extends BaseTest $this->checkRequirements(); $this->container = new Container(['environment' => Environment::mock()]); + $this->container['root_path'] = dirname(__DIR__); $this->container['config'] = Config::fromFile($this->getConfigFile()); $this->container['session'] = SessionFactory::create($this->container); $this->container['locale'] = LocaleManagerFactory::create($this->container); From be3f7d9a827790fd312738f1bbecaf9be5b96bfc Mon Sep 17 00:00:00 2001 From: Advizormcpe1 Date: Sun, 28 Feb 2021 18:32:06 +0100 Subject: [PATCH 17/18] Updated japanese translation --- i18n/ja_JP/LC_MESSAGES/Alltube.po | 64 ++++++++++++++++--------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/i18n/ja_JP/LC_MESSAGES/Alltube.po b/i18n/ja_JP/LC_MESSAGES/Alltube.po index 08b47ae..71acb9d 100644 --- a/i18n/ja_JP/LC_MESSAGES/Alltube.po +++ b/i18n/ja_JP/LC_MESSAGES/Alltube.po @@ -1,5 +1,11 @@ msgid "" -msgstr "Content-Type: text/plain; charset=UTF-8\n" +msgstr "" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: POEditor.com\n" +"Project-Id-Version: Alltube Download\n" +"Language: ja-JP\n" #: templates/inc/footer.tpl:8 msgid "Code by @dev" @@ -11,11 +17,11 @@ msgstr "デザイン: @designer" #: templates/inc/footer.tpl:21 msgid "Get the code" -msgstr "ソースコード" +msgstr "プログラムをダウンロード" #: templates/inc/footer.tpl:29 msgid "Based on @youtubedl" -msgstr "このソフトは@youtubedlを基に作成されています。" +msgstr "本ソフトは@youtubedlを基に構成されています。" #: templates/inc/footer.tpl:33 msgid "Donate using Liberapay" @@ -35,7 +41,7 @@ msgstr "言語を設定" #: templates/info.tpl:11 msgid "You are going to download @title." -msgstr "ダウンロードの対象: @title." +msgstr "ダウンロード対象: @title" #: templates/info.tpl:29 msgid "Available formats:" @@ -43,7 +49,7 @@ msgstr "ダウンロード可能な形式" #: templates/info.tpl:31 msgid "Generic formats" -msgstr "一般的な形式" +msgstr "よく使われる形式" #: templates/info.tpl:35 msgid "Best" @@ -59,11 +65,11 @@ msgstr "最低品質" #: templates/info.tpl:42 msgid "Detailed formats" -msgstr "形式の一覧" +msgstr "その他の形式" #: templates/info.tpl:86 msgid "Stream the video through the server" -msgstr "ビデオをサーバーに設置" +msgstr "ビデオをサーバーに設置してダウンロード" #: templates/info.tpl:92 msgid "Convert into a custom format:" @@ -75,7 +81,7 @@ msgstr "カスタム形式" #: templates/info.tpl:93 msgid "Format to convert to" -msgstr "形式を変換" +msgstr "ファイル形式の変換" #: templates/info.tpl:98 msgid "with" @@ -100,7 +106,7 @@ msgstr "ダウンロード" #: templates/playlist.tpl:12 msgid "Videos extracted from @title:" -msgstr "デコードの対象:" +msgstr "デコードの対象: @title" #: templates/playlist.tpl:39 msgid "More options" @@ -108,19 +114,19 @@ msgstr "詳細設定" #: templates/extractors.tpl:4 classes/Controller/FrontController.php:111 msgid "Supported websites" -msgstr "ダウンロード可能なサイト" +msgstr "ダウンロードに対応しているサイト" #: templates/error.tpl:5 msgid "An error occurred" -msgstr "エラーが発生しました" +msgstr "予期せぬエラーが発生しました。" #: templates/password.tpl:5 msgid "This video is protected" -msgstr "このビデオには制限がかかっています。" +msgstr "このビデオにはプロテクトがかかっています。" #: templates/password.tpl:6 msgid "You need a password in order to download this video." -msgstr "このビデオをダウンロードするにはパスワードが必要です。" +msgstr "このビデオをダウンロードするには閲覧用のパスワードが必要です。" #: templates/password.tpl:8 msgid "Video password" @@ -144,11 +150,11 @@ msgstr "へ" #: templates/index.tpl:41 msgid "See all supported websites" -msgstr "ダウンロード可能なサイトの一覧" +msgstr "ダウンロード可能なサイトを見る" #: templates/index.tpl:43 msgid "Drag this to your bookmarks bar:" -msgstr "ブックマークに登録" +msgstr "ブックマークバーにドラッグして登録" #: templates/index.tpl:45 msgid "Bookmarklet" @@ -161,39 +167,35 @@ msgstr "パスワードが間違っています。" #: classes/Controller/DownloadController.php:69 msgid "Conversion of playlists is not supported." -msgstr "プレイリストの読み出しに失敗しました。非対応の形式です。" +msgstr "プレイリストからの読み出しには対応しておりません。" #: classes/Controller/DownloadController.php:76 msgid "Conversion of M3U8 files is not supported." -msgstr "HLS(m3u8)プレイリストファイルの読み出しに失敗しました。非対応の形式です。" +msgstr "HLS(m3u8)プレイリストファイルからの読み出しには対応しておりません。" #: classes/Controller/DownloadController.php:82 msgid "Conversion of DASH segments is not supported." -msgstr "MPEG DASHストリーミングは非対応の形式です。" +msgstr "MPEG DASHストリーミングからの読み出しには対応しておりません。" #: classes/Controller/FrontController.php:65 -msgid "" -"Easily download videos from YouTube, Dailymotion, Vimeo and other websites." -msgstr "Youtubeから動画を簡単にダウンロード!、DailymotionやVimeo等にも対応しております。" +msgid "Easily download videos from YouTube, Dailymotion, Vimeo and other websites." +msgstr "Youtubeから動画を簡単にダウンロード!、DailymotionやVimeo等にも対応しております" #: classes/Controller/FrontController.php:112 -msgid "" -"List of all supported websites from which AllTube Download can extract video " -"or audio files" -msgstr "AllTubeでダウンロードに対応している音声または動画ファイルのサイト" +msgid "List of all supported websites from which AllTube Download can extract video or audio files" +msgstr "AllTube上でのダウンロードおよびファイルの変換に対応している音声または動画ファイルのサイト" #: classes/Controller/FrontController.php:138 msgid "Password prompt" msgstr "パスワード画面" #: classes/Controller/FrontController.php:140 -msgid "" -"You need a password in order to download this video with AllTube Download" -msgstr "" +msgid "You need a password in order to download this video with AllTube Download" +msgstr "このビデオをAllTubeでダウンロードするにはパスワードが必要です。" #: classes/Controller/FrontController.php:174 msgid "Video download" -msgstr "動画ダウンロード" +msgstr "動画をダウンロード" #: classes/Controller/FrontController.php:176 msgid "Download video from @extractor" @@ -209,8 +211,8 @@ msgstr "エラーが発生しました。" #: classes/Controller/FrontController.php:271 msgid "Page not found" -msgstr "このページは存在しません。" +msgstr "存在しないページです。" #: classes/Controller/FrontController.php:282 msgid "Method not allowed" -msgstr "パラメーターが誤っています。" +msgstr "無効なリクエストです。" \ No newline at end of file From b902c9027b1d5e850afc63de4f0754ccad74358e Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Fri, 2 Apr 2021 21:05:50 +0200 Subject: [PATCH 18/18] Upgrade youtube-dl to 2021.04.01 (fixes #349) --- composer.json | 6 +++--- composer.lock | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index fa7bcf3..3d5805d 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "symfony/translation": "^4.0", "symfony/yaml": "^4.0", "webfontkit/open-sans": "^1.0", - "ytdl-org/youtube-dl": "^2020.11", + "ytdl-org/youtube-dl": "^2021.04", "zonuexe/http-accept-language": "^0.4.1" }, "require-dev": { @@ -90,10 +90,10 @@ "type": "package", "package": { "name": "ytdl-org/youtube-dl", - "version": "2020.11.12", + "version": "2021.04.01", "dist": { "type": "zip", - "url": "https://github.com/ytdl-org/youtube-dl/archive/2020.11.12.zip" + "url": "https://github.com/ytdl-org/youtube-dl/archive/2021.04.01.zip" } } } diff --git a/composer.lock b/composer.lock index 3f48e46..65a1c69 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0a9125b1ada00d075fb697f43816a054", + "content-hash": "93cbba477de92eb8ec3d913b8cd83c82", "packages": [ { "name": "aura/session", @@ -2433,10 +2433,10 @@ }, { "name": "ytdl-org/youtube-dl", - "version": "2020.11.12", + "version": "2021.04.01", "dist": { "type": "zip", - "url": "https://github.com/ytdl-org/youtube-dl/archive/2020.11.12.zip" + "url": "https://github.com/ytdl-org/youtube-dl/archive/2021.04.01.zip" }, "type": "library" }, @@ -7132,6 +7132,5 @@ "platform-dev": [], "platform-overrides": { "php": "7.3.11" - }, - "plugin-api-version": "1.1.0" + } }