TL;DR
Strapi v3.0.0-rc.0 introduces significant framework improvements with a focus on configuration management, database lifecycle hooks, and UI enhancements. This release candidate brings native support for .env files, simplified configurations, improved database lifecycle hooks, and numerous UI refinements across the admin panel. Several breaking changes have been implemented to improve stability, including the removal of problematic ID attribute options and the addition of reserved name checks for models and attributes.
Highlight of the Release
- Native support for
.env files and simplified configuration system
- Improved database lifecycle hooks for more reliable data operations
- Removal of problematic idAttribute and idAttributeType options
- Reserved name checks for models and attributes to prevent conflicts
- Comprehensive UI improvements across the admin panel
Migration Guide
Configuration System
If you're upgrading from a previous beta version, you'll need to adapt to the new configuration system:
- Create a
.env file in your project root for environment-specific variables
- Update your configuration files to use the new simplified format
- Replace any direct access to environment variables with
strapi.config.get() calls
Database Lifecycle Hooks
If you were using the previous lifecycle hooks system, you'll need to update your code to use the new format:
module.exports = {
lifecycles: {
beforeCreate(data) {
// Your code here
},
afterCreate(result) {
// Your code here
},
// Other lifecycle hooks...
}
};
ID Attribute Options Removal
If you were using idAttribute or idAttributeType options, you'll need to:
- Remove these options from your models
- Implement custom ID generation using lifecycle hooks if needed
- Update any queries that relied on custom ID field names
Reserved Names
Check your existing models and attributes against the new reserved names list to ensure compatibility.
Upgrade Recommendations
For Testing Only
This is a release candidate (RC) version and contains breaking changes. It is not recommended to upgrade existing production applications to this version.
For testing purposes, you can create a new application using:
npx create-strapi-app@rc my-test --quickstart
Wait for the final v3.0.0 release with complete migration guides before upgrading existing applications.
If you're developing a new application, this RC version provides a good opportunity to test the latest features and provide feedback to the Strapi team before the final release.
Bug Fixes
Database Lifecycle Hooks Fix
The database lifecycle hooks system has been reimplemented to address numerous issues that had accumulated over time. This provides a more reliable foundation for data operations and custom logic execution.
Removal of Problematic ID Attribute Options
The idAttribute and idAttributeType options have been removed as they were causing significant issues, particularly when trying to use UUID types. Instead, developers are now encouraged to use additional fields with lifecycle hooks to implement custom ID generation when needed.
Content Type Builder Validation
Added checks to verify that content type names don't conflict with their pluralized versions, preventing potential API route conflicts.
User Registration Input Validation
Fixed an issue where private fields could be manipulated during user registration by properly filtering input data.
New Features
Configuration System Overhaul
The configuration loading system has been completely refactored to support .env files natively and simplify generated configurations. This makes environment-specific settings much easier to manage and deploy.
Database Lifecycle Hooks
New lifecycle hooks have been implemented to provide more reliable and consistent data operations. These hooks allow developers to execute custom logic at specific points in the data lifecycle, such as before or after create, update, and delete operations.
Reserved Names API
A new system has been added to check for and prevent the use of reserved attribute or model names, helping developers avoid conflicts with system functionality.
Security Updates
User Registration Security
Fixed a security issue in the user registration process by properly ignoring private fields in the input data, preventing potential manipulation of sensitive user data.
Performance Improvements
UI Loading Indicators
Added loading indicators to the Media Library and Content Manager list views, improving the perceived performance and user experience during data fetching operations.
Buffetjs Upgrade
Upgraded to Buffetjs 3.1.1, which includes various performance improvements for UI components used throughout the admin panel.
Impact Summary
This release candidate represents a significant step toward the final v3.0.0 release of Strapi, with major improvements to core functionality and user experience.
The configuration system overhaul makes environment management much more straightforward, with native support for .env files and simplified configuration structures. This will make deployment across different environments more reliable and easier to maintain.
The database lifecycle hooks improvements fix numerous issues that had been affecting data reliability and provide a more robust foundation for custom data processing logic.
The removal of problematic ID attribute options and the addition of reserved name checks will help prevent common issues that users were encountering, though they do represent breaking changes that will require code updates.
The UI improvements across the admin panel enhance the overall user experience with better visual consistency, improved loading indicators, and more intuitive interactions.
Overall, this release focuses on stability, developer experience, and UI refinements as Strapi approaches its final v3.0.0 release.
Full Release Notes
🎉 Do you want to test this pre-release? 🎉
You can run
npx create-strapi-app@rc my-test --quickstart
⚠️ DO NOT MIGRATE ⚠️
This pre-release contains breaking changes so you should not try migrating an existing app until we release the final v3.0.0 release with the migration guides.
For the curious ones out there, here are a few more details:
🚀 New feature
Refactors configuration loading to support .env files natively and simplifies generated configurations. (Check the future documentation learn more.
🐛 Bug fixes
We implemented new lifecycles hooks to fix the numerous issues we have added along the way with them. You can check out the future documentation to learn more.
- [core:database] 💥 Remove idAttribute and idAttributeType options because breaks strapi (#5988) @alexandrebodin
We have been having issues concerning idAttributes and UUID type when trying to overwrite the default id behavior. To make sure no one encounters those issues we decided to remove this behavior and instead promote the use of additional fields with lifecycles to build UUIDs if needed!
- [plugin:content-type-builder] 💥 Add reserved names for models and attributes (#5989) @alexandrebodin
We added checks at startup and in the content type builder to notify users that they are using reserved attribute or model names.
💅 Enhancements