Skip to content

Commit 11ba133

Browse files
committed
Initial import
0 parents  commit 11ba133

File tree

117 files changed

+6146
-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.

117 files changed

+6146
-0
lines changed

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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/
17+
/.idea
18+
/.vagrant

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.checkout
2+
=========
3+
4+
A Symfony project created on January 7, 2016, 4:32 pm.

Vagrantfile

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
# Check to determine whether we're on a windows or linux/os-x host,
5+
# later on we use this to launch ansible in the supported way
6+
# source: https://stackoverflow.com/questions/2108727/which-in-ruby-checking-if-program-exists-in-path-from-ruby
7+
def which(cmd)
8+
exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
9+
ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
10+
exts.each { |ext|
11+
exe = File.join(path, "#{cmd}#{ext}")
12+
return exe if File.executable? exe
13+
}
14+
end
15+
return nil
16+
end
17+
18+
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
19+
VAGRANTFILE_API_VERSION = "2"
20+
21+
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
22+
23+
config_values = {
24+
cpus: 2,
25+
memory: 1024,
26+
ip: "33.34.33.11",
27+
nfs: true
28+
}
29+
30+
# Overwrites config_values
31+
if File.exists? 'Vagrantfile.local'
32+
eval File.read 'Vagrantfile.local'
33+
end
34+
35+
# Default vagrant box (get one from remote location)
36+
config.vm.box = "puphpet/debian75-x64"
37+
38+
config.vm.hostname = "dev.grouphub.org"
39+
config.vm.network "private_network", ip: config_values[:ip]
40+
41+
config.vm.synced_folder "./", "/var/www", id: "vagrant-root", :nfs => config_values[:nfs]
42+
43+
# @see http://www.virtualbox.org/manual/ch08.html#idp58775840
44+
config.vm.provider "virtualbox" do |v|
45+
v.customize [
46+
"modifyvm", :id,
47+
"--paravirtprovider", "kvm",
48+
"--cpus", config_values[:cpus],
49+
"--memory", config_values[:memory],
50+
"--name", "grouphub",
51+
"--natdnshostresolver1", "on",
52+
]
53+
end
54+
55+
if which('ansible-playbook')
56+
config.vm.provision :ansible do |ansible|
57+
ansible.limit = 'all'
58+
ansible.inventory_path = "provision/vagrant"
59+
ansible.playbook = "provision/provision.yml"
60+
ansible.sudo = true
61+
end
62+
else
63+
config.vm.provision :shell, path: "provision/windows.sh"
64+
end
65+
66+
end

app/.htaccess

Lines changed: 7 additions & 0 deletions
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

Lines changed: 7 additions & 0 deletions
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

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?php
2+
3+
use Symfony\Component\HttpKernel\Kernel;
4+
use Symfony\Component\Config\Loader\LoaderInterface;
5+
6+
class AppKernel extends Kernel
7+
{
8+
public function registerBundles()
9+
{
10+
$bundles = [
11+
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
12+
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
13+
new Symfony\Bundle\TwigBundle\TwigBundle(),
14+
new Symfony\Bundle\MonologBundle\MonologBundle(),
15+
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
16+
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
17+
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
18+
new AppBundle\AppBundle(),
19+
];
20+
21+
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
22+
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
23+
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
24+
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
25+
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
26+
}
27+
28+
return $bundles;
29+
}
30+
31+
public function getRootDir()
32+
{
33+
return __DIR__;
34+
}
35+
36+
public function getCacheDir()
37+
{
38+
return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
39+
}
40+
41+
public function getLogDir()
42+
{
43+
return dirname(__DIR__) . '/var/logs';
44+
}
45+
46+
public function registerContainerConfiguration(LoaderInterface $loader)
47+
{
48+
$loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
49+
}
50+
}

app/Resources/views/base.html.twig

Lines changed: 13 additions & 0 deletions
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>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{% extends 'base.html.twig' %}
2+
3+
{% block body %}
4+
{% endblock %}

app/autoload.php

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

app/config/config.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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+
#assets_version: SomeVersionScheme
25+
default_locale: "%locale%"
26+
trusted_hosts: ~
27+
trusted_proxies: ~
28+
session:
29+
# handler_id set to null will use default session handler from php.ini
30+
handler_id: ~
31+
save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%"
32+
fragments: ~
33+
http_method_override: true
34+
assets: ~
35+
36+
# Twig Configuration
37+
twig:
38+
debug: "%kernel.debug%"
39+
strict_variables: "%kernel.debug%"
40+
41+
# Doctrine Configuration
42+
doctrine:
43+
dbal:
44+
driver: pdo_mysql
45+
host: "%database_host%"
46+
port: "%database_port%"
47+
dbname: "%database_name%"
48+
user: "%database_user%"
49+
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.root_dir%/data/data.db3"
54+
# 2. Uncomment database_path in parameters.yml.dist
55+
# 3. Uncomment next line:
56+
# path: "%database_path%"
57+
58+
orm:
59+
auto_generate_proxy_classes: "%kernel.debug%"
60+
naming_strategy: doctrine.orm.naming_strategy.underscore
61+
auto_mapping: true
62+
63+
# Swiftmailer Configuration
64+
swiftmailer:
65+
transport: "%mailer_transport%"
66+
host: "%mailer_host%"
67+
username: "%mailer_user%"
68+
password: "%mailer_password%"
69+
spool: { type: memory }

0 commit comments

Comments
 (0)