Skip to content

Commit 8a5b196

Browse files
author
Popotc
committed
Creation des bundles (creation initiale)
0 parents  commit 8a5b196

File tree

70 files changed

+4716
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+4716
-0
lines changed

.gitignore

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/app/config/parameters.yml
2+
/build/
3+
/phpunit.xml
4+
/var/*
5+
!/var/cache
6+
/var/cache/*
7+
!var/cache/.gitkeep
8+
!/var/logs
9+
/var/logs/*
10+
!var/logs/.gitkeep
11+
!/var/sessions
12+
/var/sessions/*
13+
!var/sessions/.gitkeep
14+
!var/SymfonyRequirements.php
15+
/vendor/
16+
/web/bundles/

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Symfony
2+
=======
3+
4+
A Symfony project created on April 8, 2017, 4:23 pm.

app/.htaccess

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<IfModule mod_authz_core.c>
2+
Require all denied
3+
</IfModule>
4+
<IfModule !mod_authz_core.c>
5+
Order deny,allow
6+
Deny from all
7+
</IfModule>

app/AppCache.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
4+
5+
class AppCache extends HttpCache
6+
{
7+
}

app/AppKernel.php

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?php
2+
3+
use Symfony\Component\HttpKernel\Kernel;
4+
use Symfony\Component\Config\Loader\LoaderInterface;
5+
6+
class AppKernel extends Kernel
7+
{
8+
9+
public function __construct($environment, $debug) {
10+
parent::__construct($environment, $debug);
11+
// get rid of Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone
12+
date_default_timezone_set( 'Europe/Paris' );
13+
}
14+
15+
public function registerBundles()
16+
{
17+
$bundles = [
18+
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
19+
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
20+
new Symfony\Bundle\TwigBundle\TwigBundle(),
21+
new Symfony\Bundle\MonologBundle\MonologBundle(),
22+
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
23+
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
24+
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
25+
new AssoSport\AccueilBundle\AssoSportAccueilBundle(),
26+
new AssoSport\AdherentBundle\AssoSportAdherentBundle(),
27+
new AssoSport\AdminBundle\AssoSportAdminBundle(),
28+
new AssoSport\ProjetBundle\AssoSportProjetBundle(),
29+
];
30+
31+
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
32+
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
33+
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
34+
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
35+
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
36+
}
37+
38+
return $bundles;
39+
}
40+
41+
public function getRootDir()
42+
{
43+
return __DIR__;
44+
}
45+
46+
public function getCacheDir()
47+
{
48+
return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
49+
}
50+
51+
public function getLogDir()
52+
{
53+
return dirname(__DIR__).'/var/logs';
54+
}
55+
56+
public function registerContainerConfiguration(LoaderInterface $loader)
57+
{
58+
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
59+
}
60+
61+
public function init() {
62+
date_default_timezone_set( 'Europe/Paris' );
63+
parent::init();
64+
}
65+
}

app/Resources/views/base.html.twig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>{% block title %}Welcome!{% endblock %}</title>
6+
{% block stylesheets %}{% endblock %}
7+
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
8+
</head>
9+
<body>
10+
{% block body %}{% endblock %}
11+
{% block javascripts %}{% endblock %}
12+
</body>
13+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{% extends 'base.html.twig' %}
2+
3+
{% block body %}
4+
<div id="wrapper">
5+
<div id="container">
6+
<div id="welcome">
7+
<h1><span>Welcome to</span> Symfony {{ constant('Symfony\\Component\\HttpKernel\\Kernel::VERSION') }}</h1>
8+
</div>
9+
10+
<div id="status">
11+
<p>
12+
<svg id="icon-status" width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1671 566q0 40-28 68l-724 724-136 136q-28 28-68 28t-68-28l-136-136-362-362q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 295 656-657q28-28 68-28t68 28l136 136q28 28 28 68z" fill="#759E1A"/></svg>
13+
14+
Your application is now ready. You can start working on it at:
15+
<code>{{ base_dir }}</code>
16+
</p>
17+
</div>
18+
19+
<div id="next">
20+
<h2>What's next?</h2>
21+
<p>
22+
<svg id="icon-book" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="-12.5 9 64 64" enable-background="new -12.5 9 64 64" xml:space="preserve">
23+
<path fill="#AAA" d="M6.8,40.8c2.4,0.8,4.5-0.7,4.9-2.5c0.2-1.2-0.3-2.1-1.3-3.2l-0.8-0.8c-0.4-0.5-0.6-1.3-0.2-1.9
24+
c0.4-0.5,0.9-0.8,1.8-0.5c1.3,0.4,1.9,1.3,2.9,2.2c-0.4,1.4-0.7,2.9-0.9,4.2l-0.2,1c-0.7,4-1.3,6.2-2.7,7.5
25+
c-0.3,0.3-0.7,0.5-1.3,0.6c-0.3,0-0.4-0.3-0.4-0.3c0-0.3,0.2-0.3,0.3-0.4c0.2-0.1,0.5-0.3,0.4-0.8c0-0.7-0.6-1.3-1.3-1.3
26+
c-0.6,0-1.4,0.6-1.4,1.7s1,1.9,2.4,1.8c0.8,0,2.5-0.3,4.2-2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,2.9,1.4,2.9,3.1V65.1L42.1,65.1z"/>
36+
</svg>
37+
38+
Read the documentation to learn
39+
<a href="http://symfony.com/doc/{{ constant('Symfony\\Component\\HttpKernel\\Kernel::VERSION')[:3] }}/page_creation.html">
40+
How to create your first page in Symfony
41+
</a>
42+
</p>
43+
</div>
44+
45+
</div>
46+
</div>
47+
{% endblock %}
48+
49+
{% block stylesheets %}
50+
<style>
51+
body { background: #F5F5F5; font: 18px/1.5 sans-serif; }
52+
h1, h2 { line-height: 1.2; margin: 0 0 .5em; }
53+
h1 { font-size: 36px; }
54+
h2 { font-size: 21px; margin-bottom: 1em; }
55+
p { margin: 0 0 1em 0; }
56+
a { color: #0000F0; }
57+
a:hover { text-decoration: none; }
58+
code { background: #F5F5F5; max-width: 100px; padding: 2px 6px; word-wrap: break-word; }
59+
#wrapper { background: #FFF; margin: 1em auto; max-width: 800px; width: 95%; }
60+
#container { padding: 2em; }
61+
#welcome, #status { margin-bottom: 2em; }
62+
#welcome h1 span { display: block; font-size: 75%; }
63+
#icon-status, #icon-book { float: left; height: 64px; margin-right: 1em; margin-top: -4px; width: 64px; }
64+
#icon-book { display: none; }
65+
66+
@media (min-width: 768px) {
67+
#wrapper { width: 80%; margin: 2em auto; }
68+
#icon-book { display: inline-block; }
69+
#status a, #next a { display: block; }
70+
71+
@-webkit-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }
72+
@keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }
73+
.sf-toolbar { opacity: 0; -webkit-animation: fade-in 1s .2s forwards; animation: fade-in 1s .2s forwards;}
74+
}
75+
</style>
76+
{% endblock %}

app/autoload.php

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
use Doctrine\Common\Annotations\AnnotationRegistry;
4+
use Composer\Autoload\ClassLoader;
5+
6+
/** @var ClassLoader $loader */
7+
$loader = require __DIR__.'/../vendor/autoload.php';
8+
9+
AnnotationRegistry::registerLoader([$loader, 'loadClass']);
10+
11+
return $loader;

