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 | |
namespace App\Validator; | |
use Symfony\Component\Validator\Constraints\Range; | |
use Symfony\Component\Validator\Constraints\RangeValidator; | |
class YearRange extends Range | |
{ | |
public function __construct($options) |
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 | |
namespace App\Form\Type; | |
use Money\Currencies\ISOCurrencies; | |
use Money\Currency; | |
use Money\Formatter\DecimalMoneyFormatter; | |
use Money\Parser\DecimalMoneyParser; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\Extension\Core\Type\MoneyType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\Form\CallbackTransformer; |
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
use Symfony\Component\Validator\Validation; | |
class TestedTypeTest extends TypeTestCase | |
{ | |
private $validator; | |
protected function getExtensions() | |
{ | |
$validator = Validation::createValidator(); |
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
private function addHttpClientOptionsSection(NodeBuilder $rootNode): NodeBuilder | |
{ | |
return $rootNode | |
->integerNode('max_host_connections') | |
->info('The maximum number of connections to a single host.') | |
->defaultValue(6) | |
->end() | |
->arrayNode('default_options') | |
->children() | |
->fixXmlConfig('header') |
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
private function addHttpClientSection(ArrayNodeDefinition $rootNode) | |
{ | |
$subNode = $rootNode | |
->children() | |
->arrayNode('http_client') | |
->info('HTTP Client configuration') | |
->canBeEnabled() | |
->fixXmlConfig('client') | |
->children(); |
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
manyToOne: | |
candidate: | |
targetEntity: \AppBundle\Entity\Candidate | |
inversedBy: interviews | |
joinColumn: | |
name: candidate_id | |
referencedColumnName: id | |
user: | |
targetEntity: \AppBundle\Entity\User | |
inversedBy: interviews |
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
{ | |
"require": { | |
"symfony/symfony": "^4.0" | |
}, | |
"minimum-stability": "dev" | |
} |
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 | |
declare(strict_types = 1); | |
namespace App\Entity; | |
class Product | |
{ | |
public $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
json.form.normalizer: | |
class: Adsc\MyBundle\Normalizer\FormErrorNormalizer | |
tags: | |
- { name: serializer.normalizer, priority: 10 } |
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 findByProductId($id) { | |
return $this->createQueryBuilder('mc') | |
->join('mc.product', 'product') | |
->where('product.id = :id') | |
->setParameter('id', $id) | |
; | |
} |
NewerOlder