Unverified Commit c78b6f86 authored by Sebastian Castro's avatar Sebastian Castro
Browse files

Upgrade to symfony 3.4, php7

parent c9190c10
......@@ -19,8 +19,8 @@ class AppKernel extends Kernel
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Bazinga\Bundle\GeocoderBundle\BazingaGeocoderBundle(),
new JMS\SerializerBundle\JMSSerializerBundle(),
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
new Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle(),
new Pix\SortableBehaviorBundle\PixSortableBehaviorBundle(),
......@@ -37,7 +37,7 @@ class AppKernel extends Kernel
new Sonata\AdminBundle\SonataAdminBundle(),
new Knp\Bundle\MarkdownBundle\KnpMarkdownBundle(),
new Ivory\CKEditorBundle\IvoryCKEditorBundle(),
new FOS\CKEditorBundle\FOSCKEditorBundle(),
new Sonata\FormatterBundle\SonataFormatterBundle(),
new FOS\UserBundle\FOSUserBundle(),
......@@ -48,7 +48,7 @@ class AppKernel extends Kernel
new Ob\HighchartsBundle\ObHighchartsBundle(),
new Vich\UploaderBundle\VichUploaderBundle(),
new Sentry\SentryBundle\SentryBundle(),
];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
......
......@@ -69,9 +69,9 @@ twig:
"%kernel.root_dir%/../src/Biopen/SaasBundle/Resources/views": BiopenSaasBundle
form_themes:
- 'SonataFormatterBundle:Form:formatter.html.twig'
form:
resources:
- 'SonataFormatterBundle:Form:formatter.html.twig'
# form:
# resources:
# - 'SonataFormatterBundle:Form:formatter.html.twig'
# Doctrine Configuration
doctrine:
......
......@@ -13,9 +13,10 @@ sonata_block:
sonata_doctrine_mongo_db_admin:
templates:
form:
- @BiopenAdmin/core_custom/form_admin_fields.html.twig
- "@BiopenAdmin/core_custom/form_admin_fields.html.twig"
sonata_formatter:
default_formatter: "text"
formatters:
markdown:
service: sonata.formatter.text.markdown
......@@ -68,7 +69,7 @@ sonata_admin:
templates:
# default global templates
layout: SonataAdminBundle::layout.html.twig
edit: @BiopenAdmin/core_custom/base_edit.html.twig
edit: "@BiopenAdmin/core_custom/base_edit.html.twig"
dashboard:
blocks:
# display a dashboard block
......
......@@ -11,7 +11,7 @@ bazinga_geocoder:
openstreetmap:
locale: fr
ivory_ck_editor:
fos_ck_editor:
default_config: full
configs:
full:
......
......@@ -23,5 +23,5 @@ services:
custom.sonata.security.handler.role:
class: Application\Sonata\UserBundle\Security\CustomRoleSecurityHandler
arguments:
- @security.authorization_checker
- "@security.authorization_checker"
- [ROLE_SUPER_ADMIN]
\ No newline at end of file
services:
sonata.block.service.monitoring:
class: Biopen\GeoDirectoryBundle\Block\MonitoringElementsBlockService
arguments: [ @templating, @doctrine.odm.mongoDB.document_manager ]
arguments: [ "@templating", "@doctrine.odm.mongoDB.document_manager" ]
tags:
- { name: sonata.block }
sonata.block.service.charts:
class: Biopen\GeoDirectoryBundle\Block\ChartBlockService
arguments: [ @templating, @doctrine.odm.mongoDB.document_manager, @biopen.config_service ]
arguments: [ "@templating", "@doctrine.odm.mongoDB.document_manager", "@biopen.config_service" ]
tags:
- { name: sonata.block }
biopen.block.recent_elements:
class: Biopen\GeoDirectoryBundle\Block\RecentElementsBlockService
arguments: [ @templating, @doctrine.odm.mongoDB.document_manager, @sonata.admin.pool ]
arguments: [ "@templating", "@doctrine.odm.mongoDB.document_manager", "@sonata.admin.pool" ]
tags:
- { name: sonata.block }
{
"name": "GoGoCarto",
"name": "pixelhumain/gogocarto",
"description": "Collaborative geo directory",
"license": "AGPL-3",
"type": "project",
......@@ -18,36 +18,33 @@
}
},
"require": {
"php": ">=5.5.9",
"symfony/symfony": "~2.7",
"twig/twig": "1.35",
"php": "^7.1",
"symfony/symfony": "^3.4",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"symfony/swiftmailer-bundle": "^2.6.4",
"symfony/monolog-bundle": "^3.1",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"sensio/framework-extra-bundle": "^5.0",
"incenteev/composer-parameter-handler": "^2.0",
"doctrine/doctrine-fixtures-bundle": "~2.2",
"stof/doctrine-extensions-bundle": "^1.2",
"coresphere/console-bundle": "dev-master",
"symfony/assetic-bundle": "^2.7",
"symfony/assetic-bundle": "^2.7",
"willdurand/geocoder-bundle":"^4.1",
"jms/serializer-bundle": "^1.1",
"friendsofsymfony/jsrouting-bundle": "^1.6",
"joshtronic/php-loremipsum": "dev-master",
"doctrine/mongodb-odm": "dev-master",
"doctrine/mongodb-odm": "^1.3",
"doctrine/mongodb-odm-bundle": "^3.0",
"sonata-project/admin-bundle": "3.9",
"sonata-project/doctrine-mongodb-admin-bundle": "^3.0",
"sonata-project/admin-bundle": "^3.5",
"sonata-project/doctrine-mongodb-admin-bundle": "^3.3",
"pixassociates/sortable-behavior-bundle": "^1.2",
"sonata-project/formatter-bundle": "3.1",
"sonata-project/user-bundle": "^3.0",
"knplabs/knp-menu": "2.2.0",
"knplabs/knp-menu-bundle": "2.1.3",
"sonata-project/formatter-bundle": "^4.1",
"knplabs/knp-menu": "~2.3",
"knplabs/knp-menu-bundle": "^2.2",
"sonata-project/exporter" : "^1.7",
"sonata-project/easy-extends-bundle":"^2.1",
"friendsofsymfony/user-bundle":"~1.3",
"hwi/oauth-bundle": "^0.5.3",
"ob/highcharts-bundle": "^1.6",
"vich/uploader-bundle": "^1.4",
......@@ -55,7 +52,10 @@
"alcaeus/mongo-php-adapter": "^1.1",
"ozdemirburak/iris": "^1.2",
"guzzlehttp/guzzle": "~6.0",
"sentry/sentry-symfony": "^1.0"
"sentry/sentry-symfony": "^1.0",
"friendsofsymfony/user-bundle": "^2.1",
"sonata-project/user-bundle": "^4.5",
"twig/twig": "^2.10"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
......@@ -85,12 +85,6 @@
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
]
},
"config": {
"platform": {
"php": "5.6.25",
"ext-mongo": "1.6.16"
}
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
......
This diff is collapsed.
FROM php:5.6-apache
FROM php:7.3-apache
RUN apt-get update
RUN apt-get install --yes --force-yes cron g++ gettext libicu-dev openssl libc-client-dev libkrb5-dev libxml2-dev libfreetype6-dev libgd-dev libmcrypt-dev bzip2 libbz2-dev libtidy-dev libcurl4-openssl-dev libz-dev libmemcached-dev libxslt-dev gnupg nano git
RUN apt-get install --yes cron g++ gettext libicu-dev openssl libc-client-dev libkrb5-dev libxml2-dev libfreetype6-dev libgd-dev libmcrypt-dev bzip2 libbz2-dev libtidy-dev libcurl4-openssl-dev libz-dev libmemcached-dev libxslt-dev gnupg nano git
RUN apt-get -y install libzip-dev
# PHP Configuration
RUN docker-php-ext-install bcmath
......@@ -16,7 +17,7 @@ RUN docker-php-ext-install gettext
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl
RUN docker-php-ext-install imap
RUN docker-php-ext-install intl
RUN docker-php-ext-install mcrypt
# RUN docker-php-ext-install mcrypt
RUN docker-php-ext-install soap
RUN docker-php-ext-install tidy
RUN docker-php-ext-install xmlrpc
......@@ -26,6 +27,15 @@ RUN docker-php-ext-install xsl
RUN docker-php-ext-install zip
RUN docker-php-ext-configure hash --with-mhash
# MongoDB extension
RUN pecl install mongodb \
&& docker-php-ext-enable mongodb
# Imagemagick
RUN apt-get install --yes libmagickwand-dev libmagickcore-dev imagemagick
RUN printf "\n" | pecl install imagick
RUN docker-php-ext-enable imagick
# Apache Configuration
RUN a2enmod rewrite
RUN a2enmod headers
......@@ -35,27 +45,13 @@ RUN a2enmod ssl
RUN a2ensite default-ssl
RUN openssl req -subj '/CN=example.com/O=My Company Name LTD./C=US' -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /etc/ssl/private/ssl-cert-snakeoil.key -out /etc/ssl/certs/ssl-cert-snakeoil.pem
# Imagemagick
RUN apt-get install --yes --force-yes libmagickwand-dev libmagickcore-dev
RUN yes '' | pecl install -f imagick
RUN docker-php-ext-enable imagick
# Composer
RUN \
COMPOSER_SIG=$(curl -L https://composer.github.io/installer.sig) \
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === '$COMPOSER_SIG') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php \
&& php -r "unlink('composer-setup.php');" \
&& mv composer.phar /usr/local/bin/composer
# MongoDB extension
RUN pecl install mongodb \
&& docker-php-ext-enable mongodb
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Node & NPM
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get --yes --force-yes install nodejs
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get --yes install nodejs
RUN curl -L https://npmjs.org/install.sh | sh
# Gulp
RUN npm install -g gulp
......@@ -68,3 +64,5 @@ COPY apache.conf /etc/apache2/sites-available/000-default.conf
RUN rm -R /var/www/html
WORKDIR /var/www
RUN apt-get install unzip
\ No newline at end of file
......@@ -5,7 +5,7 @@ services:
biopen_user.registration.form.type:
class: Application\Sonata\UserBundle\Form\Type\RegistrationFormType
arguments: [ %fos_user.model.user.class%, %sonata.user.registration.form.options% ]
arguments: [ %fos_user.model.user.class% ]
tags:
- { name: "form.type", alias: "biopen_user_registration"}
......@@ -13,7 +13,7 @@ services:
class: Application\Sonata\UserBundle\Form\Handler\RegistrationFormHandler
scope: "request"
arguments:
- "@request"
- "@request_stack"
- "@fos_user.user_manager"
- "@fos_user.mailer"
- "@fos_user.util.token_generator"
......
services:
my_user_provider:
class: Application\Sonata\UserBundle\Security\FOSUBUserProvider
arguments: [@fos_user.user_manager,{facebook: facebookUid, gplus: gplusUid, communs: communsUid}]
arguments: ["@fos_user.user_manager",{facebook: facebookUid, gplus: gplusUid, communs: communsUid}]
biopen.authentication_handler:
class: Application\Sonata\UserBundle\Security\AuthenticationHandler
public: false
arguments: [ '@router', '@session', '@security.context']
arguments: [ '@router', '@session', "@security.token_storage"]
biopen.config_service:
class: Biopen\CoreBundle\Services\ConfigurationService
arguments: [ "@doctrine.odm.mongoDB.document_manager", "@security.context" ]
arguments: [ "@doctrine.odm.mongoDB.document_manager", "@security.token_storage" ]
biopen.mail_service:
class: Biopen\CoreBundle\Services\MailService
......
......@@ -7,15 +7,15 @@ services:
biopen.element_vote_service:
class: Biopen\GeoDirectoryBundle\Services\ElementVoteService
arguments: [ "@doctrine.odm.mongoDB.document_manager", "@security.context", "@biopen.config_service", "@biopen.element_pending_service" ]
arguments: [ "@doctrine.odm.mongoDB.document_manager", "@security.token_storage", "@biopen.config_service", "@biopen.element_pending_service" ]
biopen.element_action_service:
class: Biopen\GeoDirectoryBundle\Services\ElementActionService
arguments: [ "@doctrine.odm.mongoDB.document_manager", "@security.context", "@biopen.mail_service", "@biopen.element_pending_service", "@biopen.user_interaction_service" ]
arguments: [ "@doctrine.odm.mongoDB.document_manager", "@security.token_storage", "@biopen.mail_service", "@biopen.element_pending_service", "@biopen.user_interaction_service" ]
biopen.element_pending_service:
class: Biopen\GeoDirectoryBundle\Services\ElementPendingService
arguments: [ "@doctrine.odm.mongoDB.document_manager", "@security.context", "@biopen.mail_service", "@biopen.user_interaction_service" ]
arguments: [ "@doctrine.odm.mongoDB.document_manager", "@security.token_storage", "@biopen.mail_service", "@biopen.user_interaction_service" ]
biopen.element_form_service:
class: Biopen\GeoDirectoryBundle\Services\ElementFormService
......@@ -31,11 +31,11 @@ services:
biopen.user_interaction_service:
class: Biopen\GeoDirectoryBundle\Services\UserInteractionService
arguments: [ "@doctrine.odm.mongoDB.document_manager", "@security.context" ]
arguments: [ "@doctrine.odm.mongoDB.document_manager", "@security.token_storage" ]
biopen.webhook_service:
class: Biopen\GeoDirectoryBundle\Services\WebhookService
arguments: [ "@doctrine.odm.mongoDB.document_manager", "@router", "@security.context", "%base_url%", "%base_path%" ]
arguments: [ "@doctrine.odm.mongoDB.document_manager", "@router", "@security.token_storage", "%base_url%", "%base_path%" ]
biopen.taxonomy_json_generator:
class: Biopen\GeoDirectoryBundle\EventListener\TaxonomyJsonGenerator
......@@ -81,5 +81,5 @@ services:
biopen.gogocartojs_service:
class: Biopen\GeoDirectoryBundle\Services\GoGoCartoJsService
arguments: [ "@doctrine.odm.mongoDB.document_manager", "@security.context", "@router", "@session", "%base_protocol%" ]
arguments: [ "@doctrine.odm.mongoDB.document_manager", "@security.token_storage", "@router", "@session", "%base_protocol%" ]
scope: request
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