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

Conversation

Projects
4 participants
@SidRoberts
Copy link
Member

commented Mar 31, 2019

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.

@SidRoberts SidRoberts force-pushed the SidRoberts:simple-events branch from 66d36ab to 3ce8a1b Mar 31, 2019

@codecov

This comment has been minimized.

Copy link

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 approved these changes Apr 1, 2019

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

4 checks passed

codecov/patch Coverage not affected when comparing 03c89eb...3ce8a1b
Details
codecov/project 67.63% (+0.01%) compared to 03c89eb
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@niden

This comment has been minimized.

Copy link
Member

commented Apr 1, 2019

Thank you @SidRoberts

@niden niden added the Bug - Low label Apr 1, 2019

@niden niden added this to In progress in 4.0 Release via automation Apr 1, 2019

@sergeyklay

This comment has been minimized.

Copy link
Member

commented Apr 1, 2019

Thank you

@niden niden moved this from In progress to Done in 4.0 Release Apr 4, 2019

@niden niden added the Docs needed label Apr 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.