Add searching for job orders within 5 km of the hub #409

This commit is contained in:
Kendrick Chan 2020-05-18 23:33:16 +08:00
parent c1a8a5199b
commit 616537d055
2 changed files with 136 additions and 98 deletions

209
composer.lock generated
View file

@ -367,20 +367,21 @@
}, },
{ {
"name": "doctrine/annotations", "name": "doctrine/annotations",
"version": "v1.8.0", "version": "1.10.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/annotations.git", "url": "https://github.com/doctrine/annotations.git",
"reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc" "reference": "b9d758e831c70751155c698c2f7df4665314a1cb"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/904dca4eb10715b92569fbcd79e201d5c349b6bc", "url": "https://api.github.com/repos/doctrine/annotations/zipball/b9d758e831c70751155c698c2f7df4665314a1cb",
"reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc", "reference": "b9d758e831c70751155c698c2f7df4665314a1cb",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"doctrine/lexer": "1.*", "doctrine/lexer": "1.*",
"ext-tokenizer": "*",
"php": "^7.1" "php": "^7.1"
}, },
"require-dev": { "require-dev": {
@ -390,7 +391,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.7.x-dev" "dev-master": "1.9.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -431,7 +432,7 @@
"docblock", "docblock",
"parser" "parser"
], ],
"time": "2019-10-01T18:55:10+00:00" "time": "2020-04-20T09:18:32+00:00"
}, },
{ {
"name": "doctrine/cache", "name": "doctrine/cache",
@ -587,16 +588,16 @@
}, },
{ {
"name": "doctrine/common", "name": "doctrine/common",
"version": "2.12.0", "version": "2.13.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/common.git", "url": "https://github.com/doctrine/common.git",
"reference": "2053eafdf60c2172ee1373d1b9289ba1db7f1fc6" "reference": "308728eae8d90412d850c155d40b1cfbede549da"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/common/zipball/2053eafdf60c2172ee1373d1b9289ba1db7f1fc6", "url": "https://api.github.com/repos/doctrine/common/zipball/308728eae8d90412d850c155d40b1cfbede549da",
"reference": "2053eafdf60c2172ee1373d1b9289ba1db7f1fc6", "reference": "308728eae8d90412d850c155d40b1cfbede549da",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -606,7 +607,7 @@
"doctrine/event-manager": "^1.0", "doctrine/event-manager": "^1.0",
"doctrine/inflector": "^1.0", "doctrine/inflector": "^1.0",
"doctrine/lexer": "^1.0", "doctrine/lexer": "^1.0",
"doctrine/persistence": "^1.1", "doctrine/persistence": "^1.3.3",
"doctrine/reflection": "^1.0", "doctrine/reflection": "^1.0",
"php": "^7.1" "php": "^7.1"
}, },
@ -666,20 +667,20 @@
"doctrine", "doctrine",
"php" "php"
], ],
"time": "2020-01-10T15:49:25+00:00" "time": "2020-05-15T05:51:54+00:00"
}, },
{ {
"name": "doctrine/dbal", "name": "doctrine/dbal",
"version": "v2.10.1", "version": "2.10.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/dbal.git", "url": "https://github.com/doctrine/dbal.git",
"reference": "c2b8e6e82732a64ecde1cddf9e1e06cb8556e3d8" "reference": "aab745e7b6b2de3b47019da81e7225e14dcfdac8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/c2b8e6e82732a64ecde1cddf9e1e06cb8556e3d8", "url": "https://api.github.com/repos/doctrine/dbal/zipball/aab745e7b6b2de3b47019da81e7225e14dcfdac8",
"reference": "c2b8e6e82732a64ecde1cddf9e1e06cb8556e3d8", "reference": "aab745e7b6b2de3b47019da81e7225e14dcfdac8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -691,9 +692,11 @@
"require-dev": { "require-dev": {
"doctrine/coding-standard": "^6.0", "doctrine/coding-standard": "^6.0",
"jetbrains/phpstorm-stubs": "^2019.1", "jetbrains/phpstorm-stubs": "^2019.1",
"phpstan/phpstan": "^0.11.3", "nikic/php-parser": "^4.4",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^8.4.1", "phpunit/phpunit": "^8.4.1",
"symfony/console": "^2.0.5|^3.0|^4.0|^5.0" "symfony/console": "^2.0.5|^3.0|^4.0|^5.0",
"vimeo/psalm": "^3.11"
}, },
"suggest": { "suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files." "symfony/console": "For helpful console commands such as SQL execution and import of files."
@ -758,20 +761,20 @@
"sqlserver", "sqlserver",
"sqlsrv" "sqlsrv"
], ],
"time": "2020-01-04T12:56:21+00:00" "time": "2020-04-20T17:19:26+00:00"
}, },
{ {
"name": "doctrine/doctrine-bundle", "name": "doctrine/doctrine-bundle",
"version": "2.0.7", "version": "2.0.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/DoctrineBundle.git", "url": "https://github.com/doctrine/DoctrineBundle.git",
"reference": "6926771140ee87a823c3b2c72602de9dda4490d3" "reference": "b0e0deb6e700438401ede433a15a6372d2285202"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/6926771140ee87a823c3b2c72602de9dda4490d3", "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/b0e0deb6e700438401ede433a15a6372d2285202",
"reference": "6926771140ee87a823c3b2c72602de9dda4490d3", "reference": "b0e0deb6e700438401ede433a15a6372d2285202",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -850,7 +853,7 @@
"orm", "orm",
"persistence" "persistence"
], ],
"time": "2020-01-18T11:56:15+00:00" "time": "2020-04-23T10:52:09+00:00"
}, },
{ {
"name": "doctrine/doctrine-cache-bundle", "name": "doctrine/doctrine-cache-bundle",
@ -1089,33 +1092,38 @@
}, },
{ {
"name": "doctrine/inflector", "name": "doctrine/inflector",
"version": "1.3.1", "version": "1.4.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/inflector.git", "url": "https://github.com/doctrine/inflector.git",
"reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1" "reference": "4111f6853aea6f28b2b1dcfdde83d12dd3d5e6e3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/ec3a55242203ffa6a4b27c58176da97ff0a7aec1", "url": "https://api.github.com/repos/doctrine/inflector/zipball/4111f6853aea6f28b2b1dcfdde83d12dd3d5e6e3",
"reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1", "reference": "4111f6853aea6f28b2b1dcfdde83d12dd3d5e6e3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.1" "php": "^7.2"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^6.2" "doctrine/coding-standard": "^7.0",
"phpstan/phpstan": "^0.11",
"phpstan/phpstan-phpunit": "^0.11",
"phpstan/phpstan-strict-rules": "^0.11",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.3.x-dev" "dev-master": "2.0.x-dev"
} }
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector",
"Doctrine\\Inflector\\": "lib/Doctrine/Inflector"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -1144,15 +1152,21 @@
"email": "schmittjoh@gmail.com" "email": "schmittjoh@gmail.com"
} }
], ],
"description": "Common String Manipulations with regard to casing and singular/plural rules.", "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.",
"homepage": "http://www.doctrine-project.org", "homepage": "https://www.doctrine-project.org/projects/inflector.html",
"keywords": [ "keywords": [
"inflection", "inflection",
"pluralize", "inflector",
"singularize", "lowercase",
"string" "manipulation",
"php",
"plural",
"singular",
"strings",
"uppercase",
"words"
], ],
"time": "2019-10-30T19:59:35+00:00" "time": "2020-05-09T15:09:09+00:00"
}, },
{ {
"name": "doctrine/instantiator", "name": "doctrine/instantiator",
@ -1356,16 +1370,16 @@
}, },
{ {
"name": "doctrine/orm", "name": "doctrine/orm",
"version": "v2.7.0", "version": "v2.7.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/orm.git", "url": "https://github.com/doctrine/orm.git",
"reference": "4d763ca4c925f647b248b9fa01b5f47aa3685d62" "reference": "dafe298ce5d0b995ebe1746670704c0a35868a6a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/orm/zipball/4d763ca4c925f647b248b9fa01b5f47aa3685d62", "url": "https://api.github.com/repos/doctrine/orm/zipball/dafe298ce5d0b995ebe1746670704c0a35868a6a",
"reference": "4d763ca4c925f647b248b9fa01b5f47aa3685d62", "reference": "dafe298ce5d0b995ebe1746670704c0a35868a6a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1378,6 +1392,7 @@
"doctrine/instantiator": "^1.3", "doctrine/instantiator": "^1.3",
"doctrine/persistence": "^1.2", "doctrine/persistence": "^1.2",
"ext-pdo": "*", "ext-pdo": "*",
"ocramius/package-versions": "^1.2",
"php": "^7.1", "php": "^7.1",
"symfony/console": "^3.0|^4.0|^5.0" "symfony/console": "^3.0|^4.0|^5.0"
}, },
@ -1435,20 +1450,20 @@
"database", "database",
"orm" "orm"
], ],
"time": "2019-11-19T08:38:05+00:00" "time": "2020-03-19T06:41:02+00:00"
}, },
{ {
"name": "doctrine/persistence", "name": "doctrine/persistence",
"version": "1.3.6", "version": "1.3.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/persistence.git", "url": "https://github.com/doctrine/persistence.git",
"reference": "5dd3ac5eebef2d0b074daa4440bb18f93132dee4" "reference": "0af483f91bada1c9ded6c2cfd26ab7d5ab2094e0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/persistence/zipball/5dd3ac5eebef2d0b074daa4440bb18f93132dee4", "url": "https://api.github.com/repos/doctrine/persistence/zipball/0af483f91bada1c9ded6c2cfd26ab7d5ab2094e0",
"reference": "5dd3ac5eebef2d0b074daa4440bb18f93132dee4", "reference": "0af483f91bada1c9ded6c2cfd26ab7d5ab2094e0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1456,7 +1471,7 @@
"doctrine/cache": "^1.0", "doctrine/cache": "^1.0",
"doctrine/collections": "^1.0", "doctrine/collections": "^1.0",
"doctrine/event-manager": "^1.0", "doctrine/event-manager": "^1.0",
"doctrine/reflection": "^1.1", "doctrine/reflection": "^1.2",
"php": "^7.1" "php": "^7.1"
}, },
"conflict": { "conflict": {
@ -1518,20 +1533,20 @@
"orm", "orm",
"persistence" "persistence"
], ],
"time": "2020-01-16T22:06:23+00:00" "time": "2020-03-21T15:13:52+00:00"
}, },
{ {
"name": "doctrine/reflection", "name": "doctrine/reflection",
"version": "v1.1.0", "version": "1.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/reflection.git", "url": "https://github.com/doctrine/reflection.git",
"reference": "bc420ead87fdfe08c03ecc3549db603a45b06d4c" "reference": "55e71912dfcd824b2fdd16f2d9afe15684cfce79"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/reflection/zipball/bc420ead87fdfe08c03ecc3549db603a45b06d4c", "url": "https://api.github.com/repos/doctrine/reflection/zipball/55e71912dfcd824b2fdd16f2d9afe15684cfce79",
"reference": "bc420ead87fdfe08c03ecc3549db603a45b06d4c", "reference": "55e71912dfcd824b2fdd16f2d9afe15684cfce79",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1552,7 +1567,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0.x-dev" "dev-master": "1.2.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -1596,7 +1611,7 @@
"reflection", "reflection",
"static" "static"
], ],
"time": "2020-01-08T19:53:19+00:00" "time": "2020-03-27T11:06:43+00:00"
}, },
{ {
"name": "edwinhoksberg/php-fcm", "name": "edwinhoksberg/php-fcm",
@ -2255,16 +2270,16 @@
}, },
{ {
"name": "psr/log", "name": "psr/log",
"version": "1.1.2", "version": "1.1.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/log.git", "url": "https://github.com/php-fig/log.git",
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2298,7 +2313,7 @@
"psr", "psr",
"psr-3" "psr-3"
], ],
"time": "2019-11-01T11:05:21+00:00" "time": "2020-03-23T09:12:05+00:00"
}, },
{ {
"name": "ralouphie/getallheaders", "name": "ralouphie/getallheaders",
@ -2515,16 +2530,16 @@
}, },
{ {
"name": "symfony/cache", "name": "symfony/cache",
"version": "v5.0.4", "version": "v5.0.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/cache.git", "url": "https://github.com/symfony/cache.git",
"reference": "4572116c640a6bc9fc0047180fe7f9362e5923fc" "reference": "0c5f5b1882dc82b255a4bdead4ed3c7738cddc04"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/cache/zipball/4572116c640a6bc9fc0047180fe7f9362e5923fc", "url": "https://api.github.com/repos/symfony/cache/zipball/0c5f5b1882dc82b255a4bdead4ed3c7738cddc04",
"reference": "4572116c640a6bc9fc0047180fe7f9362e5923fc", "reference": "0c5f5b1882dc82b255a4bdead4ed3c7738cddc04",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2590,7 +2605,7 @@
"caching", "caching",
"psr6" "psr6"
], ],
"time": "2020-01-31T09:13:47+00:00" "time": "2020-04-28T17:58:55+00:00"
}, },
{ {
"name": "symfony/cache-contracts", "name": "symfony/cache-contracts",
@ -2652,16 +2667,16 @@
}, },
{ {
"name": "symfony/config", "name": "symfony/config",
"version": "v5.0.4", "version": "v5.0.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/config.git", "url": "https://github.com/symfony/config.git",
"reference": "7640c6704f56bf64045066bc5d93fd9d664baa63" "reference": "db1674e1a261148429f123871f30d211992294e7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/config/zipball/7640c6704f56bf64045066bc5d93fd9d664baa63", "url": "https://api.github.com/repos/symfony/config/zipball/db1674e1a261148429f123871f30d211992294e7",
"reference": "7640c6704f56bf64045066bc5d93fd9d664baa63", "reference": "db1674e1a261148429f123871f30d211992294e7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2712,7 +2727,7 @@
], ],
"description": "Symfony Config Component", "description": "Symfony Config Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2020-01-04T14:08:26+00:00" "time": "2020-04-15T15:59:10+00:00"
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
@ -2848,16 +2863,16 @@
}, },
{ {
"name": "symfony/dependency-injection", "name": "symfony/dependency-injection",
"version": "v5.0.4", "version": "v5.0.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/dependency-injection.git", "url": "https://github.com/symfony/dependency-injection.git",
"reference": "86338f459313525dd95f5a012f8a9ea118002f94" "reference": "92d8b3bd896a87cdd8aba0a3dd041bc072e8cfba"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/86338f459313525dd95f5a012f8a9ea118002f94", "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/92d8b3bd896a87cdd8aba0a3dd041bc072e8cfba",
"reference": "86338f459313525dd95f5a012f8a9ea118002f94", "reference": "92d8b3bd896a87cdd8aba0a3dd041bc072e8cfba",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2917,20 +2932,20 @@
], ],
"description": "Symfony DependencyInjection Component", "description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2020-01-31T09:49:43+00:00" "time": "2020-04-28T17:58:55+00:00"
}, },
{ {
"name": "symfony/doctrine-bridge", "name": "symfony/doctrine-bridge",
"version": "v4.4.4", "version": "v4.4.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/doctrine-bridge.git", "url": "https://github.com/symfony/doctrine-bridge.git",
"reference": "b8d43116f0e5abef4b7abcbeec81c3b9328ca7b7" "reference": "642cb1000331b8dc5568587f60aeb299070f9a55"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/b8d43116f0e5abef4b7abcbeec81c3b9328ca7b7", "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/642cb1000331b8dc5568587f60aeb299070f9a55",
"reference": "b8d43116f0e5abef4b7abcbeec81c3b9328ca7b7", "reference": "642cb1000331b8dc5568587f60aeb299070f9a55",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3011,7 +3026,7 @@
], ],
"description": "Symfony Doctrine Bridge", "description": "Symfony Doctrine Bridge",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2020-01-23T10:56:47+00:00" "time": "2020-04-12T16:45:36+00:00"
}, },
{ {
"name": "symfony/error-handler", "name": "symfony/error-handler",
@ -3838,16 +3853,16 @@
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
"version": "v1.13.1", "version": "v1.17.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git", "url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
"reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3859,7 +3874,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.13-dev" "dev-master": "1.17-dev"
} }
}, },
"autoload": { "autoload": {
@ -3892,7 +3907,7 @@
"polyfill", "polyfill",
"portable" "portable"
], ],
"time": "2019-11-27T13:56:44+00:00" "time": "2020-05-12T16:14:59+00:00"
}, },
{ {
"name": "symfony/polyfill-intl-idn", "name": "symfony/polyfill-intl-idn",
@ -3958,16 +3973,16 @@
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",
"version": "v1.13.1", "version": "v1.17.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git", "url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" "reference": "fa79b11539418b02fc5e1897267673ba2c19419c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c",
"reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", "reference": "fa79b11539418b02fc5e1897267673ba2c19419c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3979,7 +3994,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.13-dev" "dev-master": "1.17-dev"
} }
}, },
"autoload": { "autoload": {
@ -4013,7 +4028,7 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2019-11-27T14:18:11+00:00" "time": "2020-05-12T16:47:27+00:00"
}, },
{ {
"name": "symfony/polyfill-php72", "name": "symfony/polyfill-php72",
@ -5222,16 +5237,16 @@
}, },
{ {
"name": "symfony/var-exporter", "name": "symfony/var-exporter",
"version": "v5.0.4", "version": "v5.0.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-exporter.git", "url": "https://github.com/symfony/var-exporter.git",
"reference": "960f9ac0fdbd642461ed29d7717aeb2a94d428b9" "reference": "5d18811da9e1ae2bb86b0a97fb2d784e27ffd59f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-exporter/zipball/960f9ac0fdbd642461ed29d7717aeb2a94d428b9", "url": "https://api.github.com/repos/symfony/var-exporter/zipball/5d18811da9e1ae2bb86b0a97fb2d784e27ffd59f",
"reference": "960f9ac0fdbd642461ed29d7717aeb2a94d428b9", "reference": "5d18811da9e1ae2bb86b0a97fb2d784e27ffd59f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5278,7 +5293,7 @@
"instantiate", "instantiate",
"serialize" "serialize"
], ],
"time": "2020-01-04T14:08:26+00:00" "time": "2020-04-15T15:59:10+00:00"
}, },
{ {
"name": "symfony/web-profiler-bundle", "name": "symfony/web-profiler-bundle",

View file

@ -4,6 +4,7 @@ namespace App\Controller;
use Doctrine\ORM\Query; use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder; use Doctrine\ORM\QueryBuilder;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller;
@ -14,14 +15,36 @@ use Catalyst\MenuBundle\Annotation\Menu;
use CrEOF\Spatial\PHP\Types\Geometry\Point; use CrEOF\Spatial\PHP\Types\Geometry\Point;
use DateTime; use DateTime;
use App\Entity\JobOrder;
use App\Entity\Hub;
class AnalyticsController extends Controller class AnalyticsController extends Controller
{ {
/** /**
* @Menu(selected="analytics_forecast") * @Menu(selected="analytics_forecast")
* @IsGranted("analytics.forecast") * @IsGranted("analytics.forecast")
*/ */
public function forecast() public function forecast(EntityManagerInterface $em)
{ {
// get hub to analyze
$hub = $em->getRepository(Hub::class)->find(86);
$hub_coord = $hub->getCoordinates();
// distance limit in meters
$distance = 5000;
// create query
// formula to convert to km is 111195 * st_distance
$query = $em->createQuery('select jo from App\\Entity\\JobOrder jo where st_distance(jo.coordinates, point(:lng, :lat)) * 111195 <= :distance_limit and jo.date_schedule >= :date_start and jo.date_schedule <= :date_end');
$query->setParameter('lng', $hub_coord->getLongitude())
->setParameter('lat', $hub_coord->getLatitude())
->setParameter('distance_limit', $distance)
->setParameter('date_start', DateTime::createFromFormat('YmdHis', '20180501000000'))
->setParameter('date_end', DateTime::createFromFormat('YmdHis', '20180531235959'));
$jos = $query->getResult();
error_log(count($jos));
$params = []; $params = [];
return $this->render('analytics/forecast.html.twig', $params); return $this->render('analytics/forecast.html.twig', $params);