content:
- NotBlank:
message: bitbag_sylius_cms_plugin.page.content.not_blank
groups: [bitbag]
- Length:
min: 2
minMessage: bitbag_sylius_cms_plugin.page.content.min_length
groups: [bitbag]
content:
- Blank:
groups: [bitbag]
content:
- NotBlank:
allowNull: true
groups: [bitbag]
FROM php:7.2-fpm
RUN apt-get update && apt-get install -y \
sudo \
cron \
zip \
unzip \
build-essential \
zlib1g-dev \
libssl-dev \
libicu-dev \
libpng-dev \
libfontconfig \
libxrender1 \
libgd3 \
libgd-dev \
gnupg2 \
git && rm -rf /var/lib/apt/lists/*
RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
RUN apt-get update && apt-get install -y \
nodejs && rm -rf /var/lib/apt/lists/*
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
RUN sudo apt-get update && sudo apt-get install yarn
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer --version
RUN composer self-update 1.4.1
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
RUN pecl install xdebug-2.6.1 && docker-php-ext-enable xdebug
RUN docker-php-ext-install pdo pdo_mysql opcache mbstring intl exif gd zip
RUN pecl install apcu \
&& echo "extension=apcu.so" > /usr/local/etc/php/conf.d/apcu.ini \
&& echo "apc.enable_cli=1" >> /usr/local/etc/php/conf.d/apcu.ini
RUN echo "opcache.max_accelerated_files = 20000" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
COPY .bashrc /root/
COPY php.ini /usr/local/etc/php/
COPY cron/ultra-cron /etc/cron.d/
RUN chmod 0644 /etc/cron.d/ultra-cron && touch /var/log/cron.log
RUN usermod -u 1000 www-data
WORKDIR /var/www/ultra
Это стандартная практика в хелсчеках
Но вообще либа должна уметь упасть, если нет коннекта
<service
id="sylius.shop_api_plugin.controller.cart.summarize_action"
class="Sylius\ShopApiPlugin\Controller\Cart\SummarizeAction"
>
<argument type="service" id="sylius.shop_api_plugin.view_repository.cart_view_repository" />
<argument type="service" id="fos_rest.view_handler" />
</service>
sylius.shop_api_plugin.controller.get_cart:
class: Sylius\ShopApiPlugin\Controller\Cart\SummarizeAction
arguments:
- '@sylius.shop_api_plugin.view_repository.cart_view_repository'
- '@fos_rest.view_handler'
sylius_shop_api_cart_summary:
path: /carts/{token}
methods: [GET]
defaults:
_controller: sylius.shop_api_plugin.controller.cart.summarize_action
sylius.shop_api_plugin.controller.get_cart:
class: Sylius\ShopApiPlugin\Controller\Cart\SummarizeAction
arguments:
- '@sylius.shop_api_plugin.view_repository.cart_view_repository'
- '@configurable_view_handler