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

Bolt\Storage, Bolt\Events\StorageEvents and Bolt\Content surgery #2664

Merged
merged 21 commits into from
Feb 2, 2015
Merged

Bolt\Storage, Bolt\Events\StorageEvents and Bolt\Content surgery #2664

merged 21 commits into from
Feb 2, 2015

Conversation

GwendolenLynch
Copy link
Contributor

So, you know when you start looking at a bug like #2484 and you think, "how hard can this be?", and 6 hours later you've fixed the problem... and several others along the way?

  • StorageEvent refactored and now extends GenericEvent
  • Move content related functionality out of Storage::saveContent() into Content (still needs larger refactor)
  • Refactored insertContent() and updateContent()
  • Bunch of docblock and type hinting
  • saveContent() heavily refactored in the process... Down from 101 lines to 53
  • StorageEvents::PRE_SAVE no longer cares about event loops as Content object data can be modified before the database commit
  • Fixes How to modify and save contenttype data on preSave? #2484

Changelog

Fixed: StorageEvents::PRE_SAVE now allows proper on-the-fly modification of data (see #2484)

@GwendolenLynch GwendolenLynch changed the title Bolt\Storage, Bolt\Storage\Events and and Bolt\Content surgery Bolt\Storage, Bolt\Storage\Events and Bolt\Content surgery Feb 1, 2015
@bobdenotter
Copy link
Member

Awesome. I suspect this will require a bit of testing, because that part of the code is particularly weird. :-)

@GwendolenLynch
Copy link
Contributor Author

because that part of the code is particularly weird

A lot less so now :-)

@GwendolenLynch GwendolenLynch changed the title Bolt\Storage, Bolt\Storage\Events and Bolt\Content surgery Bolt\Storage, Bolt\Events\StorageEvents and Bolt\Content surgery Feb 2, 2015
@@ -99,6 +99,100 @@ public static function getBaseColumns()
);
}

/**
* Return a content obejcts values
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: "objects"

@bobdenotter
Copy link
Member

Merging in. I'll fix these two typos all Bill O'Reilly style!

bobdenotter added a commit that referenced this pull request Feb 2, 2015
Bolt\Storage, Bolt\Events\StorageEvents and Bolt\Content surgery
@bobdenotter bobdenotter merged commit d324210 into bolt:master Feb 2, 2015
@GwendolenLynch GwendolenLynch deleted the hotfix/storage-events branch February 2, 2015 22:07
@GwendolenLynch
Copy link
Contributor Author

Not sure if I can't speel or tipe...

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