Commit c6041b4b authored by jnaud's avatar jnaud
Browse files

Init.

parent e6277e77
Pipeline #15915 failed with stages
in 6 minutes and 48 seconds

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
{
"directory": "web/vendor/"
}
\ No newline at end of file
/vendor/
/app/cache
/app/logs
/app/bootstrap.php.cache
error.log
/web/bundles
# ignore les vendor mais les fichier zip
/web/vendor/*
!/web/vendor/*.zip
/web/scheduler/logs/
/web/upload/
app2
====
A Symfony project created on February 12, 2016, 4:20 pm.
CREATE SCHEMA bdterr;
set search_path='bdterr';
CREATE SEQUENCE bdterr.referentiel_recherche_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE bdterr.champtype_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE bdterr.rapport_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE bdterr.contenu_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE bdterr.lot_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE bdterr.bdterr_referentiel_carto_referentiel_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE bdterr.referentiel_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE bdterr.champ_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE bdterr.donnee_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE bdterr.theme_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE bdterr.rapports_profils_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE catalogue.scheduled_command_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE catalogue.execution_report_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE TABLE bdterr.bdterr_referentiel_recherche (referentiel_id INT NOT NULL, referentiel_table VARCHAR(255) DEFAULT NULL, referentiel_insee VARCHAR(255) DEFAULT NULL, referentiel_insee_delegue VARCHAR(255) DEFAULT NULL, referentiel_commune VARCHAR(255) DEFAULT NULL, referentiel_nom TEXT DEFAULT NULL, referentiel_api_champs TEXT DEFAULT NULL, PRIMARY KEY(referentiel_id));
CREATE TABLE bdterr.bdterr_champ_type (champtype_id INT NOT NULL, champtype_nom VARCHAR(255) DEFAULT NULL, champtype_inContenuTier BOOLEAN DEFAULT 'true', PRIMARY KEY(champtype_id));
CREATE TABLE bdterr.bdterr_rapports (rapport_id INT NOT NULL, rapport_nom VARCHAR(255) DEFAULT NULL, rapport_gabarit_html VARCHAR(255) DEFAULT NULL, rapport_gabarit_odt VARCHAR(255) DEFAULT NULL, PRIMARY KEY(rapport_id));
CREATE TABLE bdterr.bdterr_contenus_tiers (contenu_id INT NOT NULL, lot_id INT DEFAULT NULL, contenu_type INT DEFAULT NULL, contenu_nom VARCHAR(255) DEFAULT NULL, contenu_ordre INT DEFAULT NULL, contenu_fiche BOOLEAN DEFAULT NULL, contenu_resultats BOOLEAN DEFAULT NULL, contenu_url VARCHAR(255) NOT NULL, PRIMARY KEY(contenu_id));
CREATE INDEX IDX_4819E6AFA8CBA5F7 ON bdterr.bdterr_contenus_tiers (lot_id);
CREATE INDEX IDX_4819E6AF8AE06949 ON bdterr.bdterr_contenus_tiers (contenu_type);
CREATE TABLE bdterr.bdterr_lot (lot_id INT NOT NULL, lot_theme_id INT DEFAULT NULL, lot_referentiel_id INT DEFAULT NULL, lot_uuid VARCHAR(255) DEFAULT NULL, lot_table VARCHAR(255) DEFAULT NULL, lot_alias VARCHAR(255) DEFAULT NULL, lot_carte VARCHAR(255) DEFAULT NULL, lot_avertissement_message VARCHAR(255) DEFAULT NULL, lot_statistiques BOOLEAN DEFAULT NULL, lot_visualiseur BOOLEAN DEFAULT NULL, lot_date_maj TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, lot_statistic TEXT DEFAULT NULL, PRIMARY KEY(lot_id));
CREATE INDEX IDX_4674D3DFFBC885B3 ON bdterr.bdterr_lot (lot_theme_id);
CREATE INDEX IDX_4674D3DFA9EE0A03 ON bdterr.bdterr_lot (lot_referentiel_id);
CREATE TABLE bdterr.bdterr_referentiel_carto (referentiel_id INT NOT NULL, referentiel_table TEXT NOT NULL, referentiel_champs TEXT DEFAULT NULL, PRIMARY KEY(referentiel_id));
CREATE TABLE bdterr.bdterr_referentiel_intersection (referentiel_id INT NOT NULL, referentiel_table VARCHAR(255) DEFAULT NULL, referentiel_insee VARCHAR(255) DEFAULT NULL, referentiel_insee_deleguee VARCHAR(255) DEFAULT NULL, referentiel_nom VARCHAR(255) DEFAULT NULL, PRIMARY KEY(referentiel_id));
CREATE TABLE bdterr.bdterr_couche_champ (champ_id INT NOT NULL, champ_lot_id INT NOT NULL, champ_type INT DEFAULT NULL, champ_nom VARCHAR(150) NOT NULL, champ_alias VARCHAR(255) DEFAULT NULL, champ_ordre INT DEFAULT NULL, champ_format VARCHAR(255) DEFAULT NULL, champ_fiche BOOLEAN DEFAULT NULL, champ_resultats BOOLEAN DEFAULT NULL, champ_identifiant BOOLEAN DEFAULT NULL, champ_label BOOLEAN DEFAULT NULL, PRIMARY KEY(champ_id));
CREATE INDEX IDX_52A0CA003DC30ACD ON bdterr.bdterr_couche_champ (champ_lot_id);
CREATE INDEX IDX_52A0CA00D43AA457 ON bdterr.bdterr_couche_champ (champ_type);
CREATE TABLE bdterr.bdterr_donnee (donnee_id INT NOT NULL, donnee_lot_id INT DEFAULT NULL, donnee_objet_id TEXT DEFAULT NULL, donnee_objet_nom TEXT DEFAULT NULL, donnee_geom TEXT DEFAULT NULL, donnee_geom_json TEXT DEFAULT NULL, donnee_attributs_fiche TEXT DEFAULT NULL, donnee_attributs_resultat TEXT DEFAULT NULL, donnee_ressources_resultat TEXT DEFAULT NULL, donnee_ressources_fiche TEXT DEFAULT NULL, donnee_insee TEXT DEFAULT NULL, donnee_insee_delegue TEXT DEFAULT NULL, PRIMARY KEY(donnee_id));
CREATE INDEX IDX_30055129141F7BF0 ON bdterr.bdterr_donnee (donnee_lot_id);
CREATE TABLE bdterr.bdterr_themes (theme_id INT NOT NULL, theme_parent INT DEFAULT NULL, theme_nom VARCHAR(255) NOT NULL, theme_alias TEXT DEFAULT NULL, theme_ordre INT DEFAULT NULL, PRIMARY KEY(theme_id));
CREATE INDEX IDX_A06003ABEDB65433 ON bdterr.bdterr_themes (theme_parent);
CREATE TABLE bdterr.bdterr_rapports_profils (id INT NOT NULL, bterr_rapport_id INT DEFAULT NULL, prodige_profil_id INT DEFAULT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_51FAF077D1EAE64C ON bdterr.bdterr_rapports_profils (bterr_rapport_id);
CREATE TABLE catalogue.scheduled_command (id INT NOT NULL, name TEXT DEFAULT NULL, command TEXT DEFAULT NULL, arguments TEXT DEFAULT NULL, cron_expression TEXT DEFAULT NULL, last_execution TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, last_return_code INT DEFAULT 0, log_file TEXT DEFAULT NULL, priority INT DEFAULT 0, execute_immediately BOOLEAN DEFAULT 'false', disabled BOOLEAN DEFAULT 'false', locked BOOLEAN DEFAULT 'false', is_periodic BOOLEAN NOT NULL, year INT DEFAULT NULL, frequency TEXT DEFAULT NULL, PRIMARY KEY(id));
CREATE TABLE catalogue.execution_report (id INT NOT NULL, scheduled_command_id INT DEFAULT NULL, date_time TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, file VARCHAR(255) NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_8E1B7BBCAD93E023 ON catalogue.execution_report (scheduled_command_id);
ALTER TABLE bdterr.bdterr_contenus_tiers ADD CONSTRAINT FK_4819E6AFA8CBA5F7 FOREIGN KEY (lot_id) REFERENCES bdterr.bdterr_lot (lot_id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE bdterr.bdterr_contenus_tiers ADD CONSTRAINT FK_4819E6AF8AE06949 FOREIGN KEY (contenu_type) REFERENCES bdterr.bdterr_champ_type (champtype_id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE bdterr.bdterr_lot ADD CONSTRAINT FK_4674D3DFFBC885B3 FOREIGN KEY (lot_theme_id) REFERENCES bdterr.bdterr_themes (theme_id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE bdterr.bdterr_lot ADD CONSTRAINT FK_4674D3DFA9EE0A03 FOREIGN KEY (lot_referentiel_id) REFERENCES bdterr.bdterr_referentiel_intersection (referentiel_id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE bdterr.bdterr_couche_champ ADD CONSTRAINT FK_52A0CA003DC30ACD FOREIGN KEY (champ_lot_id) REFERENCES bdterr.bdterr_lot (lot_id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE bdterr.bdterr_couche_champ ADD CONSTRAINT FK_52A0CA00D43AA457 FOREIGN KEY (champ_type) REFERENCES bdterr.bdterr_champ_type (champtype_id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE bdterr.bdterr_donnee ADD CONSTRAINT FK_30055129141F7BF0 FOREIGN KEY (donnee_lot_id) REFERENCES bdterr.bdterr_lot (lot_id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE bdterr.bdterr_themes ADD CONSTRAINT FK_A06003ABEDB65433 FOREIGN KEY (theme_parent) REFERENCES bdterr.bdterr_themes (theme_id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE bdterr.bdterr_rapports_profils ADD CONSTRAINT FK_51FAF077D1EAE64C FOREIGN KEY (bterr_rapport_id) REFERENCES bdterr.bdterr_rapports (rapport_id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE catalogue.execution_report ADD CONSTRAINT FK_8E1B7BBCAD93E023 FOREIGN KEY (scheduled_command_id) REFERENCES catalogue.scheduled_command (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
/** ajout des types **/
INSERT INTO bdterr.bdterr_champ_type VALUES (2, 'text', true);
INSERT INTO bdterr.bdterr_champ_type VALUES (4, 'url', true);
INSERT INTO bdterr.bdterr_champ_type VALUES (5, 'Image', true);
INSERT INTO bdterr.bdterr_champ_type VALUES (6, 'vidéo', true);
INSERT INTO bdterr.bdterr_champ_type VALUES (3, 'date', false);
/** Référentiel recherche */
INSERT INTO bdterr_referentiel_recherche VALUES (1, '', '', '', '', '', '');
/** Thème racine */
INSERT INTO bdterr.bdterr_themes (theme_id, theme_nom, theme_alias, theme_ordre, theme_parent) VALUES (0, 'root', NULL, 0, NULL);
/** Ajout layer name dans lot **/
ALTER TABLE bdterr.bdterr_lot ADD lot_layer_name TEXT DEFAULT NULL;
/** ajout collone status dans execution_report **/
ALTER TABLE catalogue.execution_report ADD status VARCHAR(255) DEFAULT NULL;
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
<?php
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
class AppCache extends HttpCache
{
}
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
/* default bundles */
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
/* extra bundles */
new JMS\AopBundle\JMSAopBundle(),
new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
new JMS\SerializerBundle\JMSSerializerBundle(),
new FOS\RestBundle\FOSRestBundle(),
new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
new Nelmio\CorsBundle\NelmioCorsBundle(),
new FOS\HttpCacheBundle\FOSHttpCacheBundle(),
new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(),
new Hautelook\TemplatedUriBundle\HautelookTemplatedUriBundle(),
new Bazinga\Bundle\RestExtraBundle\BazingaRestExtraBundle(),
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
/* app bundles */
//new AppBundle\AppBundle(),
new Prodige\ProdigeBundle\ProdigeProdigeBundle(),
new Alk\Common\CasBundle\AlkCommonCasBundle(),
new ProdigeCatalogue\WebBundle\WebBundle(),
new ProdigeCatalogue\AdminBundle\AdminBundle(),
new ProdigeCatalogue\JoinBundle\JoinBundle(),
new ProdigeCatalogue\RSSBundle\RSSBundle(),
new ProdigeCatalogue\GeosourceBundle\GeosourceBundle(),
new ProdigeCatalogue\CartePersoBundle\CartePersoBundle(),
new ProdigeCatalogue\StandardsBundle\StandardsBundle(),
new ProdigeCatalogue\GraphBundle\GraphBundle(),
new ProdigeCatalogue\BdcomBundle\BdcomBundle(),
// JMose Scheduler
new JMose\CommandSchedulerBundle\JMoseCommandSchedulerBundle(),
new ProdigeCatalogue\OpenDataBundle\OpenDataBundle() , // Bundle OpenData,
new ProdigeCatalogue\ApiBundle\ApiBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
}
return $bundles;
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}{% endblock %}
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
</head>
<body>
{% block body %}{% endblock %}
{% block javascripts %}{% endblock %}
</body>
</html>
{% extends 'base.html.twig' %}
{% block body %}
<div id="wrapper">
<div id="container">
<div id="welcome">
<h1><span>Welcome to</span> Symfony {{ constant('Symfony\\Component\\HttpKernel\\Kernel::VERSION') }}</h1>
</div>
<div id="status">
<p>
<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>
Your application is ready to start working on it at:
<code>{{ base_dir }}/</code>
</p>
</div>
<div id="next">
<h2>What's next?</h2>
<p>
<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">
<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
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
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
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.5c2-2.5,2.5-5.4,2.9-7.4l0.5-2.8c0.3,0,0.5,0.1,0.8,0.1
c2.4,0.1,3.7-1.3,3.7-2.3c0-0.6-0.3-1.2-0.9-1.2c-0.4,0-0.8,0.3-1,0.8c-0.1,0.6,0.8,1.1,0.1,1.5c-0.5,0.3-1.4,0.6-2.7,0.4l0.3-1.3
c0.5-2.6,1-5.7,3.2-5.8c0.2,0,0.8,0,0.8,0.4c0,0.2,0,0.2-0.2,0.5c-0.2,0.3-0.3,0.4-0.2,0.7c0,0.7,0.5,1.1,1.2,1.1
c0.9,0,1.2-1,1.2-1.4c0-1.2-1.2-1.8-2.6-1.8c-1.5,0.1-2.8,0.9-3.7,2.1c-1.1,1.3-1.8,2.9-2.3,4.5c-0.9-0.8-1.6-1.8-3.1-2.3
c-1.1-0.7-2.3-0.5-3.4,0.3c-0.5,0.4-0.8,1-1,1.6c-0.4,1.5,0.4,2.9,0.8,3.4l0.9,1c0.2,0.2,0.6,0.8,0.4,1.5c-0.3,0.8-1.2,1.3-2.1,1
c-0.4-0.2-1-0.5-0.9-0.9c0.1-0.2,0.2-0.3,0.3-0.5s0.1-0.3,0.1-0.3c0.2-0.6-0.1-1.4-0.7-1.6c-0.6-0.2-1.2,0-1.3,0.8
C4.3,38.4,4.7,40,6.8,40.8z M46.1,20.9c0-4.2-3.2-7.5-7.1-7.5h-3.8C34.8,10.8,32.7,9,30.2,9L-2.3,9.1c-2.8,0.1-4.9,2.4-4.9,5.4
L-7,58.6c0,4.8,8.1,13.9,11.6,14.1l34.7-0.1c3.9,0,7-3.4,7-7.6L46.1,20.9z M-0.3,36.4c0-8.6,6.5-15.6,14.5-15.6
c8,0,14.5,7,14.5,15.6S22.1,52,14.2,52C6.1,52-0.3,45-0.3,36.4z M42.1,65.1c0,1.8-1.5,3.1-3.1,3.1H4.6c-0.7,0-3-1.8-4.5-4.4h30.4
c2.8,0,5-2.4,5-5.4V17.9h3.7c1.6,0,2.9,1.4,2.9,3.1V65.1L42.1,65.1z"/>
</svg>
Read Symfony documentation to learn
<a href="http://symfony.com/doc/{{ constant('Symfony\\Component\\HttpKernel\\Kernel::VERSION')[:3] }}/book/page_creation.html">
How to create your first page in Symfony
</a>
</p>
</div>
</div>
</div>
{% endblock %}
{% block stylesheets %}
<style>
body { background: #F5F5F5; font: 18px/1.5 sans-serif; }
h1, h2 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 36px; }
h2 { font-size: 21px; margin-bottom: 1em; }
p { margin: 0 0 1em 0; }
a { color: #0000F0; }
a:hover { text-decoration: none; }
code { background: #F5F5F5; max-width: 100px; padding: 2px 6px; word-wrap: break-word; }
#wrapper { background: #FFF; margin: 1em auto; max-width: 800px; width: 95%; }
#container { padding: 2em; }
#welcome, #status { margin-bottom: 2em; }
#welcome h1 span { display: block; font-size: 75%; }
#icon-status, #icon-book { float: left; height: 64px; margin-right: 1em; margin-top: -4px; width: 64px; }
#icon-book { display: none; }
@media (min-width: 768px) {
#wrapper { width: 80%; margin: 2em auto; }
#icon-book { display: inline-block; }
#status a, #next a { display: block; }
@-webkit-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }
.sf-toolbar { opacity: 0; -webkit-animation: fade-in 1s .2s forwards; animation: fade-in 1s .2s forwards;}
}
</style>
{% endblock %}
This diff is collapsed.
<?php
use Doctrine\Common\Annotations\AnnotationRegistry;
use Composer\Autoload\ClassLoader;
/**
* @var ClassLoader $loader
*/
$loader = require __DIR__.'/../vendor/autoload.php';
AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
return $loader;
<?php
require_once dirname(__FILE__).'/SymfonyRequirements.php';
$lineSize = 70;
$symfonyRequirements = new SymfonyRequirements();
$iniPath = $symfonyRequirements->getPhpIniConfigPath();
echo_title('Symfony Requirements Checker');
echo '> PHP is using the following php.ini file:'.PHP_EOL;
if ($iniPath) {
echo_style('green', ' '.$iniPath);
} else {
echo_style('warning', ' WARNING: No configuration file (php.ini) used by PHP!');
}
echo PHP_EOL.PHP_EOL;
echo '> Checking Symfony requirements:'.PHP_EOL.' ';
$messages = array();
foreach ($symfonyRequirements->getRequirements() as $req) {
/** @var $req Requirement */
if ($helpText = get_error_message($req, $lineSize)) {
echo_style('red', 'E');
$messages['error'][] = $helpText;
} else {
echo_style('green', '.');
}
}
$checkPassed = empty($messages['error']);
foreach ($symfonyRequirements->getRecommendations() as $req) {
if ($helpText = get_error_message($req, $lineSize)) {
echo_style('yellow', 'W');
$messages['warning'][] = $helpText;
} else {
echo_style('green', '.');
}
}
if ($checkPassed) {
echo_block('success', 'OK', 'Your system is ready to run Symfony projects');
} else {
echo_block('error', 'ERROR', 'Your system is not ready to run Symfony projects');
echo_title('Fix the following mandatory requirements', 'red');
foreach ($messages['error'] as $helpText) {
echo ' * '.$helpText.PHP_EOL;
}
}
if (!empty($messages['warning'])) {
echo_title('Optional recommendations to improve your setup', 'yellow');
foreach ($messages['warning'] as $helpText) {
echo ' * '.$helpText.PHP_EOL;
}
}
echo PHP_EOL;
echo_style('title', 'Note');
echo ' The command console could use a different php.ini file'.PHP_EOL;
echo_style('title', '~~~~');
echo ' than the one used with your web server. To be on the'.PHP_EOL;
echo ' safe side, please check the requirements from your web'.PHP_EOL;
echo ' server using the ';
echo_style('yellow', 'web/config.php');
echo ' script.'.PHP_EOL;
echo PHP_EOL;
exit($checkPassed ? 0 : 1);
function get_error_message(Requirement $requirement, $lineSize)
{
if ($requirement->isFulfilled()) {
return;
}
$errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL;
$errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL;
return $errorMessage;
}
function echo_title($title, $style = null)
{
$style = $style ?: 'title';
echo PHP_EOL;
echo_style($style, $title.PHP_EOL);
echo_style($style, str_repeat('~', strlen($title)).PHP_EOL);
echo PHP_EOL;
}
function echo_style($style, $message)
{
// ANSI color codes
$styles = array(
'reset' => "\033[0m",
'red' => "\033[31m",
'green' => "\033[32m",
'yellow' => "\033[33m",
'error' => "\033[37;41m",
'success' => "\033[37;42m",
'title' => "\033[34m",
);
$supports = has_color_support();
echo($supports ? $styles[$style] : '').$message.($supports ? $styles['reset'] : '');
}
function echo_block($style, $title, $message)
{
$message = ' '.trim($message).' ';
$width = strlen($message);
echo PHP_EOL.PHP_EOL;
echo_style($style, str_repeat(' ', $width).PHP_EOL);
echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT).PHP_EOL);
echo_style($style, str_pad($message, $width, ' ', STR_PAD_RIGHT).PHP_EOL);
echo_style($style, str_repeat(' ', $width).PHP_EOL);
}
function has_color_support()
{
static $support;
if (null === $support) {
if (DIRECTORY_SEPARATOR == '\\') {
$support = false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI');
} else {
$support = function_exists('posix_isatty') && @posix_isatty(STDOUT);
}
}
return $support;
}
imports:
- { resource: "@ProdigeProdigeBundle/Resources/config/config.yml" }
- { resource: parameters.yml }
- { resource: security.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
parameters:
locale: en
framework:
#esi: ~
#translator: { fallbacks: ["%locale%"] }
secret: "%secret%"
router:
resource: "%kernel.root_dir%/config/routing.yml"
strict_requirements: ~
form: ~
csrf_protection: ~
validation: { enable_annotations: true }
#serializer: { enable_annotations: true }
templating:
engines: ['twig']
#assets_version: SomeVersionScheme
default_locale: "%locale%"
trusted_hosts: ~
trusted_proxies: ~
session:
# handler_id set to null will use default session handler from php.ini
handler_id: ~
fragments: ~
http_method_override: true
# Twig Configuration
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
# Doctrine Configuration
doctrine:
dbal:
driver: pdo_pgsql
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
# if using pdo_sqlite as your database driver:
# 1. add the path in parameters.yml
# e.g. database_path: "%kernel.root_dir%/data/data.db3"
# 2. Uncomment database_path in parameters.yml.dist
# 3. Uncomment next line:
# path: "%database_path%"
types:
geography:
class: 'Jsor\Doctrine\PostGIS\Types\GeographyType'
commented: false
geometry:
class: 'Jsor\Doctrine\PostGIS\Types\GeometryType'
commented: false
raster:
class: 'Jsor\Doctrine\PostGIS\Types\RasterType'
commented: false
point:
class: 'ProdigeCatalogue\BdcomBundle\Utils\PointType'
commented: false
orm:
auto_generate_proxy_classes: "%kernel.debug%"
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
dql:
string_functions:
ST_Distance: Jsor\Doctrine\PostGIS\Functions\ST_Distance
ST_Area: Jsor\Doctrine\PostGIS\Functions\ST_Area
ST_Union: Jsor\Doctrine\PostGIS\Functions\ST_Union
ST_Intersects: Jsor\Doctrine\PostGIS\Functions\ST_Intersects
ST_Transform: Jsor\Doctrine\PostGIS\Functions\ST_Transform
ST_IsValid: Jsor\Doctrine\PostGIS\Functions\ST_IsValid
ST_Buffer: Jsor\Doctrine\PostGIS\Functions\ST_Buffer
ST_MakeValid: ProdigeCatalogue\BdcomBundle\Utils\ST_MakeValid
ST_SnapToGrid: Jsor\Doctrine\PostGIS\Functions\ST_SnapToGrid
ST_Point: Jsor\Doctrine\PostGIS\Functions\ST_Point
# Swiftmailer Configuration
swiftmailer:
transport: "%mailer_transport%"
host: "%mailer_host%"
username: "%mailer_user%"
password: "%mailer_password%"
spool: { type: memory }
# @see http://symfony.com/doc/current/bundles/FOSRestBundle/versioning.html
fos_rest:
disable_csrf_role: ROLE_API
param_fetcher_listener: true
view:
mime_types:
json: ['application/json', 'application/json;version=1.0', 'application/json;version=1.1', 'application/json;version=1.2']
view_response_listener: 'force'
formats:
json: true
templating_formats:
html: true
format_listener:
enabled: true
rules:
- { path: '^/base_territoriale', priorities: [html, json, xml], fallback_format: ~, prefer_extension: true }
- { path: '^/base_territoriale_admin', priorities: [html, json, xml], fallback_format: ~, prefer_extension: true }
- { path: '^/', stop:true }
exception:
enabled: false
allowed_methods_listener: true
access_denied_listener:
json: true
body_listener: true
nelmio_cors:
defaults:
allow_credentials: true
allow_origin: []
allow_headers: []
allow_methods: []
expose_headers: []
max_age: 0
hosts: []
origin_regex: false
paths:
'^/admin/':
allow_origin: ['*']
allow_headers: ['origin', 'x-requested-with', 'content-type', 'authorization', 'X-Custom-Auth']
allow_methods: ['POST', 'PUT', 'GET', 'DELETE', 'OPTIONS']
max_age: 3600
'^/geosource/':
allow_origin: ['*']
allow_headers: ['origin', 'x-requested-with', 'content-type', 'authorization', 'X-Custom-Auth']
allow_methods: ['POST', 'PUT', 'GET', 'DELETE', 'OPTIONS']
max_age: 3600
'^/prodige':
allow_origin: ['*']
allow_headers: ['origin', 'x-requested-with', 'content-type', 'authorization', 'X-Custom-Auth']
allow_methods: ['POST', 'PUT', 'GET', 'DELETE', 'OPTIONS']
max_age: 3600
'^/join':
allow_origin: ['*']
allow_headers: ['origin', 'x-requested-with', 'content-type', 'authorization', 'X-Custom-Auth']
allow_methods: ['POST', 'PUT', 'GET', 'DELETE', 'OPTIONS']
max_age: 3600
'^/base_territoriale':
allow_origin: ['*']