app/config/config.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
imports:
2+
- { resource: parameters.yml }
3+
- { resource: security.yml }
4+
- { resource: services.yml }
5+
6+
# Put parameters here that don't need to change on each machine where the app is deployed
7+
# http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
8+
parameters:
9+
locale: en
10+
11+
framework:
12+
#esi: ~
13+
#translator: { fallbacks: ['%locale%'] }
14+
secret: '%secret%'
15+
router:
16+
resource: '%kernel.root_dir%/config/routing.yml'
17+
strict_requirements: ~
18+
form: ~
19+
csrf_protection: ~
20+
validation: { enable_annotations: true }
21+
#serializer: { enable_annotations: true }
22+
templating:
23+
engines: ['twig']
24+
default_locale: '%locale%'
25+
trusted_hosts: ~
26+
trusted_proxies: ~
27+
session:
28+
# http://symfony.com/doc/current/reference/configuration/framework.html#handler-id
29+
handler_id: session.handler.native_file
30+
save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%"
31+
fragments: ~
32+
http_method_override: true
33+
assets: ~
34+
php_errors:
35+
log: true
36+
37+
# Twig Configuration
38+
twig:
39+
debug: '%kernel.debug%'
40+
strict_variables: '%kernel.debug%'
41+
42+
# Doctrine Configuration
43+
doctrine:
44+
dbal:
45+
driver: pdo_mysql
46+
host: '%database_host%'
47+
port: '%database_port%'
48+
dbname: '%database_name%'
49+
user: '%database_user%'
50+
password: '%database_password%'
51+
unix_socket: /Applications/MAMP/tmp/mysql/mysql.sock
52+
charset: UTF8
53+
# if using pdo_sqlite as your database driver:
54+
# 1. add the path in parameters.yml
55+
# e.g. database_path: "%kernel.root_dir%/../var/data/data.sqlite"
56+
# 2. Uncomment database_path in parameters.yml.dist
57+
# 3. Uncomment next line:
58+
#path: '%database_path%'
59+
60+
orm:
61+
auto_generate_proxy_classes: '%kernel.debug%'
62+
naming_strategy: doctrine.orm.naming_strategy.underscore
63+
auto_mapping: true
64+
65+
# Swiftmailer Configuration
66+
swiftmailer:
67+
transport: '%mailer_transport%'
68+
host: '%mailer_host%'
69+
username: '%mailer_user%'
70+
password: '%mailer_password%'
71+
spool: { type: memory }

