Skip to content

Instantly share code, notes, and snippets.

@smhg
smhg / propel-2-migration.md
Last active May 15, 2023 19:47
Migrate Propel v1.7.2 to v2.0.0-beta3
  • convert old configuration to new format
  • run propel sql:build
  • run propel model:build
  • run propel config:convert
  • remove/replace Peer class usage
  • match Base class method signatures (more typing)
  • replace BasePeer::TYPE_STUDLYPHPNAME by TableMap::TYPE_CAMELNAME
  • remove /om and /map dirs
  • add identifierQuoting="true" to schema.xml
  • fix reset(), end(), current() on collections by casting them to arrays (see PHP 7.4 changelog)
@smhg
smhg / mocha-esm-jsx.md
Last active January 17, 2022 14:36
mocha esm jsx

Mocha tests containing JSX with ESM

Having a Mocha test suite containing JSX which you converted to ESM (aka import/export), you might run into

Unexpected token '<'

or

require is not defined in ES module scope, you can use import instead

Keybase proof

I hereby claim:

  • I am smhg on github.
  • I am smhg (https://keybase.io/smhg) on keybase.
  • I have a public key ASCnIll_cVYWNqyQaBpgIUL5SFFomGhRXfc9C844aKzZ3Qo

To claim this, I am signing this object: