RedBeanPHP
The Power ORM

Changelog

Every six months a new version of RedBeanPHP is released. Here you find the changes in each revision starting from version 4.0. You can download the latest RedBeanPHP from the Download Page

RedBeanPHP 5.7.4 (18 March 2023, Jubilate Sunday Edition)

RedBeanPHP 5.7.3 (8 October 2022, Jubilate Sunday Edition)

RedBeanPHP 5.7.2 (2 April 2022, Jubilate Sunday Edition)

RedBeanPHP 5.7.1 (31 October 2021, Jubilate Sunday Edition)

  • Added compatibility with PHP 8.1 (thanks Ipsod)
  • Fixed a minor bug in setPDO() that failed to set isConnected flag (thanks DengWang)
  • Added 4th parameter to BeanCollection to pass a meta mask (thanks MangoMarcus)
  • Added initial support for PHPStan/Psalm-annotations (thanks Craig Francis)

RedBeanPHP 5.7 (3 April 2021, Jubilate Sunday Edition)

  • Added pstr($x) function to easily generate [$x, PDO::PARAM_STR] for you (Gabor)
  • Added pint($x) function to easily generate [$x, PDO::PARAM_INT] for you (Gabor)
  • Added R::camelfy() convience function (Gabor)
  • Added R::uncamelfy() convience function (Gabor)
  • Improved PHP-8 compatibility (Gabor)
  • OODBBean::equals now accepts NULL and simply returns FALSE (Gabor)
  • Improved some source comments (Gabor)

RedBeanPHP 5.6.2 (29 November 2020, Christmas Edition)

  • Minor syntax fix (adding space) for PHP 8.0 compatibility

RedBeanPHP 5.6.1 (21 October 2020, Christmas Edition)

  • Fixed issue with R::bindFunc and shared lists in some cases (Gabor)

RedBeanPHP 5.6 (04 October 2020, Christmas Edition)

  • Added DDL-templates (Gabor)
  • Added bean->info() and R::findFromSQL() (Gabor)
  • Added getDatabaseServerVersion() (Gabor)
  • Fix unnecessary widening when storing 1 in a MySQL TINYINT(1) column #839. (Gabor, thanks davidsickmiller)
  • Preventing RedBean from trying to call protected or private methods (Lynesth)
  • Allowing the use of __call in the model (Lynesth)
  • Allow overriding stringifyFetch with setPDO (Gabor)
  • Adjust setPDO in RPDO to avoid having pdo instance replaced (Gabor)
  • Added support for SQL Select Snippets in CTE-Queries (Gabor)
  • Added support for MySQL8 (Gabor)
  • New plugin: RedSeed (Ben Major)
  • New plugin: RDB RedBeanPHP Wrapper (Taeluf)

RedBeanPHP 5.5 (30 April 2020, Pentecost Edition)

  • SQL-Extensions @joined/@own/@shared** (Lynesth)
  • R::countChildren()/R::countParents() (Gabor)
  • Finder::onmap()/R::loadJoined() (Gabor)
  • Execution bit removed from PHP files (Travispaul)
  • Plug-ins may now also contain underscores (Lynesth)
  • Arrays are now allowed as meta mask (Lynesth)
  • Minor performance improvement in convertToBeans (Lynesth)
  • Improved checking in LIMIT-1 glue (Lynesth)
  • Fix issues in Hybrid mode (Gabor/MadTeddy)
  • Make convertToBean compatible with getRow (Gabor/Flip111)
  • Fix in OODBBean changelist (AlexanderYIXIAO)
  • Fix in testPartialBeansAtSetup (AlexanderYIXIAO)
  • Removal of AutoResolve (Gabor/Lynesth/Rayraz)*
** works in every SQL-snippet also in (CTE)-trees

