Initial commit with Symfony 2.1+Vendors

Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
Polonkai Gergely
2012-07-01 09:52:20 +02:00
commit 082a0130c2
5381 changed files with 416709 additions and 0 deletions

View File

@@ -0,0 +1,102 @@
#!/bin/sh
# This file is part of the Symfony Standard Edition.
#
# (c) Fabien Potencier <fabien@symfony.com>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
DIR=`php -r "echo realpath(dirname(\\$_SERVER['argv'][0]));"`
cd $DIR
VERSION=`grep ' VERSION ' vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php | sed -E "s/.*'(.+)'.*/\1/g"`
if [ ! -d "$DIR/build" ]; then
mkdir -p $DIR/build
fi
# Without vendors
rm -rf /tmp/Symfony
mkdir /tmp/Symfony
cp -r app /tmp/Symfony/
cp -r src /tmp/Symfony/
cp -r web /tmp/Symfony/
cp README.md /tmp/Symfony/
cp LICENSE /tmp/Symfony/
cp composer.json /tmp/Symfony/
cp composer.lock /tmp/Symfony/
cd /tmp/Symfony
sudo rm -rf app/cache/* app/logs/* .git*
chmod 777 app/cache app/logs
# DS_Store cleanup
find . -name .DS_Store | xargs rm -rf -
cd ..
# avoid the creation of ._* files
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
export COPYFILE_DISABLE=true
tar zcpf $DIR/build/Symfony_Standard_$VERSION.tgz Symfony
sudo rm -f $DIR/build/Symfony_Standard_$VERSION.zip
zip -rq $DIR/build/Symfony_Standard_$VERSION.zip Symfony
# With vendors
cd $DIR
rm -rf /tmp/vendor
mkdir /tmp/vendor
TARGET=/tmp/vendor
if [ ! -d "$DIR/vendor" ]; then
echo "The master vendor directory does not exist"
exit
fi
cp -r $DIR/vendor/* $TARGET/
# Doctrine ORM
cd $TARGET/doctrine/orm && rm -rf UPGRADE* build* bin tests tools lib/vendor
# Doctrine DBAL
cd $TARGET/doctrine/dbal && rm -rf bin build* tests lib/vendor
# Doctrine Common
cd $TARGET/doctrine/common && rm -rf build* tests lib/vendor
# Swiftmailer
cd $TARGET/swiftmailer/swiftmailer && rm -rf CHANGES README* build* docs notes test-suite tests create_pear_package.php package*
# Symfony
cd $TARGET/symfony/symfony && rm -rf README.md phpunit.xml* tests *.sh vendor
# Twig
cd $TARGET/twig/twig && rm -rf AUTHORS CHANGELOG README.markdown bin doc package.xml.tpl phpunit.xml* test
# Twig Extensions
cd $TARGET/twig/extensions && rm -rf README doc phpunit.xml* test
# Monolog
cd $TARGET/monolog/monolog && rm -rf README.markdown phpunit.xml* tests
# Sensio
cd $TARGET/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/ && rm -rf phpunit.xml* Tests CHANGELOG*
cd $TARGET/sensio/framework-extra-bundle/Sensio/Bundle/FrameworkExtraBundle/ && rm -rf phpunit.xml* Tests CHANGELOG*
cd $TARGET/sensio/generator-bundle/Sensio/Bundle/GeneratorBundle/ && rm -rf phpunit.xml* Tests CHANGELOG*
# JMS
cd $TARGET/jms/metadata && rm -rf README.rst phpunit.xml* tests
cd $TARGET/jms/cg && rm -rf README.rst phpunit.xml* tests
cd $TARGET/jms/aop-bundle/JMS/AopBundle && rm -rf phpunit.xml* Tests
cd $TARGET/jms/di-extra-bundle/JMS/DiExtraBundle && rm -rf phpunit.xml* Tests
cd $TARGET/jms/security-extra-bundle/JMS/SecurityExtraBundle/ && rm -rf phpunit.xml* Tests
# cleanup
find $TARGET -name .git | xargs rm -rf -
find $TARGET -name .gitignore | xargs rm -rf -
find $TARGET -name .gitmodules | xargs rm -rf -
find $TARGET -name .svn | xargs rm -rf -
cd /tmp/
mv /tmp/vendor /tmp/Symfony/
tar zcpf $DIR/build/Symfony_Standard_Vendors_$VERSION.tgz Symfony
sudo rm -f $DIR/build/Symfony_Standard_Vendors_$VERSION.zip
zip -rq $DIR/build/Symfony_Standard_Vendors_$VERSION.zip Symfony

View File

@@ -0,0 +1,26 @@
#!/usr/bin/env php
<?php
/*
* This file is part of the Symfony Standard Edition.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$argv = $_SERVER['argv'];
// allow the base path to be passed as the first argument, or default
if (isset($argv[1])) {
$appDir = $argv[1];
} else {
if (!$appDir = realpath(__DIR__.'/../../../../../../../app')) {
exit('Looks like you don\'t have a standard layout.');
}
}
require_once $appDir.'/autoload.php';
\Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::doBuildBootstrap($appDir);

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
<route id="_configurator_home" pattern="/">
<default key="_controller">SensioDistributionBundle:Configurator:check</default>
</route>
<route id="_configurator_step" pattern="/step/{index}">
<default key="_controller">SensioDistributionBundle:Configurator:step</default>
</route>
<route id="_configurator_final" pattern="/final">
<default key="_controller">SensioDistributionBundle:Configurator:final</default>
</route>
</routes>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<parameters>
<parameter key="sensio.distribution.webconfigurator.class">Sensio\Bundle\DistributionBundle\Configurator\Configurator</parameter>
</parameters>
<services>
<service id="sensio.distribution.webconfigurator" class="%sensio.distribution.webconfigurator.class%">
<argument>%kernel.root_dir%</argument>
</service>
</services>
</container>

View File

@@ -0,0 +1,153 @@
@import url("install.css");
h1 {
margin-top: 10px;
font-size: 26px;
}
#symfony-wrapper {
padding-top: 0;
}
#symfony-search {
position: absolute;
top: 50px;
right: 30px;
}
#symfony-search-field {
width: 190px;
}
#symfony-search label {
display: block;
float: left;
width: 20px;
height: 25px;
background: url(../images/search.png) no-repeat left 5px;
}
#symfony-search label span {
display: none;
}
input[type=text] {
border: 1px solid #DADADA;
background: white url(../images/field-background.gif) repeat-x left top;
padding: 5px 6px;
color: #565656;
font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
.symfony-button-grey, .symfony-button-green {
font-size: 0.85em;
font-weight: bold;
cursor: pointer;
display: inline-block;
outline: none;
text-align: center;
text-transform: uppercase;
padding: 3px 10px;
text-shadow: 0 1px 1px rgba(0,0,0,.3);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.symfony-button-grey {
color: #868686;
font-weight: normal;
padding: 5px 10px;
border: solid 1px #d7d7d7;
background: #ffffff;
background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#d7d7d7));
background: -moz-linear-gradient(top, #ffffff, #d7d7d7);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#d7d7d7');
}
.symfony-button-green {
padding: 5px 12px;
color: white;
border: solid 1px #a7da39;
background: #a7da39;
background: -webkit-gradient(linear, left top, left bottom, from(#a7da39), to(#6a9211));
background: -moz-linear-gradient(top, #a7da39, #6a9211);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#a7da39', endColorstr='#6a9211');
}
.symfony-block-steps span {
display: inline-block;
padding: 2px 3px;
font-size: 11px;
line-height: 15px;
color: #868686;
font-weight: bold;
text-transform: uppercase;
}
.symfony-block-steps span.selected {
background-color: #aacd4e;
color: #FFFFFF;
}
.symfony-form-row {
padding-bottom: 40px;
}
.symfony-form-column {
width: 430px;
float: left;
}
.symfony-form-footer {
padding-top: 20px;
clear: both;
}
.symfony-form-field {
height: 20px;
}
.symfony-form-row label {
display: block;
padding-bottom: 8px;
}
.symfony-form-field input[type=text],
.symfony-form-field input[type=password],
.symfony-form-field textarea,
.symfony-form-field select {
font-size: 13px;
color: #565656;
width: 200px;
}
.symfony-form-field input[type=text],
.symfony-form-field input[type=password],
.symfony-form-field textarea {
border: 1px solid #dadada;
background: #FFFFFF url(../images/background-textfield.gif) repeat-x left top;
width: 194px;
padding: 5px 6px;
}
.symfony-form-errors ul {
padding: 0;
}
.symfony-form-errors li {
background: url(../images/notification.gif) no-repeat left 6px;
font-size: 11px;
line-height: 16px;
color: #759e1a;
padding: 10px 25px;
}
.symfony-configuration {
margin: 10px 0;
width: 100%;
height: 240px;
}

View File

@@ -0,0 +1,137 @@
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.2r1
Reset
*/
html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;}
html, body {
background-color: #EFEFEF;
}
body {
font-size: 14px;
font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
color: #313131;
}
a {
color: #08C;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
strong {
font-weight: bold;
}
em {
font-style: italic;
}
h1, h2, h3 {
font-family: Georgia, "Times New Roman", Times, serif;
color: #404040;
}
h1 {
font-size: 45px;
padding-bottom: 30px;
}
h2 {
font-weight: bold;
color: #FFFFFF;
/* Font is reset to sans-serif (like body) */
font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
margin-bottom: 10px;
background-color: #aacd4e;
padding: 2px 4px;
display: inline-block;
text-transform: uppercase;
}
p {
line-height: 20px;
padding-bottom: 20px;
}
ul a {
background: url(../images/blue-arrow.png) no-repeat right 6px;
padding-right: 10px;
}
ul, ol {
padding-left: 20px;
}
li {
padding-bottom: 18px;
}
ol li {
list-style-type: decimal;
}
ul li {
list-style-type: none;
}
#symfony-header {
position: relative;
padding: 30px 30px 20px 30px;
}
#symfony-wrapper {
width: 970px;
margin: 0 auto;
padding-top: 50px;
}
#symfony-content {
background-color: white;
border: 1px solid #DFDFDF;
padding: 50px;
-moz-border-radius: 16px;
-webkit-border-radius: 16px;
border-radius: 16px;
margin-bottom: 5px;
}
.symfony-blocks-install {
overflow: hidden;
}
.symfony-blocks-install .symfony-block-logo {
float: left;
width: 358px;
}
.symfony-blocks-install .symfony-block-content {
float: left;
width: 510px;
}
.symfony-install-continue {
font-size: 0.95em;
padding-left: 0;
}
.symfony-install-continue li {
padding-bottom: 10px;
}
.version {
text-align: right;
font-size: 10px;
margin-right: 20px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

View File

@@ -0,0 +1,31 @@
{% extends "SensioDistributionBundle::Configurator/layout.html.twig" %}
{% block title %}Symfony - Configure database{% endblock %}
{% block content %}
{% form_theme form "SensioDistributionBundle::Configurator/form.html.twig" %}
{% include "SensioDistributionBundle::Configurator/steps.html.twig" with { "index": index, "count": count } %}
<h1>Configure your Database</h1>
<p>If your website needs a database connection, please configure it here.</p>
{{ form_errors(form) }}
<form action="{{ path('_configurator_step', { 'index': index }) }}" method="POST">
<div class="symfony-form-column">
{{ form_row(form.driver) }}
{{ form_row(form.host) }}
{{ form_row(form.name) }}
</div>
<div class="symfony-form-column">
{{ form_row(form.user) }}
{{ form_row(form.password) }}
</div>
{{ form_rest(form) }}
<div class="symfony-form-footer">
<p><input type="submit" value="Next Step" class="symfony-button-grey" /></p>
<p>* mandatory fields</p>
</div>
</form>
{% endblock %}

View File

@@ -0,0 +1,44 @@
{% extends "SensioDistributionBundle::Configurator/layout.html.twig" %}
{% block title %}Symfony - Configure global Secret{% endblock %}
{% block content %}
{% form_theme form "SensioDistributionBundle::Configurator/form.html.twig" %}
{% include "SensioDistributionBundle::Configurator/steps.html.twig" with { "index": index, "count": count } %}
<h1>Global Secret</h1>
<p>Configure the global secret for your website (the secret is used for the CSRF protection among other things):</p>
{{ form_errors(form) }}
<form action="{{ path('_configurator_step', { 'index': index }) }} " method="POST">
<div class="symfony-form-row">
{{ form_label(form.secret) }}
<div class="symfony-form-field">
{{ form_widget(form.secret) }}
<a class="symfony-button-grey" href="#" onclick="generateSecret(); return false;">Generate</a>
<div class="symfony-form-errors">
{{ form_errors(form.secret) }}
</div>
</div>
</div>
{{ form_rest(form) }}
<div class="symfony-form-footer">
<p><input type="submit" value="Next Step" class="symfony-button-grey" /></p>
<p>* mandatory fields</p>
</div>
</form>
<script type="text/javascript">
function generateSecret()
{
var result = '';
for (i=0; i < 32; i++) {
result += Math.round(Math.random()*16).toString(16);
}
document.getElementById('distributionbundle_secret_step_secret').value = result;
}
</script>
{% endblock %}

View File

@@ -0,0 +1,43 @@
{% extends "SensioDistributionBundle::Configurator/layout.html.twig" %}
{% block content %}
{% if majors|length %}
<h1>Major Problems that need to be fixed now</h1>
<p>
We have detected <strong>{{ majors|length }}</strong> major problems.
You <em>must</em> fix them before continuing:
</p>
<ol>
{% for message in majors %}
<li>{{ message }}</li>
{% endfor %}
</ol>
{% endif %}
{% if minors|length %}
<h1>Some Recommandations</h1>
<p>
{% if majors|length %}
Additionally, we
{% else %}
We
{% endif %}
have detected some minor problems that we <em>recommend</em> you to fix to have a better Symfony
experience:
<ol>
{% for message in minors %}
<li>{{ message }}</li>
{% endfor %}
</ol>
</p>
{% endif %}
{% if not majors|length %}
<ul class="symfony_list">
<li><a href="{{ url }}">Configure your Symfony Application online</a></li>
</ul>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,28 @@
{% extends "SensioDistributionBundle::Configurator/layout.html.twig" %}
{% block content_class %}config_done{% endblock %}
{% block content %}
<h1>Well done!</h1>
{% if is_writable %}
<h2>Your distribution is configured!</h2>
{% else %}
<h2 class="configure-error">Your distribution is almost configured but...</h2>
{% endif %}
<h3>
<span>
{% if is_writable %}
Your parameters.yml file has been overwritten with these parameters (in <em>{{ yml_path }}</em>):
{% else %}
Your parameters.yml file is not writeable! Here are the parameters you can copy and paste in <em>{{ yml_path }}</em>:
{% endif %}
</span>
</h3>
<textarea class="symfony-configuration">{{ parameters }}</textarea>
{% if welcome_url %}
<ul>
<li><a href="{{ welcome_url }}">Go to the Welcome page</a></li>
</ul>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,31 @@
{% extends "form_div_layout.html.twig" %}
{% block field_rows %}
<div class="symfony-form-errors">
{{ form_errors(form) }}
</div>
{% for child in form.children %}
{{ form_row(child) }}
{% endfor %}
{% endblock field_rows %}
{% block field_row %}
<div class="symfony-form-row">
{{ form_label(form) }}
<div class="symfony-form-field">
{{ form_widget(form) }}
<div class="symfony-form-errors">
{{ form_errors(form) }}
</div>
</div>
</div>
{% endblock %}
{% block field_label %}
<label for="{{ id }}">
{{ label|trans }}
{% if required %}
<span class="symfony-form-required" title="This field is required">*</span>
{% endif %}
</label>
{% endblock %}

View File

@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="{{ asset('bundles/sensiodistribution/webconfigurator/css/configure.css') }}" />
<title>{% block title %}Web Configurator Bundle{% endblock %}</title>
<link rel="icon" type="image/x-icon" sizes="16x16" href="{{ asset('bundles/sensiodistribution/webconfigurator/images/favicon.ico') }}" />
</head>
<body>
<div id="symfony-wrapper">
<div id="symfony-header">
<img src="{{ asset("bundles/sensiodistribution/webconfigurator/images/logo-small.gif") }}" alt="Symfony logo" />
</div>
<div id="symfony-content">
{% block content %}{% endblock %}
</div>
<div class="version">Symfony Standard Edition v.{{ version }}</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,14 @@
<div class="symfony-block-steps">
{% for i in 1..count %}
{% if i == index + 1 %}
<span class="selected">Step {{ i }}</span>
{% else %}
<span>Step {{ i }}</span>
{% endif %}
{% if i != count %}
&gt;
{% endif %}
{% endfor %}
</div>