Gitlab fails to pull image from docker repository
Today, when running CI for one of my projects, I got a pipeline error for my master
branch. At first, I was a bit nervous because I'd already deployed these changes, but then, when I looked into the error itself, I was relieved, because it was not the tests that failed, but rather the downloading of the docker image.
What is Bun JS, and why it's here to stay
Bun is an all-in-one toolkit for JavaScript and TypeScript applications. The toolkit includes runtime, package manager, bundler, and test runner.
Bun vs Node JS: Features and Performance
Just a few days ago, Bun was released - Bun v1.0 - the first stable version.
The JS community has been really active these last few days. People are playing around with Bun, testing, and doing benchmarks.
Bun goal is to replace Node.js, and it claims that it's better, faster, and simpler to use. It reduces complexity by having a lot of tools built-in.
In this post, I'll compare the two and outline their pros and cons.
How to install PHP 8.3 on MacOS
PHP 8.3 will be released on November 23, 2023.
Until then, you can play around and test the beta versions which are already out. In this post, I'll show you how to install the beta version on your Mac.
How to match URL with Symfony Router
Have you ever needed to get a route name based on a given URL in Symfony? It might be a weird use case, but the RouterInterface
in Symfony has the match()
method that will help you do just that.
How to delete doctrine entity by ID in Symfony
The easiest way to remove an entity in Doctrine ORM is by using the $entityManager->remove($entity)
method and then calling $entityManager->flush()
.
How to reload ZSH configuration
I've been using Zsh with Oh-My-Zsh for a long time. All MacOS users have the Zsh (Z shell) installed and configured by default.
My Zsh configuration changes very rarely, but when it does, I need to restart my shell in order for my changes to take effect. Since I'm using tmux I can open a new window (which loads a new Zsh instance), but most of the time, I prefer to reload the current window.
To reload your Zsh (Z shell) .zshrc configuration, you can use the following command
$ exec zsh
How to cache Symfony responses with Cloudflare for free
Caching is a great way to speed up your website and reduce your server load. Why waste energy on pages that rarely change?
ElasticSearch fix 406 Not Acceptable: error
I'm trying to index a document with ElasticSearch PHP client (version 8.8), and I'm getting an error when trying to execute the create document request:
406 Not Acceptable: {"error":"Content-Type header [application/vnd.elasticsearch+json; compatible-with=8] is not supported","status":406}
The weird thing is that the client allowed me to create an index, but when I tried to index a document, I got an error...😕
My configuration is:
- ElasticSearch PHP client: version 8.8
- ElasticSearch server: version 7.10
How to return JSON response from Symfony Controller
To return JSON response from Symfony Controller, you can use the $this->json();
method or new JsonResponse(['...']);
JSON (JavaScript Object Notation) is a lightweight data interchange format commonly used for transmitting and storing structured data. It consists of key-value pairs and arrays, making it versatile for representing various data types in a human-readable format that can be easily processed by computers. It is widely used in programming and especially in APIs.