A drop in replacement for Symphony CMS to upgrade core and selected extensions to PHP 8.0 compatibility

Related tags

CMS symphonycms-php8
Overview

PHP 8 Upgrade Instructions

These are the files I have used to upgrade existing Symphony CMS installs to PHP 8.0 compatibility.

As always, make sure your site is up to date with your master branch before making any of these changes.

The instructions below remove all extensions as submodules and adds them as directories, for obvious reasons.

This also contains a Theme plugin which I recommend as it makes Symphony look more modern.

I will not be maintaining this repository.

For sites using a version earlier than 2.7.10

The site needs to be upgraded to the 2.7.10 before moving on.

  1. Copy each of the following folders and files from 2.7.10 upgrade files and paste into the root directory of the site:
    1. index.php
    2. install
    3. symphony
    4. vendor
  2. In the browser, type /install/ at the end of the project URL and follow the upgrade prompts. Do not delete this folder after upgrading. It will need to be run again on the new server before launch
  3. Check the frontend and backend of the site are still working correctly

Upgrading 2.7.10 to PHP 8.0 compatibility

Switch to PHP 8

I recommend creating a new branch for this (git checkout -b php8), however it's up to you. Use master if you wish.

  • Replace symphony folder with updated directory in this repo
  • Copy extensions folder from your site to your desktop or somewhere temporary
  • Remove all submodules git submodule deinit -f .
  • Delete extensions folder rm -rf extensions
  • Remove modules from git directory rm -rf .git/modules/*
  • We need to commit and push these changes before continuing. This is important otherwise submodules won't be properly removed. git commit -am "update Symphony to PHP8.0 compatibility. Remove extensions as submodules" git push origin php8
  • Move the extensions folder you copied onto the desktop back into site folder.
  • Remove all .git files from extension folders rm -rf extensions/**/.git
  • And remove all .gitignore files from extension folders rm -rf extensions/**/.gitignore
  • Replace extension folders within extensions of the site folder with corresponding folder within this upgrade directory. Some extensions to ignore which are unique per site a lot of the time are:
    • backend_add_script - Only the assets folder will be custom
    • richtext_tinymce - Only the assets folder will be custom
  • Again we need to commit now just to make sure submodules don't cause us a headache later git add extensions install git commit -am "update extensions to PHP8.0 compatibility and add extensions as directories" git push origin php8
  • Log into the admin area
    • Go to the extensions page
      • Update any that require it
      • install Theme: Modern and Are You Sure? Extensions.
      • Some other helpful extensions to consider which may not be currently installed are:
        • Anti Brute Force
        • Media Library
        • Tracker
      • All the extensions that are greyed out can be removed from the extensions directory. Update any that have prompts to do so. Commit and push once deleted. git commit -am "remove unused extensions" git push origin php8
    • Check every section is working as expected and fix any bugs that come up. Google is your friend here but some common ones are:
      • Array and string offset access syntax with curly braces is no longer supported - simply need to change curly braces to square brackets, e.g $array{0} to $array[0]
      • Undefined array key - means a script is trying to access an array key that hasn't been created. Most of the time simply adding in above it $array[key] = $array[key] ?? null; will fix the issue but be careful as it could sometimes be more complicated than this. Use your judgement or ask the community for help.

The site should now be working on PHP 8.

Commit all changes and push to the new branch.

git commit -am "update Symphony and extensions to PHP8.0 compatibility"

git push origin php8

Pushing to production

For sites that needed to be upgraded to 2.7.10 first

On your php 8.0 server, switch to the php8 branch and pull all changes in. The install script will need to be run again as database changes are made. In my updates, this was fairly simple. I could then log in and remove the installer, and update extensions again.

For sites that were already at 2.7.10

You can remove the installer, and when you push to the server simply install/update extensions again. Or if replace the database is an option then do that. Whatever works for your flow.

You might also like...
 Amila Laravel CMS - Free, open-source Simple Bootstrap Laravel CMS
Amila Laravel CMS - Free, open-source Simple Bootstrap Laravel CMS

Simple Bootstrap Laravel CMS. Support Laravel 8.x Can integrate into any existing Laravel project. Only add few database tables with prefixes, not affect your existing database tables. Support Laravel 7.x & Laravel 6.x & Laravel 5.x & MySql & PostgreSql - Amila Laravel CMS

YesWiki is a wiki system written in PHP, including extensions making collaboration more simple (databases, maps, easy editing, bootstrap themes,...).

