If you want to try the new release of PHP 8 and you want to install it on your local machine without having side effects on your current PHP projects and your current PHP 7 stack, I have some suggestion for you.
I think that the safest and quickest way to install and use PHP 8 is running PHP in an isolated environment. To achieve that, you can use a Docker image with all things needed by PHP runtime avoiding negative impact or conflicts with your current local PHP 7 installation.
In this tutorial I’m going to use my custom docker image robertobutti/php8-alpine-cli:php8.0.0 . As soon as it will be published a PHP 8 official image on https://hub.docker.com/_/php?tab=tags&page=1&ordering=last_updated I will update the tutorial using the official image. …
In my previous post, I implemented my first Vue3 component.
I implementend a very simple web app (roll the dice) where I had a “div” where to show the result and a button to trigger the roll and generate a random number from 1 to 6.
In that case, I used “ref()” to create reactive properties.
“My first Vue3 component” article where I used ref() for declaring reactive properties: https://medium.com/swlh/my-first-vue3-component-6e1ef1670544
For example in “setup()” function of my component I declared “dice” property in order to store the last result of the roll action.
I like to work with Vuejs, and today I tried to use the next version of Vuejs: Vue3.
My first question was: how can I create a new Web Application with Vue3 and the right npm dependencies?
To do that, I used Vite as build tool. Vite is an amazing web dev build tool that serves your code via native ES Module imports during dev and bundles it with Rollup for production. Vite uses Vue3. So if we use Vite we have an amazing fast build tool and we have all vue3 dependencies ready to use.
In order to install Vite and your sample application based on…
GitHub Actions allows you to execute some commands when a GitHub event is triggered. For example you can automate the execution of unit tests on your code base when you push your code in the repository.
With GitHub Actions you can:
LaraLens is a Laravel Artisan Command to show you the current configuration of your application. It is useful to show in your terminal the status of:
Creating a workflow for GitHub Action is quite easy. You need to understand how the “GitHub Workflow” process works and then you need to create a Yaml file to define your workflow configuration.
You could start from:
So, once you are able to start to write your workflow Yaml file, probably you would need a support in your editor, while you are creating/editing your Yaml file. A good support from your editor would be: suggest and show some directive description while you are typing and check the syntax and notify you if you are doing some error (typo, wrong directive etc). …
With Github actions you can automate some specific tasks and you can execute them on a dedicated environment.
Suppose that you have a Laravel application on a Github repository and you want to execute the test suite (via phpunit) every time you push your code on master branch.
From the Github repository page, click on “Actions”.
On Actions section you can create and manage your workflow.
A workflow is a set of steps that it will be execute once you perform a specific action on your repository, for example push your code on master branch.
To create a new workflow, in the action section, click on the “New workflow” button. …
With this post I will show you how to implement a command line interface to report and retrieve weather forecast in a specific location.
To achieve this, I will use:
What we are going to do:
The user story could be:
As user I can launch a command “php artisan weather:forecast Venice”, so that I can see a list of an hour-by-hour seven day weather forecast. …
So, I decided to mix all together, write a small side project and write some notes about my experiment about mixing 3D map, React, Typescript.
The goal is to highlight some not obvious steps when you need to mix together all these things.
The steps will be:
I just published an updated article for Laravel 7 + MySQL + managing secrets with GitHub Actions: https://medium.com/swlh/test-automation-for-laravel-7-and-mysql-with-github-actions-467493c2f7ed
GitHub Actions allows you to execute some commands when a GitHub event is triggered. For example you can automate the execution of unit test of your code when you push your code in the repository.
GitHub Actions provide you an environment where you can setup the technology stack, fetch your code from the repository, configure your software and execute some command.
The scenario that I would like to explain you…