Skip to content

v4 Upgrade guide

Sam Poyigi edited this page Feb 3, 2024 · 1 revision

Deprecations

  • ViewMaker::guessViewFileExtension,
  • App::before
  • Events: router.before, router.after, router.beforeRoute use Illuminate\\Routing\\Events\\Routing instead
  • Helper Methods: root_url, assets_url, image_url, image_path, uploads_url, site_url, assets_path, extension_path,

Changes:

  • Now using an email address instead of a username for admin login
  • App::hasDatabase > Igniter::hasDatabase
  • App::extensionsPath > Igniter::extensionsPath
  • App::themesPath > Igniter::themesPath()
  • system config values are now under igniter.system
  • Extension config files are no longer merged automatically. You must use Laravel’s mergeConfigFrom() method from your extension boot method
  • Renamed mail templates namespace admin:: > igniter.admin::, main:: > igntier.main:: , system:: > igniter.system::
  • Renamed translations string keys: admin::lang. > igniter::admin., main::lang. > igntier::main. , system::lang. > igniter::system.
  • Extend exception handler using reportable and renderable callbacks instead of overriding class (ADVANCED level)
  • Media storage location moved to public/media/{uploads, attachments}
  • Replace extension path symbol from $\\vendor\\extension\\* to vendor.extension::\\*
  • Removed migration group DB column
    • Now using prefixed migration: admin, main, system > igniter.{admin, main, system}
  • Prefix class namespaces Admin\\, Main\\, System\\ > Igniter\\{Admin,Main,System}
  • Moved all controller classes from \\Admin\\Controllers\\* > \\Igniter\\Admin\\Http\\Controllers\\* and middlewares from Admin\\Middleware\\ > Igniter\\Admin\\Http\\Middleware\\* and controller actions Admin\\Actions\\ > Igniter\\Admin\\Http\\Actions\\
  • Move customer and customer group model, controller, and form request classes from Igniter\\Admin to Igniter\\Main
  • Moved System\\Models\\Theme > Igniter\\Main\\Models\\Theme, System\\Controllers\\Themes > Igniter\\Main\\Http\\Controllers\\Themes, System\\Classes\\Theme > Igniter\\Main\\Classes\\Theme
  • Move customer and customer group model lang strings lang:admin::lang.customers. & lang:admin::lang.customer_groups > lang:igniter::main.customers. & lang:igniter::main.customer_groups
  • Now using laravel’s auth and gates: moved admin auth logic from controller to middleware
  • Models\\Customer::getName > getFullName
  • Singletons have their drawbacks so no longer used: you can now resolve most manager classes through Laravel’s IoC so no need to call the instance() method on a manager class just resolve the class through the IoC resolve(Manager::class)
  • Change MainController::remap signature from $url to $method, $parameters for consistency
  • Remove $code from method signature on ThemeManager::loadTheme
  • Changed $themeCode > $path method signature on ThemeManager::getMetaFromFile
  • Changed $theme on Page::getDropdownOptions method signature to accept string
  • Instead of hacking the Mailer classs, use mixins on the Mail facade to add methods for sending registered mail templates: Mail::queue() > Mail::queueTemplate() & Mail::send() > Mail::sendTemplate()
  • Deprecated MailManager::addContentToMailer method to use template Mailable::buildView method instead.
  • Moved \\Igniter\\Flame\\Cart into cart extension
  • Moved Igniter\\Flame\\Location\\AbstractOrderType to Igniter\\Local\\Classes\\AbstractOrderType & Igniter\\Flame\\Location\\OrderTypes to Igniter\\Local\\Classes\\OrderTypes
  • Now using mixing to extend the mail and string services
  • Deprecated Igniter\\Flame\\Support\\Facades\\Str facades
  • Deprecated Staffs_model and Staff_groups_model for UserGroup and User model
  • New default view files for index, edit, create, and preview controller actions so you no longer need to create these view files for your admin controller actions
  • Deprecated extension:install, extension:remove, theme:install, theme:remove commands in favor of composer install and remove commands
  • Media settings moved to the igniter.system config file
  • Replaced bootstrap-multiselect JS plugin with selectize JS plugin
  • No longer using SendsMailTemplate model trait.. Using Laravel Mailable instead.
  • You can now register custom location settings just like you would for system settings by adding a registerLocationSettings to your extension class.
  • Replaced Location::getOption with Location::getSettings
  • Moved Igniter\\Local\\Classes\\AbstractOrderType to Igniter\\Cart\\Classes\\AbstractOrderType & Igniter\\Local\\Classes\\OrderTypes to Igniter\\Cart\\Classes\\OrderTypes
  • The structure for the dateTimeFilter option on the Order and Reservation model scope listFrontend has changed to ['startAt' => '', 'endAt' => '']

Database changes:

  • Merge staff records into admin_users table and rename staff_groups to user_groups
  • Prefixed tables users, users_groups, user_groups, user_roles, user_preferences tables with admin_ to avoid conflict with laravel users table
  • Dropped tables conflicting with laravel default tables: job_batches, cache, jobs, failed_jobs, sessions,
  • Increased all columns with varchar(128) a length of 128 to 255

Theme changes:

  • New blade directives @themeContent to render content template files and @page for rendering a pages contents
  • New blade directives @componentPartial, @themePartial to replace @component , @partial

API extension changes

  • Moved Igniter\\Api\\Actions\\RestController to Igniter\\Api\\Http\\Actions\\RestController

Cart extension changes

  • Moved Igniter\\Flame\\Cart into Igniter\\Cart

PayRegister extension changes

  • Rename payment partials.
Clone this wiki locally