Before you start¶
Before installing the framework, you must have the following components on your workstation
List of required components¶
Here is the list of components required for the project to run smoothly. For each component, we have written a page to help you install and use it:
- Package manager
- Version manager
- Development environment
- OpenSSL extension
- mbstring extension
- pdo_mysql extension
- pdo_sqlite extension
- Dependency manager
- CURL command
- Local environment
Package manager¶
A developer's workstation (or that of anyone working in IT) must be well mastered. (This is also called a "setup".)
To make installing and maintaining your setup easier, we recommend using a "package manager"
A "package manager" (system-wide) installs the programs you know and love from the command line (CLI) with minimal friction. It:
- Eliminates permission pop-ups
- Hides GUI wizard-style installations
- Avoids the PATH pollution caused by installing many programs
- Avoids unexpected side effects when installing and uninstalling programs
- Automatically finds and installs dependencies
- Performs all the extra configuration steps needed to get a working program
Installation
Important information
Do not open PowerShell in administrator mode
To install "Scoop", follow these instructions:
Open a PowerShell terminal and type the following commands:
For more information, visit https://scoop.sh
Follow the instructions on https://community.chocolatey.org
Important information
You may need to install Apple's Xcode Command Line Tools.
Type the command xcode-select --install in a terminal
To install "Brew", follow the instructions in "Install Homebrew":
For more information, visit https://brew.sh
Version manager¶
We are going to use a distributed version control system called "GIT"
It lets you track the changes made to a set of files over time, which makes collaboration between developers easier.
It also offers advanced features such as the ability to go back to earlier versions of files, to resolve merge conflicts and to collaborate with other developers.
To find out whether GIT is installed on your workstation, type this command in a terminal
Expected result
This result is an example and will probably not be the same as yours.
Installation
To install GIT, open a terminal (PowerShell) to install the bucket:
For more information, visit https://scoop.sh/#/apps?q=git
To install GIT, open a terminal (PowerShell) to install the bucket:
For more information, visit https://community.chocolatey.org/packages/git
To install GIT, open a terminal
For more information, visit https://formulae.brew.sh/formula/git
Development environment¶
This framework uses the PHP language, more information at https://www.php.net
To find out whether PHP is installed on your machine, open a terminal and enter this command:
Expected result
This result is an example and will probably not be the same as yours.
Installation
Required version
The framework requires at least PHP 8.4; we recommend installing version 8.4 or later (8.5)
To install PHP, open a terminal (PowerShell) to install the bucket:
For more information, visit https://scoop.sh/#/apps?q=php
To install PHP, open a terminal (PowerShell) to install the bucket:
For more information, visit https://community.chocolatey.org/packages/php
To install PHP, open a terminal
For more information, visit https://formulae.brew.sh/formula/php
Enabling extensions¶
Where is your php.ini file¶
To find out where your php.ini file is located, you can use the following command:
You will get a result similar to this one:Configuration File (php.ini) Path: /usr/local/etc/php/8.4
Loaded Configuration File: /usr/local/etc/php/8.4/php.ini
Scan for additional .ini files in: /usr/local/etc/php/8.4/conf.d
Additional .ini files parsed: /usr/local/etc/php/8.4/conf.d/ext-opcache.ini
OpenSSL extension¶
To do this, open your php.ini file and uncomment the following line:
Remove the semicolon to enable the extension.mbstring extension¶
To do this, open your php.ini file and uncomment the following line:
Remove the semicolon to enable the extension.pdo_mysql extension¶
To do this, open your php.ini file and uncomment the following line:
Remove the semicolon to enable the extension.pdo_sqlite extension¶
From version v2.3.0 onwards
The pdo_sqlite extension is required for the logging service,
the debug bar and the profiler to work.
To do this, open your php.ini file and uncomment the following line:
Remove the semicolon to enable the extension.excimer extension (optional)¶
The excimer extension enables the debug bar's code profiler.
It is already installed in the framework's Docker image. Outside Docker:
extension=excimer to your php.ini file.
Dependency manager¶
To manage the installation of libraries or packages in the project, we use a dependency manager called "COMPOSER".
To find out whether COMPOSER is installed on your machine, open a terminal and enter this command:
Expected result
This result is an example and will probably not be the same as yours.
Installation
To install COMPOSER, open a terminal (PowerShell) to install the bucket:
For more information, visit https://scoop.sh/#/apps?q=composer
To install composer, open a terminal (PowerShell) to install the bucket:
For more information, visit https://community.chocolatey.org/packages/composer
To install COMPOSER, open a terminal
For more information, visit https://formulae.brew.sh/formula/composer
CURL command¶
Often used for HTTP requests, CURL is a command-line tool for transferring data with URLs.
It is often used to test APIs and scripts or to download files.
More information at https://curl.se
Expected result
This result is an example and will probably not be the same as yours.
curl 7.79.1 (x86_64-apple-darwin21.1.0) libcurl/7.79.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.45.1
Release-Date: 2021-09-22
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL UnixSockets
Installation
To install the "curl" command, follow these instructions:
For more information, visit https://scoop.sh/#/apps?q=curl
To install CURL, open a terminal (PowerShell) to install the bucket:
For more information, visit https://community.chocolatey.org/packages/curl
To install the "curl" command, follow these instructions:
For more information, visit https://formulae.brew.sh/formula/curl
Local environment¶
To emulate the services used by the framework, such as MySQL, we strongly encourage you to use Docker.
Docker is a lightweight virtualisation platform that makes it easy to isolate and manage applications in containers. With Docker, you can create and run containers for the various services your framework needs, such as MySQL, without having to install them directly on your machine. This saves you time and simplifies the development process. So don't hesitate to use Docker to emulate your services!
More information on installing Docker desktop
The framework comes with a compose.yml file that lets you quickly start the services your project needs.
For more information, we come back to this in the "Starting the services" section.
Important information
Using DOCKER is not mandatory. Nevertheless, Docker is an essential tool for modern developers.
You can run the services directly on your machine (mysql, wamp ...), but this can be more complex and take longer. It also freezes the versions of the installed services, which can cause compatibility issues with the versions used by the framework.