GoravelGoravel
Home
Video
  • English
  • 简体中文
GitHub
Home
Video
  • English
  • 简体中文
GitHub
  • Prologue

    • Upgrade Guide

      • Upgrading To v1.15 From v1.14
      • Upgrading To v1.14 From v1.13
      • History Upgrade
    • Contribution Guide
    • Excellent Extend Packages
  • Getting Started

    • Installation
    • Configuration
    • Directory Structure
    • Compile
  • Architecture Concepts

    • Request Lifecycle
    • Service Container
    • Service Providers
    • Facades
  • The Basics

    • Routing
    • HTTP Middleware
    • Controllers
    • Requests
    • Responses
    • Views
    • Grpc
    • Session
    • Validation
    • Logging
  • Digging Deeper

    • Artisan Console
    • Cache
    • Events
    • File Storage
    • Mail
    • Queues
    • Task Scheduling
    • Localization
    • Package Development
    • Color
    • Strings
    • Helpers
  • Security

    • Authentication
    • Authorization
    • Encryption
    • Hashing
  • ORM

    • Getting Started
    • Relationships
    • Migrations
    • Seeding
    • Factories
  • Testing

    • Getting Started
    • HTTP Tests
    • Mock

Upgrading To v1.9 From v1.8

  • Enhancements 🚀
  • Breaking Changes 🛠
  • Bug Fixes 🐛
  • Dependency Updates ⬆️
  • Upgrade Guide
    • Updating Dependencies
    • Add database read-write separation
    • Add database pool configuration
    • Custom .env path
    • Cache add memory driver
    • Orm add Paginate method
    • Add make command
    • Add new methods for Response
    • Add return for Request PrepareForValidation method
    • File gets the wrong file type
    • Fix template error on make:event and make:listener command
    • Fix some types cannot obtain suffixes when save file

Enhancements 🚀

  • Add database read-write separation(1.9.0)
  • Add database pool configuration(1.9.0)
  • Custom .env path(1.9.0)
  • Cache add memory driver(1.9.0)
  • Orm add Paginate method(1.9.0)
  • Add make command(1.9.0)
  • Add new methods for Response(1.9.0)

Breaking Changes 🛠

  • Add return for Request PrepareForValidation method(1.9.0)

Bug Fixes 🐛

  • File gets the wrong file type(1.9.0)
  • Fix template error on make:event and make:listener command(1.9.0)
  • Fix some types cannot obtain suffixes when save file(1.9.1)

Dependency Updates ⬆️

  • build(deps): bump github.com/gin-gonic/gin from v1.7.3 to v1.8.2

Upgrade Guide

Estimated Upgrade Time: 10 Minutes

Updating Dependencies

Update dependencies in the go.mod file:

go get -u github.com/goravel/framework@v1.9.0

Add database read-write separation

Version: v1.9.0

Database supports read-write separation,For Detail.

Add database pool configuration

Version: v1.9.0

Add pool configuration for the database configuration file: config/database.go, For Detail.

Custom .env path

Version: v1.9.0

// Develop
go run . --env=../.env

// Compiled
./main --env=../.env

Cache add memory driver

Version: v1.9.0

config/cache.go add memory configuration:

"stores": map[string]any{
  // New
  "memory": map[string]any{
    "driver": "memory",
  },
},

For Detail

Orm add Paginate method

Version: v1.9.0

facades.Orm add Paginate method, For detail.

Add make command

Version: v1.9.0

// Create controller
go run . artisan make:controller UserController

// Create middleware
go run . artisan make:middleware Cors

// Create model
go run . artisan make:model User

Add new methods for Response

Version: v1.9.0

MethodAction
DataCustom return
RedirectRedirect

Add return for Request PrepareForValidation method

Version: v1.9.0

If you are using PrepareForValidation method in Validation, please add a return value: PrepareForValidation(data validation.Data) error.

File gets the wrong file type

Version: v1.9.0

Fix the problem that .docx, .xlsx, etc. are incorrectly identified as .zip.

Fix template error on make:event and make:listener command

Version: v1.9.0

import "github.com/goravel/framework/contracts/events" 改为 import "github.com/goravel/framework/contracts/event"

Fix some types cannot obtain suffixes when save file

Version: v1.9.1

Some types cannot obtain suffixes through the code shown below:

file, err := ctx.Request().File()   
file.Store("upload")
Edit this page