Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Commit c9b6ef3

Browse files
committed
Change the default directory structure
1 parent 5d2d6d8 commit c9b6ef3

File tree

9 files changed

+191
-91
lines changed

9 files changed

+191
-91
lines changed

app/AppKernel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function registerBundles()
1515
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
1616
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
1717
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
18-
new AppBundle\AppBundle(),
18+
new Dunglas\ActionBundle\DunglasActionBundle(),
1919
];
2020

2121
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {

app/config/config.yml

+11
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ doctrine:
6060
auto_generate_proxy_classes: "%kernel.debug%"
6161
naming_strategy: doctrine.orm.naming_strategy.underscore
6262
auto_mapping: true
63+
mappings:
64+
App:
65+
type: annotation
66+
is_bundle: false
67+
dir: '%kernel.root_dir%/../src/Entity'
68+
prefix: 'Entity'
69+
alias: App
6370

6471
# Swiftmailer Configuration
6572
swiftmailer:
@@ -68,3 +75,7 @@ swiftmailer:
6875
username: "%mailer_user%"
6976
password: "%mailer_password%"
7077
spool: { type: memory }
78+
79+
dunglas_action:
80+
directories: # List of directories relative to the kernel root directory containing classes to auto-register.
81+
- '../src/{Controller,Command,EventSubscriber}'

app/config/routing.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
app:
2-
resource: "@AppBundle/Controller/"
1+
action:
2+
resource: "../../src/Controller/"
33
type: annotation

app/config/services.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# http://symfony.com/doc/current/service_container.html
33
parameters:
44
# parameter_name: value
5+
baseDir: %kernel.root_dir%/..
56

67
services:
7-
# service_name:
8-
# class: AppBundle\Directory\ClassName
8+
# 'My\ClassName':
99
# arguments: ["@another_service_name", "plain_value", "%parameter_name%"]

composer.json

+9-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
"license": "MIT",
44
"type": "project",
55
"description": "The \"Symfony Standard Edition\" distribution",
6+
"repositories": [
7+
{
8+
"type": "vcs",
9+
"url": "https://github.com/dunglas/symfony"
10+
}
11+
],
612
"autoload": {
713
"psr-4": { "": "src/" },
814
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
@@ -12,7 +18,7 @@
1218
},
1319
"require": {
1420
"php": ">=5.5.9",
15-
"symfony/symfony": "3.3.x-dev",
21+
"symfony/symfony": "dev-autowiring as 3.3.0",
1622
"doctrine/orm": "^2.5",
1723
"doctrine/doctrine-bundle": "^1.6",
1824
"doctrine/doctrine-cache-bundle": "^1.2",
@@ -21,7 +27,8 @@
2127
"symfony/polyfill-apcu": "^1.0",
2228
"sensio/distribution-bundle": "^5.0",
2329
"sensio/framework-extra-bundle": "^3.0.2",
24-
"incenteev/composer-parameter-handler": "^2.0"
30+
"incenteev/composer-parameter-handler": "^2.0",
31+
"dunglas/action-bundle": "dev-setter_autowiring"
2532
},
2633
"require-dev": {
2734
"sensio/generator-bundle": "^3.0",

0 commit comments

Comments
 (0)