endroid / teleporter
Endroid Teleporter
Fund package maintenance!
endroid
Installs: 10 158
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 4
Forks: 1
Open Issues: 0
Requires
- php: ^8.2
- ext-fileinfo: *
- cocur/slugify: ^4.0
- endroid/installer: ^1.3.2
- symfony/console: ^5.4||^6.4||^7.0
- symfony/filesystem: ^5.4||^6.4||^7.0
- symfony/finder: ^5.4||^6.4||^7.0
- twig/twig: ^3.0
Requires (Dev)
- endroid/quality: dev-main
Suggests
- roave/security-advisories: Avoids installation of package versions with vulnerabilities
README
By endroid
Copies files from one location to another while filtering the file contents and directories based on a list of component names to include. This allows you to have one single generic source for building many project variants with any combination of components.
Installation
Use Composer to install the library.
composer require endroid/teleporter
When you use Symfony, the installer
makes sure that services are automatically wired. If this is not the case you
can find the configuration files in the .install/symfony
folder.
Usage
You can specify sections to include or exclude using ### condition ### tags. For instance when we desire JWT we need to retrieve a token before performing an API call.
Feature: API Access In order to access protected resource As an API client I need to be able to connect Scenario: Perform API call {## if jwt ##} Given I retrieve a JWT token for user "admin" {## endif ##} And I send a GET request to "api/examples" Then the response should be in JSON
For the example given above we would perform the following call to copy the project files including all JWT related code. If we omit the jwt parameter, the files are copied without the sections marked for JWT.
vendor/bin/teleport development project jwt
In general the teleport command requires the following parameters.
vendor/bin/teleport <source_path> <target_path> <components>
Versioning
Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatible changes will be kept to a minimum but be aware that these can occur. Lock your dependencies for production and test your code when upgrading.
License
This bundle is under the MIT license. For the full copyright and license information please view the LICENSE file that was distributed with this source code.