diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 955248a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: php - -php: - - 5.3.3 - - 5.3 - - 5.4 - -before_script: composer install -n - -script: phpunit -c app diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 88a57f8..0000000 --- a/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2013 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6c865dc --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +up: + docker-compose run server composer install && \ + docker-compose up + +create-config: + cp docker-compose.override.yml-example docker-compose.override.yml + +fetch: + docker-compose exec server app/console harvester:fetch + +create-admin: + docker-compose exec server sh -c 'app/console harvester:user --admin="yes" --active="yes" --password harvest@reload.dk' diff --git a/README.md b/README.md index 00cf1a7..f43a39a 100644 --- a/README.md +++ b/README.md @@ -1,75 +1,142 @@ +![https://i.imgur.com/jdTgyyI.png](https://i.imgur.com/jdTgyyI.png) + +# Harvester ![Docker Badge](https://img.shields.io/docker/automated/reload/harvester.svg) ![Docker Badge](https://img.shields.io/docker/build/reload/harvester.svg) -Harvester -========= +Welcome to Harvester, a service which fetch data from HarvestApp and have a simple API to get data out. + + +## Get started -Welcome to Harvester, a service which fetch data from HarvestApp and have a simple API to get data out. This is so much -faster than the actual HarvestApp API since everything is stored locally. +#### 1. Create the config: +``` +make create-config +``` -## Installing +#### 2. Fill in envs in `docker-compose.override.yml`: -When it comes to installing Harvester you will need to clone the repository from GitHub. +``` +HARVESTER_HARVEST_USER: harvest_account_email@email.com +HARVESTER_HARVEST_PASSWORD: secretpassword +# only use the actual name, e.g. "reload". *Not* the full url (reload.harvestapp.com) +HARVESTER_HARVEST_ACCOUNT: harvestapp_account_name +``` - git clone https://github.com/reload/harvester.git +The credentials can be found in LastPass. Search for __"Harvester API"__. -And install Harvester with composer: +#### 3. Get everything up and running. This takes ~30 minutes: - cd harvester/ +``` +make up +``` - docker-compose run composer install +When your teminal looks something likes this: -Composer will install Harvester and all its dependencies. And you will need to configure database and the system. +``` +server_1 | *** Running /etc/my_init.d/00_regen_ssh_host_keys.sh... +server_1 | *** Running /etc/my_init.d/harvester... +server_1 | *** Running /etc/rc.local... +server_1 | *** Booting runit daemon... +server_1 | *** Runit started as PID 10 +server_1 | tail: unrecognized file system type 0x794c7630 for ‘/var/log/apache2/error.log’. please report this to bug-coreutils@gnu.org. reverting to polling +server_1 | tail: unrecognized file system type 0x794c7630 for ‘/var/log/syslog’. please report this to bug-coreutils@gnu.org. reverting to polling +server_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.28.0.2. Set the 'ServerName' directive globally to suppress this message +server_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.28.0.2. Set the 'ServerName' directive globally to suppress this message +server_1 | [Fri Apr 17 08:35:03.303829 2020] [mpm_prefork:notice] [pid 21] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 configured -- resuming normal operations +server_1 | [Fri Apr 17 08:35:03.303888 2020] [core:notice] [pid 21] AH00094: Command line: 'apache2 -D FOREGROUND' +server_1 | Apr 17 08:35:03 d37b70b08786 syslog-ng[18]: syslog-ng starting up; version='3.5.3' +``` -Install the database +__The wait is over!__ - docker-compose exec harvester app/console doctrine:database:create +#### 4. Create an admin user: -Import the database schema +``` +make create-admin +``` - docker-compose exec harvester app/console doctrine:schema:create +Fill in your password of choice and now you are ready to login with the user __harvest@reload.dk__ and your new password at [http://harvester.docker/login](http://harvester.docker/login). -Setup your apache/nginx virtualhost, and a few urls is now available +#### 5. Harvester is now accessible at: -[http://yourho.st/api/doc]() +- Login: [http://harvester.docker/login](http://harvester.docker/login) +- Admin: [http://harvester.docker/admin](http://harvester.docker/admin) +- Docs: [http://harvester.docker/api/doc](http://harvester.docker/api/doc) -[http://yourho.st/admin]() +## CLI -## Configuration +For fetching data from the HarvestApp API and mannaging users. -For the HarvestApp API fetcher to work you need to configure the API info via environment variables in the container: +### User mannagement - cp docker-compose.override.yml-example docker-compose.override.yml +Print the available configuration for the user command. -Then edit the variables in docker-compose.override.yml, which correspond to those in `parameters.yml`. You will need to restart the container if it is already running. +``` +docker-compose exec server app/console help harvester:user +``` -## Usage +### Data fetching -There is a commmand line command available for fetching data from the HarvestApp API. -This could be executed from crontab +
+ + Print the available configuration for the fetch command. + -To see the command +``` +docker-compose exec server app/console help harvester:fetch +``` +
- docker-compose exec harvester app/console help harvester:fetch +
+ + Run the fetch command without parameters. Will fetch everything from HarvestApp (~30 minutes). + -To run the command without parameters, will fetch everything from Harvest (could tak several minutes) +``` + docker-compose exec server app/console harvester:fetch +``` +
- docker-compose exec harvester app/console harvester:fetch +
+ + Data from this month + -To fetch updated data from this month +``` +docker-compose exec server app/console harvester:fetch `date "+%Y%m01"` +``` +
- docker-compose exec harvester app/console harvester:fetch `date "+%Y%m01"` -To fetch that has been updated since yesterday +
+ + Since yesterday + - docker-compose exec harvester app/console harvester:fetch --updated-yesterday +``` +docker-compose exec server app/console harvester:fetch --updated-yesterday +``` +
-To delete entries and repopulate within a given timespan +
+ + Delete entries and repopulate within a given timespan + - docker-compose exec harvester app/console harvester:refresh `date "+%Y%m01"` +``` +docker-compose exec server app/console harvester:refresh `date "+%Y%m01"` +``` +
-To delete entries and repopulate within a static amount of days +
+ + Delete entries and repopulate within a static amount of days + - docker-compose exec harvester app/console harvester:refresh --days=30 +``` +docker-compose exec server app/console harvester:refresh --days=30 +``` +
\ No newline at end of file diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml index fdfbb4f..b5f4071 100644 --- a/app/config/config_dev.yml +++ b/app/config/config_dev.yml @@ -35,3 +35,6 @@ assetic: swiftmailer: disable_delivery: true +# Twig Configuration +twig: + cache: false diff --git a/composer.json b/composer.json index 791ffae..593a32d 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ }, "require": { "php": ">=5.3.3", - "symfony/symfony": "~2.7", + "symfony/symfony": "~2.8", "doctrine/orm": "~2.2,>=2.2.3", "doctrine/doctrine-bundle": "~1.2", "twig/extensions": "~1.0", diff --git a/composer.lock b/composer.lock index 44e6e39..238816d 100644 --- a/composer.lock +++ b/composer.lock @@ -1,11 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "hash": "4fe865b48e92f8951761bfba52fe4471", - "content-hash": "2401cedd1acf230a88f500e89e62405c", + "content-hash": "a31a8e7a3024fe02ac274448124ef6a3", "packages": [ { "name": "doctrine/annotations", @@ -77,7 +76,7 @@ "docblock", "parser" ], - "time": "2013-06-16 21:33:03" + "time": "2013-06-16T21:33:03+00:00" }, { "name": "doctrine/cache", @@ -151,7 +150,7 @@ "cache", "caching" ], - "time": "2013-10-25 19:04:14" + "time": "2013-10-25T19:04:14+00:00" }, { "name": "doctrine/collections", @@ -219,7 +218,7 @@ "collections", "iterator" ], - "time": "2014-02-03 23:07:43" + "time": "2014-02-03T23:07:43+00:00" }, { "name": "doctrine/common", @@ -294,7 +293,7 @@ "persistence", "spl" ], - "time": "2013-09-07 10:20:34" + "time": "2013-09-07T10:20:34+00:00" }, { "name": "doctrine/dbal", @@ -360,7 +359,7 @@ "persistence", "queryobject" ], - "time": "2014-01-01 16:43:57" + "time": "2014-01-01T16:43:57+00:00" }, { "name": "doctrine/doctrine-bundle", @@ -432,7 +431,7 @@ "orm", "persistence" ], - "time": "2013-03-25 20:13:59" + "time": "2013-03-25T20:13:59+00:00" }, { "name": "doctrine/inflector", @@ -496,7 +495,7 @@ "singuarlize", "string" ], - "time": "2013-01-10 21:49:15" + "time": "2013-01-10T21:49:15+00:00" }, { "name": "doctrine/lexer", @@ -548,19 +547,19 @@ "lexer", "parser" ], - "time": "2013-01-12 18:59:04" + "time": "2013-01-12T18:59:04+00:00" }, { "name": "doctrine/orm", "version": "v2.4.2", "source": { "type": "git", - "url": "https://github.com/doctrine/doctrine2.git", + "url": "https://github.com/doctrine/orm.git", "reference": "0363a5548d9263f979f9ca149decb9cfc66419ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/0363a5548d9263f979f9ca149decb9cfc66419ab", + "url": "https://api.github.com/repos/doctrine/orm/zipball/0363a5548d9263f979f9ca149decb9cfc66419ab", "reference": "0363a5548d9263f979f9ca149decb9cfc66419ab", "shasum": "" }, @@ -624,7 +623,7 @@ "database", "orm" ], - "time": "2014-02-08 16:35:09" + "time": "2014-02-08T16:35:09+00:00" }, { "name": "friendsofsymfony/rest-bundle", @@ -702,7 +701,7 @@ "keywords": [ "rest" ], - "time": "2014-03-23 17:58:22" + "time": "2014-03-23T17:58:22+00:00" }, { "name": "incenteev/composer-parameter-handler", @@ -754,7 +753,49 @@ "keywords": [ "parameters management" ], - "time": "2013-12-07 10:10:39" + "time": "2013-12-07T10:10:39+00:00" + }, + { + "name": "ircmaxell/password-compat", + "version": "v1.0.4", + "source": { + "type": "git", + "url": "https://github.com/ircmaxell/password_compat.git", + "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/5c5cde8822a69545767f7c7f3058cb15ff84614c", + "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "type": "library", + "autoload": { + "files": [ + "lib/password.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anthony Ferrara", + "email": "ircmaxell@php.net", + "homepage": "http://blog.ircmaxell.com" + } + ], + "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", + "homepage": "https://github.com/ircmaxell/password_compat", + "keywords": [ + "hashing", + "password" + ], + "time": "2014-11-20T16:49:30+00:00" }, { "name": "jdorn/sql-formatter", @@ -804,7 +845,7 @@ "highlight", "sql" ], - "time": "2014-01-12 16:20:24" + "time": "2014-01-12T16:20:24+00:00" }, { "name": "jms/metadata", @@ -856,7 +897,7 @@ "xml", "yaml" ], - "time": "2013-11-05 23:02:36" + "time": "2013-11-05T23:02:36+00:00" }, { "name": "jms/parser-lib", @@ -891,7 +932,7 @@ "Apache2" ], "description": "A library for easily creating recursive-descent parsers.", - "time": "2012-11-18 18:08:43" + "time": "2012-11-18T18:08:43+00:00" }, { "name": "jms/serializer", @@ -961,7 +1002,7 @@ "serialization", "xml" ], - "time": "2014-02-10 11:00:05" + "time": "2014-02-10T11:00:05+00:00" }, { "name": "jms/serializer-bundle", @@ -1031,7 +1072,7 @@ "serialization", "xml" ], - "time": "2014-02-09 12:04:09" + "time": "2014-02-09T12:04:09+00:00" }, { "name": "kriswallsmith/assetic", @@ -1102,7 +1143,7 @@ "compression", "minification" ], - "time": "2013-07-19 00:03:27" + "time": "2013-07-19T00:03:27+00:00" }, { "name": "mattvick/harvest-app-bundle", @@ -1145,16 +1186,14 @@ "Harvest", "api" ], - "time": "2012-10-13 14:17:29" + "time": "2012-10-13T14:17:29+00:00" }, { "name": "mdbitz/hapi", "version": "1.1.1", "dist": { "type": "zip", - "url": "https://mdbitz.com/wp-content/uploads/2010/10/HaPi-1.1.1.zip", - "reference": null, - "shasum": null + "url": "https://mdbitz.com/wp-content/uploads/2010/10/HaPi-1.1.1.zip" }, "type": "library" }, @@ -1207,7 +1246,7 @@ "keywords": [ "markdown" ], - "time": "2013-11-29 17:09:24" + "time": "2013-11-29T17:09:24+00:00" }, { "name": "monolog/monolog", @@ -1274,7 +1313,7 @@ "logging", "psr-3" ], - "time": "2013-11-14 19:48:31" + "time": "2013-11-14T19:48:31+00:00" }, { "name": "nelmio/api-doc-bundle", @@ -1282,7 +1321,7 @@ "target-dir": "Nelmio/ApiDocBundle", "source": { "type": "git", - "url": "https://github.com/nelmio/NelmioApiDocBundle.git", + "url": "git@github.com:nelmio/NelmioApiDocBundle.git", "reference": "eddba56c66dd740b541d3f4f80dc16b6ab8b098f" }, "dist": { @@ -1349,7 +1388,56 @@ "documentation", "rest" ], - "time": "2014-03-12 13:46:04" + "time": "2014-03-12T13:46:04+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.18", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", + "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "time": "2019-01-03T20:59:08+00:00" }, { "name": "phpcollection/phpcollection", @@ -1399,7 +1487,7 @@ "sequence", "set" ], - "time": "2013-01-23 15:16:14" + "time": "2013-01-23T15:16:14+00:00" }, { "name": "phpoption/phpoption", @@ -1448,7 +1536,7 @@ "php", "type" ], - "time": "2014-01-09 22:37:17" + "time": "2014-01-09T22:37:17+00:00" }, { "name": "psr/log", @@ -1486,7 +1574,7 @@ "psr", "psr-3" ], - "time": "2012-12-21 11:40:51" + "time": "2012-12-21T11:40:51+00:00" }, { "name": "sensio/distribution-bundle", @@ -1534,7 +1622,7 @@ "configuration", "distribution" ], - "time": "2013-08-22 05:04:53" + "time": "2013-08-22T05:04:53+00:00" }, { "name": "sensio/framework-extra-bundle", @@ -1591,7 +1679,7 @@ "annotations", "controllers" ], - "time": "2013-12-03 07:53:39" + "time": "2013-12-03T07:53:39+00:00" }, { "name": "sensio/generator-bundle", @@ -1641,7 +1729,8 @@ } ], "description": "This bundle generates code for you", - "time": "2013-08-21 18:09:35" + "abandoned": "symfony/maker-bundle", + "time": "2013-08-21T18:09:35+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -1692,7 +1781,7 @@ "mail", "mailer" ], - "time": "2013-12-03 13:33:24" + "time": "2013-12-03T13:33:24+00:00" }, { "name": "symfony/assetic-bundle", @@ -1755,7 +1844,8 @@ "compression", "minification" ], - "time": "2013-05-16 05:32:23" + "abandoned": "symfony/webpack-encore-pack", + "time": "2013-05-16T05:32:23+00:00" }, { "name": "symfony/icu", @@ -1804,7 +1894,7 @@ "intl" ], "abandoned": "symfony/intl", - "time": "2013-06-03 18:32:58" + "time": "2013-06-03T18:32:58+00:00" }, { "name": "symfony/monolog-bundle", @@ -1866,7 +1956,650 @@ "log", "logging" ], - "time": "2014-02-19 14:49:26" + "time": "2014-02-19T14:49:26+00:00" + }, + { + "name": "symfony/polyfill-apcu", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-apcu.git", + "reference": "d6b5c4ac62cd4ed622e583d027ae684de2d3c4bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/d6b5c4ac62cd4ed622e583d027ae684de2d3c4bd", + "reference": "d6b5c4ac62cd4ed622e583d027ae684de2d3c4bd", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Apcu\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 polyfill backporting apcu_* functions to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "apcu", + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-02-27T09:26:54+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-02-27T09:26:54+00:00" + }, + { + "name": "symfony/polyfill-intl-icu", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-icu.git", + "reference": "9c281272735eb66476e0fa7381e03fb0d4b60197" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/9c281272735eb66476e0fa7381e03fb0d4b60197", + "reference": "9c281272735eb66476e0fa7381e03fb0d4b60197", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/intl": "~2.3|~3.0|~4.0|~5.0" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "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 polyfill for intl's ICU-related data and classes", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "icu", + "intl", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-02-27T09:26:54+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-03-09T19:04:49+00:00" + }, + { + "name": "symfony/polyfill-php54", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php54.git", + "reference": "ddc8c8497180a1ecf3e77d4df42a276a38048683" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/ddc8c8497180a1ecf3e77d4df42a276a38048683", + "reference": "ddc8c8497180a1ecf3e77d4df42a276a38048683", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php54\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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 polyfill backporting some PHP 5.4+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-02-27T09:26:54+00:00" + }, + { + "name": "symfony/polyfill-php55", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php55.git", + "reference": "bb47cf11bd615810c631c12caeadf70ea91d2d80" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/bb47cf11bd615810c631c12caeadf70ea91d2d80", + "reference": "bb47cf11bd615810c631c12caeadf70ea91d2d80", + "shasum": "" + }, + "require": { + "ircmaxell/password-compat": "~1.0", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php55\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 polyfill backporting some PHP 5.5+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-02-27T09:26:54+00:00" + }, + { + "name": "symfony/polyfill-php56", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php56.git", + "reference": "d51ec491c8ddceae7dca8dd6c7e30428f543f37d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/d51ec491c8ddceae7dca8dd6c7e30428f543f37d", + "reference": "d51ec491c8ddceae7dca8dd6c7e30428f543f37d", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-util": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php56\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 polyfill backporting some PHP 5.6+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-03-09T19:04:49+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "2a18e37a489803559284416df58c71ccebe50bf0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/2a18e37a489803559284416df58c71ccebe50bf0", + "reference": "2a18e37a489803559284416df58c71ccebe50bf0", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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 polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-02-27T09:26:54+00:00" + }, + { + "name": "symfony/polyfill-util", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-util.git", + "reference": "d8e76c104127675d0ea3df3be0f2ae24a8619027" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/d8e76c104127675d0ea3df3be0f2ae24a8619027", + "reference": "d8e76c104127675d0ea3df3be0f2ae24a8619027", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Util\\": "" + } + }, + "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 utilities for portability of PHP codes", + "homepage": "https://symfony.com", + "keywords": [ + "compat", + "compatibility", + "polyfill", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-03-02T11:55:35+00:00" + }, + { + "name": "symfony/security-acl", + "version": "v3.0.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/security-acl.git", + "reference": "dc8f10b3bda34e9ddcad49edc7accf61f31fce43" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/security-acl/zipball/dc8f10b3bda34e9ddcad49edc7accf61f31fce43", + "reference": "dc8f10b3bda34e9ddcad49edc7accf61f31fce43", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/security-core": "^2.8|^3.0|^4.0|^5.0" + }, + "require-dev": { + "doctrine/common": "~2.2", + "doctrine/dbal": "~2.2", + "psr/log": "~1.0", + "symfony/phpunit-bridge": "^2.8|^3.0|^4.0|^5.0" + }, + "suggest": { + "doctrine/dbal": "For using the built-in ACL implementation", + "symfony/class-loader": "For using the ACL generateSql script", + "symfony/finder": "For using the ACL generateSql script" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Security\\Acl\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Security Component - ACL (Access Control List)", + "homepage": "https://symfony.com", + "time": "2019-12-12T09:55:57+00:00" }, { "name": "symfony/swiftmailer-bundle", @@ -1923,27 +2656,42 @@ ], "description": "Symfony SwiftmailerBundle", "homepage": "http://symfony.com", - "time": "2013-11-21 12:29:01" + "time": "2013-11-21T12:29:01+00:00" }, { "name": "symfony/symfony", - "version": "v2.7.3", + "version": "v2.8.52", "source": { "type": "git", "url": "https://github.com/symfony/symfony.git", - "reference": "a9af4708b4bb650c4897e9b8dfbfbdb2ea5f0486" + "reference": "88f3ef62d6ab870128352c8686c7889562698faf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/a9af4708b4bb650c4897e9b8dfbfbdb2ea5f0486", - "reference": "a9af4708b4bb650c4897e9b8dfbfbdb2ea5f0486", + "url": "https://api.github.com/repos/symfony/symfony/zipball/88f3ef62d6ab870128352c8686c7889562698faf", + "reference": "88f3ef62d6ab870128352c8686c7889562698faf", "shasum": "" }, "require": { - "doctrine/common": "~2.3", + "doctrine/common": "~2.4", + "ext-xml": "*", "php": ">=5.3.9", "psr/log": "~1.0", - "twig/twig": "~1.18" + "symfony/polyfill-apcu": "~1.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php54": "~1.0", + "symfony/polyfill-php55": "~1.0", + "symfony/polyfill-php56": "~1.0", + "symfony/polyfill-php70": "~1.0", + "symfony/polyfill-util": "~1.0", + "symfony/security-acl": "~2.7|~3.0.0", + "twig/twig": "~1.34|~2.4" + }, + "conflict": { + "phpdocumentor/reflection": "<1.0.7", + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" }, "replace": { "symfony/asset": "self.version", @@ -1966,18 +2714,20 @@ "symfony/http-foundation": "self.version", "symfony/http-kernel": "self.version", "symfony/intl": "self.version", + "symfony/ldap": "self.version", "symfony/locale": "self.version", "symfony/monolog-bridge": "self.version", "symfony/options-resolver": "self.version", "symfony/process": "self.version", "symfony/property-access": "self.version", + "symfony/property-info": "self.version", "symfony/proxy-manager-bridge": "self.version", "symfony/routing": "self.version", "symfony/security": "self.version", - "symfony/security-acl": "self.version", "symfony/security-bundle": "self.version", "symfony/security-core": "self.version", "symfony/security-csrf": "self.version", + "symfony/security-guard": "self.version", "symfony/security-http": "self.version", "symfony/serializer": "self.version", "symfony/stopwatch": "self.version", @@ -1992,20 +2742,22 @@ "symfony/yaml": "self.version" }, "require-dev": { + "doctrine/annotations": "~1.0", "doctrine/data-fixtures": "1.0.*", - "doctrine/dbal": "~2.2", + "doctrine/dbal": "~2.4", "doctrine/doctrine-bundle": "~1.2", - "doctrine/orm": "~2.2,>=2.2.3", - "egulias/email-validator": "~1.2", - "ircmaxell/password-compat": "~1.0", + "doctrine/orm": "~2.4,>=2.4.5", + "egulias/email-validator": "~1.2,>=1.2.1", "monolog/monolog": "~1.11", - "ocramius/proxy-manager": "~0.4|~1.0", - "symfony/phpunit-bridge": "self.version" + "ocramius/proxy-manager": "~0.4|~1.0|~2.0", + "phpdocumentor/reflection": "^1.0.7", + "sensio/framework-extra-bundle": "^3.0.2", + "symfony/phpunit-bridge": "~3.4|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { @@ -2019,11 +2771,10 @@ "Symfony\\Component\\": "src/Symfony/Component/" }, "classmap": [ - "src/Symfony/Component/HttpFoundation/Resources/stubs", "src/Symfony/Component/Intl/Resources/stubs" ], - "files": [ - "src/Symfony/Component/Intl/Resources/stubs/functions.php" + "exclude-from-classmap": [ + "**/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2045,7 +2796,7 @@ "keywords": [ "framework" ], - "time": "2015-07-31 13:24:45" + "time": "2019-11-13T08:36:42+00:00" }, { "name": "twig/extensions", @@ -2094,34 +2845,42 @@ "i18n", "text" ], - "time": "2013-10-18 19:37:15" + "time": "2013-10-18T19:37:15+00:00" }, { "name": "twig/twig", - "version": "v1.18.0", + "version": "v1.42.5", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "4cf7464348e7f9893a93f7096a90b73722be99cf" + "reference": "87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/4cf7464348e7f9893a93f7096a90b73722be99cf", - "reference": "4cf7464348e7f9893a93f7096a90b73722be99cf", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e", + "reference": "87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e", "shasum": "" }, "require": { - "php": ">=5.2.4" + "php": ">=5.5.0", + "symfony/polyfill-ctype": "^1.8" + }, + "require-dev": { + "psr/container": "^1.0", + "symfony/phpunit-bridge": "^4.4|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-master": "1.42-dev" } }, "autoload": { "psr-0": { "Twig_": "lib/" + }, + "psr-4": { + "Twig\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2135,23 +2894,22 @@ "homepage": "http://fabien.potencier.org", "role": "Lead Developer" }, + { + "name": "Twig Team", + "role": "Contributors" + }, { "name": "Armin Ronacher", "email": "armin.ronacher@active-4.com", "role": "Project Founder" - }, - { - "name": "Twig Team", - "homepage": "http://twig.sensiolabs.org/contributors", - "role": "Contributors" } ], "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org", + "homepage": "https://twig.symfony.com", "keywords": [ "templating" ], - "time": "2015-01-25 17:32:08" + "time": "2020-02-11T05:59:23+00:00" }, { "name": "willdurand/jsonp-callback-validator", @@ -2191,7 +2949,7 @@ } ], "description": "JSONP callback validator.", - "time": "2014-01-20 22:35:06" + "time": "2014-01-20T22:35:06+00:00" }, { "name": "willdurand/negotiation", @@ -2241,7 +2999,7 @@ "header", "negotiation" ], - "time": "2014-02-26 13:56:25" + "time": "2014-02-26T13:56:25+00:00" } ], "packages-dev": [], @@ -2258,5 +3016,6 @@ "platform": { "php": ">=5.3.3" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } diff --git a/UPGRADE-2.2.md b/deprecated_changelog/UPGRADE-2.2.md similarity index 100% rename from UPGRADE-2.2.md rename to deprecated_changelog/UPGRADE-2.2.md diff --git a/UPGRADE-2.3.md b/deprecated_changelog/UPGRADE-2.3.md similarity index 100% rename from UPGRADE-2.3.md rename to deprecated_changelog/UPGRADE-2.3.md diff --git a/UPGRADE-2.4.md b/deprecated_changelog/UPGRADE-2.4.md similarity index 100% rename from UPGRADE-2.4.md rename to deprecated_changelog/UPGRADE-2.4.md diff --git a/UPGRADE.md b/deprecated_changelog/UPGRADE.md similarity index 100% rename from UPGRADE.md rename to deprecated_changelog/UPGRADE.md diff --git a/docker-compose.override.yml-example b/docker-compose.override.yml-example index 0956b00..17e1e06 100644 --- a/docker-compose.override.yml-example +++ b/docker-compose.override.yml-example @@ -1,6 +1,6 @@ version: "2" services: - harvester: + server: environment: HARVESTER_HARVEST_USER: harvest_account_email@email.com HARVESTER_HARVEST_PASSWORD: secretpassword diff --git a/docker-compose.yml b/docker-compose.yml index 386a746..21e7165 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,14 +1,13 @@ version: "2" services: - composer: - build: docker/composer - volumes: - - '.:/app' - - './docker/composer-cache:/composer/cache' - harvester: + server: build: . environment: VIRTUAL_HOST: harvester.docker + SYMFONY_ENV: dev + SYMFONY_DEBUG: 1 + SYMFONY__KERNEL__CACHE_DIR: /tmp/cache + COMPOSER_MEMORY_LIMIT: -1 ports: - '80' volumes: diff --git a/docker/harvester b/docker/harvester index bfb573a..38a7100 100755 --- a/docker/harvester +++ b/docker/harvester @@ -36,8 +36,8 @@ then fi echo "Initial import." - app/console harvester:fetch + app/console harvester:fetch --updated-yesterday - # Fix up permissions for webapp. - chmod a+w -R /harvester/app/cache /harvester/app/logs + # Fix up permissions for webapp and database. + chmod a+w -R /harvester/app/cache /harvester/app/logs /data fi diff --git a/web/app.php b/web/app.php index 4f591c1..4d08d94 100644 --- a/web/app.php +++ b/web/app.php @@ -1,28 +1,31 @@ unregister(); -$apcLoader->register(true); -*/ - require_once __DIR__.'/../app/AppKernel.php'; -//require_once __DIR__.'/../app/AppCache.php'; $kernel = new AppKernel('prod', false); -$kernel->loadClassCache(); -//$kernel = new AppCache($kernel); -// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter -//Request::enableHttpMethodParameterOverride(); +$env = getenv('SYMFONY_ENV'); +$prod = $env === 'prod'; +$debug = getenv('SYMFONY_DEBUG') !== '0' && !$prod; + +if ($debug) { + Debug::enable(); +} + +if ($prod) { + // We don't want any cache in dev mode but in production, let's get it! + $kernel->loadClassCache(); +} else { + // Will be either 'dev' or 'test' + $kernel = new AppKernel($env, true); +} + + $request = Request::createFromGlobals(); $response = $kernel->handle($request); $response->send(); diff --git a/web/app_dev.php b/web/app_dev.php deleted file mode 100644 index 872a882..0000000 --- a/web/app_dev.php +++ /dev/null @@ -1,30 +0,0 @@ -loadClassCache(); -$request = Request::createFromGlobals(); -$response = $kernel->handle($request); -$response->send(); -$kernel->terminate($request, $response);