Coder Social home page Coder Social logo

cletsimon / cakephp-shim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dereuromark/cakephp-shim

0.0 0.0 0.0 888 KB

CakePHP plugin to "shim" functionality up and down for major versions of the framework.

License: MIT License

PHP 100.00%

cakephp-shim's Introduction

Shim plugin for CakePHP

CI Coverage Latest Stable Version Minimum PHP Version License Total Downloads Coding Standards

Shim plugin to "shim" functionality up and down for CakePHP major versions. It also provides some small app-specific fixes.

This branch is for shimming 3.x in 4.x

It provides compatibility wrapper access to 3.x functionality in 4.x.

This is mainly useful when upgrading large applications to the next major framework version. Tons of code needs to be adjusted, using this Shim plugin quite a few lines less need to be touched. Especially the ORM layer, which would need heavy refactoring, requires a lot less changes to get things working again.

This branch is for use with CakePHP 4.2+. For details see version map.

Installation

Please see Install.md

Usage

Please see Docs.

A full overview of all shimming between versions can be found in the Wiki.

New shims

  • Controller setup for components and helpers
  • FormHelper BC for datetime (details).

Existing shims from 3.x

  • Nullable behavior for better data consistency.
  • Table::field() support and fieldByConditions() alias to migrate to.
  • Still supports model properties $primaryKey, $displayField, $order, $validate, $actsAs and all relations ($belongsTo, $hasMany, ...) as it would be very time-consuming to manually adjust all those.
  • Auto-adds Timestamp behavior if created or modified field exists in table.

Helpful links

When planning to upgrade, you should look into upgrade app for 3.x/4.x as well as the rector tool. They both contain tons of more ideas on how to get code aligned with the current direction of the framework to reduce friction in the long run.

cakephp-shim's People

Contributors

dereuromark avatar challgren avatar admad avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.