From bcc43353f038645975f79ac61fb154b995fd06c9 Mon Sep 17 00:00:00 2001 From: Daniel Gimenes Date: Wed, 15 Jun 2016 16:42:40 -0300 Subject: [PATCH 1/4] Update dependencies + Make some depedencies explicit --- composer.json | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 2d829eb..929557b 100644 --- a/composer.json +++ b/composer.json @@ -17,14 +17,16 @@ ], "require": { "php": "~7.0", - "guzzle/guzzle": "~3.6", - "guzzlehttp/guzzle": "~6.0", - "zendframework/zend-diactoros": "~1.1", - "container-interop/container-interop": "^1.1" + "container-interop/container-interop": "^1.1", + "guzzle/guzzle": "^3.9", + "guzzlehttp/guzzle": "^6.1", + "psr/http-message": "^1.0", + "symfony/event-dispatcher": "^2.8", + "zendframework/zend-diactoros": "^1.3" }, "require-dev": { - "phpunit/phpunit": "~5.2", - "squizlabs/php_codesniffer": "^2.3", + "phpunit/phpunit": "^5.2", + "squizlabs/php_codesniffer": "^2.5", "zendframework/zend-servicemanager": "^3.0" }, "suggest": { From b0e1bf79503361915466aabc43309a229f2f032e Mon Sep 17 00:00:00 2001 From: Daniel Gimenes Date: Wed, 15 Jun 2016 16:48:19 -0300 Subject: [PATCH 2/4] Add ConfigProvider for Zend\ComponentInstaller --- composer.json | 7 +++++++ src/{ModuleConfig.php => ConfigProvider.php} | 2 +- test/{ModuleConfigTest.php => ConfigProviderTest.php} | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) rename src/{ModuleConfig.php => ConfigProvider.php} (89%) rename test/{ModuleConfigTest.php => ConfigProviderTest.php} (62%) diff --git a/composer.json b/composer.json index 929557b..7cb63ad 100644 --- a/composer.json +++ b/composer.json @@ -50,5 +50,12 @@ "cs": "phpcs", "cs-fix": "phpcbf", "test": "phpunit" + }, + "extra": { + "zf": { + "config-provider": [ + "ZfrShopify\\ConfigProvider" + ] + } } } diff --git a/src/ModuleConfig.php b/src/ConfigProvider.php similarity index 89% rename from src/ModuleConfig.php rename to src/ConfigProvider.php index 3ee64d6..9b5f5fc 100644 --- a/src/ModuleConfig.php +++ b/src/ConfigProvider.php @@ -5,7 +5,7 @@ /** * @author Daniel Gimenes */ -final class ModuleConfig +final class ConfigProvider { /** * @return array diff --git a/test/ModuleConfigTest.php b/test/ConfigProviderTest.php similarity index 62% rename from test/ModuleConfigTest.php rename to test/ConfigProviderTest.php index ca9cdcc..fd98335 100644 --- a/test/ModuleConfigTest.php +++ b/test/ConfigProviderTest.php @@ -2,16 +2,16 @@ namespace ZfrShopifyTest; -use ZfrShopify\ModuleConfig; +use ZfrShopify\ConfigProvider; /** * @author Daniel Gimenes */ -final class ModuleConfigTest extends \PHPUnit_Framework_TestCase +final class ConfigProviderTest extends \PHPUnit_Framework_TestCase { public function testProvidesContainerConfig() { - $moduleConfig = new ModuleConfig(); + $moduleConfig = new ConfigProvider(); $config = $moduleConfig(); $this->assertArrayHasKey('dependencies', $config); From a008a0404f77521b9fc4a41811dccd7df76997e1 Mon Sep 17 00:00:00 2001 From: Daniel Gimenes Date: Wed, 15 Jun 2016 17:36:01 -0300 Subject: [PATCH 3/4] Add missing license headers --- config/module.config.php | 16 ++++++++++++++++ src/ConfigProvider.php | 16 ++++++++++++++++ src/Iterator/ShopifyResourceIterator.php | 16 ++++++++++++++++ src/Iterator/ShopifyResourceIteratorFactory.php | 16 ++++++++++++++++ src/Model/ShopDomain.php | 16 ++++++++++++++++ src/OAuth/AuthorizationRedirectResponse.php | 16 ++++++++++++++++ src/OAuth/TokenExchanger.php | 16 ++++++++++++++++ src/Validator/RequestValidator.php | 16 ++++++++++++++++ src/Validator/WebhookValidator.php | 16 ++++++++++++++++ test/ConfigProviderTest.php | 16 ++++++++++++++++ .../ShopifyResourceIteratorFactoryTest.php | 16 ++++++++++++++++ test/Iterator/ShopifyResourceIteratorTest.php | 16 ++++++++++++++++ test/Model/ShopDomainTest.php | 16 ++++++++++++++++ 13 files changed, 208 insertions(+) diff --git a/config/module.config.php b/config/module.config.php index d2c2b6e..bdb8ec4 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -1,4 +1,20 @@ Date: Wed, 15 Jun 2016 17:55:37 -0300 Subject: [PATCH 4/4] Update README.md --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5b8e7b3..188bcf4 100644 --- a/README.md +++ b/README.md @@ -9,15 +9,15 @@ ZfrShopify is a modern PHP library based on Guzzle for [Shopify](https://www.sho ## Dependencies * PHP 7 -* [Guzzle](http://www.guzzlephp.org): >= 3.6 -* [Zend Diactoros](https://github.com/zendframework/zend-diactoros): >=1.1 +* [Guzzle](http://www.guzzlephp.org): ^3.9 and ^6.1 +* [Zend Diactoros](https://github.com/zendframework/zend-diactoros): >=1.3 ## Installation Installation of ZfrShopify is only officially supported using Composer: ```sh -php composer.phar require 'zfr/zfr-shopify:0.1.*' +php composer.phar require 'zfr/zfr-shopify:1.0' ``` ## Usage @@ -77,9 +77,8 @@ return [ ]; ``` -If you're using Zend\Expressive with Zend\ServiceManager 3, you can use `ZfrShopify\ModuleConfig` to register our -factories into Zend\ServiceManager automatically. -More info [here](http://zendframework.github.io/zend-expressive/cookbook/modular-layout/) +If you're using Zend\ServiceManager 3, you can use [Zend\ComponentInstaller](https://zendframework.github.io/zend-component-installer/) +to register our factories into Zend\ServiceManager automatically. However if you're using other framework or other container, you can still manually register our factories, they are under [src/Container](/src/Container) folder. @@ -314,4 +313,4 @@ Here is a list of supported endpoints (more to come in the future): * getWebhook(array $args = []) * createWebhook(array $args = []) * updateWebhook(array $args = []) -* deleteWebhook(array $args = []) \ No newline at end of file +* deleteWebhook(array $args = [])