Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Fix "after commit" callbacks not running on nested transactions using RefreshDatabase or DatabaseMigrations #48523

Merged
merged 79 commits into from
Sep 26, 2023

Commits on Sep 20, 2023

  1. Configuration menu
    Copy the full SHA
    1f10b5e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d9538d6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e6de881 View commit details
    Browse the repository at this point in the history
  4. Fix typo

    tonysm committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    06adc98 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bf2764b View commit details
    Browse the repository at this point in the history
  6. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    451fd8b View commit details
    Browse the repository at this point in the history
  7. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    f49260e View commit details
    Browse the repository at this point in the history
  8. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    a7a2fa2 View commit details
    Browse the repository at this point in the history
  9. Update src/Illuminate/Database/DatabaseTransactionsManager.php

    Co-authored-by: Mior Muhammad Zaki <[email protected]>
    taylorotwell and crynobone authored Sep 20, 2023
    Configuration menu
    Copy the full SHA
    e3df8b1 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2023

  1. Changes the way the after commit callbacks are executed

    to avoid remembering which transactions to ignore
    
    Before, we were remembering the test transaction so we
    could ignore it when deciding to run the after commit
    callbacks or not.
    
    We're still handling the after commit callbacks like that
    but now instead of remembering which transactions to ignore,
    we're always calling the DatabaseTransactionManager::commit
    method. The difference is that now we're passing the current
    transaction level to it. The method will decide to call the
    callbacks or not based on that level and whether or not this
    is on in test mode.
    
    When in tests, instead of setting the current transaction to be
    remembered so it could be ignored, we're now only setting the
    DatabaseTransactionManager to test mode. When in test mode, it
    will execute the callbacks when the transactions count reaches
    1 (remember that the test runs in a transaction, so that's the
    "root" level). Otherwise, it runs the callbacks when the transactions
    level is on level 0 (like in production).
    
    There's also a change in the DatabaseTransactionManager::addCallback
    method. It now also checks if it's in test mode. When not in test mode,
    it only adds the callback to the execution queue if there's an open
    transaction. Otherwise, the callback is executed right away. When in
    test mode, the number of transactions has to be greater than one for
    it to be added to the callbacks queue.
    tonysm committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    f5aacf5 View commit details
    Browse the repository at this point in the history
  2. Fix DatabaseTransactionsTest

    tonysm committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    1d7b8ee View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    65c75ae View commit details
    Browse the repository at this point in the history
  4. CSFixer

    tonysm committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    2037453 View commit details
    Browse the repository at this point in the history
  5. wip

    tonysm committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    c7c7f3a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0d8f1fa View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    393a69c View commit details
    Browse the repository at this point in the history
  8. Simplify deeply nesting test

    tonysm committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    d3dcb03 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    68ed29a View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2023

  1. Rename method

    tonysm committed Sep 22, 2023
    Configuration menu
    Copy the full SHA
    5825929 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c660879 View commit details
    Browse the repository at this point in the history
  3. StyleCI

    tonysm committed Sep 22, 2023
    Configuration menu
    Copy the full SHA
    e111e70 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    239e6ec View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2023

  1. Tests observer using afterCommit

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    tonysm authored and crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    3510970 View commit details
    Browse the repository at this point in the history
  2. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    7bb02ae View commit details
    Browse the repository at this point in the history
  3. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    6799bde View commit details
    Browse the repository at this point in the history
  4. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    9cc6900 View commit details
    Browse the repository at this point in the history
  5. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    ad9b10c View commit details
    Browse the repository at this point in the history
  6. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    4a0232b View commit details
    Browse the repository at this point in the history
  7. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    36f1d21 View commit details
    Browse the repository at this point in the history
  8. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    2f3a943 View commit details
    Browse the repository at this point in the history
  9. Apply fixes from StyleCI

    StyleCIBot committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    1e8bcf4 View commit details
    Browse the repository at this point in the history
  10. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    f245912 View commit details
    Browse the repository at this point in the history
  11. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    be843ef View commit details
    Browse the repository at this point in the history
  12. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    6519d0d View commit details
    Browse the repository at this point in the history
  13. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    e2a079b View commit details
    Browse the repository at this point in the history
  14. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    21c6548 View commit details
    Browse the repository at this point in the history
  15. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    5863f0c View commit details
    Browse the repository at this point in the history
  16. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    7571318 View commit details
    Browse the repository at this point in the history
  17. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    a8882f5 View commit details
    Browse the repository at this point in the history
  18. Apply fixes from StyleCI

    StyleCIBot committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    d4ec4a2 View commit details
    Browse the repository at this point in the history
  19. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    8e9eae3 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    d2266a2 View commit details
    Browse the repository at this point in the history
  21. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    9968ad2 View commit details
    Browse the repository at this point in the history
  22. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    b3c3951 View commit details
    Browse the repository at this point in the history
  23. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    d13db21 View commit details
    Browse the repository at this point in the history
  24. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    e599333 View commit details
    Browse the repository at this point in the history
  25. Apply fixes from StyleCI

    StyleCIBot committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    7c99f62 View commit details
    Browse the repository at this point in the history
  26. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    c645396 View commit details
    Browse the repository at this point in the history
  27. Merge branch 'fix-create-or-first-transaction-callbacks' into 48466-r…

    …edux
    
    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    b1decbf View commit details
    Browse the repository at this point in the history
  28. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    4f93300 View commit details
    Browse the repository at this point in the history
  29. Apply fixes from StyleCI

    StyleCIBot committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    1e93349 View commit details
    Browse the repository at this point in the history
  30. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    082f4f5 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    9514f3b View commit details
    Browse the repository at this point in the history
  32. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    f5877c2 View commit details
    Browse the repository at this point in the history
  33. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    8ff509f View commit details
    Browse the repository at this point in the history
  34. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    55e7044 View commit details
    Browse the repository at this point in the history
  35. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    9474b23 View commit details
    Browse the repository at this point in the history
  36. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    a7aa391 View commit details
    Browse the repository at this point in the history
  37. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    f9ccf6c View commit details
    Browse the repository at this point in the history
  38. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    410bb9c View commit details
    Browse the repository at this point in the history
  39. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    1ae7684 View commit details
    Browse the repository at this point in the history
  40. Apply fixes from StyleCI

    StyleCIBot committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    bc9a4d5 View commit details
    Browse the repository at this point in the history
  41. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    8c503a3 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    f81cab0 View commit details
    Browse the repository at this point in the history
  43. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    9a3a21e View commit details
    Browse the repository at this point in the history
  44. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    8beb730 View commit details
    Browse the repository at this point in the history
  45. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    541af7b View commit details
    Browse the repository at this point in the history
  46. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    9aa3c32 View commit details
    Browse the repository at this point in the history
  47. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    c107aec View commit details
    Browse the repository at this point in the history
  48. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    565c579 View commit details
    Browse the repository at this point in the history
  49. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    0542d0e View commit details
    Browse the repository at this point in the history
  50. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    95dfe34 View commit details
    Browse the repository at this point in the history
  51. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    34f3933 View commit details
    Browse the repository at this point in the history
  52. wip

    Signed-off-by: Mior Muhammad Zaki <[email protected]>
    crynobone committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    7dd9c57 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    bcedae8 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2023

  1. Configuration menu
    Copy the full SHA
    c291c3a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    681154c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fa66e08 View commit details
    Browse the repository at this point in the history
  4. formatting

    taylorotwell committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    a519fde View commit details
    Browse the repository at this point in the history