Skip to content

Releases: dereuromark/cakephp-shim

CakePHP 2.x: Adding new shims

06 May 23:57
Compare
Choose a tag to compare

Better mobile detection

RequestHandlerComponent backport into 2.x for isMobile() and isTablet() using an up-to-date vendor library.
In order to use that, you will need to composer require "mobiledetect/mobiledetectlib": "2.*".

JsonView _jsonOptions

Backport of _jsonOptions support for 2.x as well as setting the 3.x defaults here as well (JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT).
When upgrading your code to 3.x the output then doesn't change. These 4 flags are recommended to comply to RFC4627.

See the docs for details.

Small BC fix

15 Apr 11:31
Compare
Choose a tag to compare

Conditionally deprecate better to allow people to react in time.

Getting closer to 3.x

14 Apr 23:35
Compare
Choose a tag to compare
  • Add assertRedirectContains()
  • Deprecate Model::hasAny()
  • Add UrlShimHelper for Url::build() and alike

With the last addition you can then use $this->Url->build() (instead of $this->Html->url()) already in 2.x.
Using the MyUpgrade shell command cake Upgrade.MyUpgrade shim you can automate the migration.

Minor fixes

16 Mar 12:19
Compare
Choose a tag to compare

Only disable recursive property with 'Shim.disableRecursive' Configure value set to avoid BC issues.
Also fixed a small session issue.

Added path assertions

20 Feb 18:25
Compare
Choose a tag to compare

Use Configure::write('Shim.checkPaths', true); to assert that all paths are correctly set up, including a trailing DS and the correct directory separator (as DS constant).

Adding Routing Speedup and more wrapper methods

09 Feb 11:38
Compare
Choose a tag to compare

Fixed

  • get() typehints

Added

  • Routing speedup via precompiled and cached routes.php file.
  • record() convenience wrapper.
  • Components' and behaviors' convenience wrappers for 3.x.
  • primaryKey(), displayField(), alias() and table() wrappers for 3.x.
  • Relation on-the-fly setup wrappers via hasOne(), hasMany(), belongsTo(), belongsToMany().
  • PHP5.6 builds in test matrix

Minor fixes and improvements

04 Feb 14:07
Compare
Choose a tag to compare

Fixed

  • field() shim + deprecation info

Added

  • saveField() deprecation info

Add more shims/functionality

04 Feb 00:36
Compare
Choose a tag to compare

Added:

  • field() shim
  • Named param redirects/handling
  • Dedicated ShimException
  • SEO duplicate content prevention

Fixed:

  • Consistent "contain" / "recursive reset" for all find(), field() and paginate() calls.

Please note:

The Configure namespace has been changed from App to Shim.
Make sure you adjust it in your bootstrap/configs.

Test, Model and Helper additions

03 Feb 11:50
Compare
Choose a tag to compare

FormHelper and Html

Some detection shims have been added to find left-overs of the deprecated $confirmMessage param used.

Model

get() has been added to quickly retrieving records in controller actions (backport of 3.x).

IntegrationTestCase

assertResponseSuccess() added for 2xx/3xx range check (backport of 3.x).

IntegrationTestCase additions

02 Feb 10:59
Compare
Choose a tag to compare

Added two convenience methods for IntegrationTestCase:

  • assertResponseNotEmpty()
  • assertResponseEmpty()