This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

How to Install Symfony 5.2 Using Composer – Step by Step Installation Guide

July 19, 2021

4 Min Read
install symfony

Symfony is the leading, modern PHP framework that is used to create secure websites and web applications with the help of its different components. It’s a popular MVC framework that components are reusable PHP libraries that can be treated as stand-alone – they are configurable, tested, and secure. Symfony is simple to install and configure on the Cloudways platform, and its best feature is its ability to reuse its PHP components. In this article, we want to introduce you to How to Install Symfony on Cloudways Platform.

Symfony 5.2 was made available in November 2020. It comes with exciting improvements like Pseudo-localization translator, EventSource HTTP client, PHP 8 attributes, Semaphore component, Session profiling, Shared locks, Shared locks, Constraints as PHP attributes, Console signals, Front controller configuration, Notifier improvements, and many others.

In this first look, I will walk through the release and highlight the new features and the new improvements so that you can start using Symfony 5.2 to streamline your projects. I will also include a guide on how to install Symfony 5.2 using the Composer.

symfony PHP Framework Usage Statistics

Reference: Builtwith, May 2021

Less Hassle. More Development.

Let us future-proof your hosting requirements. You focus on building your applications.

What’s New in Symfony 5.2 – Features and Improvements

Pseudo-localization translator: Symfony 5.2 adds support for pseudo-localization, a software testing method used for testing internationalization.

True colours in the console: In Symfony 5.2, Console applications can use 24-bit colours to define the text and background colours.

Session profiling: Symfony 5.2 will provide session profiling in the debug toolbar and the profiler, showing you all the session usages and their full details, including PHP backtraces.

Constraints as PHP attributes: In Symfony 5.2, you can use PHP 8 attributes to define the validation constraints.

Notifier improvements: The Notifier component is easier to debug and provides integration with lots of new third-party services.

Semaphore component: Symfony 5.2 introduces a Semaphore component to complement the existing Lock component and provide access to a shared resource to multiple concurrent processes.

Shared locks: Symfony 5.2 adds support for shared locks, which is a synchronization primitive used to solve one of the readers–writers problems.

Front controller configuration: In Symfony 5.2 the Behaviour Of the front controller can be modified with configuration options, without having to edit the index.php file.

You might also like: PHP 8 is Now Available At Cloudways Platform

Install Symfony 5.2 on Cloudways Platform

Symfony 5.2 Prerequisites

  • Install PHP 7.2.5 or higher
  • Ctype
  • Iconv
  • JSON
  • PCRE
  • Session
  • SimpleXML
  • Tokenizer

Note: If you want to use any optional component, see these Requirements for Running Symfony.

Launch Server on Cloudways

To Install Symfony on the server, select your server and custom PHP application. Select PHP server size as per your website traffic, and location according to your preferred region.

cloudways-server

Click Launch Now and wait for a few minutes for the optimized PHP application to be deployed on the Server.

After completing all these steps, you can finally navigate to the application tab and select the Symfony application. Click on it to find further details inside:

symfony-server

Access SSH

Now, to install Symfony 5.2.6 on the server, Move on to the “Server Management tab” to launch “SSH Terminal”, located in the “Master Credentials”. Here you can find your login credentials for the SSH terminal.

credentials

You have to open the SSH terminal to run the composer command. You can either use the Putty terminal or Cloudways SSH terminal as per the requirements.

Now I would access the public_html folder with the following command

ls command is used to list files or directories in Linux
CD use for change directory

As a precautionary measure, delete all the existing files and folders inside the public_html folder through this command:

rm -rf

remove-files

Install Symfony Using Composer Command

Now, use the following command to install Symfony through composer.

composer create-project symfony/website-skeleton myproject

Wait for the download to finish.

symfony-installation

symfony-installation-2

You can access the Symfony welcome page by adding /myproject/public/ to the default application URL. If you see the welcome page, everything has been configured successfully.

http://your_application_url/myproject/public/

The Symfony 5.2.6 has been installed.

Conclusion

This brings us to the end of this article which highlighted in detail how to install Symfony using Composer on Cloudways. Let me know in the comments section below if you faced any difficulty during the installation process and share your experiences with Symfony 5.

I’ve covered all the latest Improvements. This article should help you learn and understand what’s new and get you started with an all-new Symfony 5 plus how you can install Symfony using the composer.

In addition to the user-friendly UI, Cloudways is the fully managed Platform that offers several exciting features including a free SSL certificate by Let’s Encrypt, an optimized PHP stack, CloudwaysBot for prompt notifications, vertical scaling, and top-notch technical support

To help you make an informed decision, Cloudways offers a free 3-day trial.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Customer Review at

“Cloudways hosting has one of the best customer service and hosting speed”

Sanjit C [Website Developer]

Shahzeb Ahmed

Shahzeb is a Digital Marketer with a Software Engineering background, works as a Community Manager — PHP Community at Cloudways. He is growth ambitious and aims to learn & share information about PHP & Laravel Development through practice and experimentation. He loves to travel and explore new ideas whenever he finds time. Get in touch with him at [email protected]

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!