xpdo icon indicating copy to clipboard operation
xpdo copied to clipboard

Add 3.0 info to README

Open jgulledge19 opened this issue 7 years ago • 0 comments

This is a start and would be helpful to add a bit more:

How to set up to contribute

From command line

  • Fork the repo
  • Use git clone to your PC or testing server
  • Install Composer if not installed
  • CD to the directory that you cloned into
  • Run composer install

How to run Tests

A single test, via command line:

  • cd test
  • phpuint --bootstrap bootstrap.php "xPDO/Test/TearDownTest.php"

All tests

  • cd test
  • phpuint -c complete.phpunit.xml

v3.0 changes

  • Use fully qualified names (FQN) for classes, schema and packages. And when passing classes to xPDO use double slashes. Example: xPDO\\Test\\Sample
  • Schema files also must have FQN, see test/model/schema/xPDO.Test.Sample.mysql.schema.xml
  • Do not use the addPackage() method as in v2, instead add your files to the composer to be auto included See Autoloading Composer
  • New CLI tools
    • cd bin
    • Then php xpdo or php xpdo.php
    • Write XML schema, when you already have existing database tables (Not done) Example: php xpdo write-schema -C ../test/properties.inc.php mysql ../examples/test.schema.xml
    • Parse XML schema file, this will generate the PHP xPDO model classes Example: php xpdo parse-schema -C ../test/properties.inc.php -c --psr4 mysql ../examples/test.schema.xml ../examples/test/ You will need the trailing slash

jgulledge19 avatar Nov 02 '17 19:11 jgulledge19