Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Plan. Model, Events, Listeners. In Manager retrievePlans. Console command #14

Merged
merged 11 commits into from
Feb 3, 2017

Conversation

webcome
Copy link
Contributor

@webcome webcome commented Feb 2, 2017

Hi,
I've added Plan. Model, Events, Listeners. In Manager retrievePlans. Console command stripe:plan:update for update plans.
If you can see well you will merge.
Thanks.

@webcome
Copy link
Contributor Author

webcome commented Feb 2, 2017

Hi,

Travis CI show error in php:hhvm, I found the follow issue, can you review it?

composer/composer#4976

Thanks you.

@Aerendir
Copy link
Owner

Aerendir commented Feb 2, 2017

Hi @webcome , I'm happy to see you again :)

So, about the travi-ci error, I'll simply remove the hhvm test from the matrix, since it seems there is a problem on their own. So, if someone is using HVHVM, it should be aware of the problems and fix them on his own.

Another last thing: can you add just a bit of documentation here? Just some lines to explain the basic of the use of Subscriptions and Plans and use of the stripe:update:plans command.

@Aerendir
Copy link
Owner

Aerendir commented Feb 2, 2017

@webcome , I've just fixed all unit tests. Please, pull to keep in synch with the master branch...

@webcome
Copy link
Contributor Author

webcome commented Feb 3, 2017

Hi @Aerendir, I added a bit of documentation and synch with master and change requirement of phpunit to 5.* for passing the tests. I can see you change hhvm to nightly but the tests are not passing there. Can you review it?

$this
->setName('stripe:update:plan')
->setDescription('Update plans to your database.')
->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command.');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you let the user decide which EM to pass? Isn't it better to directly use the one created by the bundle?

$aPlan = $plan->__toArray();

$stripeLocalPlan = $em
->getRepository("SerendipityHQ\\Bundle\\StripeBundle\\Model\\StripeLocalPlan")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to StripeLocalPlan::class?

* @param StripeLocalResourceInterface $localResource
* @param ApiResource $stripeResource
*/
public function syncLocalSources(StripeLocalResourceInterface $localResource, ApiResource $stripeResource)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this required?

@@ -0,0 +1,72 @@
<?php
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you create a command to sync? Did you see I've improved the support of webhooks?

@Aerendir Aerendir merged commit 096093f into Aerendir:master Feb 3, 2017
@Aerendir
Copy link
Owner

Aerendir commented Feb 3, 2017

@webcome , yes, I dropped the tests for HHVM as is is currently incompatible with PHP 7 (from a link you posted above). So, in the meantime, we drop the support waiting for a support on their part.

The tests currently fails on PHP 7.2 (the nightly) due to an error in the handling of the forms by Symfony, so we have no power of fixing them currently. I've opened an issue on the Symfony's issue tracker to get some support about (symfony/symfony#21511 (comment)). Is a bug already reported and "to-be-fixed".

So, anyway I'll go to merge your PR as you did a very great job! Many many thanks! :)

@Aerendir
Copy link
Owner

Aerendir commented Feb 3, 2017

Just one last thing: if you see the checks of SensioInsights, you'll see a lot of issue with the update plans command. Maybe you can fix them in another PR...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants