0% found this document useful (0 votes)
36 views24 pages

PHP Framework Migration - From Legacy To Symfony - SMILE

Uploaded by

Arnaldo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views24 pages

PHP Framework Migration - From Legacy To Symfony - SMILE

Uploaded by

Arnaldo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Whitepaper

PHP
framework
migration:
from legacy
to Symfony
How to migrate safely from a PHP legacy
application or an unmaintained PHP
Framework app to Symfony?
INTRODUCTION

Today, every business is partly or fully online. Web platforms play a key role for companies to create deeper and more
profitable relations with their customers. To remain competitive in their markets, companies set ever-increasing web
development deadline targets and quality requirements. A faster time to market is critical to business success.

However, with the accelerated technological progress witnessed in recent years, the arrival of new tools and methods,
the challenges of developing a quality web application and to deliver it on time have never been so complex.

The roadmap to online success


PHP is essential to IT innovation and web development today. From ERP, digital and e-commerce platforms, business
applications to embedded technologies and IoT. With customer experience and customer-centricity leading the way to
success, you will need to think outside-in rather than inside-out.

Your customers are not interested in the issues you have with infrastructure or outdated PHP systems, they want
digital products and services that work 24/7 exactly to their needs. A slow website, security breaches or stranded
development will drive your customers away.

The safe migration to Symfony framework


This whitepaper introduces the Symfony framework as the best choice for companies stuck with PHP versions that
cannot be updated. It is both open-source and well supported by SensioLabs, the leading player in the open-source
community and creator of the Symfony PHP framework. Best of all, Symfony makes a Backward Compatibility
Promise, offers you a Continuous Upgrade Path and maintains your business flexibility.

In addition, we will also highlight the various ways in which SensioLabs can make your migration go as smoothly as
possible. As an accessible introduction, this whitepaper will point you to all the in-depth how-to’s and documentation
needed to safely migrate to Symfony.

Ready to start your migration?

The SensioLabs team


A SMILE group company

PHP framework migration: from legacy to Symfony


2 | 24
TABLE OF CONTENTS

1. The PHP Landscape


A BRIEF INTRODUCTION TO PHP AND FRAMEWORKS 4
THE DEVELOPMENT OF PHP FRAMEWORKS 5
PHP FRAMEWORKS IN 2021 6
IT IS ALL ABOUT THE END-USERS – THE 5 CUSTOMER COMMANDMENTS 7

2. The need to change your PHP legacy now


10 SIGNS THAT YOUR PHP FRAMEWORK IS OUTDATED 8
CHOOSING YOUR NEXT FRAMEWORK 9
THE SYMFONY FRAMEWORK 9
12 REASONS TO CHOOSE SYMFONY 11

3. Migrating to Symfony: setting the new horizon


UNDERSTANDING SYMFONY: THE KEY BASICS 12
HOW SYMFONY ADDRESSES YOUR LEGACY CHALLENGES 14
WHAT SYMFONY MEANS FOR EVERY ROLE 16

4. Symfony for future-proof success


HOW SENSIOLABS HELPS TO SMOOTHEN YOUR LEGACY MIGRATION 17
THE BUILDING BLOCKS OF SUCCESS 18
WHY SYMFONY IS THE SAFE CHOICE FOR YOUR FUTURE – 3 PROMISES 20

You are your customer’s success


ABOUT SENSIOLABS AND SMILE 24

3 | 24
1. The PHP landscape

A brief introduction to PHP and frameworks


PHP is one of the most versatile and cost-effective web development languages in the world.
With its array of functionalities and range of add-ons, its open-source nature and vast online
community makes it an essential tool for developers of all skill levels.

Originally intended to be a scripting tool by its creator, Rasmus Lerdorf in 1994, PHP soon evolved into a full-fledged
programming language to facilitate better interaction with databases and servers. Today, PHP can be used in all
major operating systems, including Windows, Mac OS, UNIX, Linux, and platform powerhouses such as WordPress,
Facebook, Amazon, Google and PayPal.

Frameworks, work
When considering frameworks, two main questions stand out:
● Why use frameworks? Providing the basic structure to build web apps, PHP frameworks help save time by
structuring code and re-using standard modules. Through the provision of pre-packaged, interoperable modules that
can be used repeatedly, businesses can leverage Rapid Application Development with more flexibility, fewer errors
and greater productivity.
● Who are frameworks for? Frameworks are for businesses or individuals that require the integration of functional
software components, both with each other and into existing ecosystems. They are invaluable for developers of all
skill levels to minimize repetitive coding, speed up web development processes, and ensure error-free coding.

Open-source for freedom


As an open-source web language, PHP is completely free, which comes with several significant advantages:
● With no cost involved with expensive licenses, PHP works efficiently with many different databases and keeps
development costs minimal.
● A passionate and widespread community, such as the one at Symfony, actively collaborates to improve web
experiences and functionality.
● No licenses or commercial obligations increase transparency, flexibility and security.
● Dedicated developers and online communities can quickly solve bugs, errors and inefficiencies.

Support still matters


Although PHP frameworks are a progressive and efficient way of working, they do still need a degree of support behind
them. By working closely with active developers who support their frameworks, businesses can benefit from:
● Increased project stability with on-demand consultancy, training and issuing of certificates.
● Faster growth and expansion through better understanding and innovation.

PHP framework migration: from legacy to Symfony


4 | 24
The development of PHP frameworks
The success of PHP is only exceeded by the speed of its evolution. After its release in 1995, it was already entering the
mainstream by 1997 – and, together with the Apache server framework (which was growing in parallel), the two formed
a symbiosis that now sits at the center of many modern platforms.

