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

Fix PHP7.4+ compatibility #1193

Merged
merged 1 commit into from
Feb 12, 2022
Merged

Fix PHP7.4+ compatibility #1193

merged 1 commit into from
Feb 12, 2022

Conversation

avsdev-cw
Copy link
Contributor

PHP 7.4 modified the method_exists behaviour so that it no longer works as required. Alternative is to use is_callable, however this always returns true when __call is present (which it is). Laravel kindly provides a method for checking if a macro exists, so use that instead.

This fixes the exception in #1143 but more work needs to be done for the UI to access soft-deleted items for hard deleting

PHP 7.4 modified the method_exists behaviour so that it no longer works as required. Alternative is to use is_callable, however this always returns true when __call is present (which it is). Laravel kindly provides a method for checking if a macro exists, so use that instead.
@avsdev-cw
Copy link
Contributor Author

@codecov
Copy link

codecov bot commented Feb 7, 2022

Codecov Report

Merging #1193 (4609904) into master (15d713a) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1193      +/-   ##
============================================
+ Coverage     70.69%   70.70%   +0.01%     
  Complexity     1983     1983              
============================================
  Files           173      173              
  Lines          6903     6903              
============================================
+ Hits           4880     4881       +1     
+ Misses         2023     2022       -1     
Impacted Files Coverage Δ
app/sprinkles/core/src/Database/Models/Model.php 73.07% <100.00%> (+3.84%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 15d713a...4609904. Read the comment docs.

@lcharette lcharette changed the base branch from master to hotfix February 12, 2022 17:51
@lcharette lcharette merged commit f09acca into userfrosting:hotfix Feb 12, 2022
@lcharette lcharette added this to the 4.6.4 milestone Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants