SlideShare a Scribd company logo
Updating Neos – Why, When and How - 2024 edition
Updating Neos – Why,
When and How
Karsten Dambekalns
Karsten Dambekalns
• Developer and consultant at Flownative GmbH
• Working on & with Neos since 2005… for 19 years…
• Updated quite a number of Flow and Neos projects over the years
• Most recently a Flow 3.0.2 project essentially unchanged since 2013 🤪
Why, When and How
Why?
Because you get new features and bug
fi
xes.
When?
Whenever a new version is released.
How?
Read & follow instructions, test & deploy.
Done!
Thanks for listening
• Any questions?
• Just kidding…
Why should you update?
• You bene
fi
t from fewer bugs, new features and better performance
most of the time
Features to gain…
Bugs to get rid of…
Why should you update?
• You bene
fi
t from fewer bugs, new features and better performance
most of the time
• Outdated versions will no longer receive support
SECURITY
https://unsplash.com/photos/RChZT-JlI9g
https://unsplash.com/photos/J5yoGZLdpSI
Why should you update?
• You bene
fi
t from fewer bugs, new features and better performance
most of the time
• Outdated versions will no longer receive support
• Security
fi
xes will no longer be done on old releases
https://github.com/FriendsOfPHP/security-advisories/tree/master/neos
Other tools
in your stack
https://www.php.net/supported-versions.php
https://endo
fl
ife.date/elasticsearch
When should you update?
• As often and as fast as possible!
• Updating often keeps the routine drilled…
• Staying up to date keeps the steps to take smaller!
• Smaller steps mean lower risk when updating!
But… we updated once, and
it broke our site!
As mentioned, in case something goes wrong:
• do test your updates on a staging instance
• have a current backup
• have a rollback-strategy
If things still break on production deployment, the cause is almost never
the new version…
But… we don‘t need new
stu
ff
and things work
fi
ne
That is the „our small site works well“ reasoning, which is
fi
ne until:
• Your hosting provider emails you to inform you about the EOL of PHP
5.6, so your Neos 1.0 site will stop working.
• Some security issue requires you to upgrade, but in a hurry!
• Related technology must be updated for some reason.
• New features must be added (GDPR adjustments, anyone?) – but no
one wants to work with such old code…
But… we run a mission
critical site!
Some sites cannot a
ff
ord a downtime caused by a bug introduced by an
update.
But of course you don‘t deploy the update to your mission-critical site
untested, do you?
And you do have a backup and a rollback strategy in place, don‘t you?
If you can‘t have a staging instance for testing, your mission can’t be that
critical…
But… we only use LTS
versions!
Sometimes people claim they must only use LTS versions, because they are
more reliable or receive better support.
Reliability
Granted, new features may introduce bugs. But all supported branches
receive all
fi
xes – due to how we manage the source code.
Support lifetime
Any versions „after“ an LTS receive support for as long as the LTS version –
due to how we manage the source code.
Updating Neos – Why, When and How - 2024 edition
How should you update?
The generic recipe is:
• read release notes
• adjust composer.json, if needed
• do a dry-run of composer update, check results
• do composer update, commit result
• run core migrations, check result, adjust as needed
• run database migrations
• test, test again, commit, deploy to staging, test, deploy to production
Types of releases
Patch-level releases
• Must never be breaking, only contain bug
fi
xes
• Might add new issues due to a buggy bug
fi
x, happens rarely, though
• Usually about an hour of work
x.y.z+1
Minor releases
• Add features and contain all the features and
fi
xes of the previous minor
release(s)
• Must never be breaking, but new features may still have bugs (more
probably in a x.y.0 release)
• Could take longer. If new features need to be enabled or con
fi
gured,
even a few hours, depending on the complexity of your site
• Might need a database migration and/or new con
fi
guration
• A bit more testing than for a patch-level release is advisable
x.y+1.z
Major releases
• Add features, contain features and
fi
xes of the previous minor release(s)
and may have breaking changes
• Probably need adjustments to your site’s code and new (major) versions
of used extensions
• Probably need a database migration and con
fi
guration changes
• Could require updated infrastructure (PHP or Elasticsearch version, …)
• Needs the most testing of all types of releases
x+1.y.z
Approaching an update
Updating to a new version can always be done “in one go”, you do not need
to upgrade to each version in between
But you always need to read the release notes of the full range of versions
you cover in your update
Check your dependencies, if needed adjust to allow newer packages
Collect a list of (breaking) changes that need attention
Packages needing a
dependency adjustment
Sometimes you must raise the allowed version of dependencies, e.g.
•
fl
ownative/google-cloudstorage 5.2 vs 5.3
• psmb/splitadd 0.3 vs 0.4
Usually not a problem, if you use constraints like ^5.2 – then 5.3 is allowed,
too. And patch-level releases should aways be allowed…
It’s di
ff
erent for major versions (no surprise) and for 0.x versions!
Hint: use https://semver.madewithlove.com/ to check constraints!
Updating Neos – Why, When and How - 2024 edition
Doing the update
• As soon as your dry-run update works and gives reasonable results
• Update without the dry-run
fl
ag and commit the changes to the
manifest(s) and lock
fi
le
• Run core migrations on your own packages, check results, clean up as
needed
Clean up after core:migrate
Here’s what I do after running core migrations:
• check the commits that were created
• soft-reset the repository to the latest upstream commit
• adjust changes as needed
• commit the changes in one commit
That way it’s easier for me to keep things clean and clear
Further adjustments
Core migrations usually adjust the „easy“ stu
ff
, but some things cannot be
automagically adjusted with reasonable e
ff
ort
So some changes need to be done manually, examples for this are:
• Fusion
removal of the default prototype generator
• Logging
PSR-3 logger adjustments
• Fluid ViewHelpers
no more render() arguments
• HTTP components
use PSR middlewares instead
Neos 9
Upgrading to Neos 9
… is not just another major version upgrade.
Upgrading to Neos 9
Upgrading Composer packages
• Adjust the version of any Neos packages to require ^9.0 and run composer
update.
• This will probably fail due to other packages in your project that need to be
updated to work with Neos 9, so check those for newer versions.
You will also need to require (at least) one new package:
• neos/contentrepositoryregistry-doctrinedbalclient is the DBAL
adapter for the CR
After the upgrade try to run ./flow – with a bitlot of luck, everything compiles
already. 🍀
Upgrading PHP code
• As usual, a
fi
rst step is to run ./flow core:migrate on all packages
you maintain or want to create a PR for.
• Next install the neos/rector package to be able to use the migrations
we ship for upgrading to v9.
• Now run Rector in dry-run mode and if things look good, run it for real.
If the automated ways of
fi
xing your PHP code did not work (well enough), it
is now time for manual adjustments…
• To begin with, just try to make the code compile again!
Migrating con
fi
guration
• If you have Routes con
fi
gured, make them use the new
FrontendNodeRoutePartHandlerInterface if needed.
• Adjust your Content Dimensions setup
• … probably more to come!
Migrate your content
Moving your content from the old Content Repository into the new one is
the major step.
In a nutshell:
1. Prepare your data
2. Prepare the new Content Repository
3. Install migration tooling
4. Do the data migration
Prepare your data
Your project ideally is at version 8.3 already (you upgrade early & often, no?)
To be on the safe side, run the migrations as usual:
./flow doctrine:migrate
To make the migration smoother,
fi
x as many errors in the CR as possible.
So think about cleaning things up using node:repair to
fi
x unde
fi
ned
properties, remove nodes with unknown nodetypes and so forth. This will
make the output less verbose, later…
As usual, be careful with that tool, it can destroy data…
Prepare your data
Make your site's root node a dedicated "home page nodetype.” Otherwise
you will run into an error like this: The site node “bf…f8" (type:
"Neos.NodeTypes:Page") must be of type "Neos.Neos:Site"
• If you already have a dedicated nodetype for the site root, you can
simply add Neos.Neos:Site as a supertype to it.
• Otherwise, create a new nodetype like below and change the type of
the current site root node to it:
'Acme.AcmeCom:Document.Homepage':
superTypes:
'Neos.Neos:Site': true
'Neos.NodeTypes:Page': true
Prepare the new CR
Before you can do anything, you need to set up the needed tables for the
new Content Repository.
Fear not – this is as easy as:
./flow cr:setup
Now a number of new tables named cr_default_* will appear in your
database – it is no problem to use the same database as before.
Install migration tooling
To migrate the data, you need another "helper package", so install neos/
contentrepository-legacynodemigration now, which allows to migrate
CR data:
composer require --dev neos/contentrepository-legacynodemigration
$ ./flow cr:migratelegacydata
Do you want to migrate resources from the current installation "/…/Data/Persistent/Resources" (y/n)?
Do you want to migrate nodes from the current database "dbname@dbhost" (y/n)?
Successfully connected to database "dbname"
Which site to migrate?
[acmecom] acme.com (Acme.AcmeCom)
> acmecom
Site "acmecom" already exists, update it? [n] y
We will clear the events from "cr_default_events". ARE YOU SURE [n]? y
Truncated events
Exporting assets...
Exported 211 assets. Errors: 54
Exporting node data...
Exported 1840 events
Importing assets...
Imported 196 Assets and 60 Image Variants. Errors: 0
Importing events...
Imported 1840 events into stream "ContentStream:6ae1f48e-b3ed-4438-b685-d703c446cc29"
Replaying projections
Done
Migrate your Fusion code
• The automated migration using Rector will have adjusted your Fusion
code already.
• Check those changes and look for instructions added – there are
adjustments you must do manually yourself.
• Some more manual changes are needed when using deprecated ways
of doing things, e.g. for adding @cache con
fi
guration.
• When (still) using Fluid, you need a few more changes – those doing AFX
already are better o
ff
– as Neos.Fusion:Template is no longer a
default.
Upgrading more PHP code
• Most projects will probably not be a
ff
ected much by the changes to the
Content Repository PHP API
• If you do interact with the CR, it is probably to
• import things from some source,
• export things to some source,
• do things in some added Neos backend module.
As we come closer to the release of Neos 9, examples and recipes will be
published for common cases!
If you get stuck
Finally, if you get stuck with an update even though you were well prepared
• Search for your issue, chances are someone else found a solution
already
• Ask the community for help on Slack or discuss.neos.io
• Ask your agency for help
• If you are an agency, ask me or my company for help 😎
Test and deploy
Now test your site. You may
• Run unit and functional tests if you have them
• Run a link checker on the site
• Check logs for error messages and warnings
• Click around and manually test important or prominent features
If all is well, deploy and be happy. 🎉
Problems after an update
If some new problems appear after an update – ideally found before going
into production – there are two possible causes:
• You made a mistake.
Double-check your changes and try to verify against the previous
version.
• You found a bug.
Check the issue tracker for a new report that looks like your problem
Recap: Why, When and How
Why?
Because you get new features and bug
fi
xes.
When?
Whenever a new version is released.
How?
Read & follow instructions, test & deploy.
Done!
Done. Questions!
Thanks for listening!
Further reading:
https://www.
fl
ownative.com/en/blog/neoscon-2024-updating-neos.html
Contact me at:
• karsten@
fl
ownative.com
• @kdambekalns in the Neos Slack
Updating Neos – Why, When and How - 2024 edition

More Related Content

PDF
The Perfect Neos Project Setup
Karsten Dambekalns
 
PDF
Create a PHP Library the right way
Christian Varela
 
PPTX
Essential Tools for Modern PHP
Alex Weissman
 
PDF
200,000 Lines Later: Our Journey to Manageable Puppet Code
David Danzilio
 
PPTX
Content Management Systems and Refactoring - Drupal, WordPress and eZ Publish
Jani Tarvainen
 
PDF
Taming the Deployment Beast
Chris Cornutt
 
PDF
When your code is nearly old enough to vote
dreamwidth
 
PDF
Composer at Scale, Release and Dependency Management
Joe Ferguson
 
The Perfect Neos Project Setup
Karsten Dambekalns
 
Create a PHP Library the right way
Christian Varela
 
Essential Tools for Modern PHP
Alex Weissman
 
200,000 Lines Later: Our Journey to Manageable Puppet Code
David Danzilio
 
Content Management Systems and Refactoring - Drupal, WordPress and eZ Publish
Jani Tarvainen
 
Taming the Deployment Beast
Chris Cornutt
 
When your code is nearly old enough to vote
dreamwidth
 
Composer at Scale, Release and Dependency Management
Joe Ferguson
 

Similar to Updating Neos – Why, When and How - 2024 edition (20)

PDF
I - Front-end Spectrum
WebF
 
PDF
Symfony - Introduction
Piers Warmers
 
PDF
WordCamp Belfast DevOps for Beginners
Stewart Ritchie
 
PDF
The New And Improved Flask Mega-Tutorial Miguel Grinberg
bumpbgsyyy017
 
KEY
CakePHP - The Path to 2.0
Graham Weldon
 
PDF
Old Dogs and New Tricks
Elizabeth Leddy
 
PDF
Front end-modernization
ColdFusionConference
 
PDF
Front-End Modernization for Mortals
cgack
 
PDF
Front end-modernization
devObjective
 
PDF
Continuous Delivery: The Dirty Details
Mike Brittain
 
PDF
Gustavo Delgado - Qué esperan de tí como desarrollador remoto
9punto5
 
PPTX
The Professional Programmer
Dave Cross
 
PDF
Choosing Javascript Libraries to Adopt for Development
Edward Apostol
 
PDF
Drupal Europe 2018: Hackers automate but the drupal community still downloads...
hernanibf
 
PPTX
Novelty in Non-Greenfield
Justin Lovell
 
PDF
Continuously Deploying Culture: Scaling Culture at Etsy - Velocity Europe 2012
Patrick McDonnell
 
PDF
Continuously Deploying Culture: Scaling Culture at Etsy - Velocity Europe 2012
Michael Rembetsy
 
