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 | |
// Before | |
public function createUser(Request $request, EntityManagerInterface $em) | |
{ | |
$user = new User(); | |
// request handling, form validation.. | |
$em->persist($user); | |
$em->flush(); |
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 add($entity, bool $flush = false): void | |
{ | |
$this->getEntityManager()->persist($entity); | |
if ($flush) | |
{ | |
$this->getEntityManager()->flush(); | |
} |
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 | |
// Before | |
public function showAllUsers(EntityManagerInterface $em) | |
{ | |
$users = $em->getRepository(User::class)->findAll(); | |
return $this->json($users); | |
} | |
// After |
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
Index: src/Repository/AdRepository.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
diff --git a/src/Repository/AdRepository.php b/src/Repository/AdRepository.php | |
--- a/src/Repository/AdRepository.php (revision c3b6a02259a16176761149ddf9781cd0686e8941) | |
+++ b/src/Repository/AdRepository.php (date 1624288342730) | |
@@ -76,9 +76,7 @@ | |
if ($savedSearch->getFilter()) |
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 Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | |
use Symfony\Component\Form\CallbackTransformer; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\OptionsResolver\OptionsResolver; |
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
2020-04-15T16:44:36.7334919Z ##[section]Starting: Request a runner to run this job | |
2020-04-15T16:44:37.7599294Z Requesting a hosted runner in current repository's account/organization with labels: 'ubuntu-latest', require runner match: True | |
2020-04-15T16:44:37.8710268Z Labels matched hosted runners has been found, waiting for one of them get assigned for this job. | |
2020-04-15T16:44:37.9614304Z ##[section]Finishing: Request a runner to run this job | |
2020-04-15T16:44:45.3605946Z Current runner version: '2.169.0' | |
2020-04-15T16:44:45.3623691Z ##[group]Operating System | |
2020-04-15T16:44:45.3624192Z Ubuntu | |
2020-04-15T16:44:45.3624349Z 18.04.4 | |
2020-04-15T16:44:45.3624482Z LTS | |
2020-04-15T16:44:45.3624614Z ##[endgroup] |
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 | |
class ApiClient | |
{ | |
/** | |
* @return Project[] | |
*/ | |
public function getProjects(): array | |
{ | |
$projects = []; |
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\Controller; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; | |
class FooController | |
{ | |
/** | |
* @Security("is_granted('ROLE_ADMIN') or is_granted('ROLE_SELLER')") | |
*/ |
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\Controller; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; | |
class FooController | |
{ | |
/** | |
* @IsGranted({"ROLE_ADMIN", "ROLE_SELLER"}) | |
*/ |
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 | |
class ApiClient | |
{ | |
/** | |
* @return Project[] | |
*/ | |
public function getProjects(): array | |
{ | |
$projects = []; |
NewerOlder