Unverified Commit 7be1ad42 authored by Sebastian Castro's avatar Sebastian Castro
Browse files

Moving to Symfony Flex, in progress

parent 308e10d6

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
# In all environments, the following files are loaded if they exist,
# the latter taking precedence over the former:
#
# * .env contains default values for the environment variables needed by the app
# * .env.local uncommitted file with local overrides
# * .env.$APP_ENV committed environment-specific defaults
# * .env.$APP_ENV.local uncommitted environment-specific overrides
#
# Real environment variables win over .env files.
#
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=82ec369b81caab5446ddfc3b5edb4d00
CSRF_PROTECTION=false # active csrf protection on production servers
#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
#TRUSTED_HOSTS='^localhost|example\.com$'
###< symfony/framework-bundle ###
###> doctrine/mongodb-odm-bundle ###
MONGODB_URL=mongodb://localhost:27017
###< doctrine/mongodb-odm-bundle ###
###> vich upload ###
images_max_filesize='8M' # for public images upload
IMAGE_RESIZE_WIDTH=1000 # in pixel
files_max_filesize='1M' # for other public file upload
###> vich upload ###
use_as_saas=false
contact_email="contact@localhost.fr"
instance_name="GoGoCarto"
base_protocol=https
base_url=saas.localhost # my-site.com
base_path=/GoGoCarto/web/app_dev.php
###> symfony/mailer ###
# MAILER_DSN=smtp://localhost
###< symfony/mailer ###
###> symfony/swiftmailer-bundle ###
# For Gmail as a transport, use: "gmail://username:password@localhost"
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
# Delivery is disabled by default via "null://localhost"
MAILER_URL=null://localhost
###< symfony/swiftmailer-bundle ###
###> hwi/oauth-bundle ###
oauth_communs_id="disabled"
oauth_communs_secret="disabled"
oauth_google_id="disabled"
oauth_google_secret="disabled"
oauth_facebook_id="disabled"
oauth_facebook_secret="disabled"
###< hwi/oauth-bundle ###
###> sentry/sentry-symfony ###
SENTRY_DSN=https://6145d1aac36c429781fc1b0f79b0da48@sentry.io/1402018
###< sentry/sentry-symfony ###
/app/config/parameters.yml
/app/config/parameters.yml.dist
/build/
/phpunit.xml
/var/*
!/var/cache
/var/cache/*
!var/cache/.gitkeep
!/var/logs
/var/logs/*
!var/logs/.gitkeep
!/var/sessions
/var/sessions/*
!var/sessions/.gitkeep
!var/SymfonyRequirements.php
/vendor/
/web/bundles/
/web/assets/css/*
/web/css/*
/web/js/*
/web/sw.js
/node_modules/
......@@ -23,13 +6,18 @@
/TODO
.sass-cache
*.DS_Store
/composer.phar
ssh_password
/web/uploads/*
*.csv
/web/assets/images/*
pdcn-home-script\.js
*~
TODO_MULTI_INSTANCE
.idea
/web/matomo/
\ No newline at end of file
/web/matomo/
###> symfony/framework-bundle ###
/.env.local
/.env.local.php
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/web/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###
<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 = [
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(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new Bazinga\GeocoderBundle\BazingaGeocoderBundle(),
new JMS\SerializerBundle\JMSSerializerBundle(),
new Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle(),
new Pix\SortableBehaviorBundle\PixSortableBehaviorBundle(),
new Sonata\CoreBundle\SonataCoreBundle(),
new Sonata\BlockBundle\SonataBlockBundle(),
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
new Exporter\Bridge\Symfony\Bundle\SonataExporterBundle(),
new Biopen\GeoDirectoryBundle\BiopenGeoDirectoryBundle(),
new Biopen\CoreBundle\BiopenCoreBundle(),
new Biopen\SaasBundle\BiopenSaasBundle(),
new Sonata\DoctrineMongoDBAdminBundle\SonataDoctrineMongoDBAdminBundle(),
new Sonata\AdminBundle\SonataAdminBundle(),
new Knp\Bundle\MarkdownBundle\KnpMarkdownBundle(),
new FOS\CKEditorBundle\FOSCKEditorBundle(),
new Sonata\FormatterBundle\SonataFormatterBundle(),
new FOS\UserBundle\FOSUserBundle(),
new Sonata\UserBundle\SonataUserBundle('FOSUserBundle'),
new Sonata\EasyExtendsBundle\SonataEasyExtendsBundle(),
new Application\Sonata\UserBundle\ApplicationSonataUserBundle(),
new HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
new Ob\HighchartsBundle\ObHighchartsBundle(),
new Vich\UploaderBundle\VichUploaderBundle(),
new Sentry\SentryBundle\SentryBundle(),
new Http\HttplugBundle\HttplugBundle()
];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
}
return $bundles;
}
public function getRootDir()
{
return __DIR__;
}
public function getCacheDir()
{
return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
}
public function getLogDir()
{
return dirname(__DIR__).'/var/logs';
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
}
}
<?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="sonata_admin_redirect" path="/">
<default key="_controller">FrameworkBundle:Redirect:redirect</default>
<default key="route">sonata_admin_dashboard</default>
<default key="permanent">true</default>
</route>
<route id="sonata_admin_dashboard" path="/dashboard">
<default key="_controller">SonataAdminBundle:Core:dashboard</default>
</route>
<route id="sonata_admin_retrieve_form_element" path="/core/get-form-field-element">
<default key="_controller">sonata.admin.controller.admin:retrieveFormFieldElementAction</default>
</route>
<route id="sonata_admin_append_form_element" path="/core/append-form-field-element">
<default key="_controller">sonata.admin.controller.admin:appendFormFieldElementAction</default>
</route>
<route id="sonata_admin_short_object_information" path="/core/get-short-object-description.{_format}">
<default key="_controller">sonata.admin.controller.admin:getShortObjectDescriptionAction</default>
<default key="_format">html</default>
<requirement key="_format">html|json</requirement>
</route>
<route id="sonata_admin_set_object_field_value" path="/core/set-object-field-value">
<default key="_controller">sonata.admin.controller.admin:setObjectFieldValueAction</default>
</route>
<route id="sonata_admin_search" path="/search">
<default key="_controller">SonataAdminBundle:Core:search</default>
</route>
<route id="sonata_admin_retrieve_autocomplete_items" path="/core/get-autocomplete-items">
<default key="_controller">sonata.admin.controller.admin:retrieveAutocompleteItemsAction</default>
</route>
</routes>
\ No newline at end of file
<?php
use Doctrine\Common\Annotations\AnnotationRegistry;
use Composer\Autoload\ClassLoader;
use Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver;
/**
* @var ClassLoader $loader
*/
$loader = require __DIR__.'/../vendor/autoload.php';
AnnotationRegistry::registerLoader([$loader, 'loadClass']);
AnnotationDriver::registerAnnotationClasses();
return $loader;
imports:
- { resource: parameters.yml }
- { resource: version.yml }
- { resource: security.yml }
- { resource: services.yml }
- { resource: services_admin_blocks.yml }
- { resource: config_fosuser.yml }
- { resource: config_sonata.yml }
- { resource: config_vendors.yml }
- { resource: "@BiopenCoreBundle/Resources/config/services.yml" }
- { resource: "@BiopenCoreBundle/Resources/config/services_admin.yml" }
- { resource: "@BiopenGeoDirectoryBundle/Resources/config/services.yml" }
- { resource: "@BiopenGeoDirectoryBundle/Resources/config/services_admin.yml" }
- { resource: "@BiopenSaasBundle/Resources/config/services.yml" }
- { resource: "@BiopenSaasBundle/Resources/config/services_admin.yml" }
- { resource: "@ApplicationSonataUserBundle/Resources/config/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
parameters:
locale: fr
router.request_context.host: '%base_url%'
router.request_context.base_url: '%base_path%'
framework:
#esi: ~
translator: { fallbacks: ["%locale%"] }
secret: "%secret%"
router:
resource: "%kernel.root_dir%/config/routing.yml"
strict_requirements: ~
form: ~
csrf_protection: "%csrf_protection%"
validation: { enable_annotations: true }
#serializer: { enable_annotations: true }
templating:
engines: ['twig']
#assets_version: SomeVersionScheme
default_locale: "%locale%"
trusted_hosts: ~
session:
enabled: true
# http://symfony.com/doc/current/reference/configuration/framework.html#handler-id
handler_id: session.handler.native_file
save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%"
# cookie_secure: 'auto'
# cookie_samesite: 'lax'
fragments: ~
http_method_override: true
assets: ~
# Twig Configuration
twig:
debug: "%kernel.debug%"
globals:
version: '%app.version%'
base_url: '%base_url%'
use_as_saas: '%use_as_saas%'
base_path: '%base_path%'
contact_email: '%contact_email%'
oauth_communs: '%oauth_communs_id%'
oauth_google: '%oauth_google_id%'
oauth_facebook: '%oauth_facebook_id%'
strict_variables: "%kernel.debug%"
paths:
"%kernel.root_dir%/../src/Biopen/GeoDirectoryBundle/Resources/views": BiopenGeoDirectory
"%kernel.root_dir%/../src/Biopen/GeoDirectoryBundle/Resources/views/admin": BiopenAdmin
"%kernel.root_dir%/../src/Biopen/CoreBundle/Resources/views": BiopenCoreBundle
"%kernel.root_dir%/../src/Application/Sonata/UserBundle/Resources/views": UserBundle
"%kernel.root_dir%/../web": RootDir
"%kernel.root_dir%/../src/Biopen/SaasBundle/Resources/views": BiopenSaasBundle
form_themes:
- '@SonataFormatter/Form/formatter.html.twig'
# Doctrine Configuration
doctrine:
dbal:
driver: pdo_mysql
charset: UTF8
# Mongodb Configuration
doctrine_mongodb:
connections:
default:
server: "%mongodb_server%"
options: {}
default_database: gogocarto_default
document_managers:
default:
auto_mapping: true
mappings:
# gedmo_translatable:
# type: annotation
# prefix: Gedmo\Translatable\Document
# dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Translatable/Document"
# alias: GedmoTranslatable # (optional) it will default to the name set for the mapping
# is_bundle: false
# gedmo_translator:
# type: annotation
# prefix: Gedmo\Translator\Document
# dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Translator/Document"
# alias: GedmoTranslator # (optional) it will default to the name set for the mapping
# is_bundle: false
gedmo_loggable:
type: annotation
prefix: Gedmo\Loggable\Document
dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Loggable/Document"
alias: GedmoLoggable # (optional) it will default to the name set for the mappingmapping
is_bundle: false
# gedmo_tree:
# type: annotation
# prefix: Gedmo\Tree\Document
# dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/Document"
# alias: GedmoTree # (optional) it will default to the name set for the mapping
# is_bundle: false
stof_doctrine_extensions:
default_locale: fr
mongodb:
default:
sortable: true
loggable: true
sluggable: true
timestampable: true
pix_sortable_behavior:
db_driver: mongodb
position_field:
default: position
entities:
Biopen\GeoDirectoryBundle\Document\Option: index
Biopen\GeoDirectoryBundle\Document\Category: index
# Swiftmailer Configuration
swiftmailer:
transport: "%mailer_transport%"
host: "%mailer_host%"
username: "%mailer_user%"
password: "%mailer_password%"
encryption: ssl
port : 465
auth_mode : login
# spool: { type: memory }
# Error monitoring
sentry:
dsn: "https://6145d1aac36c429781fc1b0f79b0da48@sentry.io/1402018"
imports:
- { resource: config_dev.yml }
framework:
test: ~
session:
storage_id: session.storage.mock_file
profiler:
collect: false
web_profiler:
toolbar: false
intercept_redirects: false
swiftmailer:
disable_delivery: true
# This file is a "template" of what your parameters.yml file should look like
# Set parameters here that may be different on each deployment target of the app, e.g. development, staging, production.
# http://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
parameters:
# SAAS Config
use_as_saas: false
# URL config
base_protocol: https
base_url: saas.localhost # my-site.com
base_path: ~ # on localhost its probably something like /GoGoCarto/web/app_dev.php
# EMAIL SERVER
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: user@localhost.fr
mailer_password: ~
# CONTACT EMAIL (displayed on error messages)
contact_email: "contact@localhost.fr"
instance_name: "GoGoCarto"
# A secret key that's used to generate certain security-related tokens
secret: ThisTokenIsNotSoSecretChangeIt
csrf_protection: false # active csrf protection on production servers
# OAUTH CONF
oauth_communs_id: "disabled"
oauth_communs_secret: "disabled"
oauth_google_id: "disabled"
oauth_google_secret: "disabled"
oauth_facebook_id: "disabled"
oauth_facebook_secret: "disabled"
# MONGODB
mongodb_server: "mongodb://localhost:27017"
# UPLOAD
images_max_filesize: '8M' # for public images upload
image_resize_width: 1000 # in pixel
files_max_filesize: '1M' # for other public file upload
_wdt:
resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
prefix: /_wdt
_profiler:
resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
prefix: /_profiler
_errors:
resource: "@TwigBundle/Resources/config/routing/errors.xml"
prefix: /_error
_main:
resource: routing.yml
services:
jms_serializer.naming_strategy_camelCase:
public: true
class: 'JMS\Serializer\Naming\IdenticalPropertyNamingStrategy'
jms_serializer.naming_strategy:
public: true
class: 'JMS\Serializer\Naming\SerializedNameAnnotationStrategy'
arguments : ['@jms_serializer.naming_strategy_camelCase']
jms_serializer.expression_language:
public: true
class: 'Symfony\Component\ExpressionLanguage\ExpressionLanguage'
jms_serializer.expression_evaluator:
public: true
class: 'JMS\Serializer\Expression\ExpressionEvaluator'
arguments : ['@jms_serializer.expression_language']
app.twig_extension:
class: Application\Twig\AppExtension
public: true
arguments: [ "@doctrine.odm.mongodb.document_manager" ]
tags:
- { name: twig.extension }
custom.sonata.security.handler.role:
public: true
class: Application\Sonata\UserBundle\Security\CustomRoleSecurityHandler
arguments:
- "@security.authorization_checker"
- [ROLE_SUPER_ADMIN]
\ No newline at end of file
services:
sonata.block.service.monitoring:
class: Biopen\GeoDirectoryBundle\Block\MonitoringElementsBlockService
public: true
arguments: [ "@templating", "@doctrine.odm.mongodb.document_manager" ]
tags:
- { name: sonata.block }
sonata.block.service.charts:
class: Biopen\GeoDirectoryBundle\Block\ChartBlockService
public: true
arguments: [ "@templating", "@doctrine.odm.mongodb.document_manager", "@biopen.config_service" ]
tags:
- { name: sonata.block }
biopen.block.recent_elements:
class: Biopen\GeoDirectoryBundle\Block\RecentElementsBlockService
public: true
arguments: [ "@templating", "@doctrine.odm.mongodb.document_manager", "@sonata.admin.pool" ]
tags:
- { name: sonata.block }
parameters:
app.version: 2.5.8
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment