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

Fixing config modifications using an attribute #69

Merged
merged 3 commits into from
Dec 28, 2023

Conversation

msmakouz
Copy link
Member

Closes: #67

  1. If the configuration file is used in the bootloader's boot method, its modification in the test using the Spiral\Testing\Attribute\Config attribute causes an exception:
Spiral\Config\Exception\ConfigDeliveredException: Unable to patch config `...`, config object has already been delivered.

However, configuration files should be ready for use by this point. The config modification has been fixed, now it is done before the boot methods are executed.

  1. The spiral/framework has been added to require-dev. It is necessary for tests in this package, but was not explicitly required, it was in spiral/roadrunner-bridge until version 3.2.0:
    spiral/roadrunner-bridge@3.1.0...3.2.0
    Now it's not there and the tests are failing due to its absence.

@msmakouz msmakouz added the bug Something isn't working label Dec 27, 2023
@msmakouz msmakouz added this to the 2.x milestone Dec 27, 2023
@msmakouz msmakouz self-assigned this Dec 27, 2023
@msmakouz msmakouz marked this pull request as draft December 27, 2023 14:50
@msmakouz msmakouz marked this pull request as ready for review December 27, 2023 15:00
Copy link

codecov bot commented Dec 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9364cbc) 43.37% compared to head (500f700) 43.19%.

Additional details and impacted files
@@             Coverage Diff              @@
##                2.x      #69      +/-   ##
============================================
- Coverage     43.37%   43.19%   -0.18%     
- Complexity      329      330       +1     
============================================
  Files            34       34              
  Lines          1132     1139       +7     
============================================
+ Hits            491      492       +1     
- Misses          641      647       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@butschster butschster added the enhancement New feature or request label Dec 28, 2023
@butschster butschster merged commit 03808a8 into 2.x Dec 28, 2023
5 of 6 checks passed
@butschster butschster deleted the bugfix/config-attribute branch December 28, 2023 09:00
@butschster butschster linked an issue Dec 28, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Raise exception when use Config attribute Add attribute to config changing
2 participants