Skip to content

Instantly share code, notes, and snippets.

View ruudk's full-sized avatar
🔥
Fixing bugs

Ruud Kamphuis ruudk

🔥
Fixing bugs
View GitHub Profile
@ruudk
ruudk / DoctrineSchemaUpdateMiddleware
Last active February 12, 2025 17:42
This custom middleware can be used to overwrite the schema manager on the connection. It allows for supporting DATETIME(6) (with precision) to be properly detected by Doctrine. See https://github.com/doctrine/dbal/issues/6631
final readonly class DoctrineSchemaUpdateMiddleware implements Middleware
{
#[Override]
public function wrap(DriverInterface $driver) : DriverInterface
{
return new class($driver) extends AbstractDriverMiddleware {
#[Override]
public function getDatabasePlatform(ServerVersionProvider $versionProvider) : AbstractPlatform
{
$platform = parent::getDatabasePlatform($versionProvider);
@ruudk
ruudk / README.md
Created December 8, 2022 15:35
How to find the files that are the slowest to analyze with PHPStan?

How to find the files that are the slowest to analyze with PHPStan?

For us, PHPStan became a bit slower with every release. We have a very large codebase with 10.000+ classes. There seem to be a few known issues related to big arrays.

See: phpstan/phpstan#8353 phpstan/phpstan#8146

To understand which files are problematic we run the following command:

@ruudk
ruudk / keybase.md
Created December 11, 2016 12:35
keybase.md

Keybase proof

I hereby claim:

  • I am ruudk on github.
  • I am ruudk (https://keybase.io/ruudk) on keybase.
  • I have a public key ASCVbtM2zKFqoGYjMddeyhtPSDsT--_oCjJr3n2g_xa5Ogo

To claim this, I am signing this object: