Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 3.0 info to README #126

Open
jgulledge19 opened this issue Nov 2, 2017 · 0 comments
Open

Add 3.0 info to README #126

jgulledge19 opened this issue Nov 2, 2017 · 0 comments

Comments

@jgulledge19
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant