Breaking Change in Laravel v12.9.0 - ManagesTransactions::transaction signature updated

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Gone away
    • Priority: Blocker - P1
    • None
    • Affects Version/s: laravel-5.3.1
    • Component/s: Laravel
    • None
    • None
    • PHP Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Issue reported in Laravel project: https://github.com/laravel/framework/issues/55421

      PR introducing the issue: https://github.com/laravel/framework/pull/55338 

       

      PHP Fatal error:  Declaration of MongoDB\Laravel\Concerns\ManagesTransactions::transaction(Closure $callback, $attempts = 1, array $options = []): mixed must be compatible with Illuminate\Database\Connection::transaction(Closure $callback, $attempts = 1, ?Closure $onFailure = null) in /home/runner/work/laravel-mongodb/laravel-mongodb/src/Concerns/ManagesTransactions.php on line 85In ManagesTransactions.php line 85:
                                                                                     
        Declaration of MongoDB\Laravel\Concerns\ManagesTransactions::transaction(Cl  
        osure $callback, $attempts = 1, array $options = []): mixed must be compati  
        ble with Illuminate\Database\Connection::transaction(Closure $callback, $at  
        tempts = 1, ?Closure $onFailure = null)                                      
                                                     

       

       

              Assignee:
              Jérôme Tamarelle
              Reporter:
              Jérôme Tamarelle
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: