diff --git a/classes/Downloader.php b/classes/Downloader.php index c74bf94..ee810eb 100644 --- a/classes/Downloader.php +++ b/classes/Downloader.php @@ -4,6 +4,7 @@ namespace Alltube\Library; use Alltube\Library\Exception\AlltubeLibraryException; use Alltube\Library\Exception\AvconvException; +use Alltube\Library\Exception\EmptyUrlException; use Alltube\Library\Exception\InvalidProtocolConversionException; use Alltube\Library\Exception\InvalidTimeException; use Alltube\Library\Exception\PasswordException; @@ -14,6 +15,8 @@ use Alltube\Library\Exception\WrongPasswordException; use Alltube\Library\Exception\YoutubedlException; use GuzzleHttp\Client; use Psr\Http\Message\ResponseInterface; +use Psr\Log\LoggerInterface; +use Psr\Log\NullLogger; use Symfony\Component\Process\Process; /** @@ -65,6 +68,11 @@ class Downloader */ private $params; + /** + * @var LoggerInterface + */ + private $logger; + /** * Downloader constructor. * @param string $youtubedl youtube-dl binary path @@ -88,15 +96,26 @@ class Downloader $this->avconv = $avconv; $this->phantomjsDir = $phantomjsDir; $this->avconvVerbosity = $avconvVerbosity; + + $this->logger = new NullLogger(); + } + + /** + * @param LoggerInterface $logger + * @return void + */ + public function setLogger(LoggerInterface $logger) + { + $this->logger = $logger; } /** * @param string $webpageUrl URL of the page containing the video * @param string $requestedFormat Requested video format - * @param string $password Password + * @param string|null $password Password * @return Video */ - public function getVideo($webpageUrl, $requestedFormat = 'best/bestvideo', $password = null) + public function getVideo(string $webpageUrl, $requestedFormat = 'best/bestvideo', string $password = null) { return new Video($this, $webpageUrl, $requestedFormat, $password); } @@ -141,21 +160,24 @@ class Downloader * @param int $audioBitrate Audio bitrate of the converted file * @param string $filetype Filetype of the converted file * @param bool $audioOnly True to return an audio-only file - * @param string $from Start the conversion at this time - * @param string $to End the conversion at this time + * @param string|null $from Start the conversion at this time + * @param string|null $to End the conversion at this time * * @return Process Process - * @throws AlltubeLibraryException * @throws AvconvException If avconv/ffmpeg is missing + * @throws EmptyUrlException * @throws InvalidTimeException + * @throws PasswordException + * @throws WrongPasswordException + * @throws YoutubedlException */ private function getAvconvProcess( Video $video, - $audioBitrate, + int $audioBitrate, $filetype = 'mp3', $audioOnly = true, - $from = null, - $to = null + string $from = null, + string $to = null ) { if (!$this->checkCommand([$this->avconv, '-version'])) { throw new AvconvException($this->avconv); @@ -207,7 +229,10 @@ class Downloader $arguments[] = '-user_agent'; $arguments[] = $video->getProp('dump-user-agent'); - return new Process($arguments); + $process = new Process($arguments); + $this->logger->debug($process->getCommandLine()); + + return $process; } @@ -226,6 +251,7 @@ class Downloader $process = $this->getProcess($arguments); //This is needed by the openload extractor because it runs PhantomJS $process->setEnv(['PATH' => $this->phantomjsDir]); + $this->logger->debug($process->getCommandLine()); $process->run(); if (!$process->isSuccessful()) { $errorOutput = trim($process->getErrorOutput()); @@ -287,13 +313,22 @@ class Downloader * * @param Video $video Video object * @param int $audioBitrate MP3 bitrate when converting (in kbit/s) - * @param string $from Start the conversion at this time - * @param string $to End the conversion at this time + * @param string|null $from Start the conversion at this time + * @param string|null $to End the conversion at this time * * @return resource popen stream - * @throws AlltubeLibraryException + * @throws AvconvException + * @throws EmptyUrlException + * @throws InvalidProtocolConversionException + * @throws InvalidTimeException + * @throws PasswordException + * @throws PlaylistConversionException + * @throws PopenStreamException + * @throws RemuxException + * @throws WrongPasswordException + * @throws YoutubedlException */ - public function getAudioStream(Video $video, $audioBitrate = 128, $from = null, $to = null) + public function getAudioStream(Video $video, $audioBitrate = 128, string $from = null, string $to = null) { return $this->getConvertedStream($video, $audioBitrate, 'mp3', true, $from, $to); } @@ -380,22 +415,28 @@ class Downloader * @param int $audioBitrate Audio bitrate of the converted file * @param string $filetype Filetype of the converted file * @param bool $audioOnly True to return an audio-only file - * @param string $from Start the conversion at this time - * @param string $to End the conversion at this time + * @param string|null $from Start the conversion at this time + * @param string|null $to End the conversion at this time * * @return resource popen stream - * @throws AlltubeLibraryException - * @throws PopenStreamException If the popen stream was not created correctly + * @throws AvconvException + * @throws EmptyUrlException * @throws InvalidProtocolConversionException If you try to convert an M3U or Dash media + * @throws InvalidTimeException + * @throws PasswordException * @throws PlaylistConversionException If you try to convert a playlist + * @throws PopenStreamException If the popen stream was not created correctly + * @throws RemuxException + * @throws WrongPasswordException + * @throws YoutubedlException */ public function getConvertedStream( Video $video, - $audioBitrate, - $filetype, + int $audioBitrate, + string $filetype, $audioOnly = false, - $from = null, - $to = null + string $from = null, + string $to = null ) { if (isset($video->_type) && $video->_type == 'playlist') { throw new PlaylistConversionException(); diff --git a/classes/exceptions/AlltubeLibraryException.php b/classes/Exception/AlltubeLibraryException.php similarity index 100% rename from classes/exceptions/AlltubeLibraryException.php rename to classes/Exception/AlltubeLibraryException.php diff --git a/classes/exceptions/AvconvException.php b/classes/Exception/AvconvException.php similarity index 88% rename from classes/exceptions/AvconvException.php rename to classes/Exception/AvconvException.php index 760c8e9..70983e3 100644 --- a/classes/exceptions/AvconvException.php +++ b/classes/Exception/AvconvException.php @@ -11,7 +11,7 @@ class AvconvException extends AlltubeLibraryException * AvconvException constructor. * @param string $path Path to avconv or ffmpeg. */ - public function __construct($path) + public function __construct(string $path) { parent::__construct("Can't find avconv or ffmpeg at " . $path . '.'); } diff --git a/classes/exceptions/EmptyUrlException.php b/classes/Exception/EmptyUrlException.php similarity index 100% rename from classes/exceptions/EmptyUrlException.php rename to classes/Exception/EmptyUrlException.php diff --git a/classes/exceptions/InvalidProtocolConversionException.php b/classes/Exception/InvalidProtocolConversionException.php similarity index 87% rename from classes/exceptions/InvalidProtocolConversionException.php rename to classes/Exception/InvalidProtocolConversionException.php index 8f5fbbc..e8cec37 100644 --- a/classes/exceptions/InvalidProtocolConversionException.php +++ b/classes/Exception/InvalidProtocolConversionException.php @@ -11,7 +11,7 @@ class InvalidProtocolConversionException extends AlltubeLibraryException * InvalidProtocolConversionException constructor. * @param string $protocol Protocol */ - public function __construct($protocol) + public function __construct(string $protocol) { parent::__construct($protocol . ' protocol is not supported in conversions.'); } diff --git a/classes/exceptions/InvalidTimeException.php b/classes/Exception/InvalidTimeException.php similarity index 86% rename from classes/exceptions/InvalidTimeException.php rename to classes/Exception/InvalidTimeException.php index 8fbfaa1..1e19188 100644 --- a/classes/exceptions/InvalidTimeException.php +++ b/classes/Exception/InvalidTimeException.php @@ -12,7 +12,7 @@ class InvalidTimeException extends AlltubeLibraryException * InvalidTimeException constructor. * @param string $time Invalid time */ - public function __construct($time) + public function __construct(string $time) { parent::__construct('Invalid time: ' . $time); } diff --git a/classes/exceptions/PasswordException.php b/classes/Exception/PasswordException.php similarity index 100% rename from classes/exceptions/PasswordException.php rename to classes/Exception/PasswordException.php diff --git a/classes/exceptions/PlaylistConversionException.php b/classes/Exception/PlaylistConversionException.php similarity index 100% rename from classes/exceptions/PlaylistConversionException.php rename to classes/Exception/PlaylistConversionException.php diff --git a/classes/exceptions/PopenStreamException.php b/classes/Exception/PopenStreamException.php similarity index 100% rename from classes/exceptions/PopenStreamException.php rename to classes/Exception/PopenStreamException.php diff --git a/classes/exceptions/RemuxException.php b/classes/Exception/RemuxException.php similarity index 100% rename from classes/exceptions/RemuxException.php rename to classes/Exception/RemuxException.php diff --git a/classes/exceptions/WrongPasswordException.php b/classes/Exception/WrongPasswordException.php similarity index 100% rename from classes/exceptions/WrongPasswordException.php rename to classes/Exception/WrongPasswordException.php diff --git a/classes/exceptions/YoutubedlException.php b/classes/Exception/YoutubedlException.php similarity index 100% rename from classes/exceptions/YoutubedlException.php rename to classes/Exception/YoutubedlException.php diff --git a/classes/Video.php b/classes/Video.php index df6aced..9efb554 100644 --- a/classes/Video.php +++ b/classes/Video.php @@ -81,13 +81,13 @@ class Video * @param string $requestedFormat Requested video format * (can be any format string accepted by youtube-dl, * including selectors like "[height<=720]") - * @param string $password Password + * @param string|null $password Password */ public function __construct( Downloader $downloader, - $webpageUrl, - $requestedFormat, - $password = null + string $webpageUrl, + string $requestedFormat, + string $password = null ) { $this->downloader = $downloader; $this->webpageUrl = $webpageUrl; @@ -151,7 +151,7 @@ class Video * @throws WrongPasswordException * @throws YoutubedlException */ - public function __get($name) + public function __get(string $name) { if (isset($this->$name)) { return $this->getJson()->$name; @@ -170,7 +170,7 @@ class Video * @throws WrongPasswordException * @throws YoutubedlException */ - public function __isset($name) + public function __isset(string $name) { return isset($this->getJson()->$name); } @@ -225,7 +225,7 @@ class Video * @throws WrongPasswordException * @throws YoutubedlException */ - public function getFileNameWithExtension($extension) + public function getFileNameWithExtension(string $extension) { if (isset($this->ext)) { return str_replace('.' . $this->ext, '.' . $extension, $this->getFilename()); @@ -278,7 +278,7 @@ class Video * * @return Video */ - public function withFormat($format) + public function withFormat(string $format) { return new self($this->downloader, $this->webpageUrl, $format, $this->password); } diff --git a/composer.json b/composer.json index 8984422..14654fe 100644 --- a/composer.json +++ b/composer.json @@ -4,9 +4,10 @@ "license": "GPL-3.0-only", "homepage": "http://alltubedownload.net/", "require": { + "ext-json": "*", "guzzlehttp/guzzle": "^6.5", - "symfony/process": "^4.0|^5.0", - "ext-json": "*" + "psr/log": "^1.1", + "symfony/process": "^4.0|^5.0" }, "require-dev": { "phpro/grumphp": "^0.18.0", @@ -26,8 +27,7 @@ }, "autoload": { "psr-4": { - "Alltube\\Library\\": "classes/", - "Alltube\\Library\\Exception\\": "classes/exceptions/" + "Alltube\\Library\\": "classes/" } } } diff --git a/composer.lock b/composer.lock index 31f45ec..a558939 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": "e084bdaf7ed377ff4963c65d85513eca", + "content-hash": "9a53e4f77d715163307f6736896493b8", "packages": [ { "name": "guzzlehttp/guzzle", @@ -245,6 +245,53 @@ ], "time": "2016-08-06T14:39:51+00:00" }, + { + "name": "psr/log", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2020-03-23T09:12:05+00:00" + }, { "name": "ralouphie/getallheaders", "version": "3.0.3", @@ -575,478 +622,6 @@ } ], "packages-dev": [ - { - "name": "amphp/amp", - "version": "v2.4.4", - "source": { - "type": "git", - "url": "https://github.com/amphp/amp.git", - "reference": "1e58d53e4af390efc7813e36cd215bd82cba4b06" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/1e58d53e4af390efc7813e36cd215bd82cba4b06", - "reference": "1e58d53e4af390efc7813e36cd215bd82cba4b06", - "shasum": "" - }, - "require": { - "php": ">=7" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "ext-json": "*", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^6.0.9 | ^7", - "react/promise": "^2", - "vimeo/psalm": "^3.11@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Amp\\": "lib" - }, - "files": [ - "lib/functions.php", - "lib/Internal/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Bob Weinand", - "email": "bobwei9@hotmail.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "A non-blocking concurrency framework for PHP applications.", - "homepage": "http://amphp.org/amp", - "keywords": [ - "async", - "asynchronous", - "awaitable", - "concurrency", - "event", - "event-loop", - "future", - "non-blocking", - "promise" - ], - "time": "2020-04-30T04:54:50+00:00" - }, - { - "name": "amphp/byte-stream", - "version": "v1.7.3", - "source": { - "type": "git", - "url": "https://github.com/amphp/byte-stream.git", - "reference": "b867505edb79dda8f253ca3c3a2bbadae4b16592" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/b867505edb79dda8f253ca3c3a2bbadae4b16592", - "reference": "b867505edb79dda8f253ca3c3a2bbadae4b16592", - "shasum": "" - }, - "require": { - "amphp/amp": "^2" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "friendsofphp/php-cs-fixer": "^2.3", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^6 || ^7 || ^8", - "vimeo/psalm": "^3.9@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Amp\\ByteStream\\": "lib" - }, - "files": [ - "lib/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "http://amphp.org/byte-stream", - "keywords": [ - "amp", - "amphp", - "async", - "io", - "non-blocking", - "stream" - ], - "time": "2020-04-04T16:56:54+00:00" - }, - { - "name": "amphp/parallel", - "version": "v1.4.0", - "source": { - "type": "git", - "url": "https://github.com/amphp/parallel.git", - "reference": "2c1039bf7ca137eae4d954b14c09a7535d7d4e1c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel/zipball/2c1039bf7ca137eae4d954b14c09a7535d7d4e1c", - "reference": "2c1039bf7ca137eae4d954b14c09a7535d7d4e1c", - "shasum": "" - }, - "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.6.1", - "amphp/parser": "^1", - "amphp/process": "^1", - "amphp/serialization": "^1", - "amphp/sync": "^1.0.1", - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", - "phpunit/phpunit": "^8 || ^7" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\Parallel\\": "lib" - }, - "files": [ - "lib/Context/functions.php", - "lib/Sync/functions.php", - "lib/Worker/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Stephen Coakley", - "email": "me@stephencoakley.com" - } - ], - "description": "Parallel processing component for Amp.", - "homepage": "https://github.com/amphp/parallel", - "keywords": [ - "async", - "asynchronous", - "concurrent", - "multi-processing", - "multi-threading" - ], - "time": "2020-04-27T15:12:37+00:00" - }, - { - "name": "amphp/parallel-functions", - "version": "v0.1.3", - "source": { - "type": "git", - "url": "https://github.com/amphp/parallel-functions.git", - "reference": "12e6c602e067b02f78ddf5b720c17e9aa01ad4b4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/parallel-functions/zipball/12e6c602e067b02f78ddf5b720c17e9aa01ad4b4", - "reference": "12e6c602e067b02f78ddf5b720c17e9aa01ad4b4", - "shasum": "" - }, - "require": { - "amphp/amp": "^2.0.3", - "amphp/parallel": "^0.1.8 || ^0.2 || ^1", - "opis/closure": "^3.0.7", - "php": ">=7" - }, - "require-dev": { - "amphp/phpunit-util": "^1.0", - "friendsofphp/php-cs-fixer": "^2.9", - "phpunit/phpunit": "^6.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\ParallelFunctions\\": "src" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "Parallel processing made simple.", - "time": "2018-10-28T15:29:02+00:00" - }, - { - "name": "amphp/parser", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/amphp/parser.git", - "reference": "f83e68f03d5b8e8e0365b8792985a7f341c57ae1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/parser/zipball/f83e68f03d5b8e8e0365b8792985a7f341c57ae1", - "reference": "f83e68f03d5b8e8e0365b8792985a7f341c57ae1", - "shasum": "" - }, - "require": { - "php": ">=7" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.3", - "phpunit/phpunit": "^6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\Parser\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - } - ], - "description": "A generator parser to make streaming parsers simple.", - "homepage": "https://github.com/amphp/parser", - "keywords": [ - "async", - "non-blocking", - "parser", - "stream" - ], - "time": "2017-06-06T05:29:10+00:00" - }, - { - "name": "amphp/process", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/amphp/process.git", - "reference": "355b1e561b01c16ab3d78fada1ad47ccc96df70e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/process/zipball/355b1e561b01c16ab3d78fada1ad47ccc96df70e", - "reference": "355b1e561b01c16ab3d78fada1ad47ccc96df70e", - "shasum": "" - }, - "require": { - "amphp/amp": "^2", - "amphp/byte-stream": "^1.4", - "php": ">=7" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "phpunit/phpunit": "^6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\Process\\": "lib" - }, - "files": [ - "lib/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bob Weinand", - "email": "bobwei9@hotmail.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - } - ], - "description": "Asynchronous process manager.", - "homepage": "https://github.com/amphp/process", - "time": "2019-02-26T16:33:03+00:00" - }, - { - "name": "amphp/serialization", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/amphp/serialization.git", - "reference": "693e77b2fb0b266c3c7d622317f881de44ae94a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/serialization/zipball/693e77b2fb0b266c3c7d622317f881de44ae94a1", - "reference": "693e77b2fb0b266c3c7d622317f881de44ae94a1", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "phpunit/phpunit": "^9 || ^8 || ^7" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\Serialization\\": "src" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "Serialization tools for IPC and data storage in PHP.", - "homepage": "https://github.com/amphp/serialization", - "keywords": [ - "async", - "asynchronous", - "serialization", - "serialize" - ], - "time": "2020-03-25T21:39:07+00:00" - }, - { - "name": "amphp/sync", - "version": "v1.4.0", - "source": { - "type": "git", - "url": "https://github.com/amphp/sync.git", - "reference": "613047ac54c025aa800a9cde5b05c3add7327ed4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/sync/zipball/613047ac54c025aa800a9cde5b05c3add7327ed4", - "reference": "613047ac54c025aa800a9cde5b05c3add7327ed4", - "shasum": "" - }, - "require": { - "amphp/amp": "^2.2", - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.1", - "phpunit/phpunit": "^9 || ^8 || ^7" - }, - "type": "library", - "autoload": { - "psr-4": { - "Amp\\Sync\\": "src" - }, - "files": [ - "src/functions.php", - "src/ConcurrentIterator/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Stephen Coakley", - "email": "me@stephencoakley.com" - } - ], - "description": "Mutex, Semaphore, and other synchronization tools for Amp.", - "homepage": "https://github.com/amphp/sync", - "keywords": [ - "async", - "asynchronous", - "mutex", - "semaphore", - "synchronization" - ], - "time": "2020-05-07T18:57:50+00:00" - }, { "name": "doctrine/collections", "version": "1.6.5", @@ -1257,67 +832,6 @@ ], "time": "2020-05-22T08:12:19+00:00" }, - { - "name": "opis/closure", - "version": "3.5.5", - "source": { - "type": "git", - "url": "https://github.com/opis/closure.git", - "reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/dec9fc5ecfca93f45cd6121f8e6f14457dff372c", - "reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c", - "shasum": "" - }, - "require": { - "php": "^5.4 || ^7.0" - }, - "require-dev": { - "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.5.x-dev" - } - }, - "autoload": { - "psr-4": { - "Opis\\Closure\\": "src/" - }, - "files": [ - "functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marius Sarca", - "email": "marius.sarca@gmail.com" - }, - { - "name": "Sorin Sarca", - "email": "sarca_sorin@hotmail.com" - } - ], - "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", - "homepage": "https://opis.io/closure", - "keywords": [ - "anonymous functions", - "closure", - "function", - "serializable", - "serialization", - "serialize" - ], - "time": "2020-06-17T14:59:55+00:00" - }, { "name": "phpro/grumphp", "version": "v0.18.1", @@ -1559,53 +1073,6 @@ ], "time": "2019-01-08T18:20:26+00:00" }, - { - "name": "psr/log", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2020-03-23T09:12:05+00:00" - }, { "name": "roave/security-advisories", "version": "dev-master", diff --git a/grumphp.yml b/grumphp.yml index 8454537..df983e1 100644 --- a/grumphp.yml +++ b/grumphp.yml @@ -8,9 +8,5 @@ parameters: composer: ~ phpcs: standard: PSR12 - ignore_patterns: - - RoboFile.php phpstan: level: max - ignore_patterns: - - RoboFile.php