Skip to content

Commit

Permalink
refactoring entities and move to yaml orm definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
robfrawley committed May 30, 2017
1 parent c0f752a commit 81d1424
Show file tree
Hide file tree
Showing 32 changed files with 847 additions and 630 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@
!/composer.json
/.idea/
/.web-server-pid
/web/server.log
1 change: 1 addition & 0 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public function registerBundles()
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new JavierEguiluz\Bundle\EasyAdminBundle\EasyAdminBundle(),
new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
new WhiteOctober\SwiftMailerDBBundle\WhiteOctoberSwiftMailerDBBundle(),
Expand Down
10 changes: 9 additions & 1 deletion app/config/bundles_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,19 @@ monolog:
- "!event"

console:
type: console
type: console
process_psr_3_messages: false

channels:
- "!event"
- "!doctrine"
- '!console'

server_log:
type: server_log
process_psr_3_messages: false

host: 0:9911

#
# mailer configuration
Expand Down
66 changes: 48 additions & 18 deletions app/config/bundles_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,27 @@
# file distributed with this vinylSourceStream code.
#

#
# app configuration
#
app:
metadata:
title: Rob Frawley 2nd
description: The thoughts and projects of Rob Frawley 2nd
keywords:
- Rob Frawley 2nd
- robfrawley
- rmf
- articles
- php
- symfony
- code

entities:
article: ~
article_comment: ~


#
# monolog configuration
#
Expand All @@ -35,12 +56,12 @@ doctrine:
dbal:
driver: "%database_driver%"
server_version: "%database_version%"
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: "%database_charset%"
host: "%env(DB_HOST)%"
port: "%env(DB_PORT)%"
dbname: "%env(DB_NAME)%"
user: "%env(DB_USER)%"
password: "%env(DB_PASS)%"

orm:
metadata_cache_driver: apc
Expand All @@ -55,9 +76,21 @@ doctrine:
unix_time: Rf\AppBundle\Doctrine\Query\Functions\UnitTimeFunction

mappings:
AppBundle:
type: xml
prefix: Rf\AppBundle\Doctrine\Entity
AppBundle:
type: yml
prefix: Rf\AppBundle\Doctrine\Entity


#
# doctrine extensions
#

stof_doctrine_extensions:
default_locale: "%locale%"
orm:
default:
timestampable: true
sluggable: true


#
Expand All @@ -75,13 +108,13 @@ doctrine_migrations:
#

swiftmailer:
transport: "%mailer_transport%"
host: "%mailer_host%"
port: "%mailer_port%"
username: "%mailer_user%"
password: "%mailer_password%"
transport: "%mail_transport%"
host: "%env(MAIL_HOST)%"
port: "%env(MAIL_PORT)%"
username: "%env(MAIL_USER)%"
password: "%env(MAIL_PASS)%"
spool:
type: "%mailer_spool%"
type: "%mail_spool%"

#
# twig configuration
Expand Down Expand Up @@ -115,9 +148,6 @@ knp_paginator :
# easy admin bundle
#

easy_admin:
entities:
- Rf\AppBundle\Doctrine\Entity\Article
- Rf\AppBundle\Doctrine\Entity\Email
easy_admin: ~

...
4 changes: 3 additions & 1 deletion app/config/config_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ framework:
profiler:
only_exceptions: false

...
ide: phpstorm

...
3 changes: 2 additions & 1 deletion app/config/config_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ imports:

parameters:
locale: en
rf_app.env: "%env(APP_ENV)%"
rf_app.domain_name: "src.run"
rf_app.assets_components_path: "/components/"
rf_app.assets_bundles_path: "/bundles/app/"
Expand All @@ -36,7 +37,7 @@ parameters:
#

framework:
secret: "%secret%"
secret: "%env(APP_SECRET)%"
form: ~
csrf_protection: ~
default_locale: "%locale%"
Expand Down
31 changes: 16 additions & 15 deletions app/config/parameters.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,23 @@ parameters:

locale: en_US

database_driver: mysqli
database_version: 5.6
database_host: 127.0.0.1
database_port: ~
database_name: rf
database_user: root
database_password: ~
database_charset: utf8mb4
database_driver: mysqli
database_version: 5.6
database_charset: utf8mb4
env(DB_HOST): 127.0.0.1
env(DB_PORT): null
env(DB_NAME): symfony
env(DB_USER): root
env(DB_PASS): null

mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_port: 2525
mailer_user: ~
mailer_password: ~
mailer_spool: db
mail_transport: smtp
mail_spool: file
env(MAIL_HOST): 127.0.0.1
env(MAIL_PORT): 2525
env(MAIL_USER): null
env(MAIL_PASS): null

secret: ThisTokenIsNotSoSecretChangeIt
env(APP_SECRET): ThisTokenIsNotSoSecretChangeIt
env(APP_ENV): default

...
7 changes: 0 additions & 7 deletions app/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
# file distributed with this vinylSourceStream code.
#

#
# import resources
#

imports:
- { resource: ../../src/AppBundle/Resources/config/services.yaml }

#
# parameter configuration
#
Expand Down
63 changes: 32 additions & 31 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,45 @@
}
],
"require": {
"php": "~7.0",
"doctrine/doctrine-bundle": "~1.6",
"doctrine/doctrine-cache-bundle": "~1.2",
"php": ">=7.1.0",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"doctrine/doctrine-migrations-bundle": "^1.0",
"doctrine/orm": "~2.5",
"erusev/parsedown": "~1.6",
"doctrine/orm": "^2.5",
"erusev/parsedown": "^1.6",
"erusev/parsedown-extra": "^0.7.1",
"incenteev/composer-parameter-handler": "~2.0",
"incenteev/composer-parameter-handler": "^2.0",
"javiereguiluz/easyadmin-bundle": "^1.16",
"knplabs/knp-menu-bundle": "~2.1",
"knplabs/knp-paginator-bundle": "~2.5",
"liip/imagine-bundle": "~1.7",
"sensio/distribution-bundle": "~5.0",
"sensio/framework-extra-bundle": "~3.0",
"src-run/augustus-exception-library": "~0.8.1",
"src-run/augustus-utility-library": "~0.7.3",
"src-run/cocoa-markdown-library": "~0.2.0",
"src-run/vermicious-console-io-library": "~0.2.1",
"stof/doctrine-extensions-bundle": "~1.2",
"symfony/assetic-bundle": "~2.8",
"symfony/cache": "~3.3",
"symfony/monolog-bundle": "~3.0",
"symfony/polyfill-apcu": "~1.0",
"symfony/swiftmailer-bundle": "~2.3",
"knplabs/knp-menu-bundle": "^2.1",
"knplabs/knp-paginator-bundle": "^2.5",
"liip/imagine-bundle": "^2.0",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^3.0.2",
"src-run/augustus-exception-library": "^0.8.1",
"src-run/augustus-utility-library": "^0.7.3",
"src-run/cocoa-markdown-library": "^0.2.0",
"src-run/vermicious-console-io-library": "^0.2.1",
"stof/doctrine-extensions-bundle": "^1.2",
"symfony/assetic-bundle": "^2.8",
"symfony/cache": "^3.3",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.3.10",
"symfony/symfony": "3.3.*",
"symfony/web-server-bundle": "^3.3@beta",
"twig/twig": "^1.0||^2.0",
"whiteoctober/swiftmailerdbbundle": "~1.0"
"symfony/web-server-bundle": "^3.3",
"twig/twig": "^2.0",
"whiteoctober/swiftmailerdbbundle": "^1.0"
},
"require-dev": {
"codacy/coverage": "~1.0",
"codacy/coverage": "^1.0",
"doctrine/doctrine-fixtures-bundle": "^2.3",
"friendsofphp/php-cs-fixer": "~1.0",
"friendsofphp/php-cs-fixer": "^1.0",
"fzaninotto/faker": "^1.6",
"phpunit/phpunit": "~5.5",
"satooshi/php-coveralls": "~1.0",
"sensio/generator-bundle": "~3.0",
"sllh/php-cs-fixer-styleci-bridge": "~2.1",
"symfony/phpunit-bridge": "~3.0"
"phpunit/phpunit": "^5.5",
"satooshi/php-coveralls": "^1.0",
"sensio/generator-bundle": "^3.0",
"sllh/php-cs-fixer-styleci-bridge": "^2.1",
"symfony/phpunit-bridge": "^3.0"
},
"autoload": {
"psr-4": {
Expand All @@ -74,6 +74,7 @@
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"bin-dir": "bin",
"sort-packages": true
Expand Down
Loading

0 comments on commit 81d1424

Please sign in to comment.