Skip to content

Instantly share code, notes, and snippets.

View igorRovenki's full-sized avatar

Igor Onachenko igorRovenki

View GitHub Profile
# https://github.com/symfony/flex/issues/251#issuecomment-364113857
# emmanuelballery says:
I'm currently using a bash script to solve this "ENV vars in test" problem:
```bash
set -o allexport # export all defined variables
source .env # load dev parameters
source .env.test # override with test parameters (only those needed)
@igorRovenki
igorRovenki / ApiResponse.php
Created September 4, 2022 08:51
Данные файлы это участок бекенда, где происходит взаимодействие с сущностью Платежная страница
<?php
namespace App\Api;
class ApiResponse
{
private $message;
private $data;
private $errors;
private $statusCode;
@igorRovenki
igorRovenki / Project.php
Created February 4, 2022 12:48 — forked from ornj/Project.php
ManyToMany / ManyToOne implemented with SonataAdminBundle and SonataMediaBundle.
<?php
namespace Acme\Bundle\ProjectBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Acme\Bundle\ProjectBundle\Entity\ProjectHasMedia;
/**
* Project
@igorRovenki
igorRovenki / JuniorTest.php
Last active January 16, 2017 09:04
Задача по PHP для джуниора
<?php
namespace Tests;
class JuniorTest extends \PHPUnit_Framework_TestCase
{
public function testFn()
{
$a3 = ['s1' => ['s2' => ['s3' => 123]]];
$b4 = ['s1' => ['s2' => ['s3' => ['s4' => 777]]]];
<?php
namespace AppBundle\Command;
use AppBundle\Entity\Event;
use Debril\RssAtomBundle\Protocol\Parser\Item;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@igorRovenki
igorRovenki / jenkins_scenario
Last active August 29, 2015 14:12
jenkins symfony2 behat
#!/bin/sh
# setup project
bin/setup
# clean build dir
rm -rf build/
# prepare logs dir
mkdir -p build/logs/behat

Приложения необходимые для работы инстанса Predanie

PHP, MySql, Apache

sudo apt-get install php5 php5-mysql php5-intl php5-curl php5-xdebug php5-gd php-apc mysql-server apache2

Git

sudo apt-get install git

Java

sudo apt-get install default-jre

<?php
namespace Predanie\ArchiveBundle\Consumer;
use Doctrine\ORM\EntityManager;
use FFMpeg\FFMpeg;
use FFMpeg\Format\Video\Ogg;
use Monolog\Logger;
use OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface;
use PhpAmqpLib\Message\AMQPMessage;

API

Коды ошибок

Коды ошибок соответствуют стандарту RFC 7231 если не описаны иначе.

status_code: 200 – OK 400 – Bad request 404 – Not Found

Ant-Task which runs behat:
<?xml version="1.0" encoding="UTF-8"?>
<project name="Foo" default="build" basedir=".">
....
<target name="behat">
<exec dir="${basedir}/" executable="php" failonerror="true">