YesWiki YesWiki is a Free Software under the AGPL licence, made for creating and managing your website, in a collaborative way. YesWiki allows any web

Core framework that implements the functionality of the Sulu content management system
Core framework that implements the functionality of the Sulu content management system

Sulu is a highly extensible open-source PHP content management system based on the Symfony framework. Sulu is developed to deliver robust multi-lingua

Backdrop core code repository.

Backdrop is a full-featured content management system that allows non-technical users to manage a wide variety of content. It can be used to create al

WoltLab Suite Core (previously WoltLab Community Framework)

WoltLab Suite Core WoltLab Suite Core is a free CMS and web-framework, designed for awesome websites and communities. Cutting-edge technologies and st

True Multisite, Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony

True Multisite, Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony

Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. /// Chat with us and others on Spectrum: https://spectrum.chat/twill
Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. /// Chat with us and others on Spectrum: https://spectrum.chat/twill

About Twill Twill is an open source Laravel package that helps developers rapidly create a custom CMS that is beautiful, powerful, and flexible. By st

A flexible and fast Cms built with Symfony and Vuejs.
A flexible and fast Cms built with Symfony and Vuejs.

GreenCheap CMS A modular and lightweight CMS made with Symfony and Vuejs components GreenCheap works with PHP 8 version. In this case, lower versions

Icônes Form Widget for October and winter CMS. One library, over 100,000 vector icons, and 108+ icon sets powered by Iconify
Icônes Form Widget for October and winter CMS. One library, over 100,000 vector icons, and 108+ icon sets powered by Iconify

Icônes Form Widget 🪄 🎉 🎊 Access thousands of SVG icons as a backend form widget. One library, over 100,000 vector icons, Modern replacement for ico

Owner
Phill
Phill
A powerful control panel search filter replacement for CraftCMS

Omnisearch plugin for Craft CMS 3.x Omnisearch is a powerful control panel search filter replacement for the CraftCMS 3 control panel. Overview Do you

Bitmatrix Studio 5 Dec 30, 2021
Baicloud CMS is a lightweight content management system (CMS) based on PHP and MySQL and running on Linux, windows and other platforms

BaiCloud-cms About BaiCloud-cms is a powerful open source CMS that allows you to create professional websites and scalable web applications. Visit the

null 5 Aug 15, 2022
GetSimple CMS - a flatfile CMS that works fast and efficient and has the best UI around, it is written in PHP

GetSimple CMS is a flatfile CMS that works fast and efficient and has the best UI around, it is written in PHP.

null 370 Dec 30, 2022
Bootstrap CMS - PHP CMS powered by Laravel 5 and Sentry

Bootstrap CMS Bootstrap CMS was created by, and is maintained by Graham Campbell, and is a PHP CMS powered by Laravel 5.1 and Sentry. It utilises many

Bootstrap CMS 2.5k Dec 27, 2022
Flextype is an open-source Hybrid Content Management System with the freedom of a headless CMS and with the full functionality of a traditional CMS

Flextype is an open-source Hybrid Content Management System with the freedom of a headless CMS and with the full functionality of a traditional CMS. Building this Content Management System, we focused on simplicity. To achieve this, we implemented a simple but powerful API's.

Flextype 524 Dec 30, 2022
NukeViet 132 Nov 27, 2022
BaiCloud-cms is a powerful open source CMS that allows you to create professional websites and scalable web applications. Visit the project website for more information.

BaiCloud-cms About BaiCloud-cms is a powerful open source CMS that allows you to create professional websites and scalable web applications. Visit the

null 5 Aug 15, 2022
PHPVibe Open source video CMS / Video Sharing CMS / Youtube Api v3 / Video Embeds

PHPVibe Video CMS Free Video Sharing CMS The modern choice of design inspired by Youtube and a social videos sharing module that may just cut it for y

MediaVibe 71 Dec 18, 2022
Doptor CMS is a Laravel 5 based CMS

Introduction Doptor CMS is a Laravel 5 based CMS. Find out more about Doptor by reading below. ;) About Doptor CMS Doptor is an Integrated and well-de

DOPTOR 4 Sep 11, 2022
Bismuth CMS is a ready-made Website CMS based on Yii 2 Advance Template

Bismuth CMS is a ready-made Website CMS based on Yii 2 Advance Template, it's the simplest and easy to set up CMS you may come across.

Hamadas Telebrain 1 Feb 11, 2022