Announcing Twill 2.0!March 10, 2020 at 6:55am (Edited 1 year ago)
We're very excited to release Twill 2.0 after a few months of focus to really set the project up for success. We've responded to the community pain points, supporting both Laravel 6 and 7, removing the need to build blocks and assets, improving documentation, introducing automated testing, and many more updates and bug fixes you can read more about below.
We were also very positively surprised by the number and quality of external contributions. Twill now has 42 contributors, twice as much as our previous release, and community members are starting to provide excellent support to other developers from their experience working with it. Thanks a lot to everyone involved! Twill also surpassed 20k installs recently!
We also want to note we understood the concerns shared by the community about our lack of releases in the past few months, and hope that this release will make you love working with Twill even more after patiently waiting for it. Our support for Laravel 6 took time to perfect, with dependencies going deprecated. Our changes to the frontend build or to the repositories traits needed to be challenged in different codebases. Stability is key for our users and it was important for us to take the time to make it right.
We could have tagged Laravel 6 support earlier though, that's entirely true, and that's something we want to address moving forward. We will now commit to releasing at least once every month. We might not want to be as quick as Laravel with a major release every 6 months, but we will be more actively releasing even if it is for a few minor fixes, that's for sure. With that said, we also want to say thank you to all the developers that tested our changes on the master branch during the past few months. It's been incredibly helpful to get feedback and contributions from the community.
Check out our full changelog for more detailed instructions on how to update and everything new in 2.0.
When releasing Laravel 6 at Laracon US last year, Taylor Otwell explained why v6 instead of v5.9, since it wasn't a "paradigm changing" release for the framework. That was because Laravel adopted semantic versioning (
major.minor.patch). For simplicity, and because this is common practice for open source projects, we made that shift as well.
Starting with Twill 2.0.0, major releases are released only when breaking changes are necessary, while minor and patch releases may be released as often as every week. Minor and patch releases should never contain breaking changes.
When referencing Twill from your
composer.jsonfile, you should always use a version constraint such as
^2.0, since major releases of Twill do include breaking changes.
Until recently, Laravel and Twill were following romantic versioning (
paradigm.major.minor). This is why Twill 1.2.2 was not just about patches but new features and improvements as well. Because today's release includes breaking changes and Twill now follows semantic versionning, we have to tag it as
2.0.0, even if it is not a paradigm shift at all.
Laravel versions support
Twill 2.0 supports Laravel 6 and 7, but does not support Laravel 5.4 and 5.5 anymore. 5.6, 5.7 and 5.8 are still supported.
We've removed all references to deprecated Laravel helpers from Twill, updated dependencies, and deleted some deprecated code from dropping support of 5.4 and 5.5.
We've also migrated from the deprecated dimsav/laravel-translatable to astronomic/laravel-translatable.
We've removed the Debug Bar and Inspector debugging packages as Laravel now ships with Ignition and we felt like developers should be able to pick the tools they prefer.
Blocks and frontend build workflow
It is not necessary to rebuild Twill's frontend when working with blocks anymore. Their templates are now dynamically rendered in Blade and loaded at runtime by Vue. Practically, it means you do not need to run
php artisan twill:blocksand
npm run twill-buildafter creating or updating a block. Just reload the page to see your changes after saving your Blade file!
This is possible because Twill's blocks Vue components are simple single file components that only have a template and a mixin registration. Blocks components are now dynamically registered by Vue using
x-templatescripts that are inlined by Blade.
In the process, we've also migrated from Laravel Mix to the latest version of Vue CLI, to have better control over our build. That also allowed us to fix an issue that had been annoying to quite a few users: conflicts with your own application's Laravel Mix configuration. Now, Twill publishes it's manifest to its own directory with a custom name, and won't be a blocker to running both of your builds if necessary anymore.
Database migrations loading strategy
As recommended by Laravel's documentation, we've decided to load Twill's database migrations without publishing them. This will allow more flexibility in the future and it avoids polluting the host application migrations folder.
A boolean config key has been introduced to control this new behavior:
twill.load_default_migrations. It defaults to
truestarting with Twill 2.0.
Even if you are migrating from a Twill 1.x application, you should not have to worry about running those new migrations as they have been modified to always check for existence (or inexistence) of tables and columns before doing anything. If you want to maintain migrations yourself, feel free to disable this option and use Twill's
migrationsfolder as a source of truth to update yours.
We've also prepared for all tables to be prefixed by
twill_in the next major release and exposed new config keys to control their names so you can already start using prefixed tables with Twill 2.0.
Database migrations changes
Like Laravel, Twill now uses big integers in migrations helpers. This is a breaking change with backwards compatibility provided through the
Twill now automatically takes care of your translations models
fillableby reusing your
translatedAttributesarray as long as you define a
$baseModuleModel, which now happens automatically when generating modules from the CLI. This is not a breaking change but we think you should update to this new approach to avoid duplicating your columns list in 2 files.
modulecommand now offers available options through a series of questions and then generates model and migration files content dynamically depending on provided options, removing previous versions comments, providing a greatly improved developer experience.
TravisCI is now testing Twill on all currently supported and future PHP versions. Almost 60% of all the PHP code is now covered by a PHPUnit test! Syntax errors are being checked by PHP-CS-Fixer and Scrutinizer CI is now analyzing Twill's codebase at every single commit. Prettier is now configured to maintain Twill's PSR-2 style. PHPStan also helped us fixing a few issues.
CMS UI i18n
The CMS UI can now be translated. We are shipping this update with Russian and Chinese translations. CMS users can choose their preferred language in their profile. As we are updating this changelog, French, German, Dutch, Portuguese and Polish translations have already been contributed by the community.
In order to provide HTML tables support in the WYSIWYG form field, we've integrated the Tiptap editor with Twill. You can use it by using the new
typeoption of the
wysiwygform field, with the
tiptapvalue. You can then enable the
tablebutton in your
You can enable the new
twill.enabled.users-oauthfeature to let your users login to the CMS using any third party service supported by Laravel Socialite.
JSON fields groups
It is now possible to automatically save and retrieve multiple form fields in a single JSON column in database. See
endpoint_typeto support Azure storage of all uploads, exactly like when working with S3.
We added a new layout to enable creating custom pages, keeping the navigation of your admin console. See our dedicated documentation section.
Automated browsers and repeaters
Clean up your repositories with this new feature that will automatically save and retrieve browser and repeaters fields for you. See
Destroy records in the trash
It is finally possible to destroy and bulk destroy records in the trash!
Records can now be duplicated from the listing page.
Enabling the new
'twill.support_subdomain_admin_routing'config key allows adding top level keys to Twill's navigation and dashboard modules configuration, mapping to a subdomain. This is a very simple way to implement multi-tenant CMS/sites in Twill.
- Add form utils component aliases
- Add sideFieldset and sideFieldsets sections to form
- Add slot to publisher component
- Fix #90 Add maxlength option to image metadata
- Allow enabling svg rendering parameters in Imgix and Glide services
- Add disabled property in the form submitOptions
- Support custom repository in dashboard and buckets configuration
- Expose glide configuration
- Added get preset url for glide
- Support multi-browsers in blocks
- Add FilterLinks on Listings and Buckets
- Add new icons
#397Support Glide Presets
#521Added support for nested repeaters in block
#526Implement updateRepeater() for morphMany relations
#528Added an extra prop to repeater field to override the name
#551Display and apply default filters in listings
#562Add new fieldNote option to browser, medias and files fields
#371Fix maps implementation when printing values from an array.
#380Bug fix with undefined route name when blocks-editor is disabled
#381Add check on translatable input store to prevent duplicate field objects
#385Fix create superadmin user Artisan command
#390Fix ignoring current email in UserRequest
#395Fixed TTY issue for twill build command #236
#402When hydrating an old revision, include the ID so relationship methods don't fail
#418Fix join() syntax
#421Display error when the blocks dir is not found
#423Fix missing /js/blocks dir on twill:blocks command
#425Fix published being sent as string on json
#427Fix google2fa settings not being enabled
#429Fix some deprecated helpers
#431fixed an http & https issue from APP URL
#446Fixed 'delete' => true not working in indexOptions, refs #289
#449Fix « Handle Repeater » feature compatibility with Laravel 5.6
#459Wysiwyg - Counter limit (fix counter limit in Textfield)
#460Wysiwyg - Make sure quill is ready when checking content length
#461Forms with no Content fieldset : fix sticky publisher module and fix sticky nav sections
#469Check the index exists before trying to save browsers in blocks
#475Fix the admin url of an element in the browser listing
#481Fix typo in docs for nested module
#484Fix join() syntax in MediaLibrary/Glide.php
#485Fix/destroy sub module
#506add required namespaces for Arr and Str in views and blade macros
#509Fix inconsistent use of integer and bigInteger on MariaDB 10.3
#523Fixed a bug causing select field not accepting default to be false
#536Exception handler should return json response on ajax call
#539Fix getSlug() function when locale fallback is activated
- Fix #41 – Use text columns for medias and files uuid, alt_text, caption and filename, make alt_text nullable
- Fix #504 Swap order of breadcrumbs and secondary nav
- Apply mine filters on dashboard drafts only if revisions are enabled
- Fix activity log breaking on destroyed subjects
- Fix lang switcher border
- Fix spacing issues
- Fix isAjax check on VSelect component
- Force assets publish on twill:update
- Fix deeper Twill namespaces
- Fix typo for issue #362
- Fix environment requirements in docs
- Fix #290 implementation
- Fix missing AWS_ROOT variable
- Fix #399 dashboard repositories service container resolution
- Fix regression on form notifications
- Fix bulk delete warning modal reference
- Fix module maker migration generator
- Fix migration stub typo
- Form - Make sure $disableContentFieldset is defined
- Prevent LQIP generator command crashes by letting it skip on exceptions
#386Refactor calling trait methods from repository
#387Refactor getLanguageLabelFromLocaleCode to use php intl's "Locale::getDisplayLanguage"
#396Added Logo and Badges to README
#404Change the way of maintaining Twill version number
#430Move logic to model
#442Implement a Sortable function closer to the one offered by Translatable.
#445Replace bcrypt() with Hash::make in CreateSuperAdmin command
#450Add style for subscript into wysiwyg
#500Extend slug character support
#534Slug characters extended
#537Refactored HandleRepeaters trait
#538Refactored HandleBrowsers trait
- 2.0 version and docs updates
- Allow using the content editor even if revisions are disabled
- Add message clarifying grouped validation error messages in blocks
- More 2.0 docs adjustements
- 2.0 documentation updates
- Allow firstOrCreate to have only attributes
- Use bold font in wysiwyg editor content
- Disable Quill warnings
- Consider itemLabel better in browser and files form fields
- Button : add download and rel attributes
- Button with a:href : update props and add target
- CSS - set default button as inline block to avoid small visual regression
- Button update default styling so it works with ahref
- Refactor Button component so it is using render function and can be used to display links
- Invert sorting order in ModuleRepository.
We hope you enjoy this release, we're already excited about the next one!
March 10, 2020 at 7:41am
Thanks so much and the team! Looking forward to trying to upgrade a few existing projects ;)
While it's really been a long time, I think it was worth waiting. I've already migrated my WIP projects and started using the new features, there are some great ones. I think Twill is getting to a point where it can be used as a full-featured production CMS replacing dinosaurs like WP and Joomla. Thank you for making this happen!
one thing to do that would really help Twill self promote is to update the demo site you have and make it include new Twill 2.0 features. If there is any chance of making a new site that uses lots of the functionality and then also copying that site into a github repro that would be an amazing reference.
March 13, 2020 at 6:25pm
March 30, 2020 at 5:22pm
March 31, 2020 at 6:02pm