From 7f5f316c1a9cabfcb88c6a21d2c065c094457081 Mon Sep 17 00:00:00 2001 From: Igor Chepurnoy Date: Fri, 7 Aug 2020 00:51:03 +0300 Subject: [PATCH] Revert "Stripe lib updated to 7, Stripe Checkout & webhook & some new attributes " --- .gitignore | 4 +- .phpunit.result.cache | 1 - Billable.php | 170 +- Invoice.php | 2 +- README.md | 61 - StripeCheckoutSubsciption.php | 157 - SubscriptionBuilder.php | 80 +- composer.json | 8 +- composer.lock | 3680 ----------------- controllers/WebhookController.php | 38 +- ...9_add_attributes_to_subscription_table.php | 29 - ..._more_attributes_to_subscription_table.php | 27 - models/SubscriptionModel.php | 29 +- tests/CashierTest.php | 123 +- tests/TestCase.php | 11 +- tests/data/User.php | 4 - 16 files changed, 23 insertions(+), 4401 deletions(-) delete mode 100644 .phpunit.result.cache delete mode 100644 StripeCheckoutSubsciption.php delete mode 100644 composer.lock delete mode 100644 migrations/m191209_213759_add_attributes_to_subscription_table.php delete mode 100644 migrations/m191219_213759_add_more_attributes_to_subscription_table.php diff --git a/.gitignore b/.gitignore index 17c78b0..8e375d0 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ Thumbs.db # composer vendor dir /vendor -#/composer.lock +/composer.lock # composer itself is not needed composer.phar @@ -32,4 +32,4 @@ phpunit.phar /tests/data/config.local.php # runtime cache -/tests/runtime +/tests/runtime \ No newline at end of file diff --git a/.phpunit.result.cache b/.phpunit.result.cache deleted file mode 100644 index 4d2f4ee..0000000 --- a/.phpunit.result.cache +++ /dev/null @@ -1 +0,0 @@ -C:37:"PHPUnit\Runner\DefaultTestResultCache":1267:{a:2:{s:7:"defects";a:5:{s:64:"yii2mod\cashier\tests\CashierTest::testSubscriptionsCanBeCreated";i:4;s:70:"yii2mod\cashier\tests\CashierTest::testCreatingSubscriptionWithCoupons";i:4;s:68:"yii2mod\cashier\tests\CashierTest::testCreatingSubscriptionWithTrial";i:4;s:73:"yii2mod\cashier\tests\CashierTest::testApplyingCouponsToExistingCustomers";i:4;s:68:"yii2mod\cashier\tests\CashierTest::testMarkingAsCancelledFromWebhook";i:4;}s:5:"times";a:10:{s:64:"yii2mod\cashier\tests\CashierTest::testSubscriptionsCanBeCreated";d:14.542;s:70:"yii2mod\cashier\tests\CashierTest::testCreatingSubscriptionWithCoupons";d:6.453;s:52:"yii2mod\cashier\tests\CashierTest::testGenericTrials";d:0.004;s:68:"yii2mod\cashier\tests\CashierTest::testCreatingSubscriptionWithTrial";d:7.188;s:73:"yii2mod\cashier\tests\CashierTest::testApplyingCouponsToExistingCustomers";d:6.838;s:68:"yii2mod\cashier\tests\CashierTest::testMarkingAsCancelledFromWebhook";d:5.638;s:61:"yii2mod\cashier\tests\CashierTest::testCreatingOneOffInvoices";d:6.344;s:46:"yii2mod\cashier\tests\CashierTest::testRefunds";d:6.659;s:69:"yii2mod\cashier\tests\CashierTest::testSessionAndStripeCheckoutWidget";d:1.024;s:87:"yii2mod\cashier\tests\CashierTest::testCreateSubscriptionFromWebhookUsingStripeCheckout";d:6.448;}}} \ No newline at end of file diff --git a/Billable.php b/Billable.php index a4bd6f6..6a0771a 100644 --- a/Billable.php +++ b/Billable.php @@ -17,7 +17,6 @@ use yii\web\NotFoundHttpException; use yii\web\Response; use yii2mod\cashier\models\SubscriptionModel; -use yii\helpers\Url; /** * Class Billable @@ -33,93 +32,6 @@ trait Billable */ protected static $stripeKey; - /** - * Mapping between attributes inside Stripe's metadata and a subscriptionModel attributes - * They will be updated by webhook controller , for example: 'metadata_id' => 'student_id' - * - * @return Array - */ - public static function billableMapMetadataAttributes() - { - return []; - } - - /** - * Get the Stripe customer instance for the current user and token. - * (copied from SubscriptionBuilder) - * - * @return \Stripe\Customer - */ - public function getStripeCustomer($token=null) - { - if (!$this->stripe_id) { - $customer = $this->createAsStripeCustomer($token); - } else { - $customer = $this->asStripeCustomer(); - } - - return $customer; - } - - /** - * Make a "one off" charge on the customer for the given amount. - * - * @param int $amount - * @param array $options - * - * @return \Stripe\Checkout\Session - * - * @throws Card - */ - public function createCheckoutSessionForSubscription($planID, array $optionsParam = []): \Stripe\Checkout\Session - { - $customer = $this->getStripeCustomer(); - if (!$this->stripe_id) { - throw new InvalidArgumentException('No stripe customer provided.'); - } - - $controller_url_name = ''; - if(array_key_exists('controller_url_name', $optionsParam)){ - $controller_url_name = $optionsParam['controller_url_name'] . '/'; - } - $url_base = Url::base(true); - if(array_key_exists('url_base', $optionsParam)){ - $url_base = $optionsParam['url_base'] . '/'; - } - - $options = [ - 'customer' => $this->stripe_id, - 'payment_method_types' => ['card'], - 'subscription_data' => [ - 'items'=> [ - ['plan'=> $planID, 'quantity'=> 1] - ], - ], - 'success_url' => $url_base . $controller_url_name . 'success?session_id={CHECKOUT_SESSION_ID}', - 'cancel_url' => $url_base . $controller_url_name . 'cancel', - ]; - - if(array_key_exists('success_url', $optionsParam)){ - $options['success_url'] = $optionsParam['success_url']; - } - if(array_key_exists('cancel_url', $optionsParam)){ - $options['cancel_url'] = $optionsParam['cancel_url']; - } - if(array_key_exists('client_reference_id', $optionsParam)){ - $options['client_reference_id'] = strval($optionsParam['client_reference_id']); - } - if(array_key_exists('metadata', $optionsParam)){ - $options['subscription_data']['metadata'] = $optionsParam['metadata']; - } - - // if($this->email){ - // $options['customer_email'] = 'max1000@gmail.com'; - // } - - $session = \Stripe\Checkout\Session::create($options, ['api_key' => $this->getStripeKey()] ); - return $session; - } - /** * Make a "one off" charge on the customer for the given amount. * @@ -218,44 +130,6 @@ public function newSubscription(string $subscription, string $plan): Subscriptio return new SubscriptionBuilder($this, $subscription, $plan); } - /** - * Create a new subscription from checkout params. - * - * @param array $payloadDataObject - * - * @return SubscriptionModel - */ - public function loadSubscriptionModel($subscriptionID, $clientReferenceId) - { - $subscriptionBuilder = new SubscriptionBuilder($this, '', ''); - return $subscriptionBuilder->loadSubscriptionModel($subscriptionID, $clientReferenceId); - } - - /** - * Create a new subscription from checkout params. - * - * @param array $conditions https://stripe.com/docs/api/subscriptions/list - * - * @return Boolean - */ - public function updateSubscriptionModels($conditions = array()) - { - if (!$this->stripe_id) { - return false; - } - - $conditions['customer'] = $this->stripe_id; - \Stripe\Stripe::setApiKey(Yii::$app->params['stripe']['apiKey']); - $stripeSubscriptions = \Stripe\Subscription::all($conditions) ; - - foreach ($stripeSubscriptions as $stripeSubscription) { - $subscriptionBuilder = new SubscriptionBuilder($this, '', ''); - $subscriptionBuilder->updateSubscriptionModel($stripeSubscription, null); - } - - return true; - } - /** * Determine if the user is on trial. * @@ -324,41 +198,6 @@ public function subscription(string $subscription = 'default'): ?SubscriptionMod return $this->getSubscriptions()->where(['name' => $subscription])->one(); } - /** - * Get a subscription instance by conditions. - * - * @param array $conditions - * - * @return SubscriptionModel|null - */ - public function subscriptionByConditions($conditions): ?SubscriptionModel - { - return $this->getSubscriptions()->where($conditions)->one(); - } - - /** - * Get a subscription instance by name. - * - * @param string $subscription - * - * @return SubscriptionModel|null - */ - public function subscriptionByStripeID(string $stripe_id = 'default'): ?SubscriptionModel - { - return $this->getSubscriptions()->where(['stripe_id' => $stripe_id])->one(); - } - - /** - * Get a subscription instance by name. - * - * @param string $subscription - * - * @return SubscriptionModel|null - */ - public static function subscriptionOnlyByStripeID($stripe_id){ - return SubscriptionModel::find()->where(['stripe_id'=> $stripe_id])->one(); - } - /** * @return mixed */ @@ -462,10 +301,9 @@ public function invoices(bool $includePending = false, array $parameters = []): { $invoices = []; - $parameters = array_merge(['limit' => 24, 'customer' => $this->stripe_id], $parameters); + $parameters = array_merge(['limit' => 24], $parameters); - \Stripe\Stripe::setApiKey(Yii::$app->params['stripe']['apiKey']); - $stripeInvoices = \Stripe\Invoice::all($parameters); + $stripeInvoices = $this->asStripeCustomer()->invoices($parameters); // Here we will loop through the Stripe invoices and create our own custom Invoice // instances that have more helper methods and are generally more convenient to @@ -632,12 +470,12 @@ public function hasStripeId(): bool /** * Create a Stripe customer for the given user. * - * @param string|null $token + * @param string $token * @param array $options * * @return Customer */ - public function createAsStripeCustomer($token = null, array $options = []): Customer + public function createAsStripeCustomer(string $token, array $options = []): Customer { $options = array_key_exists('email', $options) ? $options : array_merge($options, ['email' => $this->email]); diff --git a/Invoice.php b/Invoice.php index 2f77b7a..0a3566d 100644 --- a/Invoice.php +++ b/Invoice.php @@ -50,7 +50,7 @@ public function __construct($user, StripeInvoice $invoice) */ public function date($timezone = null) { - $carbon = Carbon::createFromTimestampUTC($this->invoice->created); + $carbon = Carbon::createFromTimestampUTC($this->invoice->date); return $timezone ? $carbon->setTimezone($timezone) : $carbon; } diff --git a/README.md b/README.md index bdb3ced..0f6dc49 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,6 @@ Next, you should configure your params section in your configuration file: 'params' => [ ..... 'stripe' => [ - 'pubKey' => 'Your Publishable Api Key for Stripe Checkout', 'apiKey' => 'Your Secret Api Key' ], ], @@ -492,63 +491,3 @@ $refund = $user->refund($invoice->charge); var_dump($refund->amount); // 1000 ``` - -Stripe's checkout UI ------------- - -Easy & quick checkout UI from Stripe to pay subscriptions. Needs a subscription plan ID from a valid subscription. The "controller_url_name" will be used to build url for user redirection, that controller should implement a 'success' & 'cancel' methods. You could add metadata additional info to store with the stripe's subscription. - -```php -StripeCheckoutSubsciption::widget([ - 'session' => $user->createCheckoutSessionForSubscription( - 'STRIPE_PLAN_ID', - [ - 'controller_url_name' => 'stripe', - // 'client_reference_id' => $user->id, - 'metadata' => [ - "student_id" => $user->id, - "student_name" => $student->name . ' ' . $student->surname, - "user_id" => $user->id, - "some_entity_id_from_other_table" => 777 - ] - ]) - ] -); -``` - -If you set a an attribute mapping in your billable model, the webhook controller will save that data in $subscriptionModel->metadata_id . The mapping tie $subscriptionModel->metadata_id and the name of attribute sended in metadata checkout widget -```php -use Billable; -public static function billableMapMetadataAttributes() -{ - return [ 'metadata_id' => 'some_entity_id_from_other_table' ]; -} -``` - -The Webhook controller will save in your database a new subscription, only if you create a new webhook in the stripe dashboard. Create a new webhook at developers/webhooks with the folowing information: -- URL: Your webhoolk url, something like https://example-domain.com/webhook/handle-webhook -- Event types: checkout.session.completed - -Testing this extension ------------- - -Install dependencies: -```php -sudo apt install php-sqlite3 php-curl -composer install --prefer-dist --no-scripts --no-autoloader && rm -rf /root/.composer && composer dump-autoload --no-scripts --optimize -``` - -Add to your Stripe account, in test mode, the following: -- Add one subscripctions named (and with the same ID): main -- Add one subscripction plans named (and with the same ID): monthly-10-1 and monthly-10-2 , price: 10$ , trialdays: 7 -- Add a coupon named and with the same ID: coupon-1 of 5$ - -Then, execute all tests with: -```bash -STRIPE_SECRET="YOUR_STRIPE_TEST_SECRET_KEY" STRIPE_PUB_KEY="YOUR_STRIPE_TEST_PUB_KEY" vendor/phpunit/phpunit/phpunit -v --bootstrap tests/bootstrap.php tests -``` - -Then, execute single test with: -```bash -STRIPE_SECRET="YOUR_STRIPE_TEST_SECRET_KEY" STRIPE_PUB_KEY="YOUR_STRIPE_TEST_PUB_KEY" vendor/phpunit/phpunit/phpunit -v --bootstrap tests/bootstrap.php tests --filter testSubscriptionsCanBeCreated -``` diff --git a/StripeCheckoutSubsciption.php b/StripeCheckoutSubsciption.php deleted file mode 100644 index a71cb0b..0000000 --- a/StripeCheckoutSubsciption.php +++ /dev/null @@ -1,157 +0,0 @@ - - */ -class StripeCheckoutSubsciption extends \yii\base\Widget { - /** - * The Stripe API key. - * - * @var string - */ - protected static $stripePubKey; - - /** - * Label of the button that starts stripe checkout - * @var string plan ID - */ - public $buttonlabel = "Subscribe"; - - /** - * Label of the button that starts stripe checkout - * @var string plan ID - */ - public $buttonSuffixID = ""; - - /** - * Url redirect on success - * @var string succes url - */ - public $successUrl = "/"; - - /** - * Url redirect on cancel - * @var string cancel url - */ - public $cancelUrl = "/"; - - /** - * Additional options to be added. - * @var array additional options. - */ - public $options = []; - - /** - * Stripe session - * @var \Stripe\Checkout\Session - */ - public $session = null; - - /** - * Stripe session - * @var \Stripe\Checkout\Session - */ - public $sessionId = null; - - /** - * @see Stripe's javascript location - * @var string url to stripe's javascript - */ - public $stripeJs = "https://js.stripe.com/v3"; - - const BUTTON_CLASS = 'stripe-button'; - - /** - * @see Init extension default - */ - public function init() { - parent::init(); - } - - /** - * Will show the Stripe's simple form modal - */ - public function run() { - echo Html::script('', [ - 'src' => $this->stripeJs, - ]); - - if($this->session!=null){ - $this->sessionId = $this->session->id; - } - - if($this->buttonSuffixID==''){ - $this->buttonSuffixID = rand(1, 1000000); - } - - echo $this->generateButton($this->buttonSuffixID, $this->buttonlabel); - echo Html::script(" - (function() { - var stripe = Stripe('{$this->getStripePubKey()}'); - var checkoutButton = document.getElementById('checkout-button-{$this->buttonSuffixID}'); - checkoutButton.addEventListener('click', function () { - // When the customer clicks on the button, redirect - // them to Checkout. - stripe.redirectToCheckout({ - // Instead use one of the strategies described in - // https://stripe.com/docs/payments/checkout/fulfillment - // successUrl: 'https://your-website.com/success', - // cancelUrl: 'https://your-website.com/canceled', - - sessionId: '{$this->sessionId}' - }) - .then(function (result) { - if (result.error) { - // If `redirectToCheckout` fails due to a browser or network - // error, display the localized error message to your customer. - var displayError = document.getElementById('stripe-checkout-error-message'); - displayError.textContent = result.error.message; - } - }); - }); - })(); - ", ['defer' => true]); - echo Html::tag('div', '', [ - 'id'=> 'stripe-checkout-error-message', - // 'class' => "alert alert-danger", - 'role' => "alert" - ]); - } - - /** - * Will generate the stripe form - * @return string the generated stripe's modal form - */ - private function generateButton($randElemIDsufix, $label) { - return Html::button(Yii::t('app', $label), [ - 'class' => 'btn btn-primary btn-flat', - "id" => "checkout-button-" . $randElemIDsufix, - "role" => "link" - ]); - } - - /** - * Get the Stripe API key. - * - * @return string - */ - public static function getStripePubKey(): string - { - return static::$stripePubKey ?: Yii::$app->params['stripe']['pubKey']; - } - -} \ No newline at end of file diff --git a/SubscriptionBuilder.php b/SubscriptionBuilder.php index dd9ec61..a8bfe3d 100644 --- a/SubscriptionBuilder.php +++ b/SubscriptionBuilder.php @@ -2,7 +2,6 @@ namespace yii2mod\cashier; -use Yii; use Carbon\Carbon; use yii\base\Exception; use yii2mod\cashier\models\SubscriptionModel; @@ -195,82 +194,7 @@ public function create($token = null, array $options = []) if ($subscriptionModel->save()) { return $subscriptionModel; } else { - throw new Exception('Subscription was not saved. ' . $subscriptionModel->getFirstError(key($subscriptionModel->getErrors())) ); - } - } - - /** - * Loads or updates an Stripe subscription. - * - * @param string $subscriptionID - * - * @return SubscriptionModel - * - * @throws Exception - */ - public function loadSubscriptionModel($subscriptionID, $clientReferenceId=null) - { - $customer = $this->getStripeCustomer(); - $stripeSubscription = \Stripe\Subscription::retrieve($subscriptionID, Yii::$app->params['stripe']['apiKey']); - return $this->updateSubscriptionModel($stripeSubscription, $clientReferenceId); - } - - /** - * Loads or updates an Stripe subscription. - * - * @param string $subscriptionID - * - * @return SubscriptionModel - * - * @throws Exception - */ - public function updateSubscriptionModel($stripeSubscription, $clientReferenceId=null) - { - // precalculate attributes - $trial_ends_at = null; - if($stripeSubscription->trial_end!=null){ - $trial_ends_at = date("Y-m-d H:m:s", $stripeSubscription->trial_end); - } - - $ends_at = null; - $current_period_end = null; - if($stripeSubscription->current_period_end!=null){ - $current_period_end = date("Y-m-d H:m:s", $stripeSubscription->current_period_end); - } - - $metadataMap = $this->user->billableMapMetadataAttributes(); - $metadata_id = null; - if(array_key_exists('metadata_id', $metadataMap) && $stripeSubscription->metadata->offsetExists($metadataMap['metadata_id'])){ - $metadata_id = $stripeSubscription->metadata->{$metadataMap['metadata_id']}; - } - - // instace creation or update - $subscriptionModel = SubscriptionModel::find()->where(['stripe_id' => $stripeSubscription->id])->one(); - if($subscriptionModel==null){ - $subscriptionModel = new SubscriptionModel(); - } - else{ - $clientReferenceId = $subscriptionModel->client_reference_id; - } - - $subscriptionModel->setAttributes([ - 'user_id' => $this->user->id, - 'name' => $stripeSubscription->plan->product, - 'stripe_id' => $stripeSubscription->id, - 'stripe_plan' => $stripeSubscription->plan->id, - 'status' => $stripeSubscription->status, - 'metadata_id' => $metadata_id, - 'client_reference_id' => $clientReferenceId, - 'quantity' => $stripeSubscription->quantity, - 'cancel_at_period_end' => (int)$stripeSubscription->cancel_at_period_end, - 'current_period_end' => $current_period_end, - 'trial_ends_at' => $trial_ends_at, - 'ends_at' => $ends_at, - ]); - if ($subscriptionModel->save()) { - return $subscriptionModel; - } else { - throw new Exception('Subscription was not saved. ' . $subscriptionModel->getFirstError(key($subscriptionModel->getErrors())) ); + throw new Exception('Subscription was not saved.'); } } @@ -303,7 +227,7 @@ protected function getStripeCustomer($token = null, array $options = []) * * @return array */ - public function buildPayload() + protected function buildPayload() { return array_filter([ 'plan' => $this->plan, diff --git a/composer.json b/composer.json index c556a45..d80e7dd 100644 --- a/composer.json +++ b/composer.json @@ -17,14 +17,14 @@ "require": { "php": ">=7.2", "yiisoft/yii2": "~2.0.14", - "yii2mod/yii2-behaviors": "~2.0", - "stripe/stripe-php": "~7.0", - "nesbot/carbon": "~2.29.1", + "yii2mod/yii2-behaviors": "*", + "stripe/stripe-php": "~4.0", + "nesbot/carbon": "~1.0", "dompdf/dompdf": "^0.8.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "~2.0", - "phpunit/phpunit": "~8.5.2" + "phpunit/phpunit": "~7.0" }, "autoload": { diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 2de5ce1..0000000 --- a/composer.lock +++ /dev/null @@ -1,3680 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "1484cc025918fc2569a8ff85f8c24578", - "packages": [ - { - "name": "bower-asset/inputmask", - "version": "3.3.11", - "source": { - "type": "git", - "url": "https://github.com/RobinHerbots/Inputmask.git", - "reference": "5e670ad62f50c738388d4dcec78d2888505ad77b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/5e670ad62f50c738388d4dcec78d2888505ad77b", - "reference": "5e670ad62f50c738388d4dcec78d2888505ad77b" - }, - "require": { - "bower-asset/jquery": ">=1.7" - }, - "type": "bower-asset", - "license": [ - "http://opensource.org/licenses/mit-license.php" - ] - }, - { - "name": "bower-asset/jquery", - "version": "3.4.1", - "source": { - "type": "git", - "url": "git@github.com:jquery/jquery-dist.git", - "reference": "15bc73803f76bc53b654b9fdbbbc096f56d7c03d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jquery/jquery-dist/zipball/15bc73803f76bc53b654b9fdbbbc096f56d7c03d", - "reference": "15bc73803f76bc53b654b9fdbbbc096f56d7c03d" - }, - "type": "bower-asset", - "license": [ - "MIT" - ] - }, - { - "name": "bower-asset/punycode", - "version": "v1.3.2", - "source": { - "type": "git", - "url": "https://github.com/bestiejs/punycode.js.git", - "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/bestiejs/punycode.js/zipball/38c8d3131a82567bfef18da09f7f4db68c84f8a3", - "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3" - }, - "type": "bower-asset" - }, - { - "name": "bower-asset/yii2-pjax", - "version": "2.0.7.1", - "source": { - "type": "git", - "url": "https://github.com/yiisoft/jquery-pjax.git", - "reference": "aef7b953107264f00234902a3880eb50dafc48be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/yiisoft/jquery-pjax/zipball/aef7b953107264f00234902a3880eb50dafc48be", - "reference": "aef7b953107264f00234902a3880eb50dafc48be" - }, - "require": { - "bower-asset/jquery": ">=1.8" - }, - "type": "bower-asset", - "license": [ - "MIT" - ] - }, - { - "name": "cebe/markdown", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/cebe/markdown.git", - "reference": "9bac5e971dd391e2802dca5400bbeacbaea9eb86" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cebe/markdown/zipball/9bac5e971dd391e2802dca5400bbeacbaea9eb86", - "reference": "9bac5e971dd391e2802dca5400bbeacbaea9eb86", - "shasum": "" - }, - "require": { - "lib-pcre": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "cebe/indent": "*", - "facebook/xhprof": "*@dev", - "phpunit/phpunit": "4.1.*" - }, - "bin": [ - "bin/markdown" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "cebe\\markdown\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Carsten Brandt", - "email": "mail@cebe.cc", - "homepage": "http://cebe.cc/", - "role": "Creator" - } - ], - "description": "A super fast, highly extensible markdown parser for PHP", - "homepage": "https://github.com/cebe/markdown#readme", - "keywords": [ - "extensible", - "fast", - "gfm", - "markdown", - "markdown-extra" - ], - "time": "2018-03-26T11:24:36+00:00" - }, - { - "name": "dompdf/dompdf", - "version": "v0.8.4", - "source": { - "type": "git", - "url": "https://github.com/dompdf/dompdf.git", - "reference": "8f49b3b01693f51037dd50da81090beba1b5c005" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dompdf/dompdf/zipball/8f49b3b01693f51037dd50da81090beba1b5c005", - "reference": "8f49b3b01693f51037dd50da81090beba1b5c005", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-mbstring": "*", - "phenx/php-font-lib": "^0.5.1", - "phenx/php-svg-lib": "^0.3.3", - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.5", - "squizlabs/php_codesniffer": "^3.5" - }, - "suggest": { - "ext-gd": "Needed to process images", - "ext-gmagick": "Improves image processing performance", - "ext-imagick": "Improves image processing performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-develop": "0.7-dev" - } - }, - "autoload": { - "psr-4": { - "Dompdf\\": "src/" - }, - "classmap": [ - "lib/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1" - ], - "authors": [ - { - "name": "Fabien Ménager", - "email": "fabien.menager@gmail.com" - }, - { - "name": "Brian Sweeney", - "email": "eclecticgeek@gmail.com" - }, - { - "name": "Gabriel Bull", - "email": "me@gabrielbull.com" - } - ], - "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter", - "homepage": "https://github.com/dompdf/dompdf", - "time": "2020-01-20T17:00:46+00:00" - }, - { - "name": "ezyang/htmlpurifier", - "version": "v4.12.0", - "source": { - "type": "git", - "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "a617e55bc62a87eec73bd456d146d134ad716f03" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/a617e55bc62a87eec73bd456d146d134ad716f03", - "reference": "a617e55bc62a87eec73bd456d146d134ad716f03", - "shasum": "" - }, - "require": { - "php": ">=5.2" - }, - "require-dev": { - "simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd" - }, - "type": "library", - "autoload": { - "psr-0": { - "HTMLPurifier": "library/" - }, - "files": [ - "library/HTMLPurifier.composer.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-or-later" - ], - "authors": [ - { - "name": "Edward Z. Yang", - "email": "admin@htmlpurifier.org", - "homepage": "http://ezyang.com" - } - ], - "description": "Standards compliant HTML filter written in PHP", - "homepage": "http://htmlpurifier.org/", - "keywords": [ - "html" - ], - "time": "2019-10-28T03:44:26+00:00" - }, - { - "name": "nesbot/carbon", - "version": "2.29.1", - "source": { - "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "e509be5bf2d703390e69e14496d9a1168452b0a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/e509be5bf2d703390e69e14496d9a1168452b0a2", - "reference": "e509be5bf2d703390e69e14496d9a1168452b0a2", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": "^7.1.8 || ^8.0", - "symfony/translation": "^3.4 || ^4.0 || ^5.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", - "kylekatarnls/multi-tester": "^1.1", - "phpmd/phpmd": "^2.8", - "phpstan/phpstan": "^0.11", - "phpunit/phpunit": "^7.5 || ^8.0", - "squizlabs/php_codesniffer": "^3.4" - }, - "bin": [ - "bin/carbon" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - }, - "laravel": { - "providers": [ - "Carbon\\Laravel\\ServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Carbon\\": "src/Carbon/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" - }, - { - "name": "kylekatarnls", - "homepage": "http://github.com/kylekatarnls" - } - ], - "description": "An API extension for DateTime that supports 281 different languages.", - "homepage": "http://carbon.nesbot.com", - "keywords": [ - "date", - "datetime", - "time" - ], - "time": "2020-01-21T09:36:43+00:00" - }, - { - "name": "phenx/php-font-lib", - "version": "0.5.1", - "source": { - "type": "git", - "url": "https://github.com/PhenX/php-font-lib.git", - "reference": "760148820110a1ae0936e5cc35851e25a938bc97" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PhenX/php-font-lib/zipball/760148820110a1ae0936e5cc35851e25a938bc97", - "reference": "760148820110a1ae0936e5cc35851e25a938bc97", - "shasum": "" - }, - "require-dev": { - "phpunit/phpunit": "^4.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "FontLib\\": "src/FontLib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0" - ], - "authors": [ - { - "name": "Fabien Ménager", - "email": "fabien.menager@gmail.com" - } - ], - "description": "A library to read, parse, export and make subsets of different types of font files.", - "homepage": "https://github.com/PhenX/php-font-lib", - "time": "2017-09-13T16:14:37+00:00" - }, - { - "name": "phenx/php-svg-lib", - "version": "v0.3.3", - "source": { - "type": "git", - "url": "https://github.com/PhenX/php-svg-lib.git", - "reference": "5fa61b65e612ce1ae15f69b3d223cb14ecc60e32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/5fa61b65e612ce1ae15f69b3d223cb14ecc60e32", - "reference": "5fa61b65e612ce1ae15f69b3d223cb14ecc60e32", - "shasum": "" - }, - "require": { - "sabberworm/php-css-parser": "^8.3" - }, - "require-dev": { - "phpunit/phpunit": "^5.5|^6.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Svg\\": "src/Svg" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0" - ], - "authors": [ - { - "name": "Fabien Ménager", - "email": "fabien.menager@gmail.com" - } - ], - "description": "A library to read, parse and export to PDF SVG files.", - "homepage": "https://github.com/PhenX/php-svg-lib", - "time": "2019-09-11T20:02:13+00:00" - }, - { - "name": "sabberworm/php-css-parser", - "version": "8.3.0", - "source": { - "type": "git", - "url": "https://github.com/sabberworm/PHP-CSS-Parser.git", - "reference": "91bcc3e3fdb7386c9a2e0e0aa09ca75cc43f121f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/91bcc3e3fdb7386c9a2e0e0aa09ca75cc43f121f", - "reference": "91bcc3e3fdb7386c9a2e0e0aa09ca75cc43f121f", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "codacy/coverage": "^1.4", - "phpunit/phpunit": "~4.8" - }, - "type": "library", - "autoload": { - "psr-0": { - "Sabberworm\\CSS": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Raphael Schweikert" - } - ], - "description": "Parser for CSS Files written in PHP", - "homepage": "http://www.sabberworm.com/blog/2010/6/10/php-css-parser", - "keywords": [ - "css", - "parser", - "stylesheet" - ], - "time": "2019-02-22T07:42:52+00:00" - }, - { - "name": "stripe/stripe-php", - "version": "v7.20.0", - "source": { - "type": "git", - "url": "https://github.com/stripe/stripe-php.git", - "reference": "bc47cd4af1c0e7be6c2aaa3f9798188a0909adef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/stripe/stripe-php/zipball/bc47cd4af1c0e7be6c2aaa3f9798188a0909adef", - "reference": "bc47cd4af1c0e7be6c2aaa3f9798188a0909adef", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "php": ">=5.6.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.15", - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5.7", - "squizlabs/php_codesniffer": "^3.3", - "symfony/process": "~3.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "Stripe\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Stripe and contributors", - "homepage": "https://github.com/stripe/stripe-php/contributors" - } - ], - "description": "Stripe PHP Library", - "homepage": "https://stripe.com/", - "keywords": [ - "api", - "payment processing", - "stripe" - ], - "time": "2020-01-23T19:25:13+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.13-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "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 polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2019-11-27T14:18:11+00:00" - }, - { - "name": "symfony/translation", - "version": "v5.0.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "28e1054f1ea26c63762d9260c37cb1056ea62dbb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/28e1054f1ea26c63762d9260c37cb1056ea62dbb", - "reference": "28e1054f1ea26c63762d9260c37cb1056ea62dbb", - "shasum": "" - }, - "require": { - "php": "^7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^2" - }, - "conflict": { - "symfony/config": "<4.4", - "symfony/dependency-injection": "<5.0", - "symfony/http-kernel": "<5.0", - "symfony/twig-bundle": "<5.0", - "symfony/yaml": "<4.4" - }, - "provide": { - "symfony/translation-implementation": "2.0" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^4.4|^5.0", - "symfony/console": "^4.4|^5.0", - "symfony/dependency-injection": "^5.0", - "symfony/finder": "^4.4|^5.0", - "symfony/http-kernel": "^5.0", - "symfony/intl": "^4.4|^5.0", - "symfony/service-contracts": "^1.1.2|^2", - "symfony/yaml": "^4.4|^5.0" - }, - "suggest": { - "psr/log-implementation": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Translation\\": "" - }, - "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": "Symfony Translation Component", - "homepage": "https://symfony.com", - "time": "2020-01-21T08:40:24+00:00" - }, - { - "name": "symfony/translation-contracts", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation-contracts.git", - "reference": "8cc682ac458d75557203b2f2f14b0b92e1c744ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/8cc682ac458d75557203b2f2f14b0b92e1c744ed", - "reference": "8cc682ac458d75557203b2f2f14b0b92e1c744ed", - "shasum": "" - }, - "require": { - "php": "^7.2.5" - }, - "suggest": { - "symfony/translation-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Translation\\": "" - } - }, - "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 translation", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "time": "2019-11-18T17:27:11+00:00" - }, - { - "name": "yii2mod/yii2-behaviors", - "version": "2.0", - "source": { - "type": "git", - "url": "https://github.com/yii2mod/yii2-behaviors.git", - "reference": "2d35266588f22930d9f87809137536aff510e01a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/yii2mod/yii2-behaviors/zipball/2d35266588f22930d9f87809137536aff510e01a", - "reference": "2d35266588f22930d9f87809137536aff510e01a", - "shasum": "" - }, - "require": { - "nesbot/carbon": "^2.16", - "php": "^7.1.8", - "yiisoft/yii2": "~2.0.10" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2.0", - "phpunit/phpunit": "^7.3" - }, - "type": "yii2-extension", - "autoload": { - "psr-4": { - "yii2mod\\behaviors\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dmitry Semenov", - "email": "disemx@gmail.com" - }, - { - "name": "Igor Chepurnoy", - "email": "chepurnoi.igor@gmail.com" - } - ], - "description": "Collection of useful behaviors for Yii Framework 2.0", - "keywords": [ - "yii2", - "yii2 behaviors" - ], - "time": "2019-06-13T12:34:56+00:00" - }, - { - "name": "yiisoft/yii2", - "version": "2.0.32", - "source": { - "type": "git", - "url": "https://github.com/yiisoft/yii2-framework.git", - "reference": "a4aca1a2154098844a039d21112cafd31d70b8fd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/a4aca1a2154098844a039d21112cafd31d70b8fd", - "reference": "a4aca1a2154098844a039d21112cafd31d70b8fd", - "shasum": "" - }, - "require": { - "bower-asset/inputmask": "~3.2.2 | ~3.3.5", - "bower-asset/jquery": "3.4.*@stable | 3.3.*@stable | 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable", - "bower-asset/punycode": "1.3.*", - "bower-asset/yii2-pjax": "~2.0.1", - "cebe/markdown": "~1.0.0 | ~1.1.0 | ~1.2.0", - "ext-ctype": "*", - "ext-mbstring": "*", - "ezyang/htmlpurifier": "~4.6", - "lib-pcre": "*", - "php": ">=5.4.0", - "yiisoft/yii2-composer": "~2.0.4" - }, - "bin": [ - "yii" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "yii\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Qiang Xue", - "email": "qiang.xue@gmail.com", - "homepage": "http://www.yiiframework.com/", - "role": "Founder and project lead" - }, - { - "name": "Alexander Makarov", - "email": "sam@rmcreative.ru", - "homepage": "http://rmcreative.ru/", - "role": "Core framework development" - }, - { - "name": "Maurizio Domba", - "homepage": "http://mdomba.info/", - "role": "Core framework development" - }, - { - "name": "Carsten Brandt", - "email": "mail@cebe.cc", - "homepage": "http://cebe.cc/", - "role": "Core framework development" - }, - { - "name": "Timur Ruziev", - "email": "resurtm@gmail.com", - "homepage": "http://resurtm.com/", - "role": "Core framework development" - }, - { - "name": "Paul Klimov", - "email": "klimov.paul@gmail.com", - "role": "Core framework development" - }, - { - "name": "Dmitry Naumenko", - "email": "d.naumenko.a@gmail.com", - "role": "Core framework development" - }, - { - "name": "Boudewijn Vahrmeijer", - "email": "info@dynasource.eu", - "homepage": "http://dynasource.eu", - "role": "Core framework development" - } - ], - "description": "Yii PHP Framework Version 2", - "homepage": "http://www.yiiframework.com/", - "keywords": [ - "framework", - "yii2" - ], - "time": "2020-01-21T22:29:38+00:00" - }, - { - "name": "yiisoft/yii2-composer", - "version": "2.0.8", - "source": { - "type": "git", - "url": "https://github.com/yiisoft/yii2-composer.git", - "reference": "5c7ca9836cf80b34db265332a7f2f8438eb469b9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/5c7ca9836cf80b34db265332a7f2f8438eb469b9", - "reference": "5c7ca9836cf80b34db265332a7f2f8438eb469b9", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0" - }, - "require-dev": { - "composer/composer": "^1.0", - "phpunit/phpunit": "<7" - }, - "type": "composer-plugin", - "extra": { - "class": "yii\\composer\\Plugin", - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "yii\\composer\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Qiang Xue", - "email": "qiang.xue@gmail.com" - }, - { - "name": "Carsten Brandt", - "email": "mail@cebe.cc" - } - ], - "description": "The composer plugin for Yii extension installer", - "keywords": [ - "composer", - "extension installer", - "yii2" - ], - "time": "2019-07-16T13:22:30+00:00" - } - ], - "packages-dev": [ - { - "name": "composer/semver", - "version": "1.5.1", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/c6bea70230ef4dd483e6bbcab6005f682ed3a8de", - "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "time": "2020-01-13T12:06:48+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "cbe23383749496fe0f373345208b79568e4bc248" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/cbe23383749496fe0f373345208b79568e4bc248", - "reference": "cbe23383749496fe0f373345208b79568e4bc248", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "time": "2019-11-06T16:40:04+00:00" - }, - { - "name": "doctrine/annotations", - "version": "v1.8.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/904dca4eb10715b92569fbcd79e201d5c349b6bc", - "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "php": "^7.1" - }, - "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "^7.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "time": "2019-10-01T18:55:10+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2019-10-21T16:45:58+00:00" - }, - { - "name": "doctrine/lexer", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", - "shasum": "" - }, - "require": { - "php": "^7.2" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan": "^0.11.8", - "phpunit/phpunit": "^8.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "time": "2019-10-30T14:39:59+00:00" - }, - { - "name": "friendsofphp/php-cs-fixer", - "version": "v2.16.1", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "c8afb599858876e95e8ebfcd97812d383fa23f02" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/c8afb599858876e95e8ebfcd97812d383fa23f02", - "reference": "c8afb599858876e95e8ebfcd97812d383fa23f02", - "shasum": "" - }, - "require": { - "composer/semver": "^1.4", - "composer/xdebug-handler": "^1.2", - "doctrine/annotations": "^1.2", - "ext-json": "*", - "ext-tokenizer": "*", - "php": "^5.6 || ^7.0", - "php-cs-fixer/diff": "^1.3", - "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0", - "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", - "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", - "symfony/finder": "^3.0 || ^4.0 || ^5.0", - "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", - "symfony/polyfill-php70": "^1.0", - "symfony/polyfill-php72": "^1.4", - "symfony/process": "^3.0 || ^4.0 || ^5.0", - "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" - }, - "require-dev": { - "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", - "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.2", - "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.1", - "php-cs-fixer/accessible-object": "^1.0", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.1", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.1", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1", - "phpunitgoodpractices/traits": "^1.8", - "symfony/phpunit-bridge": "^4.3 || ^5.0", - "symfony/yaml": "^3.0 || ^4.0 || ^5.0" - }, - "suggest": { - "ext-mbstring": "For handling non-UTF8 characters in cache signature.", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", - "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." - }, - "bin": [ - "php-cs-fixer" - ], - "type": "application", - "autoload": { - "psr-4": { - "PhpCsFixer\\": "src/" - }, - "classmap": [ - "tests/Test/AbstractFixerTestCase.php", - "tests/Test/AbstractIntegrationCaseFactory.php", - "tests/Test/AbstractIntegrationTestCase.php", - "tests/Test/Assert/AssertTokensTrait.php", - "tests/Test/IntegrationCase.php", - "tests/Test/IntegrationCaseFactory.php", - "tests/Test/IntegrationCaseFactoryInterface.php", - "tests/Test/InternalIntegrationCaseFactory.php", - "tests/TestCase.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Dariusz Rumiński", - "email": "dariusz.ruminski@gmail.com" - } - ], - "description": "A tool to automatically fix PHP code style", - "time": "2019-11-25T22:10:32+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.9.5", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "replace": { - "myclabs/deep-copy": "self.version" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, - "files": [ - "src/DeepCopy/deep_copy.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2020-01-17T21:11:47+00:00" - }, - { - "name": "paragonie/random_compat", - "version": "v9.99.99", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "shasum": "" - }, - "require": { - "php": "^7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "time": "2018-07-02T15:55:56+00:00" - }, - { - "name": "phar-io/manifest", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2018-07-08T19:23:20+00:00" - }, - { - "name": "phar-io/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "time": "2018-07-08T19:19:57+00:00" - }, - { - "name": "php-cs-fixer/diff", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756", - "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3", - "symfony/process": "^3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "SpacePossum" - } - ], - "description": "sebastian/diff v2 backport support for PHP5.6", - "homepage": "https://github.com/PHP-CS-Fixer", - "keywords": [ - "diff" - ], - "time": "2018-02-15T16:58:55+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "~6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2018-08-07T13:53:10+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "4.3.4", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", - "shasum": "" - }, - "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpdocumentor/type-resolver": "0.4.*", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-12-28T18:55:12+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "shasum": "" - }, - "require": { - "php": "^7.1", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2019-08-22T18:11:29+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.10.2", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b4400efc9d206e83138e2bb97ed7f5b14b831cd9", - "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2020-01-20T15:57:02+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "7.0.10", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", - "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": "^7.2", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.1", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^4.2.2", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1.3" - }, - "require-dev": { - "phpunit/phpunit": "^8.2.2" - }, - "suggest": { - "ext-xdebug": "^2.7.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2019-11-20T13:55:58+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "050bedf145a257b1ff02746c31894800e5122946" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", - "reference": "050bedf145a257b1ff02746c31894800e5122946", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2018-09-13T20:33:42+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "2.1.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2019-06-07T04:22:29+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2019-09-17T06:23:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "8.5.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "018b6ac3c8ab20916db85fa91bf6465acb64d1e0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/018b6ac3c8ab20916db85fa91bf6465acb64d1e0", - "reference": "018b6ac3c8ab20916db85fa91bf6465acb64d1e0", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2.0", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.9.1", - "phar-io/manifest": "^1.0.3", - "phar-io/version": "^2.0.1", - "php": "^7.2", - "phpspec/prophecy": "^1.8.1", - "phpunit/php-code-coverage": "^7.0.7", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.2", - "sebastian/exporter": "^3.1.1", - "sebastian/global-state": "^3.0.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.3", - "sebastian/version": "^2.0.1" - }, - "require-dev": { - "ext-pdo": "*" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0.0" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "8.5-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2020-01-08T08:49:49+00:00" - }, - { - "name": "psr/container", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "time": "2017-02-14T16:28:37+00:00" - }, - { - "name": "psr/event-dispatcher", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], - "time": "2019-01-08T18:20:26+00:00" - }, - { - "name": "psr/log", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", - "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": "2019-11-01T11:05:21+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" - }, - { - "name": "sebastian/comparator", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "shasum": "" - }, - "require": { - "php": "^7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2018-07-12T15:12:46+00:00" - }, - { - "name": "sebastian/diff", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "time": "2019-02-04T06:01:07+00:00" - }, - { - "name": "sebastian/environment", - "version": "4.2.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.5" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2019-11-20T08:46:58+00:00" - }, - { - "name": "sebastian/exporter", - "version": "3.1.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2019-09-14T09:02:43+00:00" - }, - { - "name": "sebastian/global-state", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", - "shasum": "" - }, - "require": { - "php": "^7.2", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^8.0" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2019-02-01T05:30:01+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2018-10-04T04:07:39+00:00" - }, - { - "name": "sebastian/type", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", - "shasum": "" - }, - "require": { - "php": "^7.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "time": "2019-07-02T08:10:15+00:00" - }, - { - "name": "sebastian/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" - }, - { - "name": "symfony/console", - "version": "v5.0.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "345ab6ecb456b5147ea3b3271d7f1f00aadfd257" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/345ab6ecb456b5147ea3b3271d7f1f00aadfd257", - "reference": "345ab6ecb456b5147ea3b3271d7f1f00aadfd257", - "shasum": "" - }, - "require": { - "php": "^7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", - "symfony/service-contracts": "^1.1|^2" - }, - "conflict": { - "symfony/dependency-injection": "<4.4", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" - }, - "provide": { - "psr/log-implementation": "1.0" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/event-dispatcher": "^4.4|^5.0", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0", - "symfony/var-dumper": "^4.4|^5.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "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": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2020-01-19T11:13:19+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v5.0.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "4a7a8cdca1120c091b4797f0e5bba69c1e783224" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4a7a8cdca1120c091b4797f0e5bba69c1e783224", - "reference": "4a7a8cdca1120c091b4797f0e5bba69c1e783224", - "shasum": "" - }, - "require": { - "php": "^7.2.5", - "symfony/event-dispatcher-contracts": "^2" - }, - "conflict": { - "symfony/dependency-injection": "<4.4" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/expression-language": "^4.4|^5.0", - "symfony/http-foundation": "^4.4|^5.0", - "symfony/service-contracts": "^1.1|^2", - "symfony/stopwatch": "^4.4|^5.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "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": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2020-01-10T21:57:37+00:00" - }, - { - "name": "symfony/event-dispatcher-contracts", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "af23c2584d4577d54661c434446fb8fbed6025dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/af23c2584d4577d54661c434446fb8fbed6025dd", - "reference": "af23c2584d4577d54661c434446fb8fbed6025dd", - "shasum": "" - }, - "require": { - "php": "^7.2.5", - "psr/event-dispatcher": "^1" - }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } - }, - "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 dispatching event", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "time": "2019-11-18T17:27:11+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v5.0.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "3afadc0f57cd74f86379d073e694b0f2cda2a88c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/3afadc0f57cd74f86379d073e694b0f2cda2a88c", - "reference": "3afadc0f57cd74f86379d073e694b0f2cda2a88c", - "shasum": "" - }, - "require": { - "php": "^7.2.5", - "symfony/polyfill-ctype": "~1.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "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": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2020-01-21T08:40:24+00:00" - }, - { - "name": "symfony/finder", - "version": "v5.0.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "4176e7cb846fe08f32518b7e0ed8462e2db8d9bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/4176e7cb846fe08f32518b7e0ed8462e2db8d9bb", - "reference": "4176e7cb846fe08f32518b7e0ed8462e2db8d9bb", - "shasum": "" - }, - "require": { - "php": "^7.2.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "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": "Symfony Finder Component", - "homepage": "https://symfony.com", - "time": "2020-01-04T14:08:26+00:00" - }, - { - "name": "symfony/options-resolver", - "version": "v5.0.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "b1ab86ce52b0c0abe031367a173005a025e30e04" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b1ab86ce52b0c0abe031367a173005a025e30e04", - "reference": "b1ab86ce52b0c0abe031367a173005a025e30e04", - "shasum": "" - }, - "require": { - "php": "^7.2.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "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": "Symfony OptionsResolver Component", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ], - "time": "2020-01-04T14:08:26+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.13.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.13-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "time": "2019-11-27T13:56:44+00:00" - }, - { - "name": "symfony/polyfill-php70", - "version": "v1.13.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "af23c7bb26a73b850840823662dda371484926c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/af23c7bb26a73b850840823662dda371484926c4", - "reference": "af23c7bb26a73b850840823662dda371484926c4", - "shasum": "" - }, - "require": { - "paragonie/random_compat": "~1.0|~2.0|~9.99", - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.13-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "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 polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2019-11-27T13:56:44+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.13.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/66fea50f6cb37a35eea048d75a7d99a45b586038", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.13-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "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 polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2019-11-27T13:56:44+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.13.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/4b0e2222c55a25b4541305a053013d5647d3a25f", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.13-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "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 polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2019-11-27T16:25:15+00:00" - }, - { - "name": "symfony/process", - "version": "v5.0.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "f9ffd870f5ac01abec7b2b5e15f904ca9400ecd1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/f9ffd870f5ac01abec7b2b5e15f904ca9400ecd1", - "reference": "f9ffd870f5ac01abec7b2b5e15f904ca9400ecd1", - "shasum": "" - }, - "require": { - "php": "^7.2.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "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": "Symfony Process Component", - "homepage": "https://symfony.com", - "time": "2020-01-09T09:53:06+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "144c5e51266b281231e947b51223ba14acf1a749" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", - "reference": "144c5e51266b281231e947b51223ba14acf1a749", - "shasum": "" - }, - "require": { - "php": "^7.2.5", - "psr/container": "^1.0" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } - }, - "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 writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "time": "2019-11-18T17:27:11+00:00" - }, - { - "name": "symfony/stopwatch", - "version": "v5.0.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "5d9add8034135b9a5f7b101d1e42c797e7f053e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5d9add8034135b9a5f7b101d1e42c797e7f053e4", - "reference": "5d9add8034135b9a5f7b101d1e42c797e7f053e4", - "shasum": "" - }, - "require": { - "php": "^7.2.5", - "symfony/service-contracts": "^1.0|^2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "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": "Symfony Stopwatch Component", - "homepage": "https://symfony.com", - "time": "2020-01-04T14:08:26+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2019-06-13T22:48:21+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "vimeo/psalm": "<3.6.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" - }, - "type": "library", - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2019-11-24T13:36:37+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=7.1" - }, - "platform-dev": [] -} diff --git a/controllers/WebhookController.php b/controllers/WebhookController.php index 2cad2a2..6338694 100644 --- a/controllers/WebhookController.php +++ b/controllers/WebhookController.php @@ -14,15 +14,6 @@ /** * Class WebhookController * - * Based on: - * - * Payment proccess: - * https://stripe.com/docs/payments/checkout/fulfillment#webhooks - * - * Request verification: - * https://stackoverflow.com/a/48694589 - * https://stripe.com/docs/webhooks/signatures - * * @package yii2mod\cashier\controllers */ class WebhookController extends Controller @@ -54,7 +45,6 @@ public function behaviors() */ public function actionHandleWebhook() { - // file_put_contents('/tmp/last-stripe-payload.txt', Yii::$app->request->getRawBody(), FILE_APPEND ); $payload = json_decode(Yii::$app->request->getRawBody(), true); if (!$this->eventExistsOnStripe($payload['id'])) { @@ -96,32 +86,6 @@ protected function handleCustomerSubscriptionDeleted(array $payload) ]); } - /** - * Handle a cancelled customer from a Stripe subscription. - * - * @param array $payload - * - * @return Response - */ - protected function handleCheckoutSessionCompleted(array $payload) - { - $user = $this->getUserByStripeId($payload['data']['object']['customer']); - if ($user) { - $dataObj = $payload['data']['object']; - if($dataObj['mode']=="subscription"){ - $subscriptionModel = $user->subscriptionByStripeID($dataObj['subscription']); - if (!$subscriptionModel) { - $subscriptionModel = $user->loadSubscriptionModel($dataObj['subscription'], $dataObj['client_reference_id']); - } - } - } - - return new Response([ - 'statusCode' => 200, - 'statusText' => 'Webhook Handled', - ]); - } - /** * Get the billable entity instance by Stripe ID. * @@ -160,7 +124,7 @@ protected function eventExistsOnStripe($id) public function missingMethod() { return new Response([ - 'statusCode' => 400, + 'statusCode' => 200, ]); } } diff --git a/migrations/m191209_213759_add_attributes_to_subscription_table.php b/migrations/m191209_213759_add_attributes_to_subscription_table.php deleted file mode 100644 index cfaf5a7..0000000 --- a/migrations/m191209_213759_add_attributes_to_subscription_table.php +++ /dev/null @@ -1,29 +0,0 @@ -addColumn('subscriptions', 'client_reference_id', $this->string()->after('stripe_plan') ); - $this->addColumn('subscriptions', 'status', $this->string()->after('stripe_plan') ); - $this->addColumn('subscriptions', 'metadata_id', $this->integer()->after('status') ); - } - - /** - * {@inheritdoc} - */ - public function safeDown() - { - $this->dropColumn('subscriptions', 'client_reference_id'); - $this->dropColumn('subscriptions', 'status'); - $this->dropColumn('subscriptions', 'metadata_id'); - } -} diff --git a/migrations/m191219_213759_add_more_attributes_to_subscription_table.php b/migrations/m191219_213759_add_more_attributes_to_subscription_table.php deleted file mode 100644 index 8f78211..0000000 --- a/migrations/m191219_213759_add_more_attributes_to_subscription_table.php +++ /dev/null @@ -1,27 +0,0 @@ -addColumn('subscriptions', 'cancel_at_period_end', $this->integer()->after('quantity')->defaultValue(0) ); - $this->addColumn('subscriptions', 'current_period_end', $this->timestamp()->after('cancel_at_period_end')->null() ); - } - - /** - * {@inheritdoc} - */ - public function safeDown() - { - $this->dropColumn('subscriptions', 'cancel_at_period_end'); - $this->dropColumn('subscriptions', 'current_period_end'); - } -} diff --git a/models/SubscriptionModel.php b/models/SubscriptionModel.php index 914c0fa..b46ca2e 100644 --- a/models/SubscriptionModel.php +++ b/models/SubscriptionModel.php @@ -17,11 +17,7 @@ * @property string $name * @property string $stripe_id * @property string $stripe_plan - * @property int $metadata_id - * @property string $client_reference_id * @property int $quantity - * @property int $cancel_at_period_end - * @property int $current_period_end * @property Carbon $trial_ends_at * @property Carbon $ends_at * @property int $created_at @@ -58,10 +54,10 @@ public static function tableName(): string public function rules(): array { return [ - [['user_id', 'name', 'stripe_id', 'stripe_plan', 'quantity'], 'required'], - [['user_id', 'quantity', 'metadata_id', 'cancel_at_period_end'], 'integer'], - [['trial_ends_at', 'ends_at', 'current_period_end'], 'safe'], - [['name', 'stripe_id', 'stripe_plan', 'client_reference_id', 'status'], 'string', 'max' => 255], + [['user_id', 'name', 'stripe_id', 'stripe_plan', 'quantity'], 'required'], + [['user_id', 'quantity'], 'integer'], + [['trial_ends_at', 'ends_at'], 'safe'], + [['name', 'stripe_id', 'stripe_plan'], 'string', 'max' => 255], ]; } @@ -76,12 +72,7 @@ public function attributeLabels(): array 'name' => Yii::t('app', 'Name'), 'stripe_id' => Yii::t('app', 'Stripe ID'), 'stripe_plan' => Yii::t('app', 'Stripe Plan'), - 'status' => Yii::t('app', 'Status'), - 'metadata_id' => Yii::t('app', 'Metadata ID'), - 'client_reference_id' => Yii::t('app', 'Client reference ID'), 'quantity' => Yii::t('app', 'Quantity'), - 'cancel_at_period_end' => Yii::t('app', 'Cancel at period end'), - 'current_period_end' => Yii::t('app', 'Current period end date'), 'trial_ends_at' => Yii::t('app', 'Trial End At'), 'ends_at' => Yii::t('app', 'End At'), 'created_at' => Yii::t('app', 'Created At'), @@ -327,8 +318,7 @@ public function cancel() { $subscription = $this->asStripeSubscription(); - $subscription->cancel_at_period_end = true; - $subscription->save(); + $subscription->cancel(['at_period_end' => true]); // If the user was on trial, we will set the grace period to end when the trial // would have ended. Otherwise, we'll retrieve the end of the billing period @@ -341,7 +331,6 @@ public function cancel() ); } - $this->cancel_at_period_end = (int)$subscription->cancel_at_period_end; $this->save(); return $this; @@ -386,7 +375,6 @@ public function resume() } $subscription = $this->asStripeSubscription(); - $subscription->cancel_at_period_end = false; // To resume the subscription we need to set the plan parameter on the Stripe // subscription object. This will force Stripe to resume this subscription @@ -405,13 +393,6 @@ public function resume() // local database to indicate that the subscription is active again and is // no longer "cancelled". Then we will save this record in the database. $this->ends_at = null; - - $current_period_end = null; - if($subscription->current_period_end!=null){ - $current_period_end = date("Y-m-d H:m:s", $subscription->current_period_end); - } - $this->current_period_end = $current_period_end; - $this->cancel_at_period_end = (int)$subscription->cancel_at_period_end; $this->save(); return $this; diff --git a/tests/CashierTest.php b/tests/CashierTest.php index 3bc873f..5f78d2d 100644 --- a/tests/CashierTest.php +++ b/tests/CashierTest.php @@ -7,8 +7,6 @@ use Yii; use yii2mod\cashier\tests\data\CashierTestControllerStub; use yii2mod\cashier\tests\data\User; -use yii2mod\cashier\StripeCheckoutSubsciption; -use yii2mod\cashier\SubscriptionBuilder; class CashierTest extends TestCase { @@ -85,15 +83,12 @@ public function testSubscriptionsCanBeCreated() // Invoice Tests $invoice = $user->invoices()[1]; - $stripeSubscription = $subscription->asStripeSubscription(); + $this->assertEquals('$10.00', $invoice->total()); $this->assertFalse($invoice->hasDiscount()); $this->assertFalse($invoice->hasStartingBalance()); $this->assertNull($invoice->coupon()); $this->assertInstanceOf(Carbon::class, $invoice->date()); - - $this->assertEquals('1000', $invoice->total); - $this->assertTrue($stripeSubscription->discount==null); } public function testCreatingSubscriptionWithCoupons() @@ -121,13 +116,6 @@ public function testCreatingSubscriptionWithCoupons() $this->assertEquals('$5.00', $invoice->total()); $this->assertEquals('$5.00', $invoice->amountOff()); $this->assertFalse($invoice->discountIsPercentage()); - - $this->assertTrue($invoice->discount!==null); - $this->assertEquals('500', $invoice->total); - $this->assertEquals('500', $invoice->amount_paid); - - $stripeSubscription = $subscription->asStripeSubscription(); - $this->assertTrue($stripeSubscription->discount->coupon->percent_off===null); } public function testGenericTrials() @@ -244,113 +232,4 @@ public function testRefunds() // Refund Tests $this->assertEquals(1000, $refund->amount); } - - public function testSessionAndStripeCheckoutWidget() - { - $user = User::findOne(['email' => 'johndoe@domain.com']); - $session = $user->createCheckoutSessionForSubscription( - 'monthly-10-1', - [ - 'url_base' => 'http://localhost', - 'controller_url_name' => 'stripe', - 'client_reference_id' => 999, - 'metadata' => [ - "student_id" => 666, - "student_name" => 'name surname', - "user_id" => 999, - ] - ] - ); - $buttonSuffixID = '8888'; - $out = StripeCheckoutSubsciption::widget([ - 'session' => $session, - 'buttonSuffixID' => '8888' - ]); - $apiKey = Yii::$app->params['stripe']['pubKey']; - - $expected = << -EOT; - - $this->assertEquals($expected, $out); - } - - public function testCreateSubscriptionFromWebhookUsingStripeCheckout() - { - $user = User::findOne(['email' => 'johndoe@domain.com']); - // $user->newSubscription('main', 'monthly-10-1')->create($this->getTestToken()); - - $customer = $user->getStripeCustomer($this->getTestToken()); - $subscriptionBuilder = new SubscriptionBuilder($user, 'main', 'monthly-10-1'); - - $payload = $subscriptionBuilder->buildPayload(); - $payload["metadata"] = [ - "student_id" => "1017", - "student_name" => "name surname", - "user_id" => "888", - "some_entity_id_from_other_table" => 777 - ]; - $subscription = $customer->subscriptions->create($payload); - - // $user->newSubscription('main', 'monthly-10-1') - // ->create($this->getTestToken()); - - // $subscription = $user->subscription('main'); - - Yii::$app->request->rawBody = json_encode([ - 'id' => 'foo', - "type" => "checkout.session.completed", - 'data' => [ - 'object' => [ - 'customer' => $user->stripe_id, - "mode" => "subscription", - 'client_reference_id' => 'some string id', - 'name' => 'monthly-10-1', - 'subscription' => $subscription->id - ], - ], - ]); - $controller = new CashierTestControllerStub('webhook', Yii::$app); - $response = $controller->actionHandleWebhook(); - $this->assertEquals(200, $response->getStatusCode()); - - $user->refresh(); - $subscriptionModel = $user->subscription($subscription->plan->product); - - // doing again does not creates a new one - $controller = new CashierTestControllerStub('webhook', Yii::$app); - $response = $controller->actionHandleWebhook(); - $this->assertEquals(200, $response->getStatusCode()); - - $this->assertEquals($subscription->id, $subscriptionModel->stripe_id); - $this->assertEquals(777, $subscriptionModel->metadata_id); - - $updatedSubscriptionModel = $subscriptionBuilder->loadSubscriptionModel($subscriptionModel->stripe_id); - $this->assertEquals(777, $updatedSubscriptionModel->metadata_id); - } } diff --git a/tests/TestCase.php b/tests/TestCase.php index 7a27b28..c18f2f4 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -10,7 +10,7 @@ */ class TestCase extends \PHPUnit\Framework\TestCase { - protected function setUp() :void + protected function setUp() { parent::setUp(); @@ -18,7 +18,7 @@ protected function setUp() :void $this->setupTestDbData(); } - protected function tearDown() :void + protected function tearDown() { $this->destroyApplication(); } @@ -55,7 +55,6 @@ protected function mockApplication($config = [], $appClass = '\yii\web\Applicati 'params' => [ 'stripe' => [ 'apiKey' => getenv('STRIPE_SECRET'), - 'pubKey' => getenv('STRIPE_PUB_KEY'), ], ], ], $config)); @@ -85,18 +84,14 @@ protected function setupTestDbData() $db = Yii::$app->getDb(); // Structure : + $db->createCommand()->createTable('subscriptions', [ 'id' => 'pk', 'user_id' => 'integer not null', 'name' => 'string not null', 'stripe_id' => 'string not null', 'stripe_plan' => 'string not null', - 'client_reference_id' => NULL, - 'status' => NULL, - 'metadata_id' => NULL, 'quantity' => 'integer not null', - 'cancel_at_period_end' => 'integer default null', - 'current_period_end' => 'timestamp null default null', 'trial_ends_at' => 'timestamp null default null', 'ends_at' => 'timestamp null default null', 'created_at' => 'timestamp null default null', diff --git a/tests/data/User.php b/tests/data/User.php index 5c42237..14cff9e 100644 --- a/tests/data/User.php +++ b/tests/data/User.php @@ -14,10 +14,6 @@ class User extends ActiveRecord implements IdentityInterface { use Billable; - public static function billableMapMetadataAttributes() - { - return [ 'metadata_id' => 'some_entity_id_from_other_table' ]; - } /** * @inheritdoc