wp-launchpad / cli
CLI library for the Launchpad framework
Requires
- ext-json: *
- adhocore/cli: ^v0.9.0
- league/event: ^3.0
- league/flysystem: ^1.1.10
Requires (Dev)
- brain/monkey: ^2.0
- mikey179/vfsstream: ^1.6
- phpunit/phpunit: ^7.5 || ^8 || ^9
- wp-media/phpunit: ^3.0
- dev-main
- 3.1.x-dev
- v1.x-dev
- v1.1.0
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.0.6
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
- dev-fix/30-fix-useless-test-run-generated-in-composer.json
- dev-bug/fix-content-not-present
- dev-bug/fix-classic-to-optimize
- dev-bug/32-no-namespace-should-default
- dev-bug/34-fix-subscriber-generation
- dev-enhancement/27-change-name-terminal
- dev-enhancement/add-event-manager
- dev-bug/fix-v1-bugs
- dev-enhancement/removed-table-command
- dev-enhancement/rename-library
- dev-enhancement/removed-mockery-when-no-need
- dev-enhancement/adapt-to-abstract
- dev-tests/add-integration-tests
- dev-bug/detect-and-remove-default-type
- dev-enhancement/add-external-run
- dev-enhancement/generate-content
- dev-enhancement/add-scenarios
- dev-enhancement/generate-params-fixtures
- dev-enhancement/add-group-test
- dev-enhancement/generate-set-up-logic-for-tests
- dev-enhancement/add-templating-conditions
This package is auto-updated.
Last update: 2024-10-27 10:08:28 UTC
README
Launchpad CLI is the library containing the CLI tool used to generate new files in the Launchpad framework.
Installation
To install the library first launch the following command: composer require launchpad/cli --dev
Then at the root from your project you can create a builder
file with the following content:
#!/usr/bin/php <?php use LaunchpadCLI\AppBuilder; require_once __DIR__ . '/vendor/autoload.php'; AppBuilder::init(__DIR__);
Usage
With this commandline the following command are available:
subscriber
: Generate a subscriber file and attach it to the project.provider
: Generate a service provider file and attach it to the project.test
: Generate a test file.table
: Generate files for adding a new table to the project.fixture
: Generate a fixture file and attach it to the project.
Subscriber
To create a subscriber run the following command: subscriber Namespace/MyClass
.
On the subscriber command the following options are available:
Provider
To create a service provider run the following command: provider Namespace/MyClass
.
Test
To create tests matching all public functions from a class run the following command: test Namespace/MyClass
.
To create tests matching a single function from a class run the following commad: test Namespace/MyClass::my_method
.
On the test command the following options are available:
Table
To create a service provider run the following command: table my_table Mynamespace
.
Fixture
To create a service provider run the following command: fixture MyClass
.