Skip to content

Instantly share code, notes, and snippets.

Avatar

Timo Bakx TimoBakx

View GitHub Profile
@TimoBakx
TimoBakx / Documentation.php
Created Mar 10, 2020
Add a dynamic property to API Platform documentation
View Documentation.php
<?php
declare(strict_types=1);
namespace App\Api;
use ArrayObject;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
final class Documentation implements NormalizerInterface
{
@TimoBakx
TimoBakx / NotFound.php
Last active Oct 3, 2019
Exception wrapper for Api Platform
View NotFound.php
<?php
declare(strict_types=1);
/**
* This is an example of the exception interfaces I use to map my internal exceptions. They're just empty.
*/
namespace App\Api\Exception;
use Throwable;
View CompilerPass.php
<?php
declare(strict_types=1);
namespace App\Util\Logger;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;
View prophet-test-result.php
PHPUnit 8.0.4 by Sebastian Bergmann and contributors.
Testing
.... 4 / 4 (100%)......PHP Fatal error: Uncaught Exception: The following test produced memory leaks:
* App\ATest::testA
in /Users/timobakx/workspace/visser/vendor/roave/no-leaks/src/CollectTestExecutionMemoryFootprints.php:102
Stack trace:
#0 /Users/timobakx/workspace/visser/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(636): Roave\NoLeaks\PHPUnit\CollectTestExecutionMemoryFootprints->executeAfterLastTest()
#1 /Users/timobakx/workspace/visser/vendor/phpunit/phpunit/src/TextUI/Command.php(208): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, true)
#2 /Users/timobakx/workspace/visser/vendor/roave/no-leaks/bin/roave-no-leaks.php(46): PHPUnit\TextUI\Command->run(Array, true)
View prophet-test.php
<?php
declare(strict_types=1);
namespace App;
use PHPUnit\Framework\TestCase;
use stdClass;
class ATest extends TestCase
{
@TimoBakx
TimoBakx / Roave no-leak output.txt
Last active Mar 22, 2019
Roave no-leak output
View Roave no-leak output.txt
$ vendor/bin/roave-no-leaks
PHPUnit 8.0.4 by Sebastian Bergmann and contributors.
Testing
............................................................. 61 / 3742 ( 1%)
...........................................................S. 122 / 3742 ( 3%)
............................................................. 183 / 3742 ( 4%)
..S.....S.............................................S...... 244 / 3742 ( 6%)
............................................................. 305 / 3742 ( 8%)
............................................S.......S........ 366 / 3742 ( 9%)
View keybase.md

Keybase proof

I hereby claim:

  • I am timobakx on github.
  • I am timobakx (https://keybase.io/timobakx) on keybase.
  • I have a public key ASAE5guIOJCp0_TBxZ-a9B-k0qmSTG4sMm_Nuw6OWbRxbAo

To claim this, I am signing this object:

You can’t perform that action at this time.