This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function testSecurityRolesCanCreateChannelAction() | |
{ | |
// Create a new client to browse the application | |
$client = static::createClient(); | |
$mock_event_dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface') | |
->disableOriginalConstructor() | |
->getMock(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Chatea\MyBundle\Tests\Controller\ChannelControllerTest::testSecurityRolesCanCreateChannelAction | |
Invalid argument supplied for foreach() | |
/var/www/workspace/apiChatea/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php:371 | |
/var/www/workspace/apiChatea/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php:129 | |
/var/www/workspace/apiChatea/app/bootstrap.php.cache:2867 | |
/var/www/workspace/apiChatea/app/bootstrap.php.cache:2820 | |
/var/www/workspace/apiChatea/app/bootstrap.php.cache:2944 | |
/var/www/workspace/apiChatea/app/bootstrap.php.cache:2245 | |
/var/www/workspace/apiChatea/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Client.php:81 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class Intermediare: CategorySection | |
<?php | |
/** | |
* @ORM\Entity(repositoryClass="xxx\SectionBundle\Repositories\GiftCategorySectionRepositoryDoctrine") | |
* @ORM\Table(name="gift_category_section") | |
*/ | |
class GiftCategorySection | |
{ | |
/** | |
* @ORM\Id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My controller: | |
/** | |
* @ParamConverter("channel", class="ApiBundle:Channel") | |
*/ | |
public function showAction(Channel $channel, Request $request) | |
{ | |
$serializer = $this->container->get('serializer'); | |
$channel = $serializer->serialize($channel, 'json', SerializationContext::create()->setGroups(array('list'))); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function createAction(Request $request) | |
{ | |
$entity = new Channel(); | |
$form = $this->createForm(new ChannelType(), $entity); | |
$form->bind($request); | |
if ($form->isValid()) { | |
$this->get('api.model.channel_manager')->save($entity); | |
$view = $this->view($entity, 201); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I want to recuperate events of one artist. | |
My entity event: | |
/** | |
* @ORM\ManyToMany(targetEntity="myproject\ArtisaBundle\Entity\Artist", inversedBy="events") | |
* @ORM\JoinTable(name="events_artists") | |
**/ | |
protected $artists; | |
public function setArtists($artists){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @ORM\Entity | |
* @ORM\Table(name="asistencia") | |
* @ORM\Entity(repositoryClass="sdfs\sdfsBundle\EntityManager\AsistenciaRepository") | |
*/ | |
class Asist{ | |
/** | |
* @ORM\Id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In my config is: | |
"url": { | |
"host": "localhost", | |
"path": "/workspace/xxx", | |
"method": "GET", | |
"headers": { | |
"accept": "application/json" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
An exception has been thrown during the rendering of a template ("An exception occurred while executing 'SELECT COUNT(*) AS dctrn_count FROM (SELECT DISTINCT id6 FROM (SELECT s0_.verb AS verb0, s0_.status_current AS status_current1, s0_.status_wanted AS status_wanted2, s0_.duplicate_key AS duplicate_key3, s0_.duplicate_priority AS duplicate_priority4, s0_.created_at AS created_at5, s0_.id AS id6, s1_.type AS type7, s1_.text AS text8, s1_.id AS id9, s2_.model AS model10, s2_.identifier AS identifier11, s2_.hash AS hash12, s2_.id AS id13, s1_.action_id AS action_id14, s1_.component_id AS component_id15 FROM spy_timeline_action s0_ INNER JOIN spy_timeline_action_component s3_ ON s0_.id = s3_.action_id AND ((s3_.action_id = s0_.id AND s3_.component_id = ? AND s3_.type = ?)) LEFT JOIN spy_timeline_action_component s1_ ON s0_.id = s1_.action_id LEFT JOIN spy_timeline_component s2_ ON s1_.component_id = s2_.id WHERE s0_.status_current = ? ORDER BY s0_.created_at DESC) dctrn_result) dctrn_table' with params {"1":"sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~ | |
sudo apt-get install unzip | |
sudo apt-get install python-software-properties -y | |
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" | |
sudo apt-get update | |
sudo apt-get install sun-java6-jre sun-java6-plugin -y | |
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.17.6.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz | |
rm elasticsearch.tar.gz |