* possible breaking change - Due to a bug, the AutoResolve feature never worked in Frozen mode unless you had a table with the same name as the resolved bean type. We tried to fix this but the complexity was going through the roof and Rayraz pointed out this the feature was actually at odds with the whole RedBeanPHP philosophy. So I decided to kill it. Although this is a backward incompatible change we do not expect users to notice due to the fact nobody reported the bug and the whole feature was defect in Frozen mode. Therefore, it looks safe to remove the code. For fluid mode this might pose a breaking change, however fluid systems are not supposed to run on production machines in the first place. In the worst case you have to adjust your development environment in order to update. Because I do not believe this is a real breaking change (the feature did not work at all and nobody reported it) I decided not to update the major version number.

RedBeanPHP 5.4.2 (26 December 2019, St. Nicholas Edition)

  • Fix issue with Hybrid Mode not working as documented (Gabor)

RedBeanPHP 5.4.1 (7 December 2019, St. Nicholas Edition)

  • Fix issue with default values in combination with Partial Beans mode (author Alexander YI)
  • Fix minor issue in Unit Test system (author Gabor, thanks for reporting Alexander YI)
  • Update test file for PHP 7.4 compatibility (author Gabor)

RedBeanPHP 5.4 (1 October 2019, St. Nicholas Edition)

  • Debug Logger now correctly handles typed bindings (author AbygailG)
  • R::store( $beans, $unfreezeIfNecessary); (author Gabor, inspiration from PR David Sickmiller)
  • R::storeAll( $beans, $unfreezeIfNecessary);
  • R::findForUpdate() (author Gabor)
  • R::traverse(...,function( ,$depth){}) passes depth level (author Lynesth)
  • Allow findLike (and the likes) to use "IS NULL" conditions (author Lynesth)
  • Have trash/trashAll return number of deleted beans (author Lynesth)
  • Fixed Facade::removeToolBoxByKey removing the toolbox (thanks Dmelo)
  • R::getRow() now adheres to return type array (author Nucc1)
  • R::setAllowFluidTransactions() (thanks Lynesth and Marios88)
  • Peformance improvement of R::diff() (author Lynesth)
  • Fix Cache prevent a second FOR-UPDATE SQL query (author Gabor)
  • Additional unit tests
  • Improvement source code documentation

Changes in version 5.3.1 (1 June 2019, Palm Sunday Edition)

  • Improved performance for advanced mapping functions map() and NMMap() (thanks mario88)
  • Minor fixes in source annotations

Changes in version 5.3 (6 April 2019, Palm Sunday Edition)

Changes in version 5.2 (1 November 2018, All Saints Edition)

  • Allow to specify the use of partial beans in R::setup() and R::addDatabase() (author: Lynesth)
  • Refactoring &__get() (author: Lynesth)
  • Small code optimization of getAssoc function (author: Lynesth)
  • Fix Prevent R::selectDatabase from changing BeanHelper (author: Lynesth)
  • Fix Can't select sqlite if not set (author: Lynesth)
  • Fix test issue with MariaDB with JSON (author: Gabor)
  • Code refactoring to bail out of parseJoin faster (author: Lynesth)
  • Refactoring import() (author: Lynesth)
  • Make unit tests more strict, trow an exception for every notice (author: Gabor)
  • Allow OODBBeans as conditions for findLike (author: Lynesth)
  • Use cache for queryRecordCount (author: Lynesth)
  • Use cache everywhere possible (author: Lynesth)
  • getOwnList and countOwn simple refactoring (author: Lynesth)
  • Allow models to provide a jsonSerialize return (author: Bert Devriese)
  • Update queryRecordWithCursor: add flagNarrowFieldMode, sqlFilters, prevent it from breaking cache state (author: Lynesth)
  • Add R::getCursor() function to query cursors with raw SQL (author: Gabor)
  • Automatically trim types in findMulti() (author: Lynesth)
  • Update R::hunt(): uses findCollection() instead of find() to prevent memory issues when deleting a lot of beans (author: Lynesth)
  • Update R::hunt(): returns the number of beans that have been deleted (#675) (author: Lynesth)
  • Update R::hunt(): The sqlSnippet is now optional, allowing to delete a whole table while still calling FUSE hooks (that's the difference with wipe()) (author: Lynesth)
  • Add getToolBoxByKey, addToolBoxWithKey and removeToolBoxByKey (author: Gabor)
  • Add basic support for tree traversal using common table expressions (author: Gabor)
  • Improve support for CUBRID, re-add CUBRID driver to Replica2 packager (author: Gabor)
  • Allow SQL = NULL for findMulti (authors: Gabor and Lynesth)
  • Re-added experimental support for Firebird/Interbase Databases
  • PoolDB plugin (have beans remember their origin database) (authors: Gabor and Lynesth)

Changes in version 5.1 (2 April 2018, Easter Edition)

  • Added R::trashBatch($type, $ids) to trash a batch of beans in one statement
  • Added R::hunt( $type, $query, $params ) to find and trash beans in one statement
  • Added Debugger::setOverrideCLIOutput() to override PHP_SAPI in Debugger
  • Improved API documentation box()/unbox()
  • Improved API documentation matchUp
  • Make QuickExport compatible with PHP versions 5.4 and below
  • Add warning in API documentation regarding use of findLast()
  • Mark R::findLast() as deprecated
  • Fixed compatibility issue with PHP 7.2 (thanks Lynesth)
  • Increases execution speed if no conditions are set (thanks Lynesth)
  • Added DispenseHelper::setEnforceNamingPolicy() to disable naming policy
  • Faster return from __call() if no model (thanks Lynesth)
  • Updated README and Composer JSON (thanks Rotzbua)
  • Added Composer Model documentation (thanks Ben Major)
  • Fix Facade::convertToBean documentation (thanks Diogo Oliveira de Melo)
  • Reached 100% test coverage
  • Code clean-ups
  • Improved other documentation
  • Tiny Query Builder now available as plugin for your convenience
  • Improved performance of modifySchema() (thanks davidsickmiller)
  • Fixed a compatibility issue with ProxySQL in connection mechanism

Changes in version 5.0 (31 October 2017, Halloween Edition)

  • Simplified Exceptions for load() functions
  • By default R::load() and R::loadForUpdate() will now throw exceptions if a bean cannot be loaded due to a lock timeout
  • Support for JSON columns has been extended.
  • Update .gitignore (thanks jreklund)
  • Update Composer aliasing in readme (thanks benmajor)
  • Make filter function in look() optional
  • Added R::loadForUpdate() to load and lock a bean
  • Separate versions for MySQL, Postgres and SQLite as well as combined
  • Storage of partial beans
  • R::look(...) perform query and put result in template
  • R::matchUp(...) match-and-update in one go (easy to create login functionality)
  • R::csv(...) create a CSV file from a query
  • R::diff(...) returns a diff between a pair of beans
  • Added setEnforceUTF8Encoding to fix issue with stringifying binary data
  • Added exists() to bean to check for relation
  • Fixed notice in Facade inproper use of reset()
  • Added missing validations for findOrDispense and findOneOrDispense
  • Support for utf8mb4_unicode_520_ci (thanks Johan)

Changes in version 4.3.4 (March 2017)

  • Various minor fixes (github issues 530, 531 and 544)

Changes in version 4.3.3 (October 2016)

  • Automatic unboxing for Simple Models if necessary (instead of exception)
  • Added findOrDispense() to facade
  • Remove support for PHAR, it makes no sense PHP is not JAVA
  • Using var_dump instead of print_r in classic debugger for clarity
  • Fixed a minor toString issue in FUSE
  • Fixed issue in fancy debugger causing bindings to appear incorrectly
  • Fixed issue where multi zero string got converted to INT (#525)

Changes in version 4.3.2 (May 2016)

  • Added meta-masks
  • Added R::convertToBean - for single rows
  • Added R::hasDatabase
  • Added some color to fancyDebug
  • Beans now implement the jsonSerializable interface if available
  • Support for JSON columns in Postgres (manual only to avoid breaking stuff)
  • Improved source comments

Changes in version 4.3.1 (January 2016)

  • Added more source code documentation to clarify handling of NULL in FUSE
  • Fixed a minor issue with backticks in fluid mode
  • Added a try-catch to avoid errors with Postgres unremovable views (nuke)

Changes in version 4.3.0 (October 2015)

  • Add source code highlighting in docs for API
  • Compatibility with PHP 7
  • Compatibility with HHVM
  • Added one() for basic 1-1 support in OODBBean
  • Added support for NUMERIC fields (fixed precision) in MySQL/Postgres
  • Added proper MarkDown markup to source code documentation
  • Moved inline facade functions to new Utility Classes.
  • Changed DSN trigger_error into RedException
  • Bundled handy test shell scripts for unit testing RB
  • Clean up source code documentation

Changes in version 4.2.5 (July 2015)

  • Fixed notice when selecting invalid database (now throws Exception instead).

Changes in version 4.2.4 (June 2015)

  • Fixed a minor issue with findOne handling redundant LIMIT clauses

Changes in version 4.2.3 (June 2015)

  • Fixed information schema performance issue in fluid mode on large MySQL servers (with lots of databases).
  • Very very tiny performance optimization for PHP interpreters: using commas instead of dots (but it's a cute trick) - thanks 'dseguy'

Changes in version 4.2.2 (May 2015)

  • Added OODB::autoClearHistoryAfterStore()

Changes in version 4.2.1 (May 2015)

  • Added a function to set the maximum for integer parameter binding (for edge cases).
  • Conditional deprecated PGSQL ATTR constant for compatibility with PHP 7
  • Some clean-up in inline documentation

Changes in version 4.2.0 (April 2015)

Backward incompatible changes

  • Build commands like 'buildcomamnd.unique' are no longer supported (I always said not to rely on them).

Changes in version 4.1.4 (Februari 2015)

  • Fixed slot-issue in debugger (mode 2)
  • Added extra MySQL type 7 to avoid utf8mb4-innodb-index issues
  • Fixed export issue with certain FUSE hooks
  • Add feature to throw exception or trigger error if a FUSE method does not exist
  • Re-added static $f for backward compatibility with 3.5 SQL Helper
  • Fixed some issues with CUBRID compatibility, re-integrated CUBRID support in master

Changes in version 4.1.3 (December 2014)

  • PostgreSQL money fields now accept more currencies
  • Improved caching by allowing multiple cache entries per tag

Changes in version 4.1.2 (November 2014)

  • Added @joined syntax feature to countOwn as well
  • Adjusted clone-syntax to comply with strict PHP code sniffers
  • R::$toolboxes R::$toolbox and R::$currentDB are public again for your convenience

Changes in version 4.1 (October 2014)

  • R::findOne() adds LIMIT 1 to query if no LIMIT clause is found
  • R::tagged() and R::taggedAll() now accept SQL for pagination
  • Improved performance parent bean saving
  • Improved method signature of dup: R::duplicate
  • Custom beans through REDBEAN_OODBBEAN_CLASS constant
  • Allow some JOINS in with/withCondition for own-lists.
  • Improved support for UUIDs/GUIDs. This feature has been backported to 4.0.5 as well.
  • Column functions: bind a function to a column
  • Improve setup time by providing direct PDO setter (use with care!)
  • Add a method to test the database connection
  • Add new debug mode with query parameters filled in
  • Add new debug function to inspect beans and arrays of beans
  • Treat beans in own-list as shared list: aggregated list
  • Split OODB in two repositories: frozen and fluid (no API changes)
  • Regular maintenance & clean up
  • Additional tests

Backward incompatible changes

RedBeanPHP 4.1 should be fully backward compatible. However, there is one change that may affect some code relying on undefined behaviour. In 4.1 a bean will only be saved if it has been changed through the setter (meta: changed). If a bean is tainted by accessing its lists it will perform all save operations but not fire the actual SQL query if no changes have been made to the bean itself. If for some reason you relied on the redundant SQL query you might want to set the 'changed' meta property manually. You can also implement this system-wide by extending the SimpleModel.

Changes in version 4.0 (April 2014)

  • PHP native namespaces
  • Exclusive own-list
  • Tree Traversal function
  • 10% performance improvement for basic CRUD operations
  • Performance improvements for bean conversion
  • Improved Array Access interface (you can now use arrays instead of beans all the time)
  • Improved handling of unique constraints
  • Added EID() function to easily insert ENUM bean IDs in queries
  • Constraints now also use ON UPDATE CASCADE
  • Dispense works more consistently now
  • Fixed an issue with type of return ID value in Postgres driver
  • Fixed possible cache collision issue
  • Performance improvements for fluid mode
  • Big clean-up: removed Cooker/Graph (use dispense), Preloader (plugin), BeanCan Server (plugin)
  • CUBRID driver still available but as plugin

Version 4 FAQ

This is a list of questions and answers regarding the 4.0 release.

Why has the Preloader been removed?

When I wrote the preloader, the original purpose was to prevent for-each loops to fire queries when retrieving the parent of a bean. Later I added the writer cache which could take care of this but was turned off by default. In RedBeanPHP the writer cache is turned on by default solving the original problem. Meanwhile people requested all kinds of new features for the Preloader like support for loading own-lists, shared-lists and even aliases and SQL snippets. It even got its own syntax. I decided to remove the preloader because I believe simple SQL is better suited to query large amounts of records all at once for overviews and reports.
This functionality is still available as a plugin.

Why has graph() been removed from core?

R::graph() was a powerful feature to load and updates beans directly from forms. However the graph() function assumed you were also using FUSE for validation. Otherwise the function could lead to serious architectural and security defects. I fixed this in version 3, but then it became less powerful, so in version 4 I decided to remove it entirely from the core.
This functionality is still available as a plugin.
Also note that the new R::dispense() method works much like the old graph() method.

Why is R::associate gone?

The R::associate() method (as well as unassociate etc...) is a relic from the past. In the earliest versions of RedBeanPHP I believed you only needed many-to-many relations. Although this was true, performance became a real bottleneck. I had to find a way to apply the on-the-fly philosophy to N-1 relations as well, this resulted in the introduction of own-lists and shared-lists. Since then, I kept the old associate() method for backward compatibility reasons. In version 4 however I decided to finally clean up.

Why are the BeanCan Servers gone?

They blurred the distinction between plugin and core. Also, the RedBeanPHP Adaptive branch is going more in the direction of a framework which is a better place for BeanCan as well. RedBeanPHP 4 returns to the core of the library: on-the-fly ORM. Another reason is that it turns out it is pretty much impossible to prescribe the interface of a JSON or REST API.
This functionality is still available as a plugin

New in RedBeanPHP 3.5.7

This is a minor maintenance update.

  • Fixed issue in QueryWriter cache (3.5.7b)
  • Improved stacktrace in SQL exception
  • Improved performance of convertToBeans() method
  • Allow duplication of trees
  • With now also works with joins

back to main menu

Donate to RedBeanPHP using Monero:
47mmY3AVbRu 7zVVd4bxQnzD
2jR7PQtBJ cF93jWHQ
rP7yRED4qr fqu6G9Q8ZNu7
zqwnB28rz76 w7MaExf
mALVg69yFd 9sUmz
(remove spaces and new lines)

Performance monitor: this page has been generated in 0.018908977508545s. Is the performance lacking? Please drop me an e-mail to notify me!

Partners  
Uurboek.nl PapelDigital

 

RedBeanPHP Easy ORM for PHP © 2024 () and the RedBeanPHP community () - Licensed New BSD/GPLv2 - RedBeanPHP Archives
RedBeanPHP, the power ORM for PHP since 2009.

Privacy Statement