From 5e58419fdc1fd88248370b38c5e4d4d219c4ea2f Mon Sep 17 00:00:00 2001 From: JMCA2 Date: Mon, 28 Nov 2016 23:48:18 +0100 Subject: [PATCH 1/8] tax/series settings Spanish translation --- .../translations/SiwappCoreBundle.es.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Siwapp/CoreBundle/Resources/translations/SiwappCoreBundle.es.yml b/src/Siwapp/CoreBundle/Resources/translations/SiwappCoreBundle.es.yml index 32d0787c..709c9465 100644 --- a/src/Siwapp/CoreBundle/Resources/translations/SiwappCoreBundle.es.yml +++ b/src/Siwapp/CoreBundle/Resources/translations/SiwappCoreBundle.es.yml @@ -46,3 +46,18 @@ abstract_invoice: subtotal: 'Subtotal' total_taxes: 'Impuestos' total: 'Total (%currency%)' + +tax: + form: + name: 'Nombre' + value: 'Valor' + first_number: 'Primer número' + is_default: 'Por defecto' + active: 'Activo' + +series: + form: + name: 'Nombre' + value: 'Valor' + first_number: 'Primer número' + enabled: 'Habilitada' From e98eed1a9722b923ed08d6b30d4a85796b8d7956 Mon Sep 17 00:00:00 2001 From: Paris Liakos Date: Sun, 4 Dec 2016 16:36:36 +0200 Subject: [PATCH 2/8] Fix #40 Add PHP 7.1 to travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 147ea149..e889059a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ cache: php: - '5.6' - '7.0' + - '7.1' before_install: - phpenv config-rm xdebug.ini From 5864cdb38641cbfb0881243eca8c279057e84d0c Mon Sep 17 00:00:00 2001 From: Paris Liakos Date: Sun, 4 Dec 2016 17:11:48 +0200 Subject: [PATCH 3/8] Fix #38 Make generated invoices from recurring to created as opened and not draft --- src/Siwapp/RecurringInvoiceBundle/InvoiceGenerator.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Siwapp/RecurringInvoiceBundle/InvoiceGenerator.php b/src/Siwapp/RecurringInvoiceBundle/InvoiceGenerator.php index 94f2acdf..f929deaf 100644 --- a/src/Siwapp/RecurringInvoiceBundle/InvoiceGenerator.php +++ b/src/Siwapp/RecurringInvoiceBundle/InvoiceGenerator.php @@ -57,6 +57,8 @@ public function generatePending(RecurringInvoice $recurring) if ($d = $recurring->getDaysToDue()) { $invoice->setDueDate(new \DateTime('+ ' . $d . ' days')); } + // Set invoice as Opened. + $invoice->setStatus(Invoice::OPENED); $recurring->addInvoice($invoice); $generated++; From d63405006c90a7a7800e5048b12b61ef6dc1dcb4 Mon Sep 17 00:00:00 2001 From: Paris Liakos Date: Sun, 4 Dec 2016 17:13:01 +0200 Subject: [PATCH 4/8] Add unit test for recurring invoice generator --- .../Tests/InvoiceGeneratorTest.php | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/Siwapp/RecurringInvoiceBundle/Tests/InvoiceGeneratorTest.php diff --git a/src/Siwapp/RecurringInvoiceBundle/Tests/InvoiceGeneratorTest.php b/src/Siwapp/RecurringInvoiceBundle/Tests/InvoiceGeneratorTest.php new file mode 100644 index 00000000..97e29cb6 --- /dev/null +++ b/src/Siwapp/RecurringInvoiceBundle/Tests/InvoiceGeneratorTest.php @@ -0,0 +1,60 @@ +assertEquals($expectedCount, $generator->generatePending($recurring)); + } + + public function generatePendingProvider() + { + $em = $this + ->getMockBuilder('Doctrine\ORM\EntityManager') + ->setMethods(['persist', 'flush']) + ->disableOriginalConstructor() + ->getMock(); + + $recurring = $this->getMock('Siwapp\RecurringInvoiceBundle\Entity\RecurringInvoice'); + $cases[] = [$em, $recurring, 0]; + + $itemMock = $this->getMock('Siwapp\CoreBundle\Entity\Item'); + $itemMock->expects($this->once()) + ->method('getTaxes') + ->will($this->returnValue([])); + $recurring = $this->getMock('Siwapp\RecurringInvoiceBundle\Entity\RecurringInvoice'); + $recurring->expects($this->at(0)) + ->method('countPendingInvoices') + ->will($this->returnValue(1)); + $recurring->expects($this->at(1)) + ->method('countPendingInvoices') + ->will($this->returnValue(2)); + $recurring->expects($this->once()) + ->method('getSeries') + ->will($this->returnValue($this->getMock('Siwapp\CoreBundle\Entity\Series'))); + $recurring->expects($this->once()) + ->method('getItems') + ->will($this->returnValue([$itemMock])); + // Check that invoices are being added with status open. + $recurring->expects($this->once()) + ->method('addInvoice') + ->with($this->callback(function(Invoice $invoice) { + return $invoice->getStatus() == Invoice::OPENED; + })); + $cases[] = [$em, $recurring, 1]; + + return $cases; + } +} From 0db37c64bd3b9d5ff0d422ed9e4c63a5ad355aa9 Mon Sep 17 00:00:00 2001 From: Paris Liakos Date: Sun, 4 Dec 2016 17:23:16 +0200 Subject: [PATCH 5/8] Issue #42 Upgrade to symfony 3.2 and fix deprecations --- composer.json | 2 +- composer.lock | 53 ++++++++++--------- .../Controller/ConfigController.php | 2 +- .../Controller/CustomerController.php | 8 +-- .../Controller/DashboardController.php | 2 +- .../Controller/EstimateController.php | 8 +-- .../Controller/InvoiceController.php | 12 ++--- .../Controller/ProductController.php | 8 +-- .../Controller/RecurringInvoiceController.php | 8 +-- 9 files changed, 54 insertions(+), 49 deletions(-) diff --git a/composer.json b/composer.json index 9592bc5f..6bdf3da4 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ }, "require": { "php": ">=5.6", - "symfony/symfony": "3.1.*", + "symfony/symfony": "3.2.*", "doctrine/orm": "^2.5", "doctrine/doctrine-bundle": "^1.6", "doctrine/doctrine-cache-bundle": "^1.2", diff --git a/composer.lock b/composer.lock index 3a8365bf..28a116d2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "9953804fef25d215fd84392b2450e527", - "content-hash": "ff24f6e1d8c641787f82d224fc292a5d", + "hash": "cc4883c4bf70bfb8b68070846614d081", + "content-hash": "33bc0e44db0d003aa17c45390bacd9ea", "packages": [ { "name": "behat/transliterator", @@ -253,16 +253,16 @@ }, { "name": "doctrine/common", - "version": "v2.6.1", + "version": "v2.6.2", "source": { "type": "git", "url": "https://github.com/doctrine/common.git", - "reference": "a579557bc689580c19fee4e27487a67fe60defc0" + "reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/a579557bc689580c19fee4e27487a67fe60defc0", - "reference": "a579557bc689580c19fee4e27487a67fe60defc0", + "url": "https://api.github.com/repos/doctrine/common/zipball/7bce00698899aa2c06fe7365c76e4d78ddb15fa3", + "reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3", "shasum": "" }, "require": { @@ -322,7 +322,7 @@ "persistence", "spl" ], - "time": "2015-12-25 13:18:31" + "time": "2016-11-30 16:50:46" }, { "name": "doctrine/data-fixtures", @@ -937,12 +937,12 @@ "source": { "type": "git", "url": "https://github.com/FriendsOfSymfony/FOSUserBundle.git", - "reference": "81f872eb331b1f3a6244483ffb77ec69a6b1c1d8" + "reference": "7261f7aa143b4bfdb0b7ddc5df208067fa7be698" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/zipball/81f872eb331b1f3a6244483ffb77ec69a6b1c1d8", - "reference": "81f872eb331b1f3a6244483ffb77ec69a6b1c1d8", + "url": "https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/zipball/7261f7aa143b4bfdb0b7ddc5df208067fa7be698", + "reference": "7261f7aa143b4bfdb0b7ddc5df208067fa7be698", "shasum": "" }, "require": { @@ -951,6 +951,7 @@ "symfony/form": "^2.7 || ^3.0", "symfony/framework-bundle": "^2.7 || ^3.0", "symfony/security-bundle": "^2.7 || ^3.0", + "symfony/templating": "^2.7 || ^3.0", "symfony/twig-bundle": "^2.7 || ^3.0" }, "conflict": { @@ -1003,7 +1004,7 @@ "keywords": [ "User management" ], - "time": "2016-11-26 22:10:42" + "time": "2016-12-03 17:42:44" }, { "name": "gedmo/doctrine-extensions", @@ -2482,16 +2483,16 @@ }, { "name": "symfony/symfony", - "version": "v3.1.7", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/symfony.git", - "reference": "db1c32c7237a6594e5e1974524c973d18066b141" + "reference": "b96a144bc875684f3338f697687147a2696d73eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/db1c32c7237a6594e5e1974524c973d18066b141", - "reference": "db1c32c7237a6594e5e1974524c973d18066b141", + "url": "https://api.github.com/repos/symfony/symfony/zipball/b96a144bc875684f3338f697687147a2696d73eb", + "reference": "b96a144bc875684f3338f697687147a2696d73eb", "shasum": "" }, "require": { @@ -2559,6 +2560,7 @@ "symfony/validator": "self.version", "symfony/var-dumper": "self.version", "symfony/web-profiler-bundle": "self.version", + "symfony/workflow": "self.version", "symfony/yaml": "self.version" }, "require-dev": { @@ -2568,7 +2570,7 @@ "doctrine/dbal": "~2.4", "doctrine/doctrine-bundle": "~1.4", "doctrine/orm": "~2.4,>=2.4.5", - "egulias/email-validator": "~1.2,>=1.2.1", + "egulias/email-validator": "~1.2,>=1.2.8|~2.0", "monolog/monolog": "~1.11", "ocramius/proxy-manager": "~0.4|~1.0|~2.0", "phpdocumentor/reflection-docblock": "^3.0", @@ -2580,7 +2582,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -2619,7 +2621,7 @@ "keywords": [ "framework" ], - "time": "2016-11-21 02:44:44" + "time": "2016-11-30 08:46:24" }, { "name": "twig/extensions", @@ -2790,16 +2792,16 @@ }, { "name": "symfony/phpunit-bridge", - "version": "v3.1.7", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "c80098acb81e604eb18030c5e444032ef948f9e7" + "reference": "a56acfdb96be7c82f4bcf16b7c77f1960690b0e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/c80098acb81e604eb18030c5e444032ef948f9e7", - "reference": "c80098acb81e604eb18030c5e444032ef948f9e7", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/a56acfdb96be7c82f4bcf16b7c77f1960690b0e2", + "reference": "a56acfdb96be7c82f4bcf16b7c77f1960690b0e2", "shasum": "" }, "require": { @@ -2808,10 +2810,13 @@ "suggest": { "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader" }, + "bin": [ + "bin/simple-phpunit" + ], "type": "symfony-bridge", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -2841,7 +2846,7 @@ ], "description": "Symfony PHPUnit Bridge", "homepage": "https://symfony.com", - "time": "2016-11-17 10:59:24" + "time": "2016-11-25 22:54:21" } ], "aliases": [], diff --git a/src/Siwapp/ConfigBundle/Controller/ConfigController.php b/src/Siwapp/ConfigBundle/Controller/ConfigController.php index f62507cf..c2e3e9a9 100644 --- a/src/Siwapp/ConfigBundle/Controller/ConfigController.php +++ b/src/Siwapp/ConfigBundle/Controller/ConfigController.php @@ -34,7 +34,7 @@ public function globalSettingsAction(Request $request) if ($request->getMethod() == 'POST') { $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { $data = $form->getData(); $series = $data['series']; $taxes = $data['taxes']; diff --git a/src/Siwapp/CustomerBundle/Controller/CustomerController.php b/src/Siwapp/CustomerBundle/Controller/CustomerController.php index 5a6f7564..36d6cb78 100644 --- a/src/Siwapp/CustomerBundle/Controller/CustomerController.php +++ b/src/Siwapp/CustomerBundle/Controller/CustomerController.php @@ -31,7 +31,7 @@ public function indexAction(Request $request) 'method' => 'GET', ]); $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { $pagination = $repo->paginatedSearch($form->getData(), $limit, $request->query->getInt('page', 1)); } else { $pagination = $repo->paginatedSearch([], $limit, $request->query->getInt('page', 1)); @@ -45,7 +45,7 @@ public function indexAction(Request $request) 'action' => $this->generateUrl('customer_index'), ]); $listForm->handleRequest($request); - if ($listForm->isValid()) { + if ($listForm->isSubmitted()) { $data = $listForm->getData(); if ($request->request->has('delete')) { if (empty($data['customers'])) { @@ -98,7 +98,7 @@ public function addAction(Request $request) ]); $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { $em->persist($customer); $em->flush(); $this->addTranslatedMessage('flash.added'); @@ -129,7 +129,7 @@ public function editAction(Request $request, $id) ]); $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { $em->persist($customer); $em->flush(); $this->addTranslatedMessage('flash.updated'); diff --git a/src/Siwapp/DashboardBundle/Controller/DashboardController.php b/src/Siwapp/DashboardBundle/Controller/DashboardController.php index d9ee8d43..a51fc651 100644 --- a/src/Siwapp/DashboardBundle/Controller/DashboardController.php +++ b/src/Siwapp/DashboardBundle/Controller/DashboardController.php @@ -30,7 +30,7 @@ public function indexAction(Request $request) 'method' => 'GET', ]); $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { $params = $form->getData(); } else { $params = []; diff --git a/src/Siwapp/EstimateBundle/Controller/EstimateController.php b/src/Siwapp/EstimateBundle/Controller/EstimateController.php index 356d11b1..7d64c0bb 100644 --- a/src/Siwapp/EstimateBundle/Controller/EstimateController.php +++ b/src/Siwapp/EstimateBundle/Controller/EstimateController.php @@ -35,7 +35,7 @@ public function indexAction(Request $request) 'method' => 'GET', ]); $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { $pagination = $repo->paginatedSearch($form->getData(), $limit, $request->query->getInt('page', 1)); } else { $pagination = $repo->paginatedSearch([], $limit, $request->query->getInt('page', 1)); @@ -45,7 +45,7 @@ public function indexAction(Request $request) 'action' => $this->generateUrl('estimate_index'), ]); $listForm->handleRequest($request); - if ($listForm->isValid()) { + if ($listForm->isSubmitted()) { $data = $listForm->getData(); if (empty($data['estimates'])) { $this->addTranslatedMessage('flash.nothing_selected', 'warning'); @@ -151,7 +151,7 @@ public function addAction(Request $request) ]); $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { $em->persist($estimate); $em->flush(); $this->addTranslatedMessage('flash.added'); @@ -182,7 +182,7 @@ public function editAction(Request $request, $id) ]); $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { if ($request->request->has('save_draft')) { $entity->setStatus(Estimate::DRAFT); } elseif ($request->request->has('save_close')) { diff --git a/src/Siwapp/InvoiceBundle/Controller/InvoiceController.php b/src/Siwapp/InvoiceBundle/Controller/InvoiceController.php index 0d4e1dd2..91577be5 100644 --- a/src/Siwapp/InvoiceBundle/Controller/InvoiceController.php +++ b/src/Siwapp/InvoiceBundle/Controller/InvoiceController.php @@ -36,7 +36,7 @@ public function indexAction(Request $request) 'method' => 'GET', ]); $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { $pagination = $repo->paginatedSearch($form->getData(), $limit, $request->query->getInt('page', 1)); } else { $pagination = $repo->paginatedSearch([], $limit, $request->query->getInt('page', 1)); @@ -50,7 +50,7 @@ public function indexAction(Request $request) 'action' => $this->generateUrl('invoice_index'), ]); $listForm->handleRequest($request); - if ($listForm->isValid()) { + if ($listForm->isSubmitted()) { $data = $listForm->getData(); if (empty($data['invoices'])) { $this->addTranslatedMessage('flash.nothing_selected', 'warning'); @@ -154,7 +154,7 @@ public function newAction(Request $request) ]); $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { if ($request->request->has('save_draft')) { $invoice->setStatus(Invoice::DRAFT); } elseif ($request->request->has('save')) { @@ -190,7 +190,7 @@ public function editAction(Request $request, $id) ]); $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { if ($request->request->has('save_draft')) { $entity->setStatus(Invoice::DRAFT); } elseif ($request->request->has('save_close')) { @@ -268,7 +268,7 @@ public function paymentsAction(Request $request, $invoiceId) 'action' => $this->generateUrl('invoice_payments', ['invoiceId' => $invoiceId]), ]); $addForm->handleRequest($request); - if ($addForm->isValid() && $invoice) { + if ($addForm->isSubmitted() && $invoice) { $invoice->addPayment($payment); $em->persist($invoice); $em->flush(); @@ -283,7 +283,7 @@ public function paymentsAction(Request $request, $invoiceId) ]); $listForm->handleRequest($request); - if ($listForm->isValid() && $invoice) { + if ($listForm->isSubmitted() && $invoice) { $data = $listForm->getData(); foreach ($data['payments'] as $payment) { $invoice->removePayment($payment); diff --git a/src/Siwapp/ProductBundle/Controller/ProductController.php b/src/Siwapp/ProductBundle/Controller/ProductController.php index 178258af..51991176 100644 --- a/src/Siwapp/ProductBundle/Controller/ProductController.php +++ b/src/Siwapp/ProductBundle/Controller/ProductController.php @@ -31,7 +31,7 @@ public function indexAction(Request $request) 'method' => 'GET', ]); $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { $pagination = $repo->paginatedSearch($form->getData(), $limit, $request->query->getInt('page', 1)); } else { $pagination = $repo->paginatedSearch([], $limit, $request->query->getInt('page', 1)); @@ -45,7 +45,7 @@ public function indexAction(Request $request) 'action' => $this->generateUrl('product_index'), ]); $listForm->handleRequest($request); - if ($listForm->isValid()) { + if ($listForm->isSubmitted()) { $data = $listForm->getData(); if ($request->request->has('delete')) { if (empty($data['products'])) { @@ -98,7 +98,7 @@ public function addAction(Request $request) ]); $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { $em->persist($product); $em->flush(); $this->addTranslatedMessage('flash.added'); @@ -129,7 +129,7 @@ public function editAction(Request $request, $id) ]); $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { $em->persist($product); $em->flush(); $this->addTranslatedMessage('flash.updated'); diff --git a/src/Siwapp/RecurringInvoiceBundle/Controller/RecurringInvoiceController.php b/src/Siwapp/RecurringInvoiceBundle/Controller/RecurringInvoiceController.php index 2d1b788d..fc6e34b0 100644 --- a/src/Siwapp/RecurringInvoiceBundle/Controller/RecurringInvoiceController.php +++ b/src/Siwapp/RecurringInvoiceBundle/Controller/RecurringInvoiceController.php @@ -34,7 +34,7 @@ public function indexAction(Request $request) 'method' => 'GET', ]); $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { $pagination = $repo->paginatedSearch($form->getData(), $limit, $request->query->getInt('page', 1)); } else { $pagination = $repo->paginatedSearch([], $limit, $request->query->getInt('page', 1)); @@ -44,7 +44,7 @@ public function indexAction(Request $request) 'action' => $this->generateUrl('recurring_index'), ]); $listForm->handleRequest($request); - if ($listForm->isValid()) { + if ($listForm->isSubmitted()) { $data = $listForm->getData(); if ($request->request->has('delete')) { if (empty($data['recurring_invoices'])) { @@ -100,7 +100,7 @@ public function addAction(Request $request) ]); $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { $em->persist($invoice); $em->flush(); $this->addTranslatedMessage('flash.added'); @@ -133,7 +133,7 @@ public function editAction(Request $request, $id) ]); $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted()) { $em->persist($invoice); $em->flush(); $this->addTranslatedMessage('flash.updated'); From e9a2d32432c3db7ce4707171c9cfd758be883bb9 Mon Sep 17 00:00:00 2001 From: Paris Liakos Date: Sun, 4 Dec 2016 17:38:58 +0200 Subject: [PATCH 6/8] Try to fix travis tests --- .travis.yml | 3 + composer.json | 1 + composer.lock | 1203 ++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 1205 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e889059a..b58c5e2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,3 +18,6 @@ before_install: install: - composer install - php bin/console doctrine:schema:create + +script: + - vendor/bin/phpunit --colors diff --git a/composer.json b/composer.json index 6bdf3da4..70c05542 100644 --- a/composer.json +++ b/composer.json @@ -38,6 +38,7 @@ "knplabs/knp-snappy-bundle": "^1.4" }, "require-dev": { + "phpunit/phpunit": "^5.4", "sensio/generator-bundle": "^3.0", "symfony/phpunit-bridge": "^3.0" }, diff --git a/composer.lock b/composer.lock index 28a116d2..5891bc4a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "cc4883c4bf70bfb8b68070846614d081", - "content-hash": "33bc0e44db0d003aa17c45390bacd9ea", + "hash": "a47e5600b24af75f1b3db6752a2db641", + "content-hash": "97f245b1afc25908b25452f327dd96ce", "packages": [ { "name": "behat/transliterator", @@ -2738,6 +2738,1155 @@ } ], "packages-dev": [ + { + "name": "myclabs/deep-copy", + "version": "1.5.5", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "399c1f9781e222f6eb6cc238796f5200d1b7f108" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/399c1f9781e222f6eb6cc238796f5200d1b7f108", + "reference": "399c1f9781e222f6eb6cc238796f5200d1b7f108", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "doctrine/collections": "1.*", + "phpunit/phpunit": "~4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "homepage": "https://github.com/myclabs/DeepCopy", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2016-10-31 17:19:45" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.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": "2015-12-27 11:43:31" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.2.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + }, + "type": "library", + "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": "2016-09-30 07:12:33" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.2.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.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" + } + ], + "time": "2016-11-25 06:54:22" + }, + { + "name": "phpspec/prophecy", + "version": "v1.6.2", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "6c52c2722f8460122f96f86346600e1077ce22cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb", + "reference": "6c52c2722f8460122f96f86346600e1077ce22cb", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1", + "sebastian/recursion-context": "^1.0|^2.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.0", + "phpunit/phpunit": "^4.8 || ^5.6.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "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": "2016-11-21 14:58:47" + }, + { + "name": "phpunit/php-code-coverage", + "version": "4.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "903fd6318d0a90b4770a009ff73e4a4e9c437929" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/903fd6318d0a90b4770a009ff73e4a4e9c437929", + "reference": "903fd6318d0a90b4770a009ff73e4a4e9c437929", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "^1.4.2", + "sebastian/code-unit-reverse-lookup": "~1.0", + "sebastian/environment": "^1.3.2 || ^2.0", + "sebastian/version": "~1.0|~2.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "^5.4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.4.0", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.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": "2016-11-28 16:00:31" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.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": "2016-10-03 07:40:28" + }, + { + "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-21 13:50:34" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4|~5" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2016-05-12 18:03:57" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b", + "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-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": "2016-11-15 14:06:22" + }, + { + "name": "phpunit/phpunit", + "version": "5.7.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "336aff0ac52e306c98e7455bc3e8d7b0bf777a5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/336aff0ac52e306c98e7455bc3e8d7b0bf777a5e", + "reference": "336aff0ac52e306c98e7455bc3e8d7b0bf777a5e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "~1.3", + "php": "^5.6 || ^7.0", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "^4.0.3", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "^3.2", + "sebastian/comparator": "~1.2.2", + "sebastian/diff": "~1.2", + "sebastian/environment": "^1.3.4 || ^2.0", + "sebastian/exporter": "~2.0", + "sebastian/global-state": "~1.0", + "sebastian/object-enumerator": "~2.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "~1.0|~2.0", + "symfony/yaml": "~2.1|~3.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-xdebug": "*", + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.7.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": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2016-12-03 08:33:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "3.4.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "90a08f5deed5f7ac35463c161f2e8fa0e5652faf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/90a08f5deed5f7ac35463c161f2e8fa0e5652faf", + "reference": "90a08f5deed5f7ac35463c161f2e8fa0e5652faf", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.6 || ^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^1.2 || ^2.0" + }, + "conflict": { + "phpunit/phpunit": "<5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2016-11-27 07:52:03" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "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": "2016-02-13 06:45:14" + }, + { + "name": "sebastian/comparator", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6a1ed12e8b2409076ab22e3897126211ff8b1f7f", + "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-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": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2016-11-19 09:18:40" + }, + { + "name": "sebastian/diff", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-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" + ], + "time": "2015-12-08 07:14:41" + }, + { + "name": "sebastian/environment", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.0" + }, + "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" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-11-26 07:53:53" + }, + { + "name": "sebastian/exporter", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "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": "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" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2016-11-19 08:54:04" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.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": "2015-10-12 03:26:01" + }, + { + "name": "sebastian/object-enumerator", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35", + "reference": "96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "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" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2016-11-19 07:35:10" + }, + { + "name": "sebastian/recursion-context", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "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": "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": "2016-11-19 07:33:16" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.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": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28 20:34:47" + }, + { + "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-03 07:35:21" + }, { "name": "sensio/generator-bundle", "version": "v3.1.1", @@ -2847,6 +3996,56 @@ "description": "Symfony PHPUnit Bridge", "homepage": "https://symfony.com", "time": "2016-11-25 22:54:21" + }, + { + "name": "webmozart/assert", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "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": "2016-11-23 20:04:58" } ], "aliases": [], From 7d3b55f859d7cc5f444d3a2e1d9c0b01e1fcf805 Mon Sep 17 00:00:00 2001 From: Paris Liakos Date: Sun, 4 Dec 2016 17:56:19 +0200 Subject: [PATCH 7/8] Issue #32 Make sure that discount amount is always positive --- src/Siwapp/CoreBundle/Entity/Item.php | 2 +- src/Siwapp/CoreBundle/Resources/views/Item/show.html.twig | 2 +- src/Siwapp/CoreBundle/Tests/Entity/ItemTest.php | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Siwapp/CoreBundle/Entity/Item.php b/src/Siwapp/CoreBundle/Entity/Item.php index 181033dc..d57a154c 100644 --- a/src/Siwapp/CoreBundle/Entity/Item.php +++ b/src/Siwapp/CoreBundle/Entity/Item.php @@ -246,7 +246,7 @@ public function getNetAmount() */ public function getDiscountAmount() { - return $this->getBaseAmount() * $this->getDiscountPercent(); + return abs($this->getBaseAmount()) * $this->getDiscountPercent(); } /** diff --git a/src/Siwapp/CoreBundle/Resources/views/Item/show.html.twig b/src/Siwapp/CoreBundle/Resources/views/Item/show.html.twig index 7eb02521..68d4bc83 100644 --- a/src/Siwapp/CoreBundle/Resources/views/Item/show.html.twig +++ b/src/Siwapp/CoreBundle/Resources/views/Item/show.html.twig @@ -9,7 +9,7 @@ {{ item.unitaryCost|localizedcurrency(currency, app.request.locale) }} - {{ item.discount }} + {{ item.discount }}% {% for tax in item.taxes %} diff --git a/src/Siwapp/CoreBundle/Tests/Entity/ItemTest.php b/src/Siwapp/CoreBundle/Tests/Entity/ItemTest.php index d7cc2af6..d0f1c04a 100644 --- a/src/Siwapp/CoreBundle/Tests/Entity/ItemTest.php +++ b/src/Siwapp/CoreBundle/Tests/Entity/ItemTest.php @@ -42,6 +42,11 @@ public function testGetDiscountAmount() $this->assertEquals(8, $item->getDiscountAmount()); $item->setDiscount(2); $this->assertEquals(1.6, $item->getDiscountAmount()); + + // Make sure that discount is always positive. + $item->setUnitaryCost(-10); + $item->setDiscount(2); + $this->assertEquals(0.2, $item->getDiscountAmount()); } public function testGetTaxAmount() From 2065677ad1aaa02862b3f99ed9a74594a7a64433 Mon Sep 17 00:00:00 2001 From: Paris Liakos Date: Sun, 4 Dec 2016 18:40:38 +0200 Subject: [PATCH 8/8] Issue #33 Fix invoice status is not translated everywhere --- .../EstimateBundle/Resources/views/Estimate/edit.html.twig | 2 +- .../EstimateBundle/Resources/views/Estimate/show.html.twig | 2 +- src/Siwapp/InvoiceBundle/Resources/views/Invoice/edit.html.twig | 2 +- src/Siwapp/InvoiceBundle/Resources/views/Invoice/show.html.twig | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Siwapp/EstimateBundle/Resources/views/Estimate/edit.html.twig b/src/Siwapp/EstimateBundle/Resources/views/Estimate/edit.html.twig index 8d66e863..5e91200b 100644 --- a/src/Siwapp/EstimateBundle/Resources/views/Estimate/edit.html.twig +++ b/src/Siwapp/EstimateBundle/Resources/views/Estimate/edit.html.twig @@ -32,7 +32,7 @@

