Back in 2017, the CakePHP project announced tentative plans to EOL the 2.x series of the framework. The CakePHP project finally announced CakePHP 4.0.0 in December 2019, and final EOL of 2.x is now scheduled for June 15, 2021.

This migration will require a fairly substantial rewrite of significant portions of the current code base. This will also provide the opportunity to address some long-standing issues. The current proposal is to perform this migration during 2020, with the resulting release being Registry v5.0.0 (though subject to change, and in the interim referred to as Registry PE). Registry v4.0.0 will be an interim release for any migrations that must be performed prior to the v5.0.0 migration.

Setting Up a Registry PE Development Environment

Registry PE has basically the same requirements and installation process as Match. Since Registry PE documentation has not yet been written, start with Match and muddle your way through.

  • PHP: v7.2 or greater is required. PHP v5.x is not supported.
  • Apache: Apache configuration is more or less the same as Match. For the moment, Registry PE can be delivered from the same virtual host as Registry (but at /registry-pe instead), though this may change.
  • Database: Postgres and MySQL/MariaDB remain supported, but cross database testing at the moment is limited. You are more likely to run into problems with MySQL/MariaDB. There may be a minimum version requirement of Postgres 9.6 (depending on where the database management layer work goes).
  • Source: Available from https://github.internet2.edu/COmanage/registry/tree/develop

A new database (schema/tablespace) will be required. Registry PE will not use the same database or tables as Registry.

The setup script is not yet fully implemented, and authentication is limited. Make sure you can somehow authenticate to Registry PE as the user admin, which will be given platform administrator permissions. Once more models have been migrated, normal authorization will be supported.

After downloading the source, create a /local directory (like Match) and set up logs and tmp (again like Match) underneath. Also create /local/config and create a database.php underneath. Set up the default Datasource as usual, this will be the new operational Registry PE database. In addition, if you wish to load data from an existing Registry instance, create an additional Datasource called transmogrify with the appropriate connection information.

Run ./bin/cake setup to create the initial salt file. Then run ./bin/cake database to create the initial tables.

If you wish to load existing data, the tables in the default schema must be completely empty. (If you created any test records, DELETE FROM each appropriate table.) When ready, run ./bin/cake transmogrify to transfer your data. More information is available here.

(info) transmogrify accepts a list of tables, in case it is useful to truncate and repopulate a small number of tables at a time. Note, however, that any dependent foreign key tables must also be loaded as part of the same transaction if results from the foreign key table are cached for mapping.

REST API v2 is fully implemented for all models that have migrated, include authentication and authorization.

  • No labels