PPTX
The world is not black and white – Impact of decisions over the lifetime of a...
Eric Reiche
 
ODP
Automatic codefixes
Sven Rautenberg
 
PPTX
Pearls and Must-Have Tools for the Modern Web / .NET Developer
Ofer Zelig
 
I - Front-end Spectrum
WebF
 
Symfony - Introduction
Piers Warmers
 
WordCamp Belfast DevOps for Beginners
Stewart Ritchie
 
The New And Improved Flask Mega-Tutorial Miguel Grinberg
bumpbgsyyy017
 
CakePHP - The Path to 2.0
Graham Weldon
 
Old Dogs and New Tricks
Elizabeth Leddy
 
Front end-modernization
ColdFusionConference
 
Front-End Modernization for Mortals
cgack
 
Front end-modernization
devObjective
 
Continuous Delivery: The Dirty Details
Mike Brittain
 
Gustavo Delgado - Qué esperan de tí como desarrollador remoto
9punto5
 
The Professional Programmer
Dave Cross
 
Choosing Javascript Libraries to Adopt for Development
Edward Apostol
 
Drupal Europe 2018: Hackers automate but the drupal community still downloads...
hernanibf
 
Novelty in Non-Greenfield
Justin Lovell
 
Continuously Deploying Culture: Scaling Culture at Etsy - Velocity Europe 2012
Patrick McDonnell
 
Continuously Deploying Culture: Scaling Culture at Etsy - Velocity Europe 2012
Michael Rembetsy
 
The world is not black and white – Impact of decisions over the lifetime of a...
Eric Reiche
 
Automatic codefixes
Sven Rautenberg
 
Pearls and Must-Have Tools for the Modern Web / .NET Developer
Ofer Zelig
 
Ad

More from Karsten Dambekalns (20)

PDF
Sawubona! Content Dimensions with Neos
Karsten Dambekalns
 
PDF
Deploying TYPO3 Neos websites using Surf
Karsten Dambekalns
 
PDF
Profiling TYPO3 Flow Applications
Karsten Dambekalns
 
PDF
Using Document Databases with TYPO3 Flow
Karsten Dambekalns
 
KEY
i18n and L10n in TYPO3 Flow
Karsten Dambekalns
 
PDF
FLOW3-Workshop F3X12
Karsten Dambekalns
 
PDF
Doctrine in FLOW3
Karsten Dambekalns
 
PDF
How Git and Gerrit make you more productive
Karsten Dambekalns
 
PDF
The agile future of a ponderous project
Karsten Dambekalns
 
PDF
How Domain-Driven Design helps you to migrate into the future
Karsten Dambekalns
 
PDF
Content Repository, Versioning and Workspaces in TYPO3 Phoenix
Karsten Dambekalns
 
PDF
Transparent Object Persistence (within FLOW3)
Karsten Dambekalns
 
PDF
JavaScript for PHP Developers
Karsten Dambekalns
 
PDF
Transparent Object Persistence with FLOW3
Karsten Dambekalns
 
PDF
TDD (with FLOW3)
Karsten Dambekalns
 
PDF
Implementing a JSR-283 Content Repository in PHP
Karsten Dambekalns
 
PDF
Knowledge Management in der TYPO3 Community
Karsten Dambekalns
 
PDF
Unicode & PHP6
Karsten Dambekalns
 
PDF
Implementing a JSR-283 Content Repository in PHP
Karsten Dambekalns
 
PDF
A Content Repository for TYPO3 5.0
Karsten Dambekalns
 
Sawubona! Content Dimensions with Neos
Karsten Dambekalns
 
Deploying TYPO3 Neos websites using Surf
Karsten Dambekalns
 
Profiling TYPO3 Flow Applications
Karsten Dambekalns
 
Using Document Databases with TYPO3 Flow
Karsten Dambekalns
 
i18n and L10n in TYPO3 Flow
Karsten Dambekalns
 
FLOW3-Workshop F3X12
Karsten Dambekalns
 
Doctrine in FLOW3
Karsten Dambekalns
 
How Git and Gerrit make you more productive
Karsten Dambekalns
 
The agile future of a ponderous project
Karsten Dambekalns
 
How Domain-Driven Design helps you to migrate into the future
Karsten Dambekalns
 
Content Repository, Versioning and Workspaces in TYPO3 Phoenix
Karsten Dambekalns
 
Transparent Object Persistence (within FLOW3)
Karsten Dambekalns
 
JavaScript for PHP Developers
Karsten Dambekalns
 
Transparent Object Persistence with FLOW3
Karsten Dambekalns
 
TDD (with FLOW3)
Karsten Dambekalns
 
Implementing a JSR-283 Content Repository in PHP
Karsten Dambekalns
 
Knowledge Management in der TYPO3 Community
Karsten Dambekalns
 
Unicode & PHP6
Karsten Dambekalns
 
Implementing a JSR-283 Content Repository in PHP
Karsten Dambekalns
 
A Content Repository for TYPO3 5.0
Karsten Dambekalns
 
Ad

Recently uploaded (20)

PDF
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
PDF
Exploring AI Agents in Process Industries
amoreira6
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
PPTX
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pptx
Certivo Inc
 
PPTX
Presentation about variables and constant.pptx
kr2589474
 
PPTX
Role Of Python In Programing Language.pptx
jaykoshti048
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PPTX
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
PDF
Enhancing Healthcare RPM Platforms with Contextual AI Integration
Cadabra Studio
 
PPTX
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
PPTX
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
PPTX
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
PDF
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
PDF
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
PDF
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
PDF
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
PDF
Appium Automation Testing Tutorial PDF: Learn Mobile Testing in 7 Days
jamescantor38
 
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
Exploring AI Agents in Process Industries
amoreira6
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
Protecting the Digital World Cyber Securit
dnthakkar16
 
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pptx
Certivo Inc
 
Presentation about variables and constant.pptx
kr2589474
 
Role Of Python In Programing Language.pptx
jaykoshti048
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
Enhancing Healthcare RPM Platforms with Contextual AI Integration
Cadabra Studio
 
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
Appium Automation Testing Tutorial PDF: Learn Mobile Testing in 7 Days
jamescantor38
 

Updating Neos – Why, When and How - 2024 edition

  • 2. Updating Neos – Why, When and How Karsten Dambekalns
  • 3. Karsten Dambekalns • Developer and consultant at Flownative GmbH • Working on & with Neos since 2005… for 19 years… • Updated quite a number of Flow and Neos projects over the years • Most recently a Flow 3.0.2 project essentially unchanged since 2013 🤪
  • 4. Why, When and How Why? Because you get new features and bug fi xes. When? Whenever a new version is released. How? Read & follow instructions, test & deploy. Done!
  • 5. Thanks for listening • Any questions? • Just kidding…
  • 6. Why should you update? • You bene fi t from fewer bugs, new features and better performance most of the time
  • 8. Bugs to get rid of…
  • 9. Why should you update? • You bene fi t from fewer bugs, new features and better performance most of the time • Outdated versions will no longer receive support
  • 13. Why should you update? • You bene fi t from fewer bugs, new features and better performance most of the time • Outdated versions will no longer receive support • Security fi xes will no longer be done on old releases
  • 18. When should you update? • As often and as fast as possible! • Updating often keeps the routine drilled… • Staying up to date keeps the steps to take smaller! • Smaller steps mean lower risk when updating!
  • 19. But… we updated once, and it broke our site! As mentioned, in case something goes wrong: • do test your updates on a staging instance • have a current backup • have a rollback-strategy If things still break on production deployment, the cause is almost never the new version…
  • 20. But… we don‘t need new stu ff and things work fi ne That is the „our small site works well“ reasoning, which is fi ne until: • Your hosting provider emails you to inform you about the EOL of PHP 5.6, so your Neos 1.0 site will stop working. • Some security issue requires you to upgrade, but in a hurry! • Related technology must be updated for some reason. • New features must be added (GDPR adjustments, anyone?) – but no one wants to work with such old code…
  • 21. But… we run a mission critical site! Some sites cannot a ff ord a downtime caused by a bug introduced by an update. But of course you don‘t deploy the update to your mission-critical site untested, do you? And you do have a backup and a rollback strategy in place, don‘t you? If you can‘t have a staging instance for testing, your mission can’t be that critical…
  • 22. But… we only use LTS versions! Sometimes people claim they must only use LTS versions, because they are more reliable or receive better support. Reliability Granted, new features may introduce bugs. But all supported branches receive all fi xes – due to how we manage the source code. Support lifetime Any versions „after“ an LTS receive support for as long as the LTS version – due to how we manage the source code.
  • 24. How should you update? The generic recipe is: • read release notes • adjust composer.json, if needed • do a dry-run of composer update, check results • do composer update, commit result • run core migrations, check result, adjust as needed • run database migrations • test, test again, commit, deploy to staging, test, deploy to production
  • 26. Patch-level releases • Must never be breaking, only contain bug fi xes • Might add new issues due to a buggy bug fi x, happens rarely, though • Usually about an hour of work x.y.z+1
  • 27. Minor releases • Add features and contain all the features and fi xes of the previous minor release(s) • Must never be breaking, but new features may still have bugs (more probably in a x.y.0 release) • Could take longer. If new features need to be enabled or con fi gured, even a few hours, depending on the complexity of your site • Might need a database migration and/or new con fi guration • A bit more testing than for a patch-level release is advisable x.y+1.z
  • 28. Major releases • Add features, contain features and fi xes of the previous minor release(s) and may have breaking changes • Probably need adjustments to your site’s code and new (major) versions of used extensions • Probably need a database migration and con fi guration changes • Could require updated infrastructure (PHP or Elasticsearch version, …) • Needs the most testing of all types of releases x+1.y.z
  • 29. Approaching an update Updating to a new version can always be done “in one go”, you do not need to upgrade to each version in between But you always need to read the release notes of the full range of versions you cover in your update Check your dependencies, if needed adjust to allow newer packages Collect a list of (breaking) changes that need attention
  • 30. Packages needing a dependency adjustment Sometimes you must raise the allowed version of dependencies, e.g. • fl ownative/google-cloudstorage 5.2 vs 5.3 • psmb/splitadd 0.3 vs 0.4 Usually not a problem, if you use constraints like ^5.2 – then 5.3 is allowed, too. And patch-level releases should aways be allowed… It’s di ff erent for major versions (no surprise) and for 0.x versions! Hint: use https://semver.madewithlove.com/ to check constraints!
  • 32. Doing the update • As soon as your dry-run update works and gives reasonable results • Update without the dry-run fl ag and commit the changes to the manifest(s) and lock fi le • Run core migrations on your own packages, check results, clean up as needed
  • 33. Clean up after core:migrate Here’s what I do after running core migrations: • check the commits that were created • soft-reset the repository to the latest upstream commit • adjust changes as needed • commit the changes in one commit That way it’s easier for me to keep things clean and clear
  • 34. Further adjustments Core migrations usually adjust the „easy“ stu ff , but some things cannot be automagically adjusted with reasonable e ff ort So some changes need to be done manually, examples for this are: • Fusion removal of the default prototype generator • Logging PSR-3 logger adjustments • Fluid ViewHelpers no more render() arguments • HTTP components use PSR middlewares instead
  • 36. Upgrading to Neos 9 … is not just another major version upgrade.
  • 37. Upgrading to Neos 9 Upgrading Composer packages • Adjust the version of any Neos packages to require ^9.0 and run composer update. • This will probably fail due to other packages in your project that need to be updated to work with Neos 9, so check those for newer versions. You will also need to require (at least) one new package: • neos/contentrepositoryregistry-doctrinedbalclient is the DBAL adapter for the CR After the upgrade try to run ./flow – with a bitlot of luck, everything compiles already. 🍀
  • 38. Upgrading PHP code • As usual, a fi rst step is to run ./flow core:migrate on all packages you maintain or want to create a PR for. • Next install the neos/rector package to be able to use the migrations we ship for upgrading to v9. • Now run Rector in dry-run mode and if things look good, run it for real. If the automated ways of fi xing your PHP code did not work (well enough), it is now time for manual adjustments… • To begin with, just try to make the code compile again!
  • 39. Migrating con fi guration • If you have Routes con fi gured, make them use the new FrontendNodeRoutePartHandlerInterface if needed. • Adjust your Content Dimensions setup • … probably more to come!
  • 40. Migrate your content Moving your content from the old Content Repository into the new one is the major step. In a nutshell: 1. Prepare your data 2. Prepare the new Content Repository 3. Install migration tooling 4. Do the data migration
  • 41. Prepare your data Your project ideally is at version 8.3 already (you upgrade early & often, no?) To be on the safe side, run the migrations as usual: ./flow doctrine:migrate To make the migration smoother, fi x as many errors in the CR as possible. So think about cleaning things up using node:repair to fi x unde fi ned properties, remove nodes with unknown nodetypes and so forth. This will make the output less verbose, later… As usual, be careful with that tool, it can destroy data…
  • 42. Prepare your data Make your site's root node a dedicated "home page nodetype.” Otherwise you will run into an error like this: The site node “bf…f8" (type: "Neos.NodeTypes:Page") must be of type "Neos.Neos:Site" • If you already have a dedicated nodetype for the site root, you can simply add Neos.Neos:Site as a supertype to it. • Otherwise, create a new nodetype like below and change the type of the current site root node to it: 'Acme.AcmeCom:Document.Homepage': superTypes: 'Neos.Neos:Site': true 'Neos.NodeTypes:Page': true
  • 43. Prepare the new CR Before you can do anything, you need to set up the needed tables for the new Content Repository. Fear not – this is as easy as: ./flow cr:setup Now a number of new tables named cr_default_* will appear in your database – it is no problem to use the same database as before.
  • 44. Install migration tooling To migrate the data, you need another "helper package", so install neos/ contentrepository-legacynodemigration now, which allows to migrate CR data: composer require --dev neos/contentrepository-legacynodemigration
  • 45. $ ./flow cr:migratelegacydata Do you want to migrate resources from the current installation "/…/Data/Persistent/Resources" (y/n)? Do you want to migrate nodes from the current database "dbname@dbhost" (y/n)? Successfully connected to database "dbname" Which site to migrate? [acmecom] acme.com (Acme.AcmeCom) > acmecom Site "acmecom" already exists, update it? [n] y We will clear the events from "cr_default_events". ARE YOU SURE [n]? y Truncated events Exporting assets... Exported 211 assets. Errors: 54 Exporting node data... Exported 1840 events Importing assets... Imported 196 Assets and 60 Image Variants. Errors: 0 Importing events... Imported 1840 events into stream "ContentStream:6ae1f48e-b3ed-4438-b685-d703c446cc29" Replaying projections Done
  • 46. Migrate your Fusion code • The automated migration using Rector will have adjusted your Fusion code already. • Check those changes and look for instructions added – there are adjustments you must do manually yourself. • Some more manual changes are needed when using deprecated ways of doing things, e.g. for adding @cache con fi guration. • When (still) using Fluid, you need a few more changes – those doing AFX already are better o ff – as Neos.Fusion:Template is no longer a default.
  • 47. Upgrading more PHP code • Most projects will probably not be a ff ected much by the changes to the Content Repository PHP API • If you do interact with the CR, it is probably to • import things from some source, • export things to some source, • do things in some added Neos backend module. As we come closer to the release of Neos 9, examples and recipes will be published for common cases!
  • 48. If you get stuck Finally, if you get stuck with an update even though you were well prepared • Search for your issue, chances are someone else found a solution already • Ask the community for help on Slack or discuss.neos.io • Ask your agency for help • If you are an agency, ask me or my company for help 😎
  • 49. Test and deploy Now test your site. You may • Run unit and functional tests if you have them • Run a link checker on the site • Check logs for error messages and warnings • Click around and manually test important or prominent features If all is well, deploy and be happy. 🎉
  • 50. Problems after an update If some new problems appear after an update – ideally found before going into production – there are two possible causes: • You made a mistake. Double-check your changes and try to verify against the previous version. • You found a bug. Check the issue tracker for a new report that looks like your problem
  • 51. Recap: Why, When and How Why? Because you get new features and bug fi xes. When? Whenever a new version is released. How? Read & follow instructions, test & deploy. Done!
  • 53. Thanks for listening! Further reading: https://www. fl ownative.com/en/blog/neoscon-2024-updating-neos.html Contact me at: • karsten@ fl ownative.com • @kdambekalns in the Neos Slack