Estimate {{ entity.label() }}

  • - {{ entity.statusString|capitalize }} + {{ ('estimate.' ~ entity.statusString)|trans }}
  • {% if entity.sentByEmail %} diff --git a/src/Siwapp/EstimateBundle/Resources/views/Estimate/show.html.twig b/src/Siwapp/EstimateBundle/Resources/views/Estimate/show.html.twig index 7d10ecee..f8cd8bd2 100644 --- a/src/Siwapp/EstimateBundle/Resources/views/Estimate/show.html.twig +++ b/src/Siwapp/EstimateBundle/Resources/views/Estimate/show.html.twig @@ -30,7 +30,7 @@

    Estimate {{ entity.label() }}

    • - {{ entity.statusString|capitalize }} + {{ ('estimate.' ~ entity.statusString)|trans }}
    • {% if entity.sentByEmail %} diff --git a/src/Siwapp/InvoiceBundle/Resources/views/Invoice/edit.html.twig b/src/Siwapp/InvoiceBundle/Resources/views/Invoice/edit.html.twig index db4c76bb..ff20c048 100644 --- a/src/Siwapp/InvoiceBundle/Resources/views/Invoice/edit.html.twig +++ b/src/Siwapp/InvoiceBundle/Resources/views/Invoice/edit.html.twig @@ -25,7 +25,7 @@
      • - {{ entity.statusString|capitalize }} + {{ ('invoice.' ~ entity.statusString)|trans }}
      • {% if entity.sentByEmail %} diff --git a/src/Siwapp/InvoiceBundle/Resources/views/Invoice/show.html.twig b/src/Siwapp/InvoiceBundle/Resources/views/Invoice/show.html.twig index 9a51f5d0..28bcf7d4 100644 --- a/src/Siwapp/InvoiceBundle/Resources/views/Invoice/show.html.twig +++ b/src/Siwapp/InvoiceBundle/Resources/views/Invoice/show.html.twig @@ -19,7 +19,7 @@

        Invoice {{ entity.label() }}

        • - {{ entity.statusString|capitalize }} + {{ ('invoice.' ~ entity.statusString)|trans }}
        • {% if entity.sentByEmail %}