Subject | Hash | Author | Date (UTC) |
---|---|---|---|
neo bundle, neo entity, empty command | 5df95da9f7d462e891685b5556abeae1abdd28b4 | Ivaylo Iliev | 2017-08-27 16:11:31 |
add mysql | 798d32267444f4f26ce9215817720217970c5e06 | Ivaylo Iliev | 2017-08-27 14:33:00 |
run and build script | a91daf3d789ac334eca951731504f1a17e79952d | Ivaylo Iliev | 2017-08-27 10:52:34 |
remove security checks | 613463e0180c3e812194b0bac40aaef508d99823 | Ivaylo Iliev | 2017-08-27 10:52:12 |
add nasa api key | a4f8c147880e69994a988a176298ed54dacc53db | Ivaylo Iliev | 2017-08-27 08:45:17 |
hello world json | 636f0cca5234693152d25e8a6f7f2e812b39fa16 | Ivaylo Iliev | 2017-08-27 08:29:56 |
empty symfony app | 9c121393c6caf39150b1eeaa274c978edef1425e | Ivaylo Iliev | 2017-08-26 23:05:32 |
update default nginx config | 87638100759fe5cec69d45fbbcf7bbda3464131a | Ivaylo Iliev | 2017-08-26 23:03:30 |
Initial commit | f0ac3b6d6f330c3ed2e5c760a30abf15601d0494 | Ivaylo Iliev | 2017-08-26 22:23:30 |
File src/nasa/app/AppKernel.php changed (mode: 100644) (index ef068e0..ca20bee) | |||
... | ... | class AppKernel extends Kernel | |
14 | 14 | new Symfony\Bundle\MonologBundle\MonologBundle(), | new Symfony\Bundle\MonologBundle\MonologBundle(), |
15 | 15 | new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), | new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), |
16 | 16 | new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), | new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), |
17 | new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(), | ||
17 | 18 | new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), | new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), |
18 | 19 | new AppBundle\AppBundle(), | new AppBundle\AppBundle(), |
20 | new NeoBundle\NeoBundle(), | ||
19 | 21 | ]; | ]; |
20 | 22 | ||
21 | 23 | if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { | if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { |
File src/nasa/app/DoctrineMigrations/Version20170827152416.php added (mode: 100644) (index 0000000..4c53704) | |||
1 | <?php | ||
2 | |||
3 | namespace Nasa\Migrations; | ||
4 | |||
5 | use Doctrine\DBAL\Migrations\AbstractMigration; | ||
6 | use Doctrine\DBAL\Schema\Schema; | ||
7 | |||
8 | /** | ||
9 | * Create the DB | ||
10 | */ | ||
11 | class Version20170827152416 extends AbstractMigration | ||
12 | { | ||
13 | /** | ||
14 | * @param Schema $schema | ||
15 | */ | ||
16 | public function up(Schema $schema) | ||
17 | { | ||
18 | $this->addSql('create database nasa'); | ||
19 | } | ||
20 | |||
21 | /** | ||
22 | * @param Schema $schema | ||
23 | */ | ||
24 | public function down(Schema $schema) | ||
25 | { | ||
26 | $this->addSql('drop database nasa') | ||
27 | } | ||
28 | } |
File src/nasa/app/DoctrineMigrations/Version20170827154604.php added (mode: 100644) (index 0000000..1993d75) | |||
1 | <?php | ||
2 | |||
3 | namespace Nasa\Migrations; | ||
4 | |||
5 | use Doctrine\DBAL\Migrations\AbstractMigration; | ||
6 | use Doctrine\DBAL\Schema\Schema; | ||
7 | |||
8 | /** | ||
9 | * Generate neo table | ||
10 | */ | ||
11 | class Version20170827154604 extends AbstractMigration | ||
12 | { | ||
13 | /** | ||
14 | * @param Schema $schema | ||
15 | */ | ||
16 | public function up(Schema $schema) | ||
17 | { | ||
18 | $this->addSql('create table neo (id int auto_increment not null, created_at timestamp not null default current_timestamp, approach_at date not null, name varchar(100) not null, reference int, speed double, is_hazardous boolean, primary key(id)) default character set utf8 collate utf8_unicode_ci engine = innodb'); | ||
19 | } | ||
20 | |||
21 | /** | ||
22 | * @param Schema $schema | ||
23 | */ | ||
24 | public function down(Schema $schema) | ||
25 | { | ||
26 | $this->addSql('drop table neo'); | ||
27 | } | ||
28 | } |
File src/nasa/app/config/config.yml changed (mode: 100644) (index 1a5c147..f7716cf) | |||
... | ... | imports: | |
2 | 2 | - { resource: parameters.yml } | - { resource: parameters.yml } |
3 | 3 | - { resource: security.yml } | - { resource: security.yml } |
4 | 4 | - { resource: services.yml } | - { resource: services.yml } |
5 | - { resource: "@NeoBundle/Resources/config/services.yml" } | ||
5 | 6 | ||
6 | 7 | # Put parameters here that don't need to change on each machine where the app is deployed | # Put parameters here that don't need to change on each machine where the app is deployed |
7 | 8 | # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration | # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration |
... | ... | doctrine: | |
47 | 48 | dbname: '%database_name%' | dbname: '%database_name%' |
48 | 49 | user: '%database_user%' | user: '%database_user%' |
49 | 50 | password: '%database_password%' | password: '%database_password%' |
50 | charset: UTF8 | ||
51 | # if using pdo_sqlite as your database driver: | ||
52 | # 1. add the path in parameters.yml | ||
53 | # e.g. database_path: '%kernel.project_dir%/var/data/data.sqlite' | ||
54 | # 2. Uncomment database_path in parameters.yml.dist | ||
55 | # 3. Uncomment next line: | ||
56 | #path: '%database_path%' | ||
51 | charset: utf8mb4 | ||
52 | default_table_options: | ||
53 | charset: utf8mb4 | ||
54 | collate: utf8mb4_unicode_ci | ||
57 | 55 | ||
58 | 56 | orm: | orm: |
59 | 57 | auto_generate_proxy_classes: '%kernel.debug%' | auto_generate_proxy_classes: '%kernel.debug%' |
60 | 58 | naming_strategy: doctrine.orm.naming_strategy.underscore | naming_strategy: doctrine.orm.naming_strategy.underscore |
61 | 59 | auto_mapping: true | auto_mapping: true |
62 | 60 | ||
61 | doctrine_migrations: | ||
62 | dir_name: "%kernel.root_dir%/DoctrineMigrations" | ||
63 | namespace: Nasa\Migrations | ||
64 | table_name: migration_versions | ||
65 | name: Nasa Migrations | ||
66 | organize_migrations: false # Version >=1.2 Possible values are: "BY_YEAR", "BY_YEAR_AND_MONTH", false | ||
67 | |||
68 | |||
63 | 69 | # Swiftmailer Configuration | # Swiftmailer Configuration |
64 | 70 | swiftmailer: | swiftmailer: |
65 | 71 | transport: '%mailer_transport%' | transport: '%mailer_transport%' |
File src/nasa/app/config/routing.yml changed (mode: 100644) (index 2ec067f..3be9bcc) | |||
1 | neo: | ||
2 | resource: "@NeoBundle/Controller/" | ||
3 | type: annotation | ||
4 | |||
1 | 5 | app: | app: |
2 | 6 | resource: '@AppBundle/Controller/' | resource: '@AppBundle/Controller/' |
3 | 7 | type: annotation | type: annotation |
File src/nasa/composer.json changed (mode: 100644) (index 78455f2..7f44038) | |||
4 | 4 | "type": "project", | "type": "project", |
5 | 5 | "autoload": { | "autoload": { |
6 | 6 | "psr-4": { | "psr-4": { |
7 | "AppBundle\\": "src/AppBundle" | ||
7 | "AppBundle\\": "src/AppBundle", | ||
8 | "NeoBundle\\": "src/NeoBundle" | ||
8 | 9 | }, | }, |
9 | 10 | "classmap": [ | "classmap": [ |
10 | 11 | "app/AppKernel.php", | "app/AppKernel.php", |
22 | 23 | "require": { | "require": { |
23 | 24 | "php": ">=5.5.9", | "php": ">=5.5.9", |
24 | 25 | "doctrine/doctrine-bundle": "^1.6", | "doctrine/doctrine-bundle": "^1.6", |
26 | "doctrine/doctrine-migrations-bundle": "^1.0", | ||
25 | 27 | "doctrine/orm": "^2.5", | "doctrine/orm": "^2.5", |
26 | 28 | "incenteev/composer-parameter-handler": "^2.0", | "incenteev/composer-parameter-handler": "^2.0", |
27 | 29 | "sensio/distribution-bundle": "^5.0.19", | "sensio/distribution-bundle": "^5.0.19", |
File src/nasa/composer.lock changed (mode: 100644) (index dfb6fbf..b4317d9) | |||
4 | 4 | "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#composer-lock-the-lock-file", |
5 | 5 | "This file is @generated automatically" | "This file is @generated automatically" |
6 | 6 | ], | ], |
7 | "content-hash": "fe97a3a10836328d1834c4788037edcd", | ||
7 | "content-hash": "90a153819e98ee1921583b571582c64b", | ||
8 | 8 | "packages": [ | "packages": [ |
9 | 9 | { | { |
10 | 10 | "name": "composer/ca-bundle", | "name": "composer/ca-bundle", |
589 | 589 | ], | ], |
590 | 590 | "time": "2016-01-26T17:28:51+00:00" | "time": "2016-01-26T17:28:51+00:00" |
591 | 591 | }, | }, |
592 | { | ||
593 | "name": "doctrine/doctrine-migrations-bundle", | ||
594 | "version": "v1.2.1", | ||
595 | "source": { | ||
596 | "type": "git", | ||
597 | "url": "https://github.com/doctrine/DoctrineMigrationsBundle.git", | ||
598 | "reference": "6276139e0b913a4e5120fc36bb5b0eae8ac549bc" | ||
599 | }, | ||
600 | "dist": { | ||
601 | "type": "zip", | ||
602 | "url": "https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/6276139e0b913a4e5120fc36bb5b0eae8ac549bc", | ||
603 | "reference": "6276139e0b913a4e5120fc36bb5b0eae8ac549bc", | ||
604 | "shasum": "" | ||
605 | }, | ||
606 | "require": { | ||
607 | "doctrine/doctrine-bundle": "~1.0", | ||
608 | "doctrine/migrations": "^1.1", | ||
609 | "php": ">=5.4.0", | ||
610 | "symfony/framework-bundle": "~2.3|~3.0" | ||
611 | }, | ||
612 | "require-dev": { | ||
613 | "phpunit/phpunit": "~4.8" | ||
614 | }, | ||
615 | "type": "symfony-bundle", | ||
616 | "extra": { | ||
617 | "branch-alias": { | ||
618 | "dev-master": "1.2-dev" | ||
619 | } | ||
620 | }, | ||
621 | "autoload": { | ||
622 | "psr-4": { | ||
623 | "Doctrine\\Bundle\\MigrationsBundle\\": "" | ||
624 | } | ||
625 | }, | ||
626 | "notification-url": "https://packagist.org/downloads/", | ||
627 | "license": [ | ||
628 | "MIT" | ||
629 | ], | ||
630 | "authors": [ | ||
631 | { | ||
632 | "name": "Symfony Community", | ||
633 | "homepage": "http://symfony.com/contributors" | ||
634 | }, | ||
635 | { | ||
636 | "name": "Doctrine Project", | ||
637 | "homepage": "http://www.doctrine-project.org" | ||
638 | }, | ||
639 | { | ||
640 | "name": "Fabien Potencier", | ||
641 | "email": "fabien@symfony.com" | ||
642 | } | ||
643 | ], | ||
644 | "description": "Symfony DoctrineMigrationsBundle", | ||
645 | "homepage": "http://www.doctrine-project.org", | ||
646 | "keywords": [ | ||
647 | "dbal", | ||
648 | "migrations", | ||
649 | "schema" | ||
650 | ], | ||
651 | "time": "2016-12-05T18:36:37+00:00" | ||
652 | }, | ||
592 | 653 | { | { |
593 | 654 | "name": "doctrine/inflector", | "name": "doctrine/inflector", |
594 | 655 | "version": "v1.2.0", | "version": "v1.2.0", |
764 | 825 | ], | ], |
765 | 826 | "time": "2014-09-09T13:34:57+00:00" | "time": "2014-09-09T13:34:57+00:00" |
766 | 827 | }, | }, |
828 | { | ||
829 | "name": "doctrine/migrations", | ||
830 | "version": "v1.5.0", | ||
831 | "source": { | ||
832 | "type": "git", | ||
833 | "url": "https://github.com/doctrine/migrations.git", | ||
834 | "reference": "c81147c0f2938a6566594455367e095150547f72" | ||
835 | }, | ||
836 | "dist": { | ||
837 | "type": "zip", | ||
838 | "url": "https://api.github.com/repos/doctrine/migrations/zipball/c81147c0f2938a6566594455367e095150547f72", | ||
839 | "reference": "c81147c0f2938a6566594455367e095150547f72", | ||
840 | "shasum": "" | ||
841 | }, | ||
842 | "require": { | ||
843 | "doctrine/dbal": "~2.2", | ||
844 | "ocramius/proxy-manager": "^1.0|^2.0", | ||
845 | "php": "^5.5|^7.0", | ||
846 | "symfony/console": "~2.3|~3.0", | ||
847 | "symfony/yaml": "~2.3|~3.0" | ||
848 | }, | ||
849 | "require-dev": { | ||
850 | "doctrine/coding-standard": "dev-master", | ||
851 | "doctrine/orm": "2.*", | ||
852 | "jdorn/sql-formatter": "~1.1", | ||
853 | "johnkary/phpunit-speedtrap": "~1.0@dev", | ||
854 | "mikey179/vfsstream": "^1.6", | ||
855 | "mockery/mockery": "^0.9.4", | ||
856 | "phpunit/phpunit": "~4.7", | ||
857 | "satooshi/php-coveralls": "^1.0" | ||
858 | }, | ||
859 | "suggest": { | ||
860 | "jdorn/sql-formatter": "Allows to generate formatted SQL with the diff command." | ||
861 | }, | ||
862 | "bin": [ | ||
863 | "bin/doctrine-migrations" | ||
864 | ], | ||
865 | "type": "library", | ||
866 | "extra": { | ||
867 | "branch-alias": { | ||
868 | "dev-master": "v1.6.x-dev" | ||
869 | } | ||
870 | }, | ||
871 | "autoload": { | ||
872 | "psr-4": { | ||
873 | "Doctrine\\DBAL\\Migrations\\": "lib/Doctrine/DBAL/Migrations" | ||
874 | } | ||
875 | }, | ||
876 | "notification-url": "https://packagist.org/downloads/", | ||
877 | "license": [ | ||
878 | "LGPL-2.1" | ||
879 | ], | ||
880 | "authors": [ | ||
881 | { | ||
882 | "name": "Benjamin Eberlei", | ||
883 | "email": "kontakt@beberlei.de" | ||
884 | }, | ||
885 | { | ||
886 | "name": "Jonathan Wage", | ||
887 | "email": "jonwage@gmail.com" | ||
888 | }, | ||
889 | { | ||
890 | "name": "Michael Simonson", | ||
891 | "email": "contact@mikesimonson.com" | ||
892 | } | ||
893 | ], | ||
894 | "description": "Database Schema migrations using Doctrine DBAL", | ||
895 | "homepage": "http://www.doctrine-project.org", | ||
896 | "keywords": [ | ||
897 | "database", | ||
898 | "migrations" | ||
899 | ], | ||
900 | "time": "2016-12-25T22:54:00+00:00" | ||
901 | }, | ||
767 | 902 | { | { |
768 | 903 | "name": "doctrine/orm", | "name": "doctrine/orm", |
769 | 904 | "version": "v2.5.10", | "version": "v2.5.10", |
1073 | 1208 | ], | ], |
1074 | 1209 | "time": "2017-06-19T01:22:40+00:00" | "time": "2017-06-19T01:22:40+00:00" |
1075 | 1210 | }, | }, |
1211 | { | ||
1212 | "name": "ocramius/package-versions", | ||
1213 | "version": "1.1.2", | ||
1214 | "source": { | ||
1215 | "type": "git", | ||
1216 | "url": "https://github.com/Ocramius/PackageVersions.git", | ||
1217 | "reference": "51e867c70f0799790b3e82276875414ce13daaca" | ||
1218 | }, | ||
1219 | "dist": { | ||
1220 | "type": "zip", | ||
1221 | "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/51e867c70f0799790b3e82276875414ce13daaca", | ||
1222 | "reference": "51e867c70f0799790b3e82276875414ce13daaca", | ||
1223 | "shasum": "" | ||
1224 | }, | ||
1225 | "require": { | ||
1226 | "composer-plugin-api": "^1.0", | ||
1227 | "php": "~7.0" | ||
1228 | }, | ||
1229 | "require-dev": { | ||
1230 | "composer/composer": "^1.3", | ||
1231 | "ext-zip": "*", | ||
1232 | "phpunit/phpunit": "^5.4.7" | ||
1233 | }, | ||
1234 | "type": "composer-plugin", | ||
1235 | "extra": { | ||
1236 | "class": "PackageVersions\\Installer", | ||
1237 | "branch-alias": { | ||
1238 | "dev-master": "2.0.x-dev" | ||
1239 | } | ||
1240 | }, | ||
1241 | "autoload": { | ||
1242 | "psr-4": { | ||
1243 | "PackageVersions\\": "src/PackageVersions" | ||
1244 | } | ||
1245 | }, | ||
1246 | "notification-url": "https://packagist.org/downloads/", | ||
1247 | "license": [ | ||
1248 | "MIT" | ||
1249 | ], | ||
1250 | "authors": [ | ||
1251 | { | ||
1252 | "name": "Marco Pivetta", | ||
1253 | "email": "ocramius@gmail.com" | ||
1254 | } | ||
1255 | ], | ||
1256 | "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", | ||
1257 | "time": "2016-12-30T09:49:15+00:00" | ||
1258 | }, | ||
1259 | { | ||
1260 | "name": "ocramius/proxy-manager", | ||
1261 | "version": "2.1.1", | ||
1262 | "source": { | ||
1263 | "type": "git", | ||
1264 | "url": "https://github.com/Ocramius/ProxyManager.git", | ||
1265 | "reference": "e18ac876b2e4819c76349de8f78ccc8ef1554cd7" | ||
1266 | }, | ||
1267 | "dist": { | ||
1268 | "type": "zip", | ||
1269 | "url": "https://api.github.com/repos/Ocramius/ProxyManager/zipball/e18ac876b2e4819c76349de8f78ccc8ef1554cd7", | ||
1270 | "reference": "e18ac876b2e4819c76349de8f78ccc8ef1554cd7", | ||
1271 | "shasum": "" | ||
1272 | }, | ||
1273 | "require": { | ||
1274 | "ocramius/package-versions": "^1.1.1", | ||
1275 | "php": "^7.1.0", | ||
1276 | "zendframework/zend-code": "^3.1.0" | ||
1277 | }, | ||
1278 | "require-dev": { | ||
1279 | "couscous/couscous": "^1.5.2", | ||
1280 | "ext-phar": "*", | ||
1281 | "humbug/humbug": "dev-master@DEV", | ||
1282 | "nikic/php-parser": "^3.0.4", | ||
1283 | "phpbench/phpbench": "^0.12.2", | ||
1284 | "phpstan/phpstan": "^0.6.4", | ||
1285 | "phpunit/phpunit": "^5.6.4", | ||
1286 | "phpunit/phpunit-mock-objects": "^3.4.1", | ||
1287 | "squizlabs/php_codesniffer": "^2.7.0" | ||
1288 | }, | ||
1289 | "suggest": { | ||
1290 | "ocramius/generated-hydrator": "To have very fast object to array to object conversion for ghost objects", | ||
1291 | "zendframework/zend-json": "To have the JsonRpc adapter (Remote Object feature)", | ||
1292 | "zendframework/zend-soap": "To have the Soap adapter (Remote Object feature)", | ||
1293 | "zendframework/zend-xmlrpc": "To have the XmlRpc adapter (Remote Object feature)" | ||
1294 | }, | ||
1295 | "type": "library", | ||
1296 | "extra": { | ||
1297 | "branch-alias": { | ||
1298 | "dev-master": "3.0.x-dev" | ||
1299 | } | ||
1300 | }, | ||
1301 | "autoload": { | ||
1302 | "psr-0": { | ||
1303 | "ProxyManager\\": "src" | ||
1304 | } | ||
1305 | }, | ||
1306 | "notification-url": "https://packagist.org/downloads/", | ||
1307 | "license": [ | ||
1308 | "MIT" | ||
1309 | ], | ||
1310 | "authors": [ | ||
1311 | { | ||
1312 | "name": "Marco Pivetta", | ||
1313 | "email": "ocramius@gmail.com", | ||
1314 | "homepage": "http://ocramius.github.io/" | ||
1315 | } | ||
1316 | ], | ||
1317 | "description": "A library providing utilities to generate, instantiate and generally operate with Object Proxies", | ||
1318 | "homepage": "https://github.com/Ocramius/ProxyManager", | ||
1319 | "keywords": [ | ||
1320 | "aop", | ||
1321 | "lazy loading", | ||
1322 | "proxy", | ||
1323 | "proxy pattern", | ||
1324 | "service proxies" | ||
1325 | ], | ||
1326 | "time": "2017-05-04T11:12:50+00:00" | ||
1327 | }, | ||
1076 | 1328 | { | { |
1077 | 1329 | "name": "paragonie/random_compat", | "name": "paragonie/random_compat", |
1078 | 1330 | "version": "v2.0.10", | "version": "v2.0.10", |
2255 | 2507 | "templating" | "templating" |
2256 | 2508 | ], | ], |
2257 | 2509 | "time": "2017-06-07T18:47:58+00:00" | "time": "2017-06-07T18:47:58+00:00" |
2510 | }, | ||
2511 | { | ||
2512 | "name": "zendframework/zend-code", | ||
2513 | "version": "3.2.0", | ||
2514 | "source": { | ||
2515 | "type": "git", | ||
2516 | "url": "https://github.com/zendframework/zend-code.git", | ||
2517 | "reference": "02944646c109fa53b6b6ab8b5269bb080fcdf5b4" | ||
2518 | }, | ||
2519 | "dist": { | ||
2520 | "type": "zip", | ||
2521 | "url": "https://api.github.com/repos/zendframework/zend-code/zipball/02944646c109fa53b6b6ab8b5269bb080fcdf5b4", | ||
2522 | "reference": "02944646c109fa53b6b6ab8b5269bb080fcdf5b4", | ||
2523 | "shasum": "" | ||
2524 | }, | ||
2525 | "require": { | ||
2526 | "php": "^7.1", | ||
2527 | "zendframework/zend-eventmanager": "^2.6 || ^3.0" | ||
2528 | }, | ||
2529 | "require-dev": { | ||
2530 | "doctrine/annotations": "~1.0", | ||
2531 | "ext-phar": "*", | ||
2532 | "phpunit/phpunit": "^6.2.3", | ||
2533 | "zendframework/zend-coding-standard": "^1.0.0", | ||
2534 | "zendframework/zend-stdlib": "^2.7 || ^3.0" | ||
2535 | }, | ||
2536 | "suggest": { | ||
2537 | "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", | ||
2538 | "zendframework/zend-stdlib": "Zend\\Stdlib component" | ||
2539 | }, | ||
2540 | "type": "library", | ||
2541 | "extra": { | ||
2542 | "branch-alias": { | ||
2543 | "dev-master": "3.2-dev", | ||
2544 | "dev-develop": "3.3-dev" | ||
2545 | } | ||
2546 | }, | ||
2547 | "autoload": { | ||
2548 | "psr-4": { | ||
2549 | "Zend\\Code\\": "src/" | ||
2550 | } | ||
2551 | }, | ||
2552 | "notification-url": "https://packagist.org/downloads/", | ||
2553 | "license": [ | ||
2554 | "BSD-3-Clause" | ||
2555 | ], | ||
2556 | "description": "provides facilities to generate arbitrary code using an object oriented interface", | ||
2557 | "homepage": "https://github.com/zendframework/zend-code", | ||
2558 | "keywords": [ | ||
2559 | "code", | ||
2560 | "zf2" | ||
2561 | ], | ||
2562 | "time": "2017-07-23T13:06:00+00:00" | ||
2563 | }, | ||
2564 | { | ||
2565 | "name": "zendframework/zend-eventmanager", | ||
2566 | "version": "3.2.0", | ||
2567 | "source": { | ||
2568 | "type": "git", | ||
2569 | "url": "https://github.com/zendframework/zend-eventmanager.git", | ||
2570 | "reference": "9d72db10ceb6e42fb92350c0cb54460da61bd79c" | ||
2571 | }, | ||
2572 | "dist": { | ||
2573 | "type": "zip", | ||
2574 | "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/9d72db10ceb6e42fb92350c0cb54460da61bd79c", | ||
2575 | "reference": "9d72db10ceb6e42fb92350c0cb54460da61bd79c", | ||
2576 | "shasum": "" | ||
2577 | }, | ||
2578 | "require": { | ||
2579 | "php": "^5.6 || ^7.0" | ||
2580 | }, | ||
2581 | "require-dev": { | ||
2582 | "athletic/athletic": "^0.1", | ||
2583 | "container-interop/container-interop": "^1.1.0", | ||
2584 | "phpunit/phpunit": "^6.0.7 || ^5.7.14", | ||
2585 | "zendframework/zend-coding-standard": "~1.0.0", | ||
2586 | "zendframework/zend-stdlib": "^2.7.3 || ^3.0" | ||
2587 | }, | ||
2588 | "suggest": { | ||
2589 | "container-interop/container-interop": "^1.1.0, to use the lazy listeners feature", | ||
2590 | "zendframework/zend-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature" | ||
2591 | }, | ||
2592 | "type": "library", | ||
2593 | "extra": { | ||
2594 | "branch-alias": { | ||
2595 | "dev-master": "3.2-dev", | ||
2596 | "dev-develop": "3.3-dev" | ||
2597 | } | ||
2598 | }, | ||
2599 | "autoload": { | ||
2600 | "psr-4": { | ||
2601 | "Zend\\EventManager\\": "src/" | ||
2602 | } | ||
2603 | }, | ||
2604 | "notification-url": "https://packagist.org/downloads/", | ||
2605 | "license": [ | ||
2606 | "BSD-3-Clause" | ||
2607 | ], | ||
2608 | "description": "Trigger and listen to events within a PHP application", | ||
2609 | "homepage": "https://github.com/zendframework/zend-eventmanager", | ||
2610 | "keywords": [ | ||
2611 | "event", | ||
2612 | "eventmanager", | ||
2613 | "events", | ||
2614 | "zf2" | ||
2615 | ], | ||
2616 | "time": "2017-07-11T19:17:22+00:00" | ||
2258 | 2617 | } | } |
2259 | 2618 | ], | ], |
2260 | 2619 | "packages-dev": [ | "packages-dev": [ |
File src/nasa/src/AppBundle/Controller/DefaultController.php changed (mode: 100644) (index 7d63241..3ac508e) | |||
... | ... | class DefaultController extends Controller | |
18 | 18 | */ | */ |
19 | 19 | public function indexAction(Request $request) | public function indexAction(Request $request) |
20 | 20 | { | { |
21 | return $this->json([ 'hello' => 'world!' ]); | ||
21 | return $this->json([ 'hello' => 'neo world!' ]); | ||
22 | 22 | } | } |
23 | 23 | } | } |
File src/nasa/src/NeoBundle/Command/ImportLastThreeDaysCommand.php added (mode: 100644) (index 0000000..fa0b18b) | |||
1 | <?php | ||
2 | |||
3 | namespace NeoBundle\Command; | ||
4 | |||
5 | use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | ||
6 | use Symfony\Component\Console\Input\InputInterface; | ||
7 | use Symfony\Component\Console\Output\OutputInterface; | ||
8 | use Symfony\Component\Console\Input\InputArgument; | ||
9 | |||
10 | use NeoBundle\Entity\Neo; | ||
11 | |||
12 | class ImportLastThreeDaysCommand extends ContainerAwareCommand | ||
13 | { | ||
14 | protected function configure() | ||
15 | { | ||
16 | $this | ||
17 | ->setName('neo:import:lastThreeDays') | ||
18 | ->setDescription('Imports last 3 days form nasa api') | ||
19 | ; | ||
20 | } | ||
21 | |||
22 | protected function execute(InputInterface $input, OutputInterface $output) | ||
23 | { | ||
24 | $output->writeln("<info>Import last 3 days from nasa api...</info>"); | ||
25 | |||
26 | |||
27 | $em = $this->getContainer()->get('doctrine')->getManager(); | ||
28 | |||
29 | $product = new Neo(); | ||
30 | $product->setName('Keyboard'); | ||
31 | $product->setReference(1); | ||
32 | $product->setApproachAt(new \DateTime()); | ||
33 | $product->setSpeed(doubleval(2.04)); | ||
34 | $product->setIsHazardous(true); | ||
35 | |||
36 | $em->persist($product); | ||
37 | |||
38 | $em->flush(); | ||
39 | |||
40 | } | ||
41 | } |
File src/nasa/src/NeoBundle/Controller/DefaultController.php added (mode: 100644) (index 0000000..b8024d2) | |||
1 | <?php | ||
2 | |||
3 | namespace NeoBundle\Controller; | ||
4 | |||
5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
7 | |||
8 | class DefaultController extends Controller | ||
9 | { | ||
10 | /** | ||
11 | * @Route("/neo") | ||
12 | */ | ||
13 | public function indexAction() | ||
14 | { | ||
15 | return $this->render('NeoBundle:Default:index.html.twig'); | ||
16 | } | ||
17 | } |
File src/nasa/src/NeoBundle/Entity/Neo.php added (mode: 100644) (index 0000000..011bb29) | |||
1 | <?php | ||
2 | |||
3 | namespace NeoBundle\Entity; | ||
4 | |||
5 | use Doctrine\ORM\Mapping as ORM; | ||
6 | |||
7 | /** | ||
8 | * @ORM\Entity | ||
9 | * @ORM\Table(name="neo") | ||
10 | * @ORM\Entity(repositoryClass="NeoBundle\Repository\NeoRepository") | ||
11 | */ | ||
12 | class Neo | ||
13 | { | ||
14 | /** | ||
15 | * @var id | ||
16 | * | ||
17 | * @ORM\Column(type="integer") | ||
18 | * @ORM\Id | ||
19 | * @ORM\GeneratedValue(strategy="AUTO") | ||
20 | */ | ||
21 | private $id; | ||
22 | |||
23 | /** | ||
24 | * @var \DateTime | ||
25 | * | ||
26 | * @ORM\Column(name="created_at", type="datetime") | ||
27 | */ | ||
28 | private $createdAt; | ||
29 | |||
30 | /** | ||
31 | * @var \DateTime | ||
32 | * | ||
33 | * @ORM\Column(name="approach_at", type="datetime") | ||
34 | */ | ||
35 | private $approachAt; | ||
36 | |||
37 | /** | ||
38 | * @var string | ||
39 | * | ||
40 | * @ORM\Column(type="string", length=100) | ||
41 | */ | ||
42 | private $name; | ||
43 | |||
44 | /** | ||
45 | * @var int | ||
46 | * | ||
47 | * @ORM\Column(type="integer") | ||
48 | */ | ||
49 | private $reference; | ||
50 | |||
51 | /** | ||
52 | * @var float | ||
53 | * | ||
54 | * @ORM\Column(type="float") | ||
55 | */ | ||
56 | private $speed; | ||
57 | |||
58 | /** | ||
59 | * @var boolean | ||
60 | * | ||
61 | * @ORM\Column(name="is_hazardous", type="boolean") | ||
62 | */ | ||
63 | private $isHazardous; | ||
64 | |||
65 | /** | ||
66 | * Get id | ||
67 | * | ||
68 | * @return integer | ||
69 | */ | ||
70 | public function getId() | ||
71 | { | ||
72 | return $this->id; | ||
73 | } | ||
74 | |||
75 | /** | ||
76 | * Set createdAt | ||
77 | * | ||
78 | * @param \DateTime $createdAt | ||
79 | * | ||
80 | * @return Neo | ||
81 | */ | ||
82 | public function setCreatedAt($createdAt) | ||
83 | { | ||
84 | $this->createdAt = $createdAt; | ||
85 | |||
86 | return $this; | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * Get createdAt | ||
91 | * | ||
92 | * @return \DateTime | ||
93 | */ | ||
94 | public function getCreatedAt() | ||
95 | { | ||
96 | return $this->createdAt; | ||
97 | } | ||
98 | |||
99 | /** | ||
100 | * Set approachAt | ||
101 | * | ||
102 | * @param \DateTime $approachAt | ||
103 | * | ||
104 | * @return Neo | ||
105 | */ | ||
106 | public function setApproachAt($approachAt) | ||
107 | { | ||
108 | $this->approachAt = $approachAt; | ||
109 | |||
110 | return $this; | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * Get approachAt | ||
115 | * | ||
116 | * @return \DateTime | ||
117 | */ | ||
118 | public function getApproachAt() | ||
119 | { | ||
120 | return $this->approachAt; | ||
121 | } | ||
122 | |||
123 | /** | ||
124 | * Set name | ||
125 | * | ||
126 | * @param string $name | ||
127 | * | ||
128 | * @return Neo | ||
129 | */ | ||
130 | public function setName($name) | ||
131 | { | ||
132 | $this->name = $name; | ||
133 | |||
134 | return $this; | ||
135 | } | ||
136 | |||
137 | /** | ||
138 | * Get name | ||
139 | * | ||
140 | * @return string | ||
141 | */ | ||
142 | public function getName() | ||
143 | { | ||
144 | return $this->name; | ||
145 | } | ||
146 | |||
147 | /** | ||
148 | * Set reference | ||
149 | * | ||
150 | * @param integer $reference | ||
151 | * | ||
152 | * @return Neo | ||
153 | */ | ||
154 | public function setReference($reference) | ||
155 | { | ||
156 | $this->reference = $reference; | ||
157 | |||
158 | return $this; | ||
159 | } | ||
160 | |||
161 | /** | ||
162 | * Get reference | ||
163 | * | ||
164 | * @return integer | ||
165 | */ | ||
166 | public function getReference() | ||
167 | { | ||
168 | return $this->reference; | ||
169 | } | ||
170 | |||
171 | /** | ||
172 | * Set speed | ||
173 | * | ||
174 | * @param float $speed | ||
175 | * | ||
176 | * @return Neo | ||
177 | */ | ||
178 | public function setSpeed(float $speed) | ||
179 | { | ||
180 | $this->speed = $speed; | ||
181 | |||
182 | return $this; | ||
183 | } | ||
184 | |||
185 | /** | ||
186 | * Get speed | ||
187 | * | ||
188 | * @return float | ||
189 | */ | ||
190 | public function getSpeed() | ||
191 | { | ||
192 | return $this->speed; | ||
193 | } | ||
194 | |||
195 | /** | ||
196 | * Set isHazardous | ||
197 | * | ||
198 | * @param boolean $isHazardous | ||
199 | * | ||
200 | * @return Neo | ||
201 | */ | ||
202 | public function setIsHazardous($isHazardous) | ||
203 | { | ||
204 | $this->isHazardous = $isHazardous; | ||
205 | |||
206 | return $this; | ||
207 | } | ||
208 | |||
209 | /** | ||
210 | * Get isHazardous | ||
211 | * | ||
212 | * @return boolean | ||
213 | */ | ||
214 | public function getIsHazardous() | ||
215 | { | ||
216 | return $this->isHazardous; | ||
217 | } | ||
218 | } |
File src/nasa/src/NeoBundle/NeoBundle.php copied from file src/nasa/src/AppBundle/AppBundle.php (similarity 53%) (mode: 100644) (index 05123b6..43d633a) | |||
1 | 1 | <?php | <?php |
2 | 2 | ||
3 | namespace AppBundle; | ||
3 | namespace NeoBundle; | ||
4 | 4 | ||
5 | 5 | use Symfony\Component\HttpKernel\Bundle\Bundle; | use Symfony\Component\HttpKernel\Bundle\Bundle; |
6 | 6 | ||
7 | class AppBundle extends Bundle | ||
7 | class NeoBundle extends Bundle | ||
8 | 8 | { | { |
9 | 9 | } | } |
File src/nasa/src/NeoBundle/Repository/NeoRepository.php added (mode: 100644) (index 0000000..0638ccd) | |||
1 | <?php | ||
2 | |||
3 | namespace NeoBundle\Repository; | ||
4 | |||
5 | use Doctrine\DBAL\Query\QueryBuilder; | ||
6 | use Doctrine\ORM\EntityRepository; | ||
7 | |||
8 | use NeoBundle\Entity\Neo; | ||
9 | |||
10 | /** | ||
11 | * Neo Repository | ||
12 | */ | ||
13 | class UserRepository extends EntityRepository | ||
14 | { | ||
15 | /** | ||
16 | * @return mixed | ||
17 | * | ||
18 | * @throws NoResultException | ||
19 | * @throws \Doctrine\ORM\NonUniqueResultException | ||
20 | */ | ||
21 | public function findAllHazardous() | ||
22 | { | ||
23 | $queryBuilder = $this->createQueryBuilder('n'); | ||
24 | |||
25 | $queryBuilder->where('u.isHazardous is true'); | ||
26 | |||
27 | return $queryBuilder->getQuery()->getResults(); | ||
28 | } | ||
29 | } |
File src/nasa/src/NeoBundle/Resources/config/services.yml added (mode: 100644) (index 0000000..b0796ad) | |||
1 | services: | ||
2 | # neo.example: | ||
3 | # class: NeoBundle\Example | ||
4 | # arguments: ["@service_id", "plain_value", "%parameter%"] |
File src/nasa/src/NeoBundle/Resources/views/Default/index.html.twig added (mode: 100644) (index 0000000..980a0d5) | |||
1 | Hello World! |
File src/nasa/tests/NeoBundle/Controller/DefaultControllerTest.php copied from file src/nasa/tests/AppBundle/Controller/DefaultControllerTest.php (similarity 54%) (mode: 100644) (index 594803c..f797539) | |||
1 | 1 | <?php | <?php |
2 | 2 | ||
3 | namespace Tests\AppBundle\Controller; | ||
3 | namespace NeoBundle\Tests\Controller; | ||
4 | 4 | ||
5 | 5 | use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; |
6 | 6 | ||
... | ... | class DefaultControllerTest extends WebTestCase | |
12 | 12 | ||
13 | 13 | $crawler = $client->request('GET', '/'); | $crawler = $client->request('GET', '/'); |
14 | 14 | ||
15 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); | ||
16 | $this->assertContains('Welcome to Symfony', $crawler->filter('#container h1')->text()); | ||
15 | $this->assertContains('Hello World', $client->getResponse()->getContent()); | ||
17 | 16 | } | } |
18 | 17 | } | } |
File src/nasa/web/config.php changed (mode: 100644) (index 5a82ba8..fd7e17e) | |||
... | ... | if (!isset($_SERVER['HTTP_HOST'])) { | |
14 | 14 | exit("This script cannot be run from the CLI. Run it from a browser.\n"); | exit("This script cannot be run from the CLI. Run it from a browser.\n"); |
15 | 15 | } | } |
16 | 16 | ||
17 | if (!in_array(@$_SERVER['REMOTE_ADDR'], array( | ||
18 | '127.0.0.1', | ||
19 | '::1', | ||
20 | ))) { | ||
21 | header('HTTP/1.0 403 Forbidden'); | ||
22 | exit('This script is only accessible from localhost.'); | ||
23 | } | ||
24 | |||
17 | 25 | require_once dirname(__FILE__).'/../var/SymfonyRequirements.php'; | require_once dirname(__FILE__).'/../var/SymfonyRequirements.php'; |
18 | 26 | ||
19 | 27 | $symfonyRequirements = new SymfonyRequirements(); | $symfonyRequirements = new SymfonyRequirements(); |