Skip to content

Update to v7.3.0 ​

How to update from v7.2.x to v7.3.0. It is an update inside v7, but v7.3 is the one version that composer update alone does not reach.

v7.3 moves the library of the admin screens, "exceedone/exment-admin-core", from 1.x to 2.x. The composer.json of a site so far fixes admin-core to ^1.0, so a plain composer update says "Nothing to install, update or remove" and the site stays on v7.2.x.

v7.2.xv7.3.0
PHP8.2 or later8.2 or later (no change)
exceedone/exment-admin-core1.x (^1.0)2.x (^2.1)
QR code librarysimplesoftwareio/simple-qrcodebacon/bacon-qr-code 3.x
Laravel1212 (no change)
MySQL / MariaDB8.0 or later / 10.11 or laterno change

If you get an error, see Troubleshooting.

1. Take a backup ​

Always take a backup before the update.

  • Back up the database and the whole folder of Exment (with composer.json, composer.lock, vendor, public/vendor, .env and storage).
  • Check with your own eyes that the backup file is there. php artisan exment:backup can end without an error even when mysqldump failed (for example with a self-signed TLS certificate of the database).

2. A site installed with composer ​

In the folder where Exment is installed (the root of the project), run these in order.

# 1. exment and exment-admin-core of 7.3 (-W is needed)
composer require "exceedone/exment:^7.3" "exceedone/exment-admin-core:^2.1" -W

# 2. update the database and the rest
php artisan exment:update
  • 1. simplesoftwareio/simple-qrcode in the composer.json of a site installed from the v7.2 zip or boilerplate (v7.3 does not use it) is removed automatically by this line. There is no need to remove it first.
  • 1. Add -W (--with-all-dependencies). Without it, it stops with a message like "bacon … fixed to 1.0.2 by a partial update". It brings exment 7.3, exment-admin-core 2.1.1 or later and bacon/bacon-qr-code 3.x (and adds dasprid/enum).
    • If the site itself requires bacon/bacon-qr-code 1.x, add "bacon/bacon-qr-code:^3" to the same line.
  • 2. On a production site (APP_ENV=production), answer yes when it asks for a confirmation (to go on without being asked, add --force).
  • A site whose composer.json lists neither exment-admin-core nor simple-qrcode (only exceedone/exment) updates with a plain composer update and php artisan exment:update.
  • At the end, press Ctrl+F5 (super reload) in the browser.

3. A site installed from the zip, a rental server ​

Replace it with the v7.3 zip.

  1. php artisan down (maintenance mode).
  2. Take the backup above.
  3. Rename the folder (for example exment → exment_old).
  4. Download the v7.3 zip and unpack it as a folder with the old name.
  5. Delete storage in the new folder, and copy the whole storage and .env from the old folder.
  6. Delete bootstrap/cache/*.php in the new folder.
  7. Run php artisan exment:update --force.
  8. php artisan up (end of maintenance mode).
What to do
.env, all of storage (app/admin, app/plugins, app/backup, app/templates, oauth-*.key and so on)Use the old ones as they are
Files you put or changed in public, edits by hand in config/*.php, packages you required with composer yourself (ldaprecord and so on)Bring back by hand, looking at the old folder
Your own code in app/Exment/bootstrap.phpBring back by hand (exment:update makes the file again)
vendor, composer.json, composer.lock, public/vendor, bootstrap/cacheThe new ones (do not use the old ones; exment:update makes public/vendor again)

4. What changes in v7.3 ​

Plugins and your own code: messages are shown as text ​

With admin-core 2.x, the messages of admin_info(), admin_success(), admin_warning(), admin_error() (and *_once()) and admin_toastr() are shown as text, not HTML. A < in a name or an error text is shown as it is, which is safe.

When a message uses HTML (<br>, a link and so on), wrap it in admin_html_message(), and wrap the values in it with e() (or esc_html()).

php
// up to v7.2
admin_info('Done', $name . ' was made.<br><a href="' . $url . '">Open</a>');

// from v7.3
admin_info('Done', admin_html_message(e($name) . ' was made.<br><a href="' . e($url) . '">Open</a>'));

Without it, <br> and the like are shown as text (nothing stops working).

Feature management ​

Many of the features added in v7.3 are turned on or off in "System Setting" → "Feature management". Some new features start off.

Screens ​

In the left menu, an item with items under it opens to the side (the old way can be chosen in the system settings). See the release notes.

5. Exment SaaS ​

Exment SaaS is updated by its provider. You do not need these steps.

6. To go back ​

Go back to the backup taken before the update.

  1. Restore the database from the backup taken before.
  2. Put back composer.json, composer.lock, vendor and public/vendor from before (a zip site: go back to the old folder you renamed).
  3. Delete the content of bootstrap/cache and run php artisan optimize:clear.

Do not use php artisan migrate:rollback. Some database changes of v7.3 have no step back, so menus and columns would remain.