app/config/config_dev.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
imports:
2+
- { resource: config.yml }
3+
4+
framework:
5+
router:
6+
resource: '%kernel.root_dir%/config/routing_dev.yml'
7+
strict_requirements: true
8+
profiler: { only_exceptions: false }
9+
10+
web_profiler:
11+
toolbar: true
12+
intercept_redirects: false
13+
14+
monolog:
15+
handlers:
16+
main:
17+
type: stream
18+
path: '%kernel.logs_dir%/%kernel.environment%.log'
19+
level: debug
20+
channels: ['!event']
21+
console:
22+
type: console
23+
channels: ['!event', '!doctrine']
24+
# uncomment to get logging in your browser
25+
# you may have to allow bigger header sizes in your Web server configuration
26+
#firephp:
27+
# type: firephp
28+
# level: info
29+
#chromephp:
30+
# type: chromephp
31+
# level: info
32+
33+
#swiftmailer:
34+
# delivery_addresses: ['[email protected]']

app/config/config_prod.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
imports:
2+
- { resource: config.yml }
3+
4+
#doctrine:
5+
# orm:
6+
# metadata_cache_driver: apc
7+
# result_cache_driver: apc
8+
# query_cache_driver: apc
9+
10+
monolog:
11+
handlers:
12+
main:
13+
type: fingers_crossed
14+
action_level: error
15+
handler: nested
16+
nested:
17+
type: stream
18+
path: '%kernel.logs_dir%/%kernel.environment%.log'
19+
level: debug
20+
console:
21+
type: console

app/config/config_test.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
imports:
2+
- { resource: config_dev.yml }
3+
4+
framework:
5+
test: ~
6+
session:
7+
storage_id: session.storage.mock_file
8+
profiler:
9+
collect: false
10+
11+
web_profiler:
12+
toolbar: false
13+
intercept_redirects: false
14+
15+
swiftmailer:
16+
disable_delivery: true

app/config/parameters.yml.dist

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# This file is a "template" of what your parameters.yml file should look like
2+
# Set parameters here that may be different on each deployment target of the app, e.g. development, staging, production.
3+
# http://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
4+
parameters:
5+
database_host: 127.0.0.1
6+
database_port: ~
7+
database_name: symfony
8+
database_user: root
9+
database_password: ~
10+
# You should uncomment this if you want to use pdo_sqlite
11+
#database_path: '%kernel.root_dir%/../var/data/data.sqlite'
12+
13+
mailer_transport: smtp
14+
mailer_host: 127.0.0.1
15+
mailer_user: ~
16+
mailer_password: ~
17+
18+
# A secret key that's used to generate certain security-related tokens
19+
secret: ThisTokenIsNotSoSecretChangeIt

app/config/routing.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
asso_sport_projet:
2+
resource: "@AssoSportProjetBundle/Resources/config/routing.yml"
3+
prefix: /
4+
5+
asso_sport_admin:
6+
resource: "@AssoSportAdminBundle/Resources/config/routing.yml"
7+
prefix: /
8+
9+
asso_sport_adherent:
10+
resource: "@AssoSportAdherentBundle/Resources/config/routing.yml"
11+
prefix: /
12+
13+
asso_sport_accueil:
14+
resource: "@AssoSportAccueilBundle/Resources/config/routing.yml"
15+
prefix: /
16+
17+

0 commit comments

Comments
 (0)