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

Simplified events. #13924

Merged
merged 1 commit into from
Apr 1, 2019
Merged

Simplified events. #13924

merged 1 commit into from
Apr 1, 2019

Conversation

SidRoberts
Copy link
Contributor

Hello!

  • Type: code quality

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • [-] I wrote some tests for this PR
  • I updated the CHANGELOG

Previously, the Events Manager was able to store events in two different systems - SplPriorityQueue and arrays. The system depended on whether priorities were enabled or not.

A lof of the code look similar to this:

if this->enablePriorities {
    // Handle SplPriorityQueue
} else {
    // Handle array
}

It doesn't make sense to duplicate the code functionality for two systems when just one can be used instead.

Now SplPriorityQueue is used regardless. If priorities are disabled, the default priority (new constant DEAULT_PRIORITY) is used instead so that everything has the same priority.

@codecov
Copy link

codecov bot commented Mar 31, 2019

Codecov Report

Merging #13924 into 4.0.x will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##            4.0.x   #13924      +/-   ##
==========================================
+ Coverage   67.62%   67.63%   +0.01%     
==========================================
  Files         469      469              
  Lines       94394    94344      -50     
==========================================
- Hits        63831    63811      -20     
+ Misses      30563    30533      -30
Impacted Files Coverage Δ
ext/phalcon/events/manager.zep.c 77.55% <0%> (+4.16%) ⬆️

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 03c89eb...3ce8a1b. Read the comment docs.

@niden niden merged commit 4d5cd10 into phalcon:4.0.x Apr 1, 2019
@niden
Copy link
Member

niden commented Apr 1, 2019

Thank you @SidRoberts

@niden niden added the Bug - Low label Apr 1, 2019
@sergeyklay
Copy link
Contributor

Thank you

@niden niden added the documentation Documentation required label Apr 9, 2019
@niden niden added 4.0 and removed documentation Documentation required labels Oct 17, 2019
@niden niden added bug A bug report status: low Low and removed Bug - Low labels Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: low Low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants