- {% include 'navbar.html.twig' %}
+ {% include 'navbar.html.twig' %}
{% include 'sidebar.html.twig' %}
-
Update Task
+ {% trans %}Update Task{% endtrans %}
@@ -41,7 +47,7 @@
{{ form_label(form.dueDate, 'Due Date', { 'label_attr': {'class': 'col-sm-3 control-label'}}) }}
{{ form_errors(form.dueDate) }}
- {{ form_widget(form.dueDate) }}
+ {{ form_widget(form.dueDate, {'attr': {'class': 'form-control date-time-picker'}}) }}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
+{% block javascripts %}
+{{ parent() }}
+
+
+{% endblock %}
diff --git a/app/config/config.yml b/app/config/config.yml
index f9471fb..4467363 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -1,18 +1,18 @@
imports:
- - { resource: parameters.yml }
+ #- { resource: parameters.yml }
- { resource: security.yml }
- { resource: services.yml }
+ - { resource: repository.yml }
# Put parameters here that don't need to change on each machine where the app is deployed
# http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
-parameters:
- locale: en
+#parameters:
+# locale: en
framework:
#esi: ~
- #translator: { fallbacks: ['%locale%'] }
- translator: ~
- secret: '%secret%'
+ translator: { fallbacks: ['%env(SYMFONY_LOCALE)%'] }
+ secret: '%env(SYMFONY_SECRET)%'
router:
resource: '%kernel.project_dir%/app/config/routing.yml'
strict_requirements: ~
@@ -22,7 +22,7 @@ framework:
#serializer: { enable_annotations: true }
templating:
engines: ['twig']
- default_locale: '%locale%'
+ default_locale: '%env(SYMFONY_LOCALE)%'
trusted_hosts: ~
session:
# http://symfony.com/doc/current/reference/configuration/framework.html#handler-id
@@ -43,11 +43,11 @@ twig:
doctrine:
dbal:
driver: pdo_mysql
- host: '%database_host%'
- port: '%database_port%'
- dbname: '%database_name%'
- user: '%database_user%'
- password: '%database_password%'
+ host: '%env(SYMFONY_DB_HOST)%'
+ port: '%env(SYMFONY_DB_PORT)%'
+ dbname: '%env(SYMFONY_DB_NAME)%'
+ user: '%env(SYMFONY_DB_USERNAME)%'
+ password: '%env(SYMFONY_DB_PASSWORD)%'
charset: utf8mb4
# if using pdo_sqlite as your database driver:
# 1. add the path in parameters.yml
@@ -77,10 +77,10 @@ doctrine_migrations:
# Swiftmailer Configuration
swiftmailer:
- transport: '%mailer_transport%'
- host: '%mailer_host%'
- username: '%mailer_user%'
- password: '%mailer_password%'
+ transport: '%env(SYMFONY_MAILER_TRANSPORT)%'
+ host: '%env(SYMFONY_MAILER_HOST)%'
+ username: '%env(SYMFONY_MAILER_USERNAME)%'
+ password: '%env(SYMFONY_MAILER_PASSWORD)%'
spool: { type: memory }
fos_user:
@@ -88,8 +88,8 @@ fos_user:
firewall_name: main
user_class: AppBundle\Entity\User
from_email:
- address: "%mailer_user%"
- sender_name: "%mailer_user%"
+ address: "%env(SYMFONY_MAILER_FROM_ADDRESS)%"
+ sender_name: "%env(SYMFONY_MAILER_SENDER_NAME)%"
registration:
form:
type: AppBundle\Form\RegistrationFormType
diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml
index 3ea30f0..eb3037e 100644
--- a/app/config/config_dev.yml
+++ b/app/config/config_dev.yml
@@ -15,7 +15,7 @@ monolog:
handlers:
main:
type: stream
- path: '%kernel.logs_dir%/%kernel.environment%.log'
+ path: '/tmp/stdout'
level: debug
channels: ['!event']
console:
diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml
index 5d460ce..42f596d 100644
--- a/app/config/config_prod.yml
+++ b/app/config/config_prod.yml
@@ -15,7 +15,7 @@ monolog:
handler: nested
nested:
type: stream
- path: '%kernel.logs_dir%/%kernel.environment%.log'
+ path: '/tmp/stdout'
level: debug
console:
type: console
diff --git a/app/config/config_test.yml b/app/config/config_test.yml
index 2f6d925..ded7f54 100644
--- a/app/config/config_test.yml
+++ b/app/config/config_test.yml
@@ -8,6 +8,11 @@ framework:
profiler:
collect: false
+security:
+ firewalls:
+ main:
+ http_basic: ~
+
web_profiler:
toolbar: false
intercept_redirects: false
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist
deleted file mode 100644
index 653ff3b..0000000
--- a/app/config/parameters.yml.dist
+++ /dev/null
@@ -1,19 +0,0 @@
-# This file is a "template" of what your parameters.yml file should look like
-# Set parameters here that may be different on each deployment target of the app, e.g. development, staging, production.
-# http://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
-parameters:
- database_host: 127.0.0.1
- database_port: ~
- database_name: symfony
- database_user: root
- database_password: ~
- # You should uncomment this if you want to use pdo_sqlite
- #database_path: '%kernel.project_dir%/var/data/data.sqlite'
-
- mailer_transport: smtp
- mailer_host: 127.0.0.1
- mailer_user: ~
- mailer_password: ~
-
- # A secret key that's used to generate certain security-related tokens
- secret: ThisTokenIsNotSoSecretChangeIt
diff --git a/app/config/repository.yml b/app/config/repository.yml
new file mode 100644
index 0000000..4df5cbd
--- /dev/null
+++ b/app/config/repository.yml
@@ -0,0 +1,12 @@
+services:
+ app.repository.plant_repository:
+ class: 'AppBundle\Repository\PlantRepository'
+ arguments:
+ - '@doctrine.orm.entity_manager'
+ - 'AppBundle\Entity\Plant'
+
+ app.repository.task_repository:
+ class: 'AppBundle\Repository\TaskRepository'
+ arguments:
+ - '@doctrine.orm.entity_manager'
+ - 'AppBundle\Entity\Task'
\ No newline at end of file
diff --git a/bin/symfony_requirements b/bin/symfony_requirements
old mode 100644
new mode 100755
diff --git a/bower.json b/bower.json
new file mode 100644
index 0000000..6ec1077
--- /dev/null
+++ b/bower.json
@@ -0,0 +1,17 @@
+{
+ "name": "tania",
+ "homepage": "https://github.com/Tanibox/tania",
+ "description": "",
+ "main": "",
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ],
+ "dependencies": {
+ "datetimepicker": "^2.5.4"
+ }
+}
diff --git a/composer.json b/composer.json
index bcd946d..f66ab68 100644
--- a/composer.json
+++ b/composer.json
@@ -33,17 +33,18 @@
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.3.10",
"symfony/symfony": "3.3.*",
+ "symfony/translation": "^3.3",
"symfony/var-dumper": "^3.3",
"twig/twig": "^1.0||^2.0",
"vich/uploader-bundle": "^1.4"
},
"require-dev": {
+ "phpunit/phpunit": "6.2",
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
"scripts": {
"symfony-scripts": [
- "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
@@ -67,9 +68,6 @@
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
- "incenteev-parameters": {
- "file": "app/config/parameters.yml"
- },
- "branch-alias": null
+ "branch-alias": "NULL"
}
}
diff --git a/composer.lock b/composer.lock
index aa90f7c..281561d 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "content-hash": "cc10080e9767f14f937d74772cae106b",
+ "content-hash": "28b7146201c7c001b9d8a9b50c346611",
"packages": [
{
"name": "behat/transliterator",
@@ -179,16 +179,16 @@
},
{
"name": "doctrine/cache",
- "version": "v1.6.1",
+ "version": "v1.6.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/cache.git",
- "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3"
+ "reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/cache/zipball/b6f544a20f4807e81f7044d31e679ccbb1866dc3",
- "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3",
+ "url": "https://api.github.com/repos/doctrine/cache/zipball/eb152c5100571c7a45470ff2a35095ab3f3b900b",
+ "reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b",
"shasum": ""
},
"require": {
@@ -245,7 +245,7 @@
"cache",
"caching"
],
- "time": "2016-10-29T11:16:17+00:00"
+ "time": "2017-07-22T12:49:21+00:00"
},
{
"name": "doctrine/collections",
@@ -316,16 +316,16 @@
},
{
"name": "doctrine/common",
- "version": "v2.7.2",
+ "version": "v2.7.3",
"source": {
"type": "git",
"url": "https://github.com/doctrine/common.git",
- "reference": "930297026c8009a567ac051fd545bf6124150347"
+ "reference": "4acb8f89626baafede6ee5475bc5844096eba8a9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/common/zipball/930297026c8009a567ac051fd545bf6124150347",
- "reference": "930297026c8009a567ac051fd545bf6124150347",
+ "url": "https://api.github.com/repos/doctrine/common/zipball/4acb8f89626baafede6ee5475bc5844096eba8a9",
+ "reference": "4acb8f89626baafede6ee5475bc5844096eba8a9",
"shasum": ""
},
"require": {
@@ -385,20 +385,20 @@
"persistence",
"spl"
],
- "time": "2017-01-13T14:02:13+00:00"
+ "time": "2017-07-22T08:35:12+00:00"
},
{
"name": "doctrine/dbal",
- "version": "v2.5.12",
+ "version": "v2.5.13",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
- "reference": "7b9e911f9d8b30d43b96853dab26898c710d8f44"
+ "reference": "729340d8d1eec8f01bff708e12e449a3415af873"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/dbal/zipball/7b9e911f9d8b30d43b96853dab26898c710d8f44",
- "reference": "7b9e911f9d8b30d43b96853dab26898c710d8f44",
+ "url": "https://api.github.com/repos/doctrine/dbal/zipball/729340d8d1eec8f01bff708e12e449a3415af873",
+ "reference": "729340d8d1eec8f01bff708e12e449a3415af873",
"shasum": ""
},
"require": {
@@ -456,7 +456,7 @@
"persistence",
"queryobject"
],
- "time": "2017-02-08T12:53:47+00:00"
+ "time": "2017-07-22T20:44:48+00:00"
},
{
"name": "doctrine/doctrine-bundle",
@@ -690,33 +690,33 @@
},
{
"name": "doctrine/inflector",
- "version": "v1.1.0",
+ "version": "v1.2.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/inflector.git",
- "reference": "90b2128806bfde671b6952ab8bea493942c1fdae"
+ "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae",
- "reference": "90b2128806bfde671b6952ab8bea493942c1fdae",
+ "url": "https://api.github.com/repos/doctrine/inflector/zipball/e11d84c6e018beedd929cff5220969a3c6d1d462",
+ "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462",
"shasum": ""
},
"require": {
- "php": ">=5.3.2"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "4.*"
+ "phpunit/phpunit": "^6.2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1.x-dev"
+ "dev-master": "1.2.x-dev"
}
},
"autoload": {
- "psr-0": {
- "Doctrine\\Common\\Inflector\\": "lib/"
+ "psr-4": {
+ "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -753,7 +753,7 @@
"singularize",
"string"
],
- "time": "2015-11-06T14:35:42+00:00"
+ "time": "2017-07-22T12:18:28+00:00"
},
{
"name": "doctrine/instantiator",
@@ -939,23 +939,23 @@
},
{
"name": "doctrine/orm",
- "version": "v2.5.6",
+ "version": "v2.5.7",
"source": {
"type": "git",
"url": "https://github.com/doctrine/doctrine2.git",
- "reference": "e6c434196c8ef058239aaa0724b4aadb0107940b"
+ "reference": "22546a381144a957c00f17dc428ca33bc48ddecd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/e6c434196c8ef058239aaa0724b4aadb0107940b",
- "reference": "e6c434196c8ef058239aaa0724b4aadb0107940b",
+ "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/22546a381144a957c00f17dc428ca33bc48ddecd",
+ "reference": "22546a381144a957c00f17dc428ca33bc48ddecd",
"shasum": ""
},
"require": {
"doctrine/cache": "~1.4",
"doctrine/collections": "~1.2",
- "doctrine/common": ">=2.5-dev,<2.8-dev",
- "doctrine/dbal": ">=2.5-dev,<2.6-dev",
+ "doctrine/common": ">=2.5-dev,<2.9-dev",
+ "doctrine/dbal": ">=2.5-dev,<2.7-dev",
"doctrine/instantiator": "~1.0.1",
"ext-pdo": "*",
"php": ">=5.4",
@@ -1011,7 +1011,7 @@
"database",
"orm"
],
- "time": "2016-12-18T15:42:34+00:00"
+ "time": "2017-08-11T21:28:20+00:00"
},
{
"name": "fig/link-util",
@@ -1898,16 +1898,16 @@
},
{
"name": "sensiolabs/security-checker",
- "version": "v4.0.4",
+ "version": "v4.1.3",
"source": {
"type": "git",
"url": "https://github.com/sensiolabs/security-checker.git",
- "reference": "9e69eddf3bc49d1ee5c7908564da3141796d4bbc"
+ "reference": "7d60f01b9a56dfd152796877d009b1a0578d6ef4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/9e69eddf3bc49d1ee5c7908564da3141796d4bbc",
- "reference": "9e69eddf3bc49d1ee5c7908564da3141796d4bbc",
+ "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/7d60f01b9a56dfd152796877d009b1a0578d6ef4",
+ "reference": "7d60f01b9a56dfd152796877d009b1a0578d6ef4",
"shasum": ""
},
"require": {
@@ -1920,7 +1920,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-master": "4.1-dev"
}
},
"autoload": {
@@ -1939,7 +1939,7 @@
}
],
"description": "A security checker for your composer.lock",
- "time": "2017-03-31T14:50:32+00:00"
+ "time": "2017-08-03T12:24:05+00:00"
},
{
"name": "swiftmailer/swiftmailer",
@@ -2394,16 +2394,16 @@
},
{
"name": "symfony/swiftmailer-bundle",
- "version": "v2.6.2",
+ "version": "v2.6.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/swiftmailer-bundle.git",
- "reference": "deabc81120c2086571f7c4484ab785c5e1b84f75"
+ "reference": "11555c338f3c367b0a1bd2f024a53aa813f4ce00"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/deabc81120c2086571f7c4484ab785c5e1b84f75",
- "reference": "deabc81120c2086571f7c4484ab785c5e1b84f75",
+ "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/11555c338f3c367b0a1bd2f024a53aa813f4ce00",
+ "reference": "11555c338f3c367b0a1bd2f024a53aa813f4ce00",
"shasum": ""
},
"require": {
@@ -2449,24 +2449,25 @@
],
"description": "Symfony SwiftmailerBundle",
"homepage": "http://symfony.com",
- "time": "2017-05-22T04:58:24+00:00"
+ "time": "2017-07-22T07:18:13+00:00"
},
{
"name": "symfony/symfony",
- "version": "v3.3.4",
+ "version": "v3.3.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/symfony.git",
- "reference": "82f7cba3c272bcd266f2d27ad6f07832c2eb3a1c"
+ "reference": "6f80cbd2dd89c5308b14e03d806356fac72c263e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/symfony/zipball/82f7cba3c272bcd266f2d27ad6f07832c2eb3a1c",
- "reference": "82f7cba3c272bcd266f2d27ad6f07832c2eb3a1c",
+ "url": "https://api.github.com/repos/symfony/symfony/zipball/6f80cbd2dd89c5308b14e03d806356fac72c263e",
+ "reference": "6f80cbd2dd89c5308b14e03d806356fac72c263e",
"shasum": ""
},
"require": {
"doctrine/common": "~2.4",
+ "ext-xml": "*",
"fig/link-util": "^1.0",
"php": ">=5.5.9",
"psr/cache": "~1.0",
@@ -2482,7 +2483,7 @@
"twig/twig": "~1.34|~2.4"
},
"conflict": {
- "phpdocumentor/reflection-docblock": "<3.0",
+ "phpdocumentor/reflection-docblock": "<3.0||>=3.2.0",
"phpdocumentor/type-resolver": "<0.2.0",
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
},
@@ -2601,7 +2602,7 @@
"keywords": [
"framework"
],
- "time": "2017-07-05T13:28:34+00:00"
+ "time": "2017-08-01T10:26:30+00:00"
},
{
"name": "twig/twig",
@@ -2671,16 +2672,16 @@
},
{
"name": "vich/uploader-bundle",
- "version": "1.6.0",
+ "version": "1.6.2",
"source": {
"type": "git",
"url": "https://github.com/dustin10/VichUploaderBundle.git",
- "reference": "56c0d3ad6fc7c92bae7b05e46b3b9b5be0ec5ecc"
+ "reference": "5a5f27598ba3885104bce447539b5227704f0aa5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/dustin10/VichUploaderBundle/zipball/56c0d3ad6fc7c92bae7b05e46b3b9b5be0ec5ecc",
- "reference": "56c0d3ad6fc7c92bae7b05e46b3b9b5be0ec5ecc",
+ "url": "https://api.github.com/repos/dustin10/VichUploaderBundle/zipball/5a5f27598ba3885104bce447539b5227704f0aa5",
+ "reference": "5a5f27598ba3885104bce447539b5227704f0aa5",
"shasum": ""
},
"require": {
@@ -2752,7 +2753,7 @@
"file uploads",
"upload"
],
- "time": "2017-06-06T13:42:13+00:00"
+ "time": "2017-07-08T08:10:50+00:00"
},
{
"name": "zendframework/zend-code",
@@ -2809,16 +2810,16 @@
},
{
"name": "zendframework/zend-eventmanager",
- "version": "3.1.0",
+ "version": "3.2.0",
"source": {
"type": "git",
"url": "https://github.com/zendframework/zend-eventmanager.git",
- "reference": "c3bce7b7d47c54040b9ae51bc55491c72513b75d"
+ "reference": "9d72db10ceb6e42fb92350c0cb54460da61bd79c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/c3bce7b7d47c54040b9ae51bc55491c72513b75d",
- "reference": "c3bce7b7d47c54040b9ae51bc55491c72513b75d",
+ "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/9d72db10ceb6e42fb92350c0cb54460da61bd79c",
+ "reference": "9d72db10ceb6e42fb92350c0cb54460da61bd79c",
"shasum": ""
},
"require": {
@@ -2827,7 +2828,7 @@
"require-dev": {
"athletic/athletic": "^0.1",
"container-interop/container-interop": "^1.1.0",
- "phpunit/phpunit": "^5.6",
+ "phpunit/phpunit": "^6.0.7 || ^5.7.14",
"zendframework/zend-coding-standard": "~1.0.0",
"zendframework/zend-stdlib": "^2.7.3 || ^3.0"
},
@@ -2838,8 +2839,8 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1-dev",
- "dev-develop": "3.2-dev"
+ "dev-master": "3.2-dev",
+ "dev-develop": "3.3-dev"
}
},
"autoload": {
@@ -2859,107 +2860,287 @@
"events",
"zf2"
],
- "time": "2016-12-19T21:47:12+00:00"
+ "time": "2017-07-11T19:17:22+00:00"
}
],
"packages-dev": [
{
- "name": "sensio/generator-bundle",
- "version": "v3.1.4",
+ "name": "myclabs/deep-copy",
+ "version": "1.6.1",
"source": {
"type": "git",
- "url": "https://github.com/sensiolabs/SensioGeneratorBundle.git",
- "reference": "37f9f4e165b033fb76cc2320838321cc57140e65"
+ "url": "https://github.com/myclabs/DeepCopy.git",
+ "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/37f9f4e165b033fb76cc2320838321cc57140e65",
- "reference": "37f9f4e165b033fb76cc2320838321cc57140e65",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102",
+ "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102",
"shasum": ""
},
"require": {
- "symfony/console": "~2.7|~3.0",
- "symfony/framework-bundle": "~2.7|~3.0",
- "symfony/process": "~2.7|~3.0",
- "symfony/yaml": "~2.7|~3.0",
- "twig/twig": "^1.28.2|^2.0"
+ "php": ">=5.4.0"
},
"require-dev": {
- "doctrine/orm": "~2.4",
- "symfony/doctrine-bridge": "~2.7|~3.0",
- "symfony/filesystem": "~2.7|~3.0",
- "symfony/phpunit-bridge": "^3.3"
+ "doctrine/collections": "1.*",
+ "phpunit/phpunit": "~4.1"
},
- "type": "symfony-bundle",
+ "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": "2017-04-12T18:52:22+00:00"
+ },
+ {
+ "name": "phar-io/manifest",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phar-io/manifest.git",
+ "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0",
+ "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-phar": "*",
+ "phar-io/version": "^1.0.1",
+ "php": "^5.6 || ^7.0"
+ },
+ "type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1.x-dev"
+ "dev-master": "1.0.x-dev"
}
},
"autoload": {
- "psr-4": {
- "Sensio\\Bundle\\GeneratorBundle\\": ""
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
},
- "exclude-from-classmap": [
- "/Tests/"
+ {
+ "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": "2017-03-05T18:14:27+00:00"
+ },
+ {
+ "name": "phar-io/version",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phar-io/version.git",
+ "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df",
+ "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df",
+ "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": "2017-03-05T17:38:23+00:00"
+ },
+ {
+ "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": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "name": "Jaap van Otterdijk",
+ "email": "opensource@ijaap.nl"
}
],
- "description": "This bundle generates code for you",
- "time": "2017-03-15T01:02:10+00:00"
+ "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-27T11:43:31+00:00"
},
{
- "name": "symfony/phpunit-bridge",
- "version": "v3.3.2",
+ "name": "phpdocumentor/reflection-docblock",
+ "version": "3.1.1",
"source": {
"type": "git",
- "url": "https://github.com/symfony/phpunit-bridge.git",
- "reference": "acae7416018ebe5a7a2d79b4221203b2b8aca5d3"
+ "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
+ "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/acae7416018ebe5a7a2d79b4221203b2b8aca5d3",
- "reference": "acae7416018ebe5a7a2d79b4221203b2b8aca5d3",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e",
+ "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=5.5",
+ "phpdocumentor/reflection-common": "^1.0@dev",
+ "phpdocumentor/type-resolver": "^0.2.0",
+ "webmozart/assert": "^1.0"
},
- "conflict": {
- "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
+ "require-dev": {
+ "mockery/mockery": "^0.9.4",
+ "phpunit/phpunit": "^4.4"
},
- "suggest": {
- "ext-zip": "Zip support is required when using bin/simple-phpunit",
- "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "phpDocumentor\\Reflection\\": [
+ "src/"
+ ]
+ }
},
- "bin": [
- "bin/simple-phpunit"
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
],
- "type": "symfony-bridge",
+ "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-30T07:12:33+00:00"
+ },
+ {
+ "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": "3.3-dev"
+ "dev-master": "1.0.x-dev"
}
},
"autoload": {
- "files": [
- "bootstrap.php"
- ],
"psr-4": {
- "Symfony\\Bridge\\PhpUnit\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
+ "phpDocumentor\\Reflection\\": [
+ "src/"
+ ]
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2967,17 +3148,1232 @@
],
"authors": [
{
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
+ "name": "Mike van Riel",
+ "email": "me@mikevanriel.com"
+ }
+ ],
+ "time": "2016-11-25T06:54:22+00:00"
+ },
+ {
+ "name": "phpspec/prophecy",
+ "version": "v1.7.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpspec/prophecy.git",
+ "reference": "93d39f1f7f9326d746203c7c056f300f7f126073"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073",
+ "reference": "93d39f1f7f9326d746203c7c056f300f7f126073",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/instantiator": "^1.0.2",
+ "php": "^5.3|^7.0",
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
+ "sebastian/comparator": "^1.1|^2.0",
+ "sebastian/recursion-context": "^1.0|^2.0|^3.0"
+ },
+ "require-dev": {
+ "phpspec/phpspec": "^2.5|^3.2",
+ "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": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
+ "name": "Marcello Duarte",
+ "email": "marcello.duarte@gmail.com"
}
],
- "description": "Symfony PHPUnit Bridge",
- "homepage": "https://symfony.com",
- "time": "2017-06-01T14:45:22+00:00"
+ "description": "Highly opinionated mocking framework for PHP 5.3+",
+ "homepage": "https://github.com/phpspec/prophecy",
+ "keywords": [
+ "Double",
+ "Dummy",
+ "fake",
+ "mock",
+ "spy",
+ "stub"
+ ],
+ "time": "2017-03-02T20:05:34+00:00"
+ },
+ {
+ "name": "phpunit/php-code-coverage",
+ "version": "5.2.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
+ "reference": "8ed1902a57849e117b5651fc1a5c48110946c06b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/8ed1902a57849e117b5651fc1a5c48110946c06b",
+ "reference": "8ed1902a57849e117b5651fc1a5c48110946c06b",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-xmlwriter": "*",
+ "php": "^7.0",
+ "phpunit/php-file-iterator": "^1.4.2",
+ "phpunit/php-text-template": "^1.2.1",
+ "phpunit/php-token-stream": "^1.4.11 || ^2.0",
+ "sebastian/code-unit-reverse-lookup": "^1.0.1",
+ "sebastian/environment": "^3.0",
+ "sebastian/version": "^2.0.1",
+ "theseer/tokenizer": "^1.1"
+ },
+ "require-dev": {
+ "ext-xdebug": "^2.5",
+ "phpunit/phpunit": "^6.0"
+ },
+ "suggest": {
+ "ext-xdebug": "^2.5.5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.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": "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": "2017-08-03T12:40:43+00:00"
+ },
+ {
+ "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-03T07:40:28+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": "1.0.9",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-timer.git",
+ "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
+ "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.3 || ^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
+ },
+ "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": "sb@sebastian-bergmann.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Utility class for timing",
+ "homepage": "https://github.com/sebastianbergmann/php-timer/",
+ "keywords": [
+ "timer"
+ ],
+ "time": "2017-02-26T11:10:40+00:00"
+ },
+ {
+ "name": "phpunit/php-token-stream",
+ "version": "2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-token-stream.git",
+ "reference": "ecb0b2cdaa0add708fe6f329ef65ae0c5225130b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ecb0b2cdaa0add708fe6f329ef65ae0c5225130b",
+ "reference": "ecb0b2cdaa0add708fe6f329ef65ae0c5225130b",
+ "shasum": ""
+ },
+ "require": {
+ "ext-tokenizer": "*",
+ "php": "^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.2.4"
+ },
+ "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": "Wrapper around PHP's tokenizer extension.",
+ "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
+ "keywords": [
+ "tokenizer"
+ ],
+ "time": "2017-08-03T14:17:41+00:00"
+ },
+ {
+ "name": "phpunit/phpunit",
+ "version": "6.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/phpunit.git",
+ "reference": "23bcb03e5c6a8b8067f6c2b28f6cd84b2df321cc"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/23bcb03e5c6a8b8067f6c2b28f6cd84b2df321cc",
+ "reference": "23bcb03e5c6a8b8067f6c2b28f6cd84b2df321cc",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-json": "*",
+ "ext-libxml": "*",
+ "ext-mbstring": "*",
+ "ext-xml": "*",
+ "myclabs/deep-copy": "^1.3",
+ "phar-io/manifest": "^1.0.1",
+ "phar-io/version": "^1.0",
+ "php": "^7.0",
+ "phpspec/prophecy": "^1.7",
+ "phpunit/php-code-coverage": "^5.2",
+ "phpunit/php-file-iterator": "^1.4",
+ "phpunit/php-text-template": "^1.2",
+ "phpunit/php-timer": "^1.0.6",
+ "phpunit/phpunit-mock-objects": "^4.0",
+ "sebastian/comparator": "^2.0",
+ "sebastian/diff": "^1.4.3 || ^2.0",
+ "sebastian/environment": "^3.0.2",
+ "sebastian/exporter": "^3.1",
+ "sebastian/global-state": "^1.1 || ^2.0",
+ "sebastian/object-enumerator": "^3.0.2",
+ "sebastian/resource-operations": "^1.0",
+ "sebastian/version": "^2.0"
+ },
+ "conflict": {
+ "phpdocumentor/reflection-docblock": "3.0.2",
+ "phpunit/dbunit": "<3.0"
+ },
+ "require-dev": {
+ "ext-pdo": "*"
+ },
+ "suggest": {
+ "ext-xdebug": "*",
+ "phpunit/php-invoker": "^1.1"
+ },
+ "bin": [
+ "phpunit"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "6.1.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": "2017-06-02T08:02:48+00:00"
+ },
+ {
+ "name": "phpunit/phpunit-mock-objects",
+ "version": "4.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
+ "reference": "2f789b59ab89669015ad984afa350c4ec577ade0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/2f789b59ab89669015ad984afa350c4ec577ade0",
+ "reference": "2f789b59ab89669015ad984afa350c4ec577ade0",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/instantiator": "^1.0.5",
+ "php": "^7.0",
+ "phpunit/php-text-template": "^1.2.1",
+ "sebastian/exporter": "^3.0"
+ },
+ "conflict": {
+ "phpunit/phpunit": "<6.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.0"
+ },
+ "suggest": {
+ "ext-soap": "*"
+ },
+ "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": "Mock Object library for PHPUnit",
+ "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
+ "keywords": [
+ "mock",
+ "xunit"
+ ],
+ "time": "2017-08-03T14:08:16+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": "2.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/comparator.git",
+ "reference": "ae068fede81d06e7bb9bb46a367210a3d3e1fe6a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ae068fede81d06e7bb9bb46a367210a3d3e1fe6a",
+ "reference": "ae068fede81d06e7bb9bb46a367210a3d3e1fe6a",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0",
+ "sebastian/diff": "^2.0",
+ "sebastian/exporter": "^3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.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": "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": "2017-08-03T07:14:59+00:00"
+ },
+ {
+ "name": "sebastian/diff",
+ "version": "2.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/diff.git",
+ "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
+ "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.2"
+ },
+ "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": "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": "2017-08-03T08:09:46+00:00"
+ },
+ {
+ "name": "sebastian/environment",
+ "version": "3.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/environment.git",
+ "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
+ "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.1"
+ },
+ "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"
+ }
+ ],
+ "description": "Provides functionality to handle HHVM/PHP environments",
+ "homepage": "http://www.github.com/sebastianbergmann/environment",
+ "keywords": [
+ "Xdebug",
+ "environment",
+ "hhvm"
+ ],
+ "time": "2017-07-01T08:51:00+00:00"
+ },
+ {
+ "name": "sebastian/exporter",
+ "version": "3.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/exporter.git",
+ "reference": "234199f4528de6d12aaa58b612e98f7d36adb937"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937",
+ "reference": "234199f4528de6d12aaa58b612e98f7d36adb937",
+ "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": "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": "2017-04-03T13:19:02+00:00"
+ },
+ {
+ "name": "sebastian/global-state",
+ "version": "2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/global-state.git",
+ "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
+ "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.0"
+ },
+ "suggest": {
+ "ext-uopz": "*"
+ },
+ "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": "Snapshotting of global state",
+ "homepage": "http://www.github.com/sebastianbergmann/global-state",
+ "keywords": [
+ "global state"
+ ],
+ "time": "2017-04-27T15:39:26+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": "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-28T20:34:47+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": "sensio/generator-bundle",
+ "version": "v3.1.6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sensiolabs/SensioGeneratorBundle.git",
+ "reference": "128bc5dabc91ca40b7445f094968dd70ccd58305"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/128bc5dabc91ca40b7445f094968dd70ccd58305",
+ "reference": "128bc5dabc91ca40b7445f094968dd70ccd58305",
+ "shasum": ""
+ },
+ "require": {
+ "symfony/console": "~2.7|~3.0",
+ "symfony/framework-bundle": "~2.7|~3.0",
+ "symfony/process": "~2.7|~3.0",
+ "symfony/yaml": "~2.7|~3.0",
+ "twig/twig": "^1.28.2|^2.0"
+ },
+ "require-dev": {
+ "doctrine/orm": "~2.4",
+ "symfony/doctrine-bridge": "~2.7|~3.0",
+ "symfony/filesystem": "~2.7|~3.0",
+ "symfony/phpunit-bridge": "^3.3"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Sensio\\Bundle\\GeneratorBundle\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ }
+ ],
+ "description": "This bundle generates code for you",
+ "time": "2017-07-18T07:57:44+00:00"
+ },
+ {
+ "name": "symfony/phpunit-bridge",
+ "version": "v3.3.6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/phpunit-bridge.git",
+ "reference": "c2c124b7f9de79f4a64dc011f041a3a2c768b913"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/c2c124b7f9de79f4a64dc011f041a3a2c768b913",
+ "reference": "c2c124b7f9de79f4a64dc011f041a3a2c768b913",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "conflict": {
+ "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
+ },
+ "suggest": {
+ "ext-zip": "Zip support is required when using bin/simple-phpunit",
+ "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
+ },
+ "bin": [
+ "bin/simple-phpunit"
+ ],
+ "type": "symfony-bridge",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.3-dev"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Bridge\\PhpUnit\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "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 PHPUnit Bridge",
+ "homepage": "https://symfony.com",
+ "time": "2017-06-12T13:35:45+00:00"
+ },
+ {
+ "name": "theseer/tokenizer",
+ "version": "1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/theseer/tokenizer.git",
+ "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b",
+ "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b",
+ "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": "2017-04-07T12:08:54+00:00"
+ },
+ {
+ "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-23T20:04:58+00:00"
}
],
"aliases": [],
diff --git a/src/AppBundle/Controller/AreaController.php b/src/AppBundle/Controller/AreaController.php
index 2117aae..f9a32e8 100644
--- a/src/AppBundle/Controller/AreaController.php
+++ b/src/AppBundle/Controller/AreaController.php
@@ -1,66 +1,56 @@
getRepository('AppBundle:Area')->findAll();
-
- $growingMethodNames = array_map(function($item) {
+
+ $growingMethodNames = array_map(function ($item) {
$growingMethodName = CategoryMaster::growingMethods();
+
return $growingMethodName[$item->getGrowingMethod()];
}, $areas);
- $measurementUnits = array_map(function($item) {
+ $measurementUnits = array_map(function ($item) {
$unit = CategoryMaster::areaUnits();
+
return $unit[$item->getMeasurementUnit()];
}, $areas);
-
+
return $this->render('area/index.html.twig', array(
'areas' => $areas,
'growingMethods' => $growingMethodNames,
'measurementUnits' => $measurementUnits,
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
/**
- The detail of single area.
- */
+ The detail of single area.
+ */
public function showAction($id, EntityManagerInterface $em, Request $request, $_route)
{
$area = $em->getRepository('AppBundle:Area')->find($id);
-
- // counting total varieties
- $qb = $em->createQueryBuilder('p');
- $plantQ = $qb->addSelect('SUM(p.seedlingAmount) AS seedling_total')
- ->addSelect('SUM(p.areaCapacity) AS area_capacity')
- ->addSelect('sc.name AS seed_category')
- ->addSelect('s AS seed')
- ->from('AppBundle:Plant', 'p')
- ->innerJoin('AppBundle:Seed', 's', 'WITH', 'p.seed = s.id')
- ->innerJoin('AppBundle:SeedCategory', 'sc', 'WITH', 's.seedCategory = sc.id')
- ->where('p.area = :area_id')
- ->groupBy('p.seed')
- ->setParameter('area_id', $id)
- ->getQuery();
- $plants = $plantQ->getResult();
-
+ if (!$area) {
+ throw new NotFoundHttpException(sprintf('Area with id %s is not found.', $id));
+ }
+
+ $plants = $this->container->get('app.repository.plant_repository')->findPlantByArea($area);
+
// get growing method name from the master or categories
$growingMethodName = CategoryMaster::growingMethods()[$area->getGrowingMethod()];
@@ -69,24 +59,24 @@ public function showAction($id, EntityManagerInterface $em, Request $request, $_
'growingMethod' => $growingMethodName,
'plants' => $plants,
'total_varieties' => count($plants),
- 'current_capacities' => array_reduce($plants, function($carry, $item) {
+ 'current_capacities' => array_reduce($plants, function ($carry, $item) {
return $carry += $item['area_capacity'];
}),
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
/**
- Show the form to add new area and persist it to the database.
- */
+ Show the form to add new area and persist it to the database.
+ */
public function createAction(EntityManagerInterface $em, Request $request, $_route)
{
$area = new Area();
-
+
$form = $this->createForm(AreaType::class, $area);
$form->handleRequest($request);
- if($form->isSubmitted() && $form->isValid()) {
+ if ($form->isSubmitted() && $form->isValid()) {
$area = $form->getData();
// save to database here
@@ -100,21 +90,21 @@ public function createAction(EntityManagerInterface $em, Request $request, $_rou
return $this->render('area/create.html.twig', array(
'form' => $form->createView(),
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
/**
- Editing the detail of the area
- */
+ Editing the detail of the area
+ */
public function editAction($id, $_route, EntityManagerInterface $em, Request $request)
{
$area = $em->getRepository('AppBundle:Area')->find($id);
-
+
$form = $this->createForm(AreaType::class, $area);
$form->handleRequest($request);
- if($form->isSubmitted() && $form->isValid()) {
+ if ($form->isSubmitted() && $form->isValid()) {
$area = $form->getData();
// save to database here
@@ -129,7 +119,7 @@ public function editAction($id, $_route, EntityManagerInterface $em, Request $re
return $this->render('area/edit.html.twig', array(
'form' => $form->createView(),
'area' => $area,
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
-}
\ No newline at end of file
+}
diff --git a/src/AppBundle/Controller/DashboardController.php b/src/AppBundle/Controller/DashboardController.php
index db634a9..dcada22 100644
--- a/src/AppBundle/Controller/DashboardController.php
+++ b/src/AppBundle/Controller/DashboardController.php
@@ -1,10 +1,10 @@
getRepository('AppBundle:Field')->findAll();
- $fieldLocations = array_map(function($location) {
+ $fieldLocations = array_map(function ($location) {
return array($location->getLat(), $location->getLng());
}, $fields);
-
- // query 5 oldest plants
- $plantQb = $em->createQueryBuilder('p');
- $plantQ = $plantQb->addSelect('s.name AS seed_name')
- ->addSelect('a.name AS area_name')
- ->addSelect('p.seedlingDate AS seedling_date')
- ->from('AppBundle:Plant', 'p')
- ->innerJoin('AppBundle:Seed', 's', 'WITH', 'p.seed = s.id')
- ->innerJoin('AppBundle:Area', 'a', 'WITH', 'p.area = a.id')
- ->where("p.action is null")
- ->orWhere("p.action = 'donothing'")
- ->orderBy('p.seedlingDate', 'ASC')
- ->setMaxResults(5)
- ->getQuery();
- $plants = $plantQ->getResult();
- $plantsWithDaysAgo = array_map(function($plant) {
- // translate the date time to days ago
+ // query 5 oldest plants
+ $plants = $this->container->get('app.repository.plant_repository')->findOldestPlants(5);
+
+ $plantsWithDaysAgo = array_map(function ($plant) {
+ // translate the date time to days ago
$seedlingDate = date_create($plant['seedling_date']->format('Y-m-d'));
$currentDate = date_create(date('Y-m-d'));
$interval = date_diff($currentDate, $seedlingDate);
@@ -42,26 +30,14 @@ public function indexAction(EntityManagerInterface $em, $_route)
}, $plants);
// query 5 nearest deadline for certain tasks
- $taskQb = $em->createQueryBuilder('t');
- $taskQ = $taskQb->select('t')
- ->from('AppBundle:Task', 't')
- ->orderBy('t.dueDate', 'ASC')
- ->where('t.isDone = 0')
- ->setMaxResults(5)
- ->getQuery();
- $tasks = $taskQ->getResult();
-
- $tasksWithFormattedDate = array_map(function($task) {
- $dueDate = $task->getDueDate()->format('d-M-Y H:i');
- $task->setDueDate($dueDate);
- return $task;
- }, $tasks);
+ $tasks = $this->container->get('app.repository.task_repository')->deadlineTasks(5);
return $this->render('dashboard/index.html.twig', array(
'classActive' => $_route,
- 'farmLocations' => json_encode($fieldLocations),
+ 'farms' => $fieldLocations,
+ 'farmsJSON' => json_encode($fieldLocations),
'plants' => $plantsWithDaysAgo,
- 'tasks' => $tasksWithFormattedDate
+ 'tasks' => $tasks,
));
}
}
diff --git a/src/AppBundle/Controller/FieldController.php b/src/AppBundle/Controller/FieldController.php
index 5d94e79..c3c94ba 100644
--- a/src/AppBundle/Controller/FieldController.php
+++ b/src/AppBundle/Controller/FieldController.php
@@ -1,42 +1,40 @@
getRepository('AppBundle:Field')->findAll();
-
+
return $this->render('field/index.html.twig', array(
'fields' => $fields,
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
/**
- This method will render the new field submission form and handle the submission.
- */
+ This method will render the new field submission form and handle the submission.
+ */
public function createAction(Request $request, EntityManagerInterface $em, $_route)
{
$field = new Field();
-
+
$form = $this->createForm(FieldType::class, $field);
-
+
$form->handleRequest($request);
- if($form->isSubmitted() && $form->isValid()) {
+ if ($form->isSubmitted() && $form->isValid()) {
$field = $form->getData();
// save to database here
@@ -50,14 +48,13 @@ public function createAction(Request $request, EntityManagerInterface $em, $_rou
return $this->render('field/add.html.twig', array(
'form' => $form->createView(),
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
/**
- This method will render the detail of the field form
- and handle the data update when necessary.
- */
+ and handle the data update when necessary.
+ */
public function showAction($id, EntityManagerInterface $em, Request $request, $_route)
{
$field = $em->getRepository('AppBundle:Field')->find($id);
@@ -66,7 +63,7 @@ public function showAction($id, EntityManagerInterface $em, Request $request, $_
$form->handleRequest($request);
- if($form->isSubmitted() && $form->isValid()) {
+ if ($form->isSubmitted() && $form->isValid()) {
$field = $form->getData();
// save to database here
@@ -81,7 +78,7 @@ public function showAction($id, EntityManagerInterface $em, Request $request, $_
'form' => $form->createView(),
'classActive' => $_route,
'lat' => $field->getLat(),
- 'lng' => $field->getLng()
+ 'lng' => $field->getLng(),
));
}
}
diff --git a/src/AppBundle/Controller/InventoryController.php b/src/AppBundle/Controller/InventoryController.php
index 8930f3f..2e1ef4c 100644
--- a/src/AppBundle/Controller/InventoryController.php
+++ b/src/AppBundle/Controller/InventoryController.php
@@ -1,14 +1,12 @@
render('inventory/index.html.twig', array(
'seeds' => $seeds,
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
@@ -27,10 +25,10 @@ public function seedCreateAction(Request $request, EntityManagerInterface $em, $
$seed = new Seed();
$form = $this->createForm(SeedType::class, $seed);
-
+
$form->handleRequest($request);
- if($form->isSubmitted() && $form->isValid()) {
+ if ($form->isSubmitted() && $form->isValid()) {
$seed = $form->getData();
// save to database here
@@ -44,7 +42,7 @@ public function seedCreateAction(Request $request, EntityManagerInterface $em, $
return $this->render('seed/create.html.twig', array(
'form' => $form->createView(),
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
@@ -53,10 +51,10 @@ public function seedEditAction($id, $_route, Request $request, EntityManagerInte
$seed = $em->getRepository('AppBundle:Seed')->find($id);
$form = $this->createForm(SeedType::class, $seed);
-
+
$form->handleRequest($request);
- if($form->isSubmitted() && $form->isValid()) {
+ if ($form->isSubmitted() && $form->isValid()) {
$seed = $form->getData();
// save to database here
@@ -71,7 +69,7 @@ public function seedEditAction($id, $_route, Request $request, EntityManagerInte
return $this->render('seed/edit.html.twig', array(
'form' => $form->createView(),
'seed' => $seed,
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
}
diff --git a/src/AppBundle/Controller/PlantController.php b/src/AppBundle/Controller/PlantController.php
index de896e2..f1e4fa7 100644
--- a/src/AppBundle/Controller/PlantController.php
+++ b/src/AppBundle/Controller/PlantController.php
@@ -1,4 +1,5 @@
createQueryBuilder('p');
- $plantQ = $qb->addSelect('SUM(p.areaCapacity) AS seedling_total')
- ->addSelect('p.id AS id')
- ->addSelect('COUNT(p.area) AS area_count')
- ->addSelect('sc.name AS seed_category')
- ->addSelect('s AS seed')
- ->from('AppBundle:Plant', 'p')
- ->innerJoin('AppBundle:Seed', 's', 'WITH', 'p.seed = s.id')
- ->innerJoin('AppBundle:Area', 'a', 'WITH', 'p.area = a.id')
- ->innerJoin('AppBundle:SeedCategory', 'sc', 'WITH', 's.seedCategory = sc.id')
- ->groupBy('p.seed')
- ->getQuery();
- $plants = $plantQ->getResult();
-
+ $plants = $this->container->get('app.repository.plant_repository')->findAllPlants();
+
return $this->render('plant/index.html.twig', array(
'plants' => $plants,
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
/**
- Show the form to add new plant and persist it to the database.
- */
+ Show the form to add new plant and persist it to the database.
+ */
public function createAction(EntityManagerInterface $em, Request $request, $_route)
{
$plant = new Plant();
-
+
$form = $this->createForm(PlantType::class, $plant, [
- 'entityManager' => $em
+ 'entityManager' => $em,
]);
$form->handleRequest($request);
- if($form->isSubmitted() && $form->isValid()) {
+ if ($form->isSubmitted() && $form->isValid()) {
// validate the area capacity and seed inventory
$seedsInfo = $em->getRepository('AppBundle:Plant')->findBy(array('seed' => $plant->getSeed()->getId()));
$areasInfo = $em->getRepository('AppBundle:Plant')->findBy(array('area' => $plant->getArea()->getId()));
-
- $usedSeed = array_reduce($seedsInfo, function($carry, $item) {
+
+ $usedSeed = array_reduce($seedsInfo, function ($carry, $item) {
return $carry += $item->getSeedlingAmount();
});
- $usedArea = array_reduce($areasInfo, function($carry, $item) {
+ $usedArea = array_reduce($areasInfo, function ($carry, $item) {
return $carry += $item->getAreaCapacity();
});
$totalSeed = $usedSeed + $plant->getSeedlingAmount();
$totalArea = $usedArea + $plant->getAreaCapacity();
-
- if($totalSeed <= $plant->getSeed()->getQuantity() && $totalArea <= $plant->getArea()->getCapacity()) {
+
+ if ($totalSeed <= $plant->getSeed()->getQuantity() && $totalArea <= $plant->getArea()->getCapacity()) {
// save to database here
$plant = $form->getData();
$plant->setCreatedAt(new \DateTime('now'));
-
+
$em->persist($plant);
$em->flush();
@@ -76,28 +62,25 @@ public function createAction(EntityManagerInterface $em, Request $request, $_rou
} else {
// give error message
$this->addFlash('notice', 'The capacity of the area or the quantity of the seed are insufficient.');
+
return $this->redirectToRoute('plants_create');
}
}
return $this->render('plant/create.html.twig', array(
'form' => $form->createView(),
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
/**
- Display the detail of the plant
- */
+ Display the detail of the plant
+ */
public function showAction($id, EntityManagerInterface $em, Request $request, $_route)
{
$plants = $em->getRepository('AppBundle:Plant')->findBy(array('seed' => $id));
$plantsWithMeasurementAndDaysAgo = array_map(function($plant) {
- // translate the measurement
- $unit = CategoryMaster::areaUnits()[$plant->getArea()->getMeasurementUnit()];
- $plant->getArea()->setMeasurementUnit($unit);
-
// translate the date time object to "days ago" string
$seedlingDate = date_create($plant->getSeedlingDate()->format('Y-m-d'));
$currentDate = date_create(date('Y-m-d'));
@@ -106,32 +89,32 @@ public function showAction($id, EntityManagerInterface $em, Request $request, $_
return $plant;
}, $plants);
-
+
return $this->render('plant/show.html.twig', array(
'plants' => $plantsWithMeasurementAndDaysAgo,
'totalArea' => count($plantsWithMeasurementAndDaysAgo),
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
/**
- Harvesting or disposing the plants
- */
+ Harvesting or disposing the plants
+ */
public function harvestAction($id, $_route, EntityManagerInterface $em, Request $request)
{
$plant = $em->getRepository('AppBundle:Plant')->find($id);
-
+
$form = $this->createForm(PlantHarvestType::class, $plant);
$form->handleRequest($request);
- if($form->isSubmitted() && $form->isValid()) {
+ if ($form->isSubmitted() && $form->isValid()) {
// when the farmer choose to harvest or dispose his/her plant
- if($plant->getAction() != 'donothing') {
- if($plant->getAction() == 'harvest') {
+ if ($plant->getAction() != 'donothing') {
+ if ($plant->getAction() == 'harvest') {
// harvest
$plant->setHarvestingDate(new \DateTime('now'));
$plant->setDisposingDate(null);
- } elseif($plant->getAction() == 'dispose') {
+ } elseif ($plant->getAction() == 'dispose') {
// dispose
$plant->setDisposingDate(new \DateTime('now'));
$plant->setHarvestingDate(null);
@@ -156,43 +139,43 @@ public function harvestAction($id, $_route, EntityManagerInterface $em, Request
'classActive' => $_route,
'form' => $form->createView(),
'plant' => $plant,
- 'seedlingDate' => $plant->getSeedlingDate()->format('d-M-Y')
+ 'seedlingDate' => $plant->getSeedlingDate()->format('d-M-Y'),
));
}
/**
- Edit the plantation's detail
- */
+ Edit the plantation's detail
+ */
public function editAction($id, $_route, EntityManagerInterface $em, Request $request)
{
$plant = $em->getRepository('AppBundle:Plant')->find($id);
-
+
$form = $this->createForm(PlantType::class, $plant, [
- 'entityManager' => $em
+ 'entityManager' => $em,
]);
$form->handleRequest($request);
- if($form->isSubmitted() && $form->isValid()) {
+ if ($form->isSubmitted() && $form->isValid()) {
// validate the area capacity and seed inventory
$seedsInfo = $em->getRepository('AppBundle:Plant')->findBy(array('seed' => $plant->getSeed()->getId()));
$areasInfo = $em->getRepository('AppBundle:Plant')->findBy(array('area' => $plant->getArea()->getId()));
-
- $usedSeed = array_reduce($seedsInfo, function($carry, $item) {
+
+ $usedSeed = array_reduce($seedsInfo, function ($carry, $item) {
return $carry += $item->getSeedlingAmount();
});
- $usedArea = array_reduce($areasInfo, function($carry, $item) {
+ $usedArea = array_reduce($areasInfo, function ($carry, $item) {
return $carry += $item->getAreaCapacity();
});
$totalSeed = $usedSeed + $plant->getSeedlingAmount();
$totalArea = $usedArea + $plant->getAreaCapacity();
-
- if($totalSeed <= $plant->getSeed()->getQuantity() && $totalArea <= $plant->getArea()->getCapacity()) {
+
+ if ($totalSeed <= $plant->getSeed()->getQuantity() && $totalArea <= $plant->getArea()->getCapacity()) {
// save to database here
$plant = $form->getData();
$plant->setUpdatedAt(new \DateTime('now'));
-
+
$em->persist($plant);
$em->flush();
@@ -200,6 +183,7 @@ public function editAction($id, $_route, EntityManagerInterface $em, Request $re
} else {
// give error message
$this->addFlash('notice', 'The capacity of the area or the quantity of the seed are insufficient.');
+
return $this->redirectToRoute('plants_edit', array('id' => $id));
}
}
@@ -207,7 +191,7 @@ public function editAction($id, $_route, EntityManagerInterface $em, Request $re
return $this->render('plant/edit.html.twig', array(
'form' => $form->createView(),
'plant' => $plant,
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
}
diff --git a/src/AppBundle/Controller/ProfileController.php b/src/AppBundle/Controller/ProfileController.php
index 7f26cc4..536c942 100644
--- a/src/AppBundle/Controller/ProfileController.php
+++ b/src/AppBundle/Controller/ProfileController.php
@@ -1,4 +1,5 @@
render('@FOSUser/Profile/edit.html.twig', array(
'form' => $form->createView(),
- 'classActive' => 'fos_user_profile_edit'
+ 'classActive' => 'fos_user_profile_edit',
));
}
}
diff --git a/src/AppBundle/Controller/RegistrationController.php b/src/AppBundle/Controller/RegistrationController.php
index 779b9b0..ec52227 100644
--- a/src/AppBundle/Controller/RegistrationController.php
+++ b/src/AppBundle/Controller/RegistrationController.php
@@ -1,4 +1,5 @@
createForm(ReservoirType::class, $reservoir);
$form->handleRequest($request);
- if($form->isSubmitted() && $form->isValid()) {
+ if ($form->isSubmitted() && $form->isValid()) {
$reservoir = $form->getData();
// save to database here
@@ -35,7 +33,7 @@ public function indexAction(EntityManagerInterface $em, Request $request, $_rout
return $this->render('reservoir/index.html.twig', array(
'form' => $form->createView(),
'reservoirs' => $reservoirs,
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
@@ -47,7 +45,7 @@ public function showAction($id, $_route, EntityManagerInterface $em, Request $re
$form->handleRequest($request);
- if($form->isSubmitted() && $form->isValid()) {
+ if ($form->isSubmitted() && $form->isValid()) {
$reservoir = $form->getData();
// save to database here
@@ -61,7 +59,7 @@ public function showAction($id, $_route, EntityManagerInterface $em, Request $re
return $this->render('reservoir/show.html.twig', array(
'form' => $form->createView(),
'reservoir' => $reservoir,
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
-}
\ No newline at end of file
+}
diff --git a/src/AppBundle/Controller/TaskController.php b/src/AppBundle/Controller/TaskController.php
index 8acef5a..2505152 100644
--- a/src/AppBundle/Controller/TaskController.php
+++ b/src/AppBundle/Controller/TaskController.php
@@ -1,14 +1,12 @@
render('task/index.html.twig', array(
'tasks' => $tasks,
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
@@ -27,10 +25,10 @@ public function createAction(Request $request, EntityManagerInterface $em, $_rou
$task = new Task();
$form = $this->createForm(TaskType::class, $task);
-
+
$form->handleRequest($request);
- if($form->isSubmitted() && $form->isValid()) {
+ if ($form->isSubmitted() && $form->isValid()) {
$task = $form->getData();
// save to database here
@@ -44,7 +42,7 @@ public function createAction(Request $request, EntityManagerInterface $em, $_rou
return $this->render('task/create.html.twig', array(
'form' => $form->createView(),
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
@@ -56,7 +54,7 @@ public function showAction($id, Request $request, EntityManagerInterface $em, $_
$form->handleRequest($request);
- if($form->isSubmitted() && $form->isValid()) {
+ if ($form->isSubmitted() && $form->isValid()) {
$task = $form->getData();
// save to database here
@@ -69,7 +67,7 @@ public function showAction($id, Request $request, EntityManagerInterface $em, $_
return $this->render('task/show.html.twig', array(
'form' => $form->createView(),
- 'classActive' => $_route
+ 'classActive' => $_route,
));
}
}
diff --git a/src/AppBundle/Data/CategoryMaster.php b/src/AppBundle/Data/CategoryMaster.php
index 7a4d2b3..aec489d 100644
--- a/src/AppBundle/Data/CategoryMaster.php
+++ b/src/AppBundle/Data/CategoryMaster.php
@@ -1,4 +1,5 @@
'NFT',
2 => 'Drip Irrigation',
3 => 'Ebb and Flow',
- 4 => 'Soil/Organic'
+ 4 => 'Soil/Organic',
);
}
@@ -17,7 +18,7 @@ public static function areaUnits()
{
return array(
1 => 'Holes',
- 2 => 'Trays'
+ 2 => 'Trays',
);
}
@@ -28,7 +29,7 @@ public static function seedUnits()
2 => 'gr',
3 => 'kg',
4 => 'lbs',
- 5 => 'oz'
+ 5 => 'oz',
);
}
}
diff --git a/src/AppBundle/Data/CountryList.php b/src/AppBundle/Data/CountryList.php
index fc6a066..13f988b 100644
--- a/src/AppBundle/Data/CountryList.php
+++ b/src/AppBundle/Data/CountryList.php
@@ -1,4 +1,5 @@
'Albania Lek',
'AFN' => 'Afghanistan Afghani',
'ARS' => 'Argentina Peso',
@@ -376,7 +377,7 @@ public static function currency()
'VEF' => 'Venezuela Bolivar',
'VND' => 'Viet Nam Dong',
'YER' => 'Yemen Rial',
- 'ZWD' => 'Zimbabwe Dollar'
+ 'ZWD' => 'Zimbabwe Dollar',
);
}
}
diff --git a/src/AppBundle/DoctrineExtensions/Utils/AnyValue.php b/src/AppBundle/DoctrineExtensions/Utils/AnyValue.php
index e564300..ba5fad1 100644
--- a/src/AppBundle/DoctrineExtensions/Utils/AnyValue.php
+++ b/src/AppBundle/DoctrineExtensions/Utils/AnyValue.php
@@ -1,4 +1,5 @@
match( Lexer::T_IDENTIFIER );
- $parser->match( Lexer::T_OPEN_PARENTHESIS );
+ public function parse(Parser $parser)
+ {
+ $parser->match(Lexer::T_IDENTIFIER);
+ $parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->value = $parser->StringPrimary();
- $parser->match( Lexer::T_CLOSE_PARENTHESIS );
+ $parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
- public function getSql( SqlWalker $sqlWalker ) {
- return 'ANY_VALUE(' . $this->value->dispatch( $sqlWalker ) . ')';
+ public function getSql(SqlWalker $sqlWalker)
+ {
+ return 'ANY_VALUE('.$this->value->dispatch($sqlWalker).')';
}
}
diff --git a/src/AppBundle/Entity/Area.php b/src/AppBundle/Entity/Area.php
index 7ac0caa..c5017ba 100644
--- a/src/AppBundle/Entity/Area.php
+++ b/src/AppBundle/Entity/Area.php
@@ -1,11 +1,12 @@
plants = new ArrayCollection();
- $this->image = new EmbeddedFile();
- }
-
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
-
+
/**
* @ORM\Column(type="string", length=100)
* @Assert\NotBlank()
*/
private $name;
-
+
/**
* @ORM\Column(type="integer")
* @Assert\NotBlank()
@@ -59,7 +55,7 @@ public function __construct()
* @Assert\NotBlank()
*/
private $capacity;
-
+
/**
* @ORM\Column(type="integer")
* @Assert\NotBlank()
@@ -68,10 +64,10 @@ public function __construct()
/**
* NOTE: This is not a mapped field of entity metadata, just a simple property.
- *
+ *
* @Assert\File(maxSize="2M")
* @Vich\UploadableField(mapping="area_image", fileNameProperty="image.name", size="image.size", mimeType="image.mimeType", originalName="image.originalName")
- *
+ *
* @var File
*/
private $imageFile;
@@ -95,10 +91,16 @@ public function __construct()
*/
private $createdAt;
+ public function __construct()
+ {
+ $this->plants = new ArrayCollection();
+ $this->image = new EmbeddedFile();
+ }
+
/**
- * Get id
+ * Get id.
*
- * @return integer
+ * @return int
*/
public function getId()
{
@@ -106,7 +108,7 @@ public function getId()
}
/**
- * Set name
+ * Set name.
*
* @param string $name
*
@@ -120,7 +122,7 @@ public function setName($name)
}
/**
- * Get name
+ * Get name.
*
* @return string
*/
@@ -130,9 +132,9 @@ public function getName()
}
/**
- * Set growingMethod
+ * Set growingMethod.
*
- * @param integer $growingMethod
+ * @param int $growingMethod
*
* @return Area
*/
@@ -144,9 +146,9 @@ public function setGrowingMethod($growingMethod)
}
/**
- * Get growingMethod
+ * Get growingMethod.
*
- * @return integer
+ * @return int
*/
public function getGrowingMethod()
{
@@ -154,9 +156,9 @@ public function getGrowingMethod()
}
/**
- * Set capacity
+ * Set capacity.
*
- * @param integer $capacity
+ * @param int $capacity
*
* @return Area
*/
@@ -168,9 +170,9 @@ public function setCapacity($capacity)
}
/**
- * Get capacity
+ * Get capacity.
*
- * @return integer
+ * @return int
*/
public function getCapacity()
{
@@ -178,9 +180,9 @@ public function getCapacity()
}
/**
- * Set measurementUnit
+ * Set measurementUnit.
*
- * @param integer $measurementUnit
+ * @param int $measurementUnit
*
* @return Area
*/
@@ -192,9 +194,9 @@ public function setMeasurementUnit($measurementUnit)
}
/**
- * Get measurementUnit
+ * Get measurementUnit.
*
- * @return integer
+ * @return int
*/
public function getMeasurementUnit()
{
@@ -202,7 +204,7 @@ public function getMeasurementUnit()
}
/**
- * Set updatedAt
+ * Set updatedAt.
*
* @param \DateTime $updatedAt
*
@@ -216,7 +218,7 @@ public function setUpdatedAt($updatedAt)
}
/**
- * Get updatedAt
+ * Get updatedAt.
*
* @return \DateTime
*/
@@ -226,7 +228,7 @@ public function getUpdatedAt()
}
/**
- * Set createdAt
+ * Set createdAt.
*
* @param \DateTime $createdAt
*
@@ -240,7 +242,7 @@ public function setCreatedAt($createdAt)
}
/**
- * Get createdAt
+ * Get createdAt.
*
* @return \DateTime
*/
@@ -250,7 +252,7 @@ public function getCreatedAt()
}
/**
- * Set reservoir
+ * Set reservoir.
*
* @param \AppBundle\Entity\Reservoir $reservoir
*
@@ -264,7 +266,7 @@ public function setReservoir(\AppBundle\Entity\Reservoir $reservoir = null)
}
/**
- * Get reservoir
+ * Get reservoir.
*
* @return \AppBundle\Entity\Reservoir
*/
@@ -274,7 +276,7 @@ public function getReservoir()
}
/**
- * Add plant
+ * Add plant.
*
* @param \AppBundle\Entity\Plant $plant
*
@@ -288,7 +290,7 @@ public function addPlant(\AppBundle\Entity\Plant $plant)
}
/**
- * Remove plant
+ * Remove plant.
*
* @param \AppBundle\Entity\Plant $plant
*/
@@ -298,7 +300,7 @@ public function removePlant(\AppBundle\Entity\Plant $plant)
}
/**
- * Get plants
+ * Get plants.
*
* @return \Doctrine\Common\Collections\Collection
*/
@@ -353,16 +355,17 @@ public function getImage()
/**
* @Assert\Callback
+ *
* @param ExecutionContextInterface $context
*/
public function validate(ExecutionContextInterface $context, $payload)
{
// check only when not null
- if($this->imageFile != null) {
- if (! in_array($this->imageFile->getMimeType(), array(
+ if ($this->imageFile != null) {
+ if (!in_array($this->imageFile->getMimeType(), array(
'image/jpeg',
'image/gif',
- 'image/png'
+ 'image/png',
))) {
$context
->buildViolation('Wrong file type (only jpg,gif,png allowed)')
diff --git a/src/AppBundle/Entity/Field.php b/src/AppBundle/Entity/Field.php
index 7bb36f0..1df7a10 100644
--- a/src/AppBundle/Entity/Field.php
+++ b/src/AppBundle/Entity/Field.php
@@ -1,11 +1,12 @@
imageFile != null) {
+ if ($this->imageFile != null) {
if (!in_array($this->imageFile->getMimeType(), array(
'image/jpeg',
'image/gif',
- 'image/png'
+ 'image/png',
))) {
$context
->buildViolation('Wrong file type (only jpg,gif,png allowed)')
diff --git a/src/AppBundle/Entity/Plant.php b/src/AppBundle/Entity/Plant.php
index 4eaca50..e68c9cf 100644
--- a/src/AppBundle/Entity/Plant.php
+++ b/src/AppBundle/Entity/Plant.php
@@ -1,7 +1,7 @@
imageFile != null) {
- if (! in_array($this->imageFile->getMimeType(), array(
+ if ($this->imageFile != null) {
+ if (!in_array($this->imageFile->getMimeType(), array(
'image/jpeg',
'image/gif',
- 'image/png'
+ 'image/png',
))) {
$context
->buildViolation('Wrong file type (only jpg,gif,png allowed)')
diff --git a/src/AppBundle/Entity/SeedCategory.php b/src/AppBundle/Entity/SeedCategory.php
index f494940..87c6480 100644
--- a/src/AppBundle/Entity/SeedCategory.php
+++ b/src/AppBundle/Entity/SeedCategory.php
@@ -1,4 +1,5 @@
add('name', TextType::class, array(
- 'attr' => array('maxlength' => 50)))
+ 'attr' => array('maxlength' => 50),
+ 'label' => 'Name',
+ 'translation_domain' => 'dashboard'))
->add('reservoir', EntityType::class, array(
'class' => 'AppBundle:Reservoir',
- 'choice_label' => 'name'
+ 'choice_label' => 'name',
+ 'required' => false,
+ 'label' => 'Reservoir',
+ 'translation_domain' => 'dashboard'
))
->add('growingMethod', ChoiceType::class, array(
'choices' => array(
CategoryMaster::growingMethods()[1] => 1,
CategoryMaster::growingMethods()[2] => 2,
CategoryMaster::growingMethods()[3] => 3,
- CategoryMaster::growingMethods()[4] => 4
- )
+ CategoryMaster::growingMethods()[4] => 4,
+ ),
+ 'label' => 'Growing method',
+ 'translation_domain' => 'dashboard'
+ ))
+ ->add('capacity', IntegerType::class, array(
+ 'label' => 'Capacity',
+ 'translation_domain' => 'dashboard'
))
- ->add('capacity', IntegerType::class)
->add('measurementUnit', ChoiceType::class, array(
'choices' => array(
CategoryMaster::areaUnits()[1] => 1,
- CategoryMaster::areaUnits()[2] => 2
- )
+ CategoryMaster::areaUnits()[2] => 2,
+ ),
+ 'label' => 'Measurement unit',
+ 'translation_domain' => 'dashboard'
))
->add('imageFile', VichImageType::class, array(
- 'required' => FALSE,
- 'allow_delete' => TRUE,
- 'image_uri' => TRUE,
- 'download_uri' => TRUE
+ 'required' => false,
+ 'allow_delete' => true,
+ 'image_uri' => true,
+ 'download_uri' => true,
+ 'label' => 'Image file',
+ 'translation_domain' => 'dashboard'
))
- ->add('save', SubmitType::class, array('label' => 'Save'));
+ ->add('save', SubmitType::class, array(
+ 'label' => 'Save',
+ 'translation_domain' => 'dashboard'
+ ));
}
}
diff --git a/src/AppBundle/Form/FieldType.php b/src/AppBundle/Form/FieldType.php
index 06b92b5..e0826ff 100644
--- a/src/AppBundle/Form/FieldType.php
+++ b/src/AppBundle/Form/FieldType.php
@@ -1,12 +1,13 @@
add('name', TextType::class, array(
- 'attr' => array('maxlength' => 50)))
- ->add('lat', NumberType::class, array('required' => FALSE, 'scale' => 8))
- ->add('lng', NumberType::class, array('required' => FALSE, 'scale' => 8))
- ->add('description', TextareaType::class, array('required' => FALSE))
+ 'attr' => array('maxlength' => 50),
+ 'label' => 'Name',
+ 'translation_domain' => 'dashboard'))
+ ->add('lat', NumberType::class, array(
+ 'required' => false,
+ 'scale' => 8,
+ 'label' => 'Latitude',
+ 'translation_domain' => 'dashboard'))
+ ->add('lng', NumberType::class, array(
+ 'required' => false,
+ 'scale' => 8,
+ 'label' => 'Longitude',
+ 'translation_domain' => 'dashboard'))
+ ->add('description', TextareaType::class, array(
+ 'required' => false,
+ 'label' => 'Description',
+ 'translation_domain' => 'dashboard'))
->add('imageFile', VichImageType::class, array(
- 'required' => FALSE,
- 'allow_delete' => TRUE,
- 'image_uri' => TRUE,
- 'download_uri' => TRUE
+ 'required' => false,
+ 'allow_delete' => true,
+ 'image_uri' => true,
+ 'download_uri' => true,
+ 'label' => 'Image file',
+ 'translation_domain' => 'dashboard'
))
- ->add('save', SubmitType::class, array('label' => 'Save'));
+ ->add('save', SubmitType::class, array(
+ 'label' => 'Save',
+ 'translation_domain' => 'dashboard'));
}
}
diff --git a/src/AppBundle/Form/PlantHarvestType.php b/src/AppBundle/Form/PlantHarvestType.php
index 9b93dfd..fd48672 100644
--- a/src/AppBundle/Form/PlantHarvestType.php
+++ b/src/AppBundle/Form/PlantHarvestType.php
@@ -1,15 +1,12 @@
add('action', ChoiceType::class, array(
'choices' => array('Harvest' => 'harvest', 'Dispose' => 'dispose'),
- 'expanded' => true
+ 'expanded' => true,
+ 'label' => 'Action',
+ 'translation_domain' => 'dashboard'
))
- ->add('note', TextareaType::class, array('required' => FALSE))
- ->add('save', SubmitType::class, array('label' => 'Update'));
+ ->add('note', TextareaType::class, array(
+ 'required' => false,
+ 'label' => 'Note',
+ 'translation_domain' => 'dashboard'))
+ ->add('save', SubmitType::class, array(
+ 'label' => 'Update',
+ 'translation_domain' => 'dashboard'));
}
}
diff --git a/src/AppBundle/Form/PlantType.php b/src/AppBundle/Form/PlantType.php
index 15746d6..1092e7f 100644
--- a/src/AppBundle/Form/PlantType.php
+++ b/src/AppBundle/Form/PlantType.php
@@ -1,14 +1,14 @@
setDefaults([
- 'entityManager' => null
+ 'entityManager' => null,
]);
}
@@ -25,41 +25,56 @@ public function buildForm(FormBuilderInterface $builder, array $options)
$builder
->add('area', EntityType::class, array(
'class' => 'AppBundle:Area',
- 'choice_label' => function($area) use($options) {
+ 'choice_label' => function ($area) use ($options) {
// measurement unit for area capacity
$unit = CategoryMaster::areaUnits()[$area->getMeasurementUnit()];
// capacity left
$areasInfo = $options['entityManager']->getRepository('AppBundle:Plant')->findBy(array('area' => $area->getId()));
- $usedArea = array_reduce($areasInfo, function($carry, $item) {
+ $usedArea = array_reduce($areasInfo, function ($carry, $item) {
return $carry += $item->getAreaCapacity();
});
$areaLeft = $area->getCapacity() - $usedArea;
- return $area->getName() . " (Capacities: ". $areaLeft . " ". $unit . " remaining)";
- }
+ return $area->getName().' (Capacities: '.$areaLeft.' '.$unit.' remaining)';
+ },
+ 'label' => 'Area',
+ 'translation_domain' => 'dashboard'
))
->add('seed', EntityType::class, array(
'class' => 'AppBundle:Seed',
- 'choice_label' => function($seed) use($options) {
+ 'choice_label' => function ($seed) use ($options) {
// measurement unit for seed amount
$unit = CategoryMaster::seedUnits()[$seed->getMeasurementUnit()];
// seeds left
$seedsInfo = $options['entityManager']->getRepository('AppBundle:Plant')->findBy(array('seed' => $seed->getId()));
- $usedSeed = array_reduce($seedsInfo, function($carry, $item) {
+ $usedSeed = array_reduce($seedsInfo, function ($carry, $item) {
return $carry += $item->getSeedlingAmount();
});
$seedLeft = $seed->getQuantity() - $usedSeed;
- return $seed->getName() . " (Quantities: ". $seedLeft . " " . $unit ." remaining)";
- }
+ return $seed->getName().' (Quantities: '.$seedLeft.' '.$unit.' remaining)';
+ },
+ 'label' => 'Seed',
+ 'translation_domain' => 'dashboard'
))
->add('seedlingDate', DateType::class, array(
- 'years' => range(date('Y'), date('Y') - 1)
+ 'years' => range(date('Y'), date('Y') - 1),
+ 'widget' => 'single_text',
+ 'label' => 'Seedling date',
+ 'translation_domain' => 'dashboard'
+ ))
+ ->add('seedlingAmount', IntegerType::class, array(
+ 'label' => 'Seedling amount',
+ 'translation_domain' => 'dashboard'
+ ))
+ ->add('areaCapacity', IntegerType::class, array(
+ 'label' => 'Area capacity',
+ 'translation_domain' => 'dashboard'
))
- ->add('seedlingAmount', IntegerType::class)
- ->add('areaCapacity', IntegerType::class)
- ->add('save', SubmitType::class, array('label' => 'Save'));
+ ->add('save', SubmitType::class, array(
+ 'label' => 'Save',
+ 'translation_domain' => 'dashboard'));
}
}
diff --git a/src/AppBundle/Form/RegistrationFormType.php b/src/AppBundle/Form/RegistrationFormType.php
index eed2d4a..c7dbd6a 100644
--- a/src/AppBundle/Form/RegistrationFormType.php
+++ b/src/AppBundle/Form/RegistrationFormType.php
@@ -1,4 +1,5 @@
add('name', TextType::class)
+ ->add('name', TextType::class, array(
+ 'label' => 'Name',
+ 'translation_domain' => 'dashboard'
+ ))
->add('field', EntityType::class, array(
'class' => 'AppBundle:Field',
- 'choice_label' => 'name'
+ 'choice_label' => 'name',
+ 'label' => 'Field',
+ 'translation_domain' => 'dashboard'
+ ))
+ ->add('capacity', NumberType::class, array(
+ 'scale' => 2,
+ 'label' => 'Capacity',
+ 'translation_domain' => 'dashboard'
))
- ->add('capacity', NumberType::class, array('scale' => 2))
->add('measurementUnit', ChoiceType::class, array(
'choices' => array(
'Litre' => 1,
- 'Gallon' => 2
- )
+ 'Gallon' => 2,
+ ),
+ 'label' => 'Measurement unit',
+ 'translation_domain' => 'dashboard'
))
- ->add('save', SubmitType::class, array('label' => 'Save'));
+ ->add('save', SubmitType::class, array(
+ 'label' => 'Save',
+ 'translation_domain' => 'dashboard'
+ ));
}
}
diff --git a/src/AppBundle/Form/SeedType.php b/src/AppBundle/Form/SeedType.php
index d1a1cf7..3aa0d74 100644
--- a/src/AppBundle/Form/SeedType.php
+++ b/src/AppBundle/Form/SeedType.php
@@ -1,16 +1,17 @@
"Indonesia".
// We don't need the country code.
- $countryArray = array_reduce(CountryList::name(), function($result, $item) {
+ $countryArray = array_reduce(CountryList::name(), function ($result, $item) {
$result[$item] = $item;
+
return $result;
}, array());
// Generate 5 years from the current year
$years = range(date('Y'), date('Y') + 5);
- $yearChoice = array_reduce($years, function($result, $item) {
+ $yearChoice = array_reduce($years, function ($result, $item) {
$result[$item] = $item;
+
return $result;
}, array());
$builder
- ->add('name', TextType::class)
+ ->add('name', TextType::class, array(
+ 'label' => 'Name',
+ 'translation_domain' => 'dashboard'
+ ))
->add('seedCategory', EntityType::class, array(
'class' => 'AppBundle:SeedCategory',
- 'choice_label' => 'name'
+ 'choice_label' => 'name',
+ 'label' => 'Seed category',
+ 'translation_domain' => 'dashboard'
+ ))
+ ->add('quantity', IntegerType::class, array(
+ 'label' => 'Quantity',
+ 'translation_domain' => 'dashboard'
))
- ->add('quantity', IntegerType::class)
->add('measurementUnit', ChoiceType::class, array(
'choices' => array(
'Seeds' => 1,
'Gramme' => 2,
'Kilogramme' => 3,
'Lbs' => 4,
- 'Oz' => 5
- )
+ 'Oz' => 5,
+ ),
+ 'label' => 'Measurement unit',
+ 'translation_domain' => 'dashboard'
+ ))
+ ->add('producerName', TextType::class, array(
+ 'label' => 'Producer name',
+ 'translation_domain' => 'dashboard'
))
- ->add('producerName', TextType::class)
->add('originCountry', ChoiceType::class, array(
- 'choices' => $countryArray
+ 'choices' => $countryArray,
+ 'label' => 'Country of origin',
+ 'translation_domain' => 'dashboard'
+ ))
+ ->add('note', TextareaType::class, array(
+ 'required' => false,
+ 'label' => 'Note',
+ 'translation_domain' => 'dashboard'
))
- ->add('note', TextareaType::class, array('required' => FALSE))
->add('expirationMonth', ChoiceType::class, array(
'choices' => array(
'January' => 'January',
@@ -65,19 +87,32 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'September' => 'September',
'October' => 'October',
'November' => 'November',
- 'December' => 'December'
- )
+ 'December' => 'December',
+ ),
+ 'label' => 'Expiration month',
+ 'translation_domain' => 'dashboard'
))
->add('expirationYear', ChoiceType::class, array(
- 'choices' => $yearChoice
+ 'choices' => $yearChoice,
+ 'label' => 'Expiration year',
+ 'translation_domain' => 'dashboard'
+ ))
+ ->add('germinationRate', NumberType::class, array(
+ 'scale' => 2,
+ 'label' => 'Germination rate',
+ 'translation_domain' => 'dashboard'
))
- ->add('germinationRate', NumberType::class, array('scale' => 2))
->add('imageFile', VichImageType::class, array(
- 'required' => FALSE,
- 'allow_delete' => TRUE,
- 'image_uri' => TRUE,
- 'download_uri' => TRUE
+ 'required' => false,
+ 'allow_delete' => true,
+ 'image_uri' => true,
+ 'download_uri' => true,
+ 'label' => 'Image file',
+ 'translation_domain' => 'dashboard'
))
- ->add('save', SubmitType::class, array('label' => 'Save'));
+ ->add('save', SubmitType::class, array(
+ 'label' => 'Save',
+ 'translation_domain' => 'dashboard'
+ ));
}
-}
\ No newline at end of file
+}
diff --git a/src/AppBundle/Form/TaskType.php b/src/AppBundle/Form/TaskType.php
index e53af1c..a3bd68c 100644
--- a/src/AppBundle/Form/TaskType.php
+++ b/src/AppBundle/Form/TaskType.php
@@ -1,45 +1,65 @@
add('name', TextType::class)
- ->add('notes', TextareaType::class, array('required' => FALSE))
+ ->add('name', TextType::class, array(
+ 'label' => 'Name',
+ 'translation_domain' => 'dashboard'
+ ))
+ ->add('notes', TextareaType::class, array(
+ 'required' => false,
+ 'label' => 'Note',
+ 'translation_domain' => 'dashboard'
+ ))
->add('category', ChoiceType::class, array(
'choices' => array(
'Area' => 'area',
'Plant' => 'plant',
'Seed' => 'seed',
- 'Reservoir' => 'reservoir'
- )
+ 'Reservoir' => 'reservoir',
+ ),
+ 'label' => 'Category',
+ 'translation_domain' => 'dashboard'
))
->add('dueDate', DateTimeType::class, array(
- 'years' => range(date('Y'), date('Y') + 1)
+ 'years' => range(date('Y'), date('Y') + 1),
+ 'widget' => 'single_text',
+ 'label' => 'Due date',
+ 'translation_domain' => 'dashboard'
))
->add('urgencyLevel', ChoiceType::class, array(
'choices' => array(
'Low' => 'low',
'Medium' => 'medium',
- 'High' => 'high'
- )
+ 'High' => 'high',
+ ),
+ 'label' => 'Level of urgency',
+ 'translation_domain' => 'dashboard'
))
->add('isDone', ChoiceType::class, array(
'choices' => array(
'No' => 0,
- 'Yes' => 1
- )
+ 'Yes' => 1,
+ ),
+ 'label' => 'Is it done?',
+ 'translation_domain' => 'dashboard'
))
- ->add('save', SubmitType::class, array('label' => 'Save'));
+ ->add('save', SubmitType::class, array(
+ 'label' => 'Save',
+ 'translation_domain' => 'dashboard'
+ ));
}
}
diff --git a/src/AppBundle/Repository/AbstractRepository.php b/src/AppBundle/Repository/AbstractRepository.php
new file mode 100644
index 0000000..36fe410
--- /dev/null
+++ b/src/AppBundle/Repository/AbstractRepository.php
@@ -0,0 +1,40 @@
+
+ */
+abstract class AbstractRepository
+{
+ /**
+ * @var EntityManager
+ */
+ private $manager;
+
+ /**
+ * @var string
+ */
+ private $class;
+
+ /**
+ * @param EntityManager $entityManager
+ * @param string $class
+ */
+ public function __construct(EntityManager $entityManager, $class)
+ {
+ $this->manager = $entityManager;
+ $this->class = $class;
+ }
+
+ /**
+ * @return EntityRepository
+ */
+ protected function getRepository()
+ {
+ return $this->manager->getRepository($this->class);
+ }
+}
diff --git a/src/AppBundle/Repository/PlantRepository.php b/src/AppBundle/Repository/PlantRepository.php
new file mode 100644
index 0000000..dd7dcb4
--- /dev/null
+++ b/src/AppBundle/Repository/PlantRepository.php
@@ -0,0 +1,91 @@
+
+ */
+class PlantRepository extends AbstractRepository
+{
+ /**
+ * @param Area $area
+ *
+ * @return Plant[]
+ */
+ public function findPlantByArea(Area $area)
+ {
+ $qb = $this->getRepository()->createQueryBuilder('p');
+
+ $query = $qb
+ ->select('
+ SUM(p.seedlingAmount) AS seedling_total,
+ SUM(p.areaCapacity) AS area_capacity,
+ sc.name AS seed_category,
+ s AS seed
+ ')
+ ->innerJoin('AppBundle:Seed', 's', 'WITH', 'p.seed = s.id')
+ ->innerJoin('AppBundle:SeedCategory', 'sc', 'WITH', 's.seedCategory = sc.id')
+ ->where('p.area = :area_id')
+ ->groupBy('p.seed')
+ ->setParameter('area_id', $area->getId())
+ ->getQuery()
+ ;
+
+ return $query->getResult();
+ }
+
+ /**
+ * @return Plant[]
+ */
+ public function findAllPlants()
+ {
+ $qb = $this->getRepository()->createQueryBuilder('p');
+
+ $query = $qb
+ ->select('
+ SUM(p.areaCapacity) AS seedling_total,
+ p.id AS id,
+ COUNT(p.area) AS area_count,
+ sc.name AS seed_category,
+ s AS seed
+ ')
+ ->innerJoin('AppBundle:Seed', 's', 'WITH', 'p.seed = s.id')
+ ->innerJoin('AppBundle:Area', 'a', 'WITH', 'p.area = a.id')
+ ->innerJoin('AppBundle:SeedCategory', 'sc', 'WITH', 's.seedCategory = sc.id')
+ ->groupBy('p.seed')
+ ->getQuery()
+ ;
+
+ return $query->getResult();
+ }
+
+ /**
+ * @param int $limit
+ *
+ * @return Plant[]
+ */
+ public function findOldestPlants($limit = 9)
+ {
+ $qb = $this->getRepository()->createQueryBuilder('p');
+
+ $query = $qb
+ ->select('
+ s.name AS seed_name,
+ a.name AS area_name,
+ p.seedlingDate AS seedling_date
+ ')
+ ->innerJoin('AppBundle:Seed', 's', 'WITH', 'p.seed = s.id')
+ ->innerJoin('AppBundle:Area', 'a', 'WITH', 'p.area = a.id')
+ ->where('p.action is null')
+ ->orWhere("p.action = 'donothing'")
+ ->orderBy('p.seedlingDate', 'ASC')
+ ->setMaxResults(5)
+ ->getQuery()
+ ;
+
+ return $query->getResult();
+ }
+}
diff --git a/src/AppBundle/Repository/TaskRepository.php b/src/AppBundle/Repository/TaskRepository.php
new file mode 100644
index 0000000..2b9793e
--- /dev/null
+++ b/src/AppBundle/Repository/TaskRepository.php
@@ -0,0 +1,31 @@
+
+ */
+class TaskRepository extends AbstractRepository
+{
+ /**
+ * @param int $limit
+ *
+ * @return Task[]
+ */
+ public function deadlineTasks($limit = 9)
+ {
+ $qb = $this->getRepository()->createQueryBuilder('t');
+
+ $query = $qb
+ ->select('t')
+ ->orderBy('t.dueDate', 'ASC')
+ ->where('t.isDone = 0')
+ ->setMaxResults(5)
+ ->getQuery()
+ ;
+
+ return $query->getResult();
+ }
+}
diff --git a/tests/AppBundle/Controller/DashboardControllerTest.php b/tests/AppBundle/Controller/DashboardControllerTest.php
new file mode 100644
index 0000000..84fc6f5
--- /dev/null
+++ b/tests/AppBundle/Controller/DashboardControllerTest.php
@@ -0,0 +1,21 @@
+ 'test',
+ 'PHP_AUTH_PW' => 'test'
+ ));
+
+ $crawler = $client->request('GET', '/');
+
+ $this->assertEquals(200, $client->getResponse()->getStatusCode());
+ //$this->assertContains('Welcome to Symfony', $crawler->filter('#container h1')->text());
+ }
+}
diff --git a/tests/AppBundle/Controller/DefaultControllerTest.php b/tests/AppBundle/Controller/DefaultControllerTest.php
deleted file mode 100644
index 594803c..0000000
--- a/tests/AppBundle/Controller/DefaultControllerTest.php
+++ /dev/null
@@ -1,18 +0,0 @@
-request('GET', '/');
-
- $this->assertEquals(200, $client->getResponse()->getStatusCode());
- $this->assertContains('Welcome to Symfony', $crawler->filter('#container h1')->text());
- }
-}
diff --git a/tests/AppBundle/Form/AreaTypeTest.php b/tests/AppBundle/Form/AreaTypeTest.php
new file mode 100644
index 0000000..673ca95
--- /dev/null
+++ b/tests/AppBundle/Form/AreaTypeTest.php
@@ -0,0 +1,21 @@
+ 'The Valid Area',
+ 'reservoir' => null,
+ 'growingMethod' => 1,
+ 'capacity' => 150,
+ 'measurementUnit' => 2,
+ 'imageFile' => null
+ );
+ }
+}
\ No newline at end of file
diff --git a/web/app.php b/web/app.php
index 53dc642..5599b54 100644
--- a/web/app.php
+++ b/web/app.php
@@ -1,16 +1,14 @@
loadClassCache();
+if ('dev' == getenv('SYMFONY_ENV')) {
+ Debug::enable();
+ $kernel = new AppKernel('dev', true);
+} else {
+ $kernel = new AppKernel('prod', false);
}
//$kernel = new AppCache($kernel);
diff --git a/web/app_dev.php b/web/app_dev.php
deleted file mode 100644
index 4361a97..0000000
--- a/web/app_dev.php
+++ /dev/null
@@ -1,32 +0,0 @@
-loadClassCache();
-}
-$request = Request::createFromGlobals();
-$response = $kernel->handle($request);
-$response->send();
-$kernel->terminate($request, $response);
diff --git a/web/assets/css/non-responsive.css b/web/assets/css/non-responsive.css
new file mode 100644
index 0000000..0a8e92d
--- /dev/null
+++ b/web/assets/css/non-responsive.css
@@ -0,0 +1,262 @@
+/* Template-specific stuff
+ *
+ * Customizations just for the template; these are not necessary for anything
+ * with disabling the responsiveness.
+ */
+
+/* Account for fixed navbar */
+body {
+ padding-top: 70px;
+ padding-bottom: 30px;
+}
+
+body,
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+ min-width: 970px;
+}
+
+/* Don't let the lead text change font-size. */
+.lead {
+ font-size: 16px;
+}
+
+/* Finesse the page header spacing */
+.page-header {
+ margin-bottom: 30px;
+}
+.page-header .lead {
+ margin-bottom: 10px;
+}
+
+
+/* Non-responsive overrides
+ *
+ * Utilize the following CSS to disable the responsive-ness of the container,
+ * grid system, and navbar.
+ */
+
+/* Reset the container */
+.container {
+ width: 970px;
+ max-width: none !important;
+}
+
+/* Demonstrate the grids */
+.col-xs-4 {
+ padding-top: 15px;
+ padding-bottom: 15px;
+ background-color: #eee;
+ background-color: rgba(86,61,124,.15);
+ border: 1px solid #ddd;
+ border: 1px solid rgba(86,61,124,.2);
+}
+
+.container .navbar-header,
+.container .navbar-collapse {
+ margin-right: 0;
+ margin-left: 0;
+}
+
+/* Always float the navbar header */
+.navbar-header {
+ float: left;
+}
+
+/* Undo the collapsing navbar */
+.navbar-collapse {
+ display: block !important;
+ height: auto !important;
+ padding-bottom: 0;
+ overflow: visible !important;
+ visibility: visible !important;
+}
+
+.navbar-toggle {
+ display: none;
+}
+.navbar-collapse {
+ border-top: 0;
+}
+
+.navbar-brand {
+ margin-left: -15px;
+}
+
+/* Always apply the floated nav */
+.navbar-nav {
+ float: left;
+ margin: 0;
+}
+.navbar-nav > li {
+ float: left;
+}
+.navbar-nav > li > a {
+ padding: 15px;
+}
+
+/* Redeclare since we override the float above */
+.navbar-nav.navbar-right {
+ float: right;
+}
+
+/* Undo custom dropdowns */
+.navbar .navbar-nav .open .dropdown-menu {
+ position: absolute;
+ float: left;
+ background-color: #fff;
+ border: 1px solid #ccc;
+ border: 1px solid rgba(0, 0, 0, .15);
+ border-width: 0 1px 1px;
+ border-radius: 0 0 4px 4px;
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+ box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+}
+.navbar-default .navbar-nav .open .dropdown-menu > li > a {
+ color: #333;
+}
+.navbar .navbar-nav .open .dropdown-menu > li > a:hover,
+.navbar .navbar-nav .open .dropdown-menu > li > a:focus,
+.navbar .navbar-nav .open .dropdown-menu > .active > a,
+.navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
+.navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
+ color: #fff !important;
+ background-color: #428bca !important;
+}
+.navbar .navbar-nav .open .dropdown-menu > .disabled > a,
+.navbar .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+.navbar .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+ color: #999 !important;
+ background-color: transparent !important;
+}
+
+/* Undo form expansion */
+.navbar-form {
+ float: left;
+ width: auto;
+ padding-top: 0;
+ padding-bottom: 0;
+ margin-right: 0;
+ margin-left: 0;
+ border: 0;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+
+/* Copy-pasted from forms.less since we mixin the .form-inline styles. */
+.navbar-form .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+}
+
+.navbar-form .form-control {
+ display: inline-block;
+ width: auto;
+ vertical-align: middle;
+}
+
+.navbar-form .form-control-static {
+ display: inline-block;
+}
+
+.navbar-form .input-group {
+ display: inline-table;
+ vertical-align: middle;
+}
+
+.navbar-form .input-group .input-group-addon,
+.navbar-form .input-group .input-group-btn,
+.navbar-form .input-group .form-control {
+ width: auto;
+}
+
+.navbar-form .input-group > .form-control {
+ width: 100%;
+}
+
+.navbar-form .control-label {
+ margin-bottom: 0;
+ vertical-align: middle;
+}
+
+.navbar-form .radio,
+.navbar-form .checkbox {
+ display: inline-block;
+ margin-top: 0;
+ margin-bottom: 0;
+ vertical-align: middle;
+}
+
+.navbar-form .radio label,
+.navbar-form .checkbox label {
+ padding-left: 0;
+}
+
+.navbar-form .radio input[type="radio"],
+.navbar-form .checkbox input[type="checkbox"] {
+ position: relative;
+ margin-left: 0;
+}
+
+.navbar-form .has-feedback .form-control-feedback {
+ top: 0;
+}
+
+/* Undo inline form compaction on small screens */
+.form-inline .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+}
+
+.form-inline .form-control {
+ display: inline-block;
+ width: auto;
+ vertical-align: middle;
+}
+
+.form-inline .form-control-static {
+ display: inline-block;
+}
+
+.form-inline .input-group {
+ display: inline-table;
+ vertical-align: middle;
+}
+.form-inline .input-group .input-group-addon,
+.form-inline .input-group .input-group-btn,
+.form-inline .input-group .form-control {
+ width: auto;
+}
+
+.form-inline .input-group > .form-control {
+ width: 100%;
+}
+
+.form-inline .control-label {
+ margin-bottom: 0;
+ vertical-align: middle;
+}
+
+.form-inline .radio,
+.form-inline .checkbox {
+ display: inline-block;
+ margin-top: 0;
+ margin-bottom: 0;
+ vertical-align: middle;
+}
+.form-inline .radio label,
+.form-inline .checkbox label {
+ padding-left: 0;
+}
+
+.form-inline .radio input[type="radio"],
+.form-inline .checkbox input[type="checkbox"] {
+ position: relative;
+ margin-left: 0;
+}
+
+.form-inline .has-feedback .form-control-feedback {
+ top: 0;
+}
diff --git a/web/assets/css/style.css b/web/assets/css/style.css
index 7b7632e..cb30a19 100644
--- a/web/assets/css/style.css
+++ b/web/assets/css/style.css
@@ -8218,7 +8218,6 @@ canvas {
*/
.be-wrapper {
min-height: 100%;
- padding-top: 61px;
}
@media (max-width: 767px) {
.be-wrapper {
diff --git a/web/assets/css/tania.css b/web/assets/css/tania.css
index b979389..9f0fdbd 100644
--- a/web/assets/css/tania.css
+++ b/web/assets/css/tania.css
@@ -1,7 +1,3 @@
-body {
-
-}
-
.img-area {
width: 100%;
}
@@ -156,4 +152,9 @@ body {
.be-top-header .navbar-header .navbar-brand img {
height: 40px;
margin-top: 8px;
+}
+
+/* panel */
+.panel-body p {
+ padding: 8px 20px 20px;
}
\ No newline at end of file
diff --git a/web/assets/js/plant.js b/web/assets/js/plant.js
new file mode 100644
index 0000000..38ba92b
--- /dev/null
+++ b/web/assets/js/plant.js
@@ -0,0 +1,5 @@
+jQuery.datetimepicker.setLocale(global.locale);
+$(".date-picker").datetimepicker({
+ format: 'Y-m-d',
+ timepicker: false
+});
\ No newline at end of file
diff --git a/web/assets/js/task.js b/web/assets/js/task.js
new file mode 100644
index 0000000..5d03d8e
--- /dev/null
+++ b/web/assets/js/task.js
@@ -0,0 +1,4 @@
+jQuery.datetimepicker.setLocale(global.locale);
+$(".date-time-picker").datetimepicker({
+ format: 'Y-m-d H:i'
+});