Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

[do not merge] Change the default directory structure and use new features of 3.3 #1034

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 0 additions & 54 deletions 54 app/AppKernel.php

This file was deleted.

3 changes: 0 additions & 3 deletions 3 app/config/routing.yml

This file was deleted.

9 changes: 0 additions & 9 deletions 9 app/config/services.yml

This file was deleted.

3 changes: 2 additions & 1 deletion 3 bin/console
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env php
<?php

use App\AppKernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
Expand All @@ -13,7 +14,7 @@ use Symfony\Component\Debug\Debug;
set_time_limit(0);

/** @var Composer\Autoload\ClassLoader $loader */
$loader = require __DIR__.'/../app/autoload.php';
$loader = require __DIR__.'/../conf/autoload.php';

$input = new ArgvInput();
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
Expand Down
19 changes: 12 additions & 7 deletions 19 composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/dunglas/symfony"
}
],
"autoload": {
"psr-4": { "": "src/" },
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
"psr-4": { "App\\": "src/" }
},
"autoload-dev": {
"psr-4": { "Tests\\": "tests/" }
},
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.3.x-dev",
"php": ">=7.0.0",
"symfony/symfony": "dev-autowirable_controller as 3.3.0",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
Expand Down Expand Up @@ -46,18 +51,18 @@
},
"config": {
"platform": {
"php": "5.5.9"
"php": "7.0.0"
}
},
"extra": {
"symfony-app-dir": "app",
"symfony-app-dir": "conf",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
"file": "conf/parameters.yml"
},
"branch-alias": {
"dev-master": "3.3-dev"
Expand Down
47 changes: 31 additions & 16 deletions 47 composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
17 changes: 13 additions & 4 deletions 17 app/config/config.yml → conf/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: services.yml }
- { resource: 'parameters.yml' }
- { resource: 'security.yml' }
- { resource: 'services.yml' }

# Put parameters here that don't need to change on each machine where the app is deployed
# http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
Expand All @@ -13,7 +13,7 @@ framework:
#translator: { fallbacks: ["%locale%"] }
secret: "%secret%"
router:
resource: "%kernel.root_dir%/config/routing.yml"
resource: "%kernel.root_dir%/../conf/routing.yml"
strict_requirements: ~
form: ~
csrf_protection: ~
Expand All @@ -38,6 +38,8 @@ framework:
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
paths:
- '%kernel.root_dir%/../templates'

# Doctrine Configuration
doctrine:
Expand All @@ -60,6 +62,13 @@ doctrine:
auto_generate_proxy_classes: "%kernel.debug%"
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
mappings:
App:
type: annotation
is_bundle: false
dir: '%kernel.root_dir%/../src/Entity'
prefix: 'Entity'
alias: App

# Swiftmailer Configuration
swiftmailer:
Expand Down
4 changes: 2 additions & 2 deletions 4 app/config/config_dev.yml → conf/dev/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
imports:
- { resource: config.yml }
- { resource: '../config.yml' }

framework:
router:
resource: "%kernel.root_dir%/config/routing_dev.yml"
resource: "%kernel.root_dir%/../conf/dev/routing.yml"
strict_requirements: true
profiler: { only_exceptions: false }

Expand Down
2 changes: 1 addition & 1 deletion 2 app/config/routing_dev.yml → conf/dev/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ _errors:
prefix: /_error

_main:
resource: routing.yml
resource: '../routing.yml'
12 changes: 12 additions & 0 deletions 12 conf/parameters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file is auto-generated during the composer install
parameters:
database_host: 127.0.0.1
database_port: null
database_name: symfony
database_user: root
database_password: null
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
secret: ThisTokenIsNotSoSecretChangeIt
File renamed without changes.
2 changes: 1 addition & 1 deletion 2 app/config/config_prod.yml → conf/prod/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
imports:
- { resource: config.yml }
- { resource: '../config.yml' }

#doctrine:
# orm:
Expand Down
3 changes: 3 additions & 0 deletions 3 conf/routing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
action:
resource: "../src/Controller/"
type: annotation
File renamed without changes.
40 changes: 40 additions & 0 deletions 40 conf/services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Learn more about services, parameters and containers at
# http://symfony.com/doc/current/service_container.html
parameters:
# parameter_name: value

services:
# 'My\ClassName': ~

# Auto-register common directories
_defaults:
# Enable constructor and getter autowiring for all services defined in this file
autowire: ['__construct', 'get*']
public: false

_instanceof:
# Add some common tags to enable feature auto-registration
Symfony\Component\Console\Command\Command:
tags: ['console.command']
public: true # Mandatory

Twig_ExtensionInterface:
tags: ['twig.extension']

Symfony\Component\EventDispatcher\EventSubscriberInterface:
tags: ['kernel.event_subscriber']

Symfony\Component\Form\FormTypeInterface:
tags: ['form.type']
public: true # Mandatory
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be removed now that symfony/symfony#21690 is merged and thus form types can be private?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


Symfony\Component\Security\Core\Authorization\VoterInterface:
tags: ['security.voter']

# Register all classes in these directories as services
App\:
resource: '../src/{Command,EventSubscriber,Twig,Form,Voter}'

App\Controller\:
resource: '../src/Controller'
public: true # Mandatory
2 changes: 1 addition & 1 deletion 2 app/config/config_test.yml → conf/test/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
imports:
- { resource: config_dev.yml }
- { resource: '../dev/config.yml' }

framework:
test: ~
Expand Down
9 changes: 0 additions & 9 deletions 9 src/AppBundle/AppBundle.php

This file was deleted.

Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.