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
SUBDIRS := $(wildcard fe-*) | |
PROXIED_COMPOSER_COMMANDS := install build lint test | |
MAKEFLAGS := --jobs=$(words $(SUBDIRS)) | |
define make-composer-dot-rules | |
$1.$2:: | |
cd $1 && composer $2 | |
endef |
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 Elektronik\Bl\DomainBundle\Infrastructure\Elasticsearch\Event; | |
use Symfony\Contracts\EventDispatcher\Event; | |
class AddDocumentEvent extends Event | |
{ | |
private string $index; |
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 | |
function array_select(array $array, array $filter): array | |
{ | |
return array_map(function (array $object) use ($filter) { | |
$object = array_intersect_key($object, $filter); | |
foreach ($object as $key => $value) { | |
if (is_array($filter[$key])) { | |
$object[$key] = array_select($object[$key], $filter[$key]); |
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
Guilhermes-MacBook-Pro:orm guilhermeblanco$ lldb /usr/local/Cellar/php/7.3.2/bin/php | |
(lldb) target create "/usr/local/Cellar/php/7.3.2/bin/php" | |
Current executable set to '/usr/local/Cellar/php/7.3.2/bin/php' (x86_64). | |
(lldb) run ./vendor/bin/phpunit tests/Doctrine/Tests/ORM/Functional/PaginationTest.php --filter testIterateWithOutputWalkersWithRegularJoinWithComplexOrderByReferencingJoined | |
Process 99416 launched: '/usr/local/Cellar/php/7.3.2/bin/php' (x86_64) | |
PHPUnit 7.5.6 by Sebastian Bergmann and contributors. | |
Runtime: PHP 7.3.2 with Xdebug 2.7.0RC2 | |
Configuration: /Users/guilhermeblanco/doctrine/orm/phpunit.xml.dist |
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
#!/usr/sbin/dtrace -s | |
/* | |
* maclife.d | |
* | |
* Example script from Chapter 5 of the book: DTrace: Dynamic Tracing in | |
* Oracle Solaris, Mac OS X, and FreeBSD", by Brendan Gregg and Jim Mauro, | |
* Prentice Hall, 2011. ISBN-10: 0132091518. http://dtracebook.com. | |
* | |
* See the book for the script description and warnings. Many of these are | |
* provided as example solutions, and will need changes to work on your OS. |
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
UPPERBRANCH=master | |
BOTTOMBRANCH=3.4 | |
DIR="src" | |
git checkout $BOTTOMBRANCH | |
php-cs-fixer fix $DIR --rules='{"array_syntax": {"syntax": "short"}}' | |
git diff > patch.patch && splitpatch patch.patch && rm patch.patch | |
git checkout $UPPERBRANCH --force | |
mkdir -p nonworkingpatches workingpatches && rm -rf nonworkingpatches/* workingpatches/* | |
for patchfile in *.patch*; do |
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\EventListener; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
use Symfony\Component\HttpKernel\Event\FilterResponseEvent; | |
use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
use Symfony\Component\HttpKernel\KernelEvents; |
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\Service\Http; | |
use GuzzleHttp\Psr7\Request; | |
use GuzzleHttp\Psr7\Uri; | |
use Http\Client\HttpClient; | |
use Stripe\HttpClient\ClientInterface; |
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
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping | |
https://raw.github.com/doctrine/doctrine2/master/doctrine-mapping.xsd"> | |
<embeddable name="Money\Currency"> | |
<field name="code" length="3" /> | |
</embeddable> | |
</doctrine-mapping> |
NewerOlder