# install xcode command line tool
$ xcode-select --install
# Make sure xcode path is properly set
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 Core\SomeDomain\Application\DTOs; | |
use Exception; | |
use Illuminate\Contracts\Validation\ValidatesWhenResolved; | |
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; | |
class SampleInput implements ValidatesWhenResolved | |
{ |
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 | |
/** | |
* Dot notation for access multidimensional arrays. | |
* | |
* $dn = new DotNotation(['bar'=>['baz'=>['foo'=>true]]]); | |
* | |
* $value = $dn->get('bar.baz.foo'); // $value == true | |
* | |
* $dn->set('bar.baz.foo', false); // ['foo'=>false] | |
* |
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 | |
// Slim 4. | |
$routes = $app->getRouteCollector()->getRoutes(); | |
$output = []; | |
/** Slim\Routing\Route $route */ | |
foreach ($routes as $route) { | |
$output[] = [ |
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
RUN apt update | |
RUN apt upgrade -y | |
RUN apt install -y apt-utils | |
RUN a2enmod rewrite | |
RUN apt install -y libmcrypt-dev | |
RUN docker-php-ext-install mcrypt | |
RUN apt install -y libicu-dev | |
RUN docker-php-ext-install -j$(nproc) intl | |
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev | |
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ |
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 Doctrine\DBAL\Logging; | |
use Doctrine\Common\Collections\ArrayCollection; | |
use Symfony\Component\HttpKernel\KernelInterface; | |
use function microtime; | |
use function exec; | |
/** |
https://en.wikipedia.org/wiki/Command_pattern
Um texto que usa JOBs - de forma errada - para implementar service layer em projetos Laravel.
https://stackoverflow.com/questions/52895669/laravel-patterns-usage-of-jobs-vs-services
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\Support\Validation; | |
abstract class Validation | |
{ | |
/** | |
* @var array |
-
Anemic Domain Model vs Rich Domain Model with Examples
https://thevaluable.dev/anemic-domain-model/ -
Symfony: services and Rich Domain Models
https://stackoverflow.com/questions/58091042/symfony-services-and-rich-domain-models -
How to use Repository with Doctrine as Service in Symfony
https://tomasvotruba.com/blog/2017/10/16/how-to-use-repository-with-doctrine-as-service-in-symfony/
NewerOlder