So, how do people choose a framework? Selecting a framework depends on individual business requirements. Each
comes with its respective pros and cons, and picking between them depends on project needs, scalability potential
and technical prowess of those charged with implementation.

Legacies are not ‘golden oldies’


The ease of PHP development can become a double-edged sword. Due to its forgiving nature as a technical language,
developers can create applications without much programming experience. Although this increases accessibility, it
does leave the door open for poor coding, hard-to-understand approaches and limited scalability. As such, businesses
can be hesitant to uproot their legacy systems.

These are some of the most common concerns:


● Fear of the unknown – “Things seem to be running ok, so why change them?”
● Retraining of staff – “We don’t have the time to show everyone how to use the new systems.”
● Cost of migration – “Moving everything across will take time and money that we don’t want to spend.”
● Operational risks – “What if things go wrong. Do we pause working while we migrate?”
● Tangled code – “The backend is really messy. If we change something, everything might break.”

While at a glance these may appear to be valid reasons for sticking to outdated PHP, in truth it may mean your
business could stay stagnant and be at risk of missing key innovations.

Where PHP is heading – 5 key trends


Since 2005, PHP and its associated frameworks have changed alongside consumer needs and the ongoing
digital transformation of the world we live in. The following trends are leading today in meeting those ever-changing
consumer needs:
1. C
 loud integration – With the global cloud infrastructure services market increasing by 37% in Q3 2019 to a value of
$27.5 billion, businesses are discovering the power of PHP and cloud-based solutions.
2. U
 I matters – As devices increase in numbers and complexity, and customers expect slicker, faster interactions, PHP
frameworks are being used to create better online experiences. From social networks and e-commerce through to
government websites, online platforms must seamlessly connect and deliver from the backend in the fastest and
most aesthetically pleasing way.
3. IoT – IoT is no longer a thing of the future.Statista forecasts that the worldwide spending on the IoT market will
pass the $ 1 trillion mark 2022. While PHP tools are a virtual structure of combined software technologies, IoT takes
things further by adding hardware into the mix.
4. Cybersecurity – Cybersecurity is one of the highest priorities for business owners and consumers. With PHP
development to support tool creation, these safeguards can remain robust and adaptive for major platforms such as
Google Wallet, Amazon Pay, Revolut, PayPal, and many more.
5. C
 hatbots and customer service – As machine learning and AI continue to enhance customer experiences, chatbots
leverage PHP’s open-sourced nature to deliver a better interaction. By accessing open-source language APIs and
libraries, chatbots are evolving into ‘conversation agents’, resulting in more meaningful exchanges with website visitors.

5 | 24
PHP frameworks in 2021
PHP has come a long way. Now, in version 8 (as of December 2020) , the consistent release cycle has made sure that
it remains relevant in today’s digital world. With 78.9% of all websites with a server-side programming language using
PHP, it seems that it is here to stay.

2020 has been far from a typical year. The COVID-19 pandemic has changed the world as we know it, affecting more
than 190 countries and their respective economies. While the negative effects of the pandemic are clear from many
perspectives, the impact on the technological world has been substantial in surprising ways.

The acceleration of digital


With reduced access to physical stores and service providers, people have turned to digital solutions to fulfil their
needs – pushing organizations to restructure and evolve their approach. Research by McKinsey and Twilio show a
remarkable shift in priorities as a result of the pandemic:

● COVID-19 accelerated the company digital communications strategy by a global average of 6 years. (Twilio)
● Digital adoption in Europe jumped from 81% to 95%. (McKinsey Digital)
 6% of UK enterprise decision-makers believe the pandemic sped up their company’s digital transformation. (Twilio)
●9
● Almost all global companies (95%) are seeking new ways of engaging customers as a result of COVID-19. (Twilio)
● 92% of UK businesses say their organization is very or somewhat likely to expand digital communication
channels as the world reopens. (Twilio)
● Almost four in five (77%) of UK respondents say that COVID-19 increased their budget for digital
transformation. (Twilio)
● Over 70% of respondents said they expected to continue using digital services with the same frequency as they
do now, or even more often. (McKinsey Digital)

Meeting demand with PHP


With so many companies speeding up their digital transformation, remaining competitive has never been more
important for businesses. However, for those without huge budgets or technical knowledge, upgrading such
capabilities may seem daunting.

PHP offers many pre-built elements that can be reused, tweaked and scaled, so there is no need for custom software
solutions and long lead times. Through the use of PHP frameworks and the associated benefits of an open community
and active support network, even those without ample funds have a good chance to survive and thrive. For companies
using legacy PHP the migration to new frameworks is essential now.

Migrating from legacy to modern frameworks


Legacy systems are typically one of the biggest blockers when it comes to digital transformation. The PHP of
yesterday may have been powerful at the time, but modern demands outweigh what older versions can deliver.
By migrating to new frameworks such as those developed by Symfony, you can future-proof your systems with
scalability, better security, more reliability and time-saving efficiency.

PHP framework migration: from legacy to Symfony


6 | 24
It is all about the end-users
– the 5 customer commandments
Experiences that may have seemed incredible in the past are now part of the norm. End-users are now familiar with
the bells and whistles of the digital age, and it takes a more nuanced and multi-faceted approach to satisfy their
needs. With the power of PHP frameworks, these needs can be satisfied as long as the following consumer trends are
considered as a key part of the web development process:

1. Better experiences are worth more


According to Gladly’s 2020 Customer Expectations Report, 84% of consumers are willing to spend more money on
better experiences, and 79% say that personalized service is more important than personalized marketing. With so
many new entrants and market disruptors around every corner, end-users never as much choice as they have today,
and companies have never had more to prove.

2. Business is personal
Nobody wants to feel like a support ticket or a ‘dear x’ in an email. By demonstrating a genuine understanding of their
end-users through PHP frameworks and scripts, businesses can retain and grow their market share. What is more, 77%
of people are more likely to recommend a brand to family and friends following a positive, personalized experience.

3. Customers never forget


Good customer service is important to more than 90% of customers, as reported by Microsoft in its Global State
of Customer Service Report. A polite greeting at the end of the phone isn’t enough: today’s consumers want issues
resolved swiftly through the channel of their choice, and without the need to repeat themselves. Just one bad
experience could tarnish perceptions forever.

4. ‘Omnichannel’ is no longer a buzzword


In its Retailing 2020 Report, PWC found that the number of companies investing in omnichannel experiences has
increased from 20% to more than 80%. To take full advantage of the potential benefits, technology needs to keep
pace. Fortunately, with the correct application of PHP-based solutions, end-users can expect fast and seamless
experience, where credentials and associated account data can be accessed and actioned 24/7, no matter where they
are or what the access point is.

5. UX must be exceptional
The best UX goes unseen – users only notice when something goes wrong. A laggy website or poor mobile experience
can quickly turn advocates into detractors. For instance, 57% of users won’t recommend a business with poor mobile
implementation, and 87% think that mobile experiences should match or exceed that of what is available on desktop.
By employing purpose-built PHP frameworks, UX expectations can be met without the need to create solutions from
scratch. And, with passionate communities behind their creation, these frameworks are more likely to be stable,
responsive and efficient.

7 | 24
2. The need to change your
PHP legacy now
It is likely that an overwhelming proportion of the world’s software runs on legacy code that has
been passed from developer to developer. Dealing with legacy code is an everyday reality for many,
but there comes a point where quick fixes and digital Band-Aids can only get you so far.

Together with limited functionality, the problem with legacy code is that it gets increasingly difficult to predict outcomes
when something is changed. Even the smallest tweaks can cause an unforeseen domino effect, turning a minor
problem into a much larger one.

10 Signs that your code is rot


If your business is experiencing any of the following issues, it may be time to explore new PHP framework possibilities.

1. Things don’t improve. Developing new features or fixing bugs is not cost-effective. Instead, you and your
end-users will just have to live with how things are.
2. There is no innovation. Instead of fixing current bugs, innovating and planning new functionality, your
developers’ time is spent on maintaining the uptime of existing code.
3. Your product or service stays behind. Increasing the scope of your offering is made difficult or impossible
due to the current solution.
4. Help is not coming. Your existing setup is too old, cross-wired or obscure to get help from the PHP community
when you need it.
5. There is no guide anymore. Documentation for the implementation, use and troubleshooting of your current
code or framework can no longer be found internally or externally.
6. New plugins don’t work. Most, if not all new plugins are not compatible with your PHP version and either
cause problems, or don’t install at all.
7. Productivity suffers. Working around annoying bugs and issues is affecting productivity and making simple
tasks unnecessarily laborious.
8. No support. Your software version is no longer supported by the original developers, meaning that when you
have issues, you’re on your own.
9. So. Slow. Performance is laggy or unresponsive, causing frustration and bad experiences for both end-users
and developers.
10. No trust in the system. You simply can’t depend on your system and are constantly worried about crashes
and freezes.

If any of these signs look familiar, you may be in dire straits and migrating to a modern framework should be on top of
your digital agenda right now. Fortunately, there are several frameworks you can successfully migrate to, one of which
being Symfony.

PHP framework migration: from legacy to Symfony


8 | 24
Choosing your next framework
Changing frameworks is the best way to stay modern and functional, but it is no small task. Making the choice to move
from a legacy system comes with financial and time-based considerations that are worth exploring before making the jump.
1. Name and fame – The more well-known your chosen framework is, the more likely it is that it will continue
receiving updates, plugins and innovations from a passionate community. Going for an obscure or niche framework
may come with its advantages, but if you’re looking for simplicity, it is best to stay within the mainstream.
2. Philosophy – Any good framework has a philosophy at its heart. Not only will this ensure that the people behind it
are passionate about what they’re doing, but you can align your own business needs and viewpoint to it as well.
3. Sustainability – Is your chosen framework there for the long-haul? Will it be able to keep up with your business
needs in the longer term? Are updates easily installed?
4. Support – It should be easy to find answers to any questions you have about your framework, or help with bugs
and issues. By choosing a prolific framework you will find it easier to get in touch with publishers, developers or
community fans.
5. Technique – To avoid being trapped in a labyrinth of difficult or overcomplicated operation it is always best to
choose an interoperable solution that respects best practices in web development. That way, your framework can
still work in recognizable ways, making support and updates easier.
6. Security – Any application is potentially vulnerable. By selecting a mainstream framework you’re more likely
to have better security measures in place. Always look for solutions that have security functions such as XSS
management and other recognized protection measures.
7. Documentation – A well-documented framework or tool is often likely to be of higher quality. As well as indicating
care from the developers, it can help you in all aspects of setup, implementation, operation and updating.
8. Licensing – Licenses are crucial because they can have a significant impact on your applications. For example, an
application developed using a GPL-licensed framework will necessarily be subject to GPL. On the other hand, this
is not the case for MIT-licensed frameworks.
9. Availability of developers and skilled users – Ensure that your staff, both current and desired, are familiar with
the framework and able to work within its parameters. Due to their popularity, mainstream frameworks will have a
bigger pool of skilled users and developers available.
10. Ease of testing – As well as reading online reviews and articles, also test the framework out for yourself. If it is
free, you have nothing to lose and you can gain a good understanding of its suitability for your needs.

The Symfony framework


The PHP community is highly active and passionate about improving experiences and functionality across the board.
This has led to the development of many frameworks from different developers, all with their own vision and set of
features. One of the most used and popular frameworks today is Symfony.

What is Symfony?
Symfony is an open-source PHP framework that speeds up the creation and maintenance of web applications by
eliminating repetitive coding tasks. It is used to build robust applications for enterprises and individuals, giving
developers full control over the configuration. With over 9 million daily downloads, it is one of the most widely-used
frameworks in the world.

9 | 24
Why do people use Symfony?
Symfony offers a stable work environment that is lauded for its flexibility, power, user-friendliness and active
community of over 600,000 developers in 120 countries. Completely free and open-source, Symfony allows users of
all skill ranges to create web applications based on pre-made frameworks that save time and provide quality. Symfony
also positions itself as a philosophy that promotes professionalism, best practice, standardization and interoperability
of applications.

Where did Symfony come from?


The first version of Symfony version was created and released by Fabien Potencier in 2005. Once opened up to the
community, the second version was released in 2011 with annual versions following suit. Today, it is a stable and
internationally recognized product with billions of downloads.

Who uses Symfony?


Symfony is currently being used by some of the biggest brands and platforms in the world, including Spotify,
DailyMotion, Vogue, Facebook Ads, Drupal and many more. It is also employed by thousands of SMEs and startups
around the globe in the development of their own web applications, thanks to its easygoing and highly supported usage.

Quick facts about Symfony


● Symfony is designed as a large collection of reusable PHP components, each enabling developers to complete a
specific task.
● The first version was released in 2005, and the second in 2011.
● Symfony is independently created, free and open-source.
● Beyond the tools, Symfony is also a philosophy and a community.
● A passionate group of over 600,000 developers from more than 120 countries.
● There are more than 155 packages with 9 million daily downloads, totalling 5.7 billion in total (and counting).
● Symfony is used by leading CMS platforms including Drupal, Typo3 and Joomla, and e-commerce platforms such
as Magento, Shopware and Spryker.
● Symfony components support Google Cloud, Google Ads, Facebook Ads and Facebook Insights.

PHP framework migration: from legacy to Symfony


10 | 24
12 reasons to choose Symfony
As one of the most prolific and popular PHP frameworks in the world, Symfony is one of the best choices for SMEs,
startups, large businesses and developers of all skill levels. There are many reasons why you should consider Symfony,
but here are 12 of the most essential ones.

1. It is open-source. Having been released under the MIT license, Symfony is open-source. This means that it is free
to redistribute and modify as needed, with no permissions needed.
2. There is a highly active community. With large numbers of daily comments and interactions on GitHub and other
platforms, Symfony is one of the most discussed and used frameworks in the world.
3. Encourages best practice. As it is always current, developers using Symfony can stay on top of the latest
object-oriented design patterns such as service-oriented architectures, dependency injections, interface
abstractions and more.
4. Easy to debug. With a built-in toolbar called the Web Debug Toolbar, Symfony helps developers debug
applications during development. The toolbar can also be augmented with new panels for further functionality.
5. Fast and flexible. Symfony components are quick and easy to download, with a directory structure that is easily
abstracted and decoupled. This makes it easier to implement in large projects that need flexibility.
6. Modularity. The modular structure of Symfony allows users to build applications, step by step. This also means
that they can be swapped in and out as needed.
7. Readiness. Symfony gives users a large number of applications, straight out of the box. This saves time and
provides highly stable solutions with very little time investment.
8. Excellent documentation. Each release of Symfony comes with robust and detailed documentation to help with
all matters around implementation, usage and operation.
9. Better hiring potential. Users of Symfony are in demand due to its prolific, powerful and flexible nature. The wider
community also attracts high-level programmers looking to push their skills to the next level.
10. Community-tested. Each Symfony package is tested by a large number of developers immediately after release,
resulting in significantly higher chances of bug discovery and squashing.
11. Active communication. As a highly active framework, users of Symfony are highly informed about current trends
and upcoming releases.
12. Happy end-customers. At the bottom line, it is all about serving the customer with meaningful experiences that
help improve their work and lives. With security, reliability and speed covered, Symfony ensures your
end-customers are happy with your services and digital products.

Updates and new versions are always


around the corner.
● Every 6 months sees a new release of Symfony with enhanced features, letting you plan ‘upgrade days’
for all of your PHP projects.
● Every 2 years will see the release of a new major version with long-term support.

11 | 24
3. Migrating to Symfony: setting the
new horizon
At first, migrating your framework may seem daunting, but when you make the choice for Symfony,
both your business and daily work will be simplified. More than a modern PHP framework, Symfony
is also a philosophy to guide and a community to support you.

In the previous chapter, we looked over the various reasons for considering Symfony for your migration from legacy.
Now, it is time for a deep dive into the basics. How does this particular PHP framework work and what sets it apart
from other PHP frameworks?

Understanding Symfony: the key basics


Symfony was born from the imagination of the web designers at SensioLabs to speed up the creation and
maintenance of business web applications. With such a developer-focused approach, repetitive coding tasks are
minimized and developers are given full control over the configuration.

The following four basics go into more detail on how Symfony makes web development easier.

Symfony is both open-source and supported


Since October 18th 2005, Symfony has been an open-source PHP framework released under the MIT license.
While that gives you all the freedom, openness and sharing you need, Symfony is also sponsored and supported by
SensioLabs, the original creator. This adds the advantage for developers looking to get the most out of Symfony
and provides technical support, advice, training and migration services when needed.

‘An undocumented line of code


is a line of code that doesn’t exist’

An international community of developers, users, and companies backs up Symfony all over the world to further
develop the framework through their experience. They can add their own modules and share knowledge on Slack,
Stack Overflow, hundreds of blogs, tutorials for all levels and various forums. This leads to ongoing innovation and
a certain strive for excellence in the Symfony community. For instance, the idea for the dependency injector was
borrowed from the Java world and adapted to PHP.

When starting with Symfony, you have a wealth of learning to choose from, based on your level of understanding.
There is extensive literature devoted to Symfony, including books written by the founder of the Symfony project
himself, Fabien Potencier.

PHP framework migration: from legacy to Symfony


12 | 24
Symfony works like Lego
As a set of reusable PHP components, Symfony offers unlimited flexibility. These software components are called
bundles and work completely independent of each other, making Symfony fully configurable to your business needs.
Everything is considered a bundle in Symfony, including both the core framework functionality and the code written for
your application. You can select specific functionalities for your application by picking only the components you need.

Symfony is fully adaptable as a 3-in-1 framework:

1. Full Stack (complete version): for developing a complex application that requires many functionalities.
2. Brick by brick: for building your framework according to the functionalities as needed.
3. Microframework: as a standalone, to develop only a specific functionality in one of your projects. Ideal for using
certain pieces of software building blocks, such as the dependency injector, translations management or forms
management. You can do this without having to redevelop everything and without installing the entire framework.

Symfony is fully interoperable


Symfony is based on a system of interface contracts between components. Since those components are independent,
it means that you can add functionality at any time, and change the behavior of the framework without having to
reconfigure everything. Each component is intended to add functionality to the framework and can be reused in
another project or be shared with the rest of the community.

‘Within Symfony, everything can be changed.’


And because Symfony is consistent with PHP conventions (PHPUnit, naming conventions for classes, etc.), it is
inherently interoperable with industry standards. To put this another way, your choice for Symfony does not lock you
in and gives you all the flexibility you could ever want. In fact, Symfony itself uses external software components in its
kernel, such as Doctrine, ORM and Composer.

Symfony is PHP, but different


Changing to Symfony may appear to be challenging at first, but not in the way that would require you to relearn coding.
Instead, you will need to learn a new way of understanding coding. Symfony, by its nature, is more methodical which
may feel restrictive at first, but after the initial shock, you will find it is actually set up to make your life easier.
With the joy of developing in mind, Symfony offers a certain comfort level to developers. Embedded within the
framework you will find best practices that are natively applied automatically without the need of having to fully
understand them.

Symfony also takes care of unpleasant tasks such as the development of minor functionalities, instead allowing you
to focus on the actual highlights. Symfony comes with tools designed to make the developer’s life easier, such as the
Web Debug Toolbar as well as native support for development environments, native security and detailed error pages.

Symfony at its core


From the very start, Symfony was designed to meet the needs of the software company that created it, SensioLabs. Today,
SensioLabs continues to use Symfony on its own client projects. This makes it a pragmatic tool that still reflects real-world
requirements, aiming to make the day-to-day life of developers easier with a long-term vision of application assets.

13 | 24
‘Symfony is for developers today and tomorrow,
because it is made for developers, by developers.’

How Symfony addresses your legacy challenges


Legacy code is usually old code that has been developed without a framework or an outdated version that is no longer
supported. While in good use for many years, sooner or later, the question of modernization arises. For developers, it
comes down to sustainability and coherence:

● Every time a new development is made in an ongoing legacy project, it becomes less and less sustainable in
terms of time and costs. It is like feeding a monster that gets bigger and bigger.
● And, when your new projects follow high-quality practices, why would you also have an ongoing project where these
standards are not applied? The lack of coherence stiffens innovation and frankly, makes your work less enjoyable.

As a framework made by developers for developers, Symfony wants to make web development easy to create robust
enterprise applications that delight customers. It does this in a way that acknowledges legacy code and provides
several solutions that address key challenges by ensuring quality, performance and productivity.

Guaranteeing code quality


Development projects can be ongoing, especially if the application sees great mileage due to its success. Evaluating the
code’s quality and predicting its robustness and evolution over time, can be a daunting task that is done under varying
conditions. Another consideration is that senior developers may retire or the business focus may linger and shift.

The signs for the accumulation of technical debt in chapter two are all too familiar for developers working with legacy.
You’re confronted with slowness, security flaws, multiplication of bugs and a lack of guarantee on non-regression.
Your progress can be suddenly undone by hidden flaws in the coding. Because code quality is essential to sustainable
development, Symfony comes with tools to easily choose a unified, measurable and comparable metric to ensure
rigorous monitoring of a project’s overall quality.

SymfonyInsight for continuous code analysis

SymfonyInsight is a SaaS tool that boots your Symfony application, inspects its containers and gives you advanced
reports on your project quality. It is aimed to detect security risks, suggest possible corrective measures and improve
quality by respecting Symfo­ny’s development guidelines. It does so by inspecting the heart of the PHP code and
providing an in-depth diagnostic on code quality.

Based on more than 100 rules that cover maintainability, scalability and quality, SymfonyInsight can detect problems
and errors on a daily, continuous basis. This ensures the assessment of technical debt over time, improves code
quality and improves developer skills by enabling self-correction.

SymfonyInsight is a paid service that can be integrated into GitHub, GitLab or BitBucket with a few clicks. It gives
you cost estimates for correcting problems and comes with a collaborative workspace and educational tutorials to
understand and assimilate good practices. SymfonyInsight also saves valuable time by reducing proof-reading efforts
by lead developers and provides a great way to train and help onboard junior staff.

PHP framework migration: from legacy to Symfony


14 | 24
Optimizing the performance
In the age of the customer, speed and reliability are fundamental to retaining customers and providing them with
optimal digital experiences. If your website or application is just a few seconds too slow, your customers will leave
for the competition. That means your business simply can’t afford for its developers to spend their valuable time to
keep buggy legacy running. Instead, their time is better spent innovating and building web applications and digital
experiences that customers crave for.

Blackfire for performance management automation

Performance is a hygiene factor required to remain competitive today, and to be able to optimize the performance
of your code, you need to be able to measure it. Blackfire is a SaaS tool designed for PHP code performance
management throughout its whole life cycle, measuring the resource consumption of the code at the level of functions/
methods calls.

With intuitive navigation through call graphs or temporal representations of resource consumption, developers get
a complete view of its behavior. They can see and understand how Wall-time, CPU time, I/O time, memory, network
calls, HTTP and SQL are used. Blackfire highlights slowdowns and helps developers to easily verify and validate the
impact of their changes at each iteration.

Blackfire seamlessly integrates into any existing toolset and process and is designed for production, but can also be
used in deve­lopment, testing and staging. Developers gain speed in experimen­ting and validating their improvements
when using Blackfire on their machines, where they are able to test performance before going into production.

Speeding up your web development


In business, just like in project management, timing is everything. If the development team can’t achieve a project on
time, it negatively affects the economy of the project. Therefore, guarding and improving the team’s productivity is
essential. This is where the development infrastructure comes into play.

SymfonyCloud for an adapted development infrastructure

Created specifically to help developers working on Symfony, SymfonyCloud is a PaaS (Platform as a Service) that is
perfectly adapted for the infrastructure of PHP and Symfony. It is designed to automate the deployment of a complete
Symfony infrastructure, covering PHP to database, search and performance.

Getting a project up and running takes only a few seconds with SymfonyCloud. Thanks to the Git integration and
Ceph layering technology, it is possible to go from dev to staging and production and back, in a matter of minutes.
SymfonyCloud fully supports DevOps and continuous deployment and integrates SymfonyInsight and Blackfire.

SymfonyCloud can also perform complete snapshots of an application, its software infrastructure and associated
databases. With this major feature, the development team can reproduce an identical production system to provi­de more
reliable testing capabilities, allowing the launch of several develop­ment and test projects in parallel on the same application.

15 | 24
The integration of Git processes and its revolutionary file system makes it possible to deploy up to 7 times more often
and increase the deve­lopment team’s overall productivity by 30%. At the same time, SymfonyCloud reduces overall
hosting costs by 60%.

What Symfony means for every role


Migrating to Symfony not only affects the developers who use it but also the managers, project managers and system
administrators within your company. That is because Symfony makes web development easier and quicker. In turn, this
affects your IT infrastructure, digital products, customer experience and bottom-line business results.

For understanding the impact of using Symfony completely, here is how different roles may benefit:

Symfony for managers


Symfony is a PHP framework to develop websites or applications written in PHP. That means the development of your
digital products and services complies with industry rules, is scalable and saves your developers valuable time. It is
also relatively easy to find PHP developers as PHP is a very popular code language that is easy to learn. Symfony
stands out from other PHP frameworks with its practical approach, where generic modules can be reused so that you
can focus on specific business features. Symfony allows you to efficiently and quickly craft better digital experiences
that make a difference in your market today.

Symfony for developers


The Symfony framework is made for you, the developer. Symfony is an internationally recognized, stable development
environment under the MIT licence. It comes with interoperable software components called bundles that allow you
to easily build business functionality as needed. Repetitive coding tasks are avoided and several integrated solutions
are available to make your life easier, such as the Web Debug Toolbar. By using Symfony your maintenance is easier,
development is faster and security is better. As an open-source framework, Symfony is supported by a passionate
group of over 600.000 developers from more than 120 countries. Through SensioLabs, you can rely on dedicated
professional support and advice. And best of all, Symfony does not confine you to its environments but adopts
industry standards. You can switch at any time, if you would ever want to.

Symfony for system administrators


Symfony is PHP, which means that unlike Perl and Python, for example, it can be used as both command line and
server-side scripting. Additionally, Symfony only requires two writing folders, which can be fully configured to adapt
to your company’s established security policy. Symfony also facilitates the build-up of applications to be hosted, for
example, by storing sessions in databases or implementing HTTP standards to natively handle website accelerators
like Varnish. In short, Symfony simplifies the system administrator’s job.

Symfony for project managers


As a structured framework, Symfony gives your team members a shared reference for project consistency. This will
help to clearly define your project, which will make it significantly easier to understand and maintain in the long-term.
Developing with Symfony is fast because developers can reuse generic components such as database connection
modules and forms – enabling them to focus on the application’s real challenges to create real business value.
Productivity is also improved by tools such as the Web Debug Toolbar, natively supported security and detailed error
pages. By using Symfony, your project will be scalable, fast, reliable and successful.

PHP framework migration: from legacy to Symfony


16 | 24
4. Symfony for future-proof success
As a top-tier framework, Symfony considers every aspect of your organization to enable web
development that moves your business forward. This chapter explains how SensioLabs, the creator
of Symfony, provides you with the building blocks of your future success.

The why for legacy migration is clear. Once you decide to replace your legacy PHP with a modern framework, the approach
comes next. The first step is to perform a code quality audit to determine the most appropriate type of migration.

If the code is burdened by heavy technical debt and if there is no active development, a direct migration from scratch is
considered to be better. However, when a temporary shutdown needs to be avoided, like with an e-commerce website,
the development of a new application while maintaining the legacy is recommended. Generally, gradual migration is
better than one-shot migrations for several reasons: issues occur gradually instead of all at once, rolling backward is a
possibility, and there is more time to improve the application with new features instead of only reproducing it.

Realizing that each legacy migration project comes with its technical debt, team, architecture, product backlog and
more, SensioLabs offers various services and solutions to meet your specific requirements.

How SensioLabs helps to smoothen your legacy migration


Your choice for Symfony comes with the availability of the following migration services.

Migration workshop
When you have an existing application built with another technology and you want to learn how to move to Symfony,
this migration workshop offers an excellent starting point. First off, it helps you to consider between a gradual
migration and the one-shot, ‘big bang’ migration. The workshop gives analysis and audit of your application, and helps
to identify and prioritize the principal components to migrate. As a result, you will learn how to design an environment
of coexistence for two apps, define your migration roadmap, evaluate costs and prevent risks.

Progressive Migration
After you make the choice for a gradual migration to Symfony, this migration service offers you step-by-step support
to execute your migration project faster and cleaner. Included are training, technical support, audit and analysis, code
review, recommendations, implementation of repository and management tools, regular team follow-ups and reporting.
As a whole, it will give your developers everything needed to improve their skills through best development practices to
make the migration a full success.

Expertise Solutions
Since every application and project is different, SensioLabs offers a selection of professional solutions and
prepackaged custom-made services that focus on the start, design, build and run phase.

17 | 24
The building blocks of success
As any CTO or business leader will tell you, success is never a clear-cut path. The road is often long, messy and
twisted, which calls for breaking down the overall vision into smaller milestones. By reaching these smaller targets,
you will be more able to hit the quick wins before reaching the ultimate goal.

Symfony provides you with all the building blocks to build your long-term success with digital experiences that your
customers will appreciate and value.

The following blocks are the foundation for success in PHP development:

Technology
Your technical architecture needs to meet the business requirements of today and tomorrow. The big challenge,
however, is that those requirements are shaped by the customer’s needs and expectations. These are evolving faster
and faster as technology adoption accelerates, which means that your reactions must be agile, instead of pe-planned.
As a result, today’s PHP frameworks must be highly flexible, time-saving, reliable and mature, easy to work with,
high-performing and above all: secure. While that may seem like a lot to ask, SensioLabs’ range of products aims
to meet all these requirements.

Open-source
Symfony The PHP framework you are reading about in this whitepaper used by approximately 12% of all the
websites worldwide, directly or indirectly.
Twig A strong and extensible, native PHP template engine used in Symfony and Silex. It improves the
readability of HTML code with less complicated syntax than standard PHP, and has a sandbox mode to
secure applications.

PHP framework migration: from legacy to Symfony


18 | 24
SaaS products
SymfonyCloud The end-to-end development and hosting solution designed for Symfony specifically.
The best way to create a new project with Symfony in just minutes, with continuous
deployment, a fully managed stack and synchronized app data and services.
Blackfire A continuous PHP performance testing tool to enhance PHP application performance and fix
bottlenecks. Blackfire verifies and improves the application’s performance throughout its life
cycle by getting the right information at the right moment.
SymfonyInsight The SaaS tool for PHP project quality that covers every single aspect of your application with
more than 100 quality checks. SymfonyInsight helps to protect your team against technical
debt, security breaches, data leaks and customer complaints.

People
Technology today powers your business operations, the products and services it sells, and the way it interacts with
target audiences. In this digital world, software excellence fuels business performance. Which means that, more than
ever, your development team is responsible for delivering your company’s success. Empowering your developers is
what will help to set your company apart from your competitors.

SensioLabs acknowledges the leading role of the developer. In fact, Fabien Potencier, the CEO and co-founder of
SensioLabs, is a passionate developer himself. To get the most out of your development team that uses Symfony,
consider the following solutions for a proven and solid approach.

Upscaling your team’s skills


Rather than a business cost, training is an opportunity for growth that impacts your team’s skills and the recruitment
and the loyalty of your developers. Without quality training, your team will struggle with development challenges as
they arise, which will ultimately impact the team’s well-being. That is why SensioLabs offers a wide range of in-class
or remote training sessions on the latest versions of Symfony for both beginners and advanced developers. All training
sessions are supported by SensioLabs University, an immersive e-learning platform for evaluating your team instantly
and training continuously.

Coaching to increase skills and solve issues


When the technical team lacks experience on Symfony, the first design stages of a development project are often
the most complex, which makes long-term technical decisions more difficult. The best solution for defining and
guaranteeing your project is having your development team coached by a PHP/Symfony expert.

This ensures long-term application stability and maintainability and also increases the potential to produce quality
code. Additionally, the coach is able to support several projects with different development teams within the same
company, harmonizing the quality and tools used.

19 | 24
Strengthening your technical team
Finding all the skills and knowledge required for each project in-house is becoming more and more difficult, where
using external resources on short-term placements is sometimes the only way to complete the work. To meet the
needs for specific technical skills, SensioLabs selects and evaluates the best available profiles from a wide network of
partners and freelance developers.

Your success, supported by SensioLabs


As an open-source PHP framework, Symfony is freely available for your web development to build micro-sites, web
services and enterprise applications. SensioLabs embraces the open-source movement wholeheartedly and fully
recognizes that open-source is the reason why technology has developed at such an astonishing pace.

At the same time, there is a clear need in the market to achieve technical and business success. To help ensure that
success, SensioLabs offers consultancy, expertise, services, training and technical assistance. Whether you need
advanced expertise, consulting on your project or qualified staff for implementation, SensioLabs stands by your side
to ensure that your Symfony project succeeds. Especially when dealing with legacy code and looking to migrate safely,
SensioLabs is your best ally to smoothen the migration into the future.

Why Symfony is the safe choice for your future


– 3 promises
Migrating to a new PHP framework is not a decision to be taken lightly. Even though Symfony follows industry
standards and allows you to try out and switch easily, you may still have some reservations. With the following three
promises, SensioLabs dedicates itself to making Symfony the safe choice for both today and tomorrow.

1. Backward Compatibility Promise


Introduced from Symfony 2.3 onwards, the backward compatibility promise is a commitment to strictly follow semantic
versioning so that anyone using Symfony can safely and confidently upgrade. This enables cheaper and simpler
migration between minor versions of Symfony, so you don’t have to wait for the long-term support version (LTS). It also
allows you to benefit from the latest version while making sure you’re still benefiting from a fully maintained version.

2. Predictable Release Cycle


Symfony releases work like clockwork and follow a time-based model with semantic versioning. Minor versions come
out every six months, in May and November, and major versions come out every two years. On top of these, new
Symfony patch versions come out every month, which focus solely on squashing bugs.

Development
For any major or minor version, the full development period lasts six months and is divided into two phases.
The development phase lasts four months and serves to add new features and enhance existing ones. Then, the next
two months consist of a stabilization phase in which bugs are fixed, the release is prepared and time is given for the
whole Symfony ecosystem to catch up.

PHP framework migration: from legacy to Symfony


20 | 24
Maintenance
Starting from the Symfony 3.x branch, the number of minor versions is limited to five per branch (X.0, X.1, X.2, X.3 and
X.4). The last minor version of a branch (e.g. 3.4, 4.4, 5.4) is considered a long-term support version and the others are
considered as standard versions.

Predictability and transparency


The rationale behind this release cycle is to:
- Shorten the release cycle and allow developers to benefit from the new features faster;
- Improve the experience of Symfony core contributors: everyone knows when a feature might be available in Symfony;
- Coordinate the Symfony timeline with popular PHP projects that work well with Symfony, and with projects using it;
- Give time to the Symfony ecosystem to catch up with the new versions;
- Give a strict and predictable timeline to companies so that they can plan their project’s development.

3. Continuous Upgrade Path


The backward compatibility promise and semantic versioning are part of the continuous migration path that Symfony
offers. When a feature implementation cannot be replaced with a better one without breaking backward compatibility,
Symfony deprecates the old implementation and adds a new preferred one alongside.

Deprecated features will trigger deprecation notices at run-time that can be seen in the Web Debug Toolbar, or after
running your tests. This allows you to update your code little-by-little, ensuring your final upgrade is easy and safe.
To learn exactly how deprecations are handled in Symfony, read the conventions document here.

21 | 24
You are your customers’ success
It is the era of the customer. Cloud and AI are increasingly ubiquitous, IoT is well underway and easy UI interfaces and
optimal digital interactions are a given. The customer of today wants to feel valued and appreciated, and will not stay
around to wait for you to address your technical challenges. For matching those customer expectations, the choice for
a modern PHP framework is essential.

With technology leading the way in business innovation, the adoption of it in your organization should be high on your
agenda. Web development has never been more important, creating new challenges in finding the best architecture
choices for delivering products and services. It calls for a culture of innovation, not just a technological solution.

As a technology, philosophy and community, Symfony delivers it all.

Once your developers can create their applications in an efficient, quick and pleasant way, you can focus on customer
needs in a whole new way. Symfony makes it easy to align web development with your business goals and create
meaningful digital experiences that set you apart from the competition.

If you’re still using legacy PHP and are ready to migrate to a modern PHP framework safely and smoothly, talk to us
about Symfony. Together we can bring digital harmony to your organization and align your company’s success to that
of your customers’.

The SensioLabs team, a Smile group company

Choose your next step:


Download Symfony and get started!
https://symfony.com

SensioLabs University
train your teams with the creator of the Symfony Framework
university.sensiolabs.com

Contact us:
[email protected]
[email protected]

PHP framework migration: from legacy to Symfony


22 | 24
23 | 24
About SensioLabs
SensioLabs is the creator of the open-source framework Symfony, which has become a global reference
in web development. At SensioLabs, we support the success of large groups and startups, IT services
companies and integrators, in the transformation or improvement of their existing projects and the
creation of new services.

SensioLabs offers consultancy, expertise, services, training and support tailored to enhance developers’
effectiveness, to ensure the success of web application development projects and to support the creation
of a competent technical team.

SensioLabs operates in a further 20 countries through its own offices and an extensive network of more
than 50 certified and affiliated partners. A company recognized internationally for its innovations in its
market, SensioLabs boasts over 100 employees and consultants.

About Smile
Since the beginning of 2019, Smile has been a majority shareholder in SensioLabs. As a European
market leader in digital open-source with a presence in 7 countries, Smile shares the same values and
ambitions as SensioLabs.

Each year, some 1,700 committed personnel contribute to many hundreds of strategic digital projects for
large corporate clients in France and Europe, based on the most innovative solutions and concepts.

Fully proficient in the best products, components and open-source frameworks combined with an
in-depth understanding of the major business challenges, Smile offers its clients the support they require
at every stage of their digital transformation via four vertical offerings (Digital/E-business, Business Apps,
Infrastructure and Embedded/IoT) and a complete range of integrated services (consultancy, digital
agency, training, development & integration, maintenance and outsourcing).

PHP framework migration: from legacy to Symfony


24 | 24

You might also like