Respect / Relational

A fluent, intuitive ORM for any relational database engine
http://respect.github.io/Relational
Other
243 stars 32 forks source link

Deprecated: preg_replace(): The /e modifier is deprecated #39

Closed jackmakiyama closed 9 years ago

jackmakiyama commented 11 years ago

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in .../respect/data/library/Respect/Data/Styles/AbstractStyle.php on line 20

wesleyvicthor commented 11 years ago

The Respect/Relational is not yet compatible with PHP 5.5.

alganet commented 11 years ago

This should be easy to fix. The /e modifier is being used to convert camelCase to case_separators and we could do that without regular expressions, or maybe using preg_replace_callback instead of /e.

Still, I haven't tested any Respect component in PHP 5.5 yet as @wesleyvicthor noticed. We sure want to make it work.

If you need a quick fix, you can extend any of the Respect\Data\Styles\ class and replace the separatorToCamelCase method on it, then $mapper->setStyle(new \MyCustomStyleThatExtendsAnotherOne). Extended custom styles can also be used to change how table and column naming works. I use them all the time =D

nickl- commented 10 years ago

The /e is an easy fix and preg_replace_callback is much more legible than before. I thought this was deprecated in 5.4 already?

nickl- commented 10 years ago

@jackmakiyama would you please submit a pull request with your suggest fix.

williamespindola commented 10 years ago

Hey @nickl- this issue can be solved with the PR 8