Laravel with MariaDB and GitLab CI/CD: Illuminate\Database\QueryException: SQLSTATE[HY000] [2006] MySQL server has gone away

When running many tests involving the database one might encounter the following issue: Illuminate\Database\QueryException: SQLSTATE[HY000] [2006] MySQL server has gone away The issue occurred reliably and always at the same test. Temporarily deleting test classes just made another test triggering the issue. When debugging locally it turns out that the maximum connection limit of MariaDB is the root cause. By default MariaDB comes with a connection limit of 100 connections. Laravel however does not use persistent connections by default and therefore consumes a lot of connections when running tests. ...

January 9, 2022 · 1 min

Laravel v5.0.20: Call to undefined method Illuminate\Foundation\Application::getCachedCompilePath()

When creating a new Laravel project and running composer update you might get the following error: Writing lock file Generating autoload files PHP Fatal error: Call to undefined method Illuminate\Foundation\Application::getCachedCompilePath() in /tmp/foo/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php on line 28 [Symfony\Component\Debug\Exception\FatalErrorException] Call to undefined method Illuminate\Foundation\Application::getCachedCompilePath() Script php artisan clear-compiled handling the post-update-cmd event returned with an error [RuntimeException] Error Output: PHP Fatal error: Call to undefined method Illuminate\Foundation\Application::getCachedCompilePath() in /tmp/foo/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand .php on line 28 update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [packages1] ... [packagesN] See also this issue on Github: https://github.com/laravel/framework/issues/8127 ...

March 25, 2015 · 1 min

SQLgreyGUI: A web interface for SQLgrey using #Laravel 5

Today I released a new version of SQLgreyGUI . It’s a web interface for SQLgrey using the Laravel 5 PHP framework. Installation is pretty straight forward – check the README on GitHub.

March 21, 2015 · 1 min

Twig: Render String as Template

In case your template is not located in a file but in the database Twig allows you to render a string: $twig_env = new Twig_Environment(new Twig_Loader_String); $output = $twig_env->render('This is {{ foo }}', [ 'foo' => 'an ordinary string', ]); // $output now contains: This is an ordinary string

January 19, 2015 · 1 min