Download the PHP package magewirephp/portman without Composer
On this page you can find all versions of the php package magewirephp/portman. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download magewirephp/portman
More information about magewirephp/portman
Files in magewirephp/portman
Package portman
Short Description Portman is a command-line utility that simplifies porting PHP libraries between frameworks.
License MIT
Informations about the package portman
Portman
Portman is a command-line utility that simplifies porting PHP libraries between frameworks.
Contents
- Installing
- Configure
- Options
- Filtering files
- Environment file
- Usage
- Download-source
- Build
- Watch
- Contributing
- Code of Conduct
- Made possible by using
- Nikic PHP-Parser
- Laravel Zero
- Webmozart Glob
- Spatie Laravel-data
:electric_plug: Installing
You can run it from your bin directory:
Or download the portman
executable from the releases section and run it from the terminal.
:gear: Configure
Portman works with portman.config.php
config file. You can create it manually, or let Portman create it for you:
Options
Filtering files
If you want to be more precise into what files or folders to include from the directories you can use the 'ant-like glob' functionality provided by 'webmozarts/glob':
Here you can see a global 'glob' definition('glob' => '**/*.php'
) that will only include php files from the foo
source directory.
But the ignore
array specifies globs for files to ignore.
The ignore globs will stack. Globs starting with a !
will negate the ignored files from previous ignore rules.
So given the configuration above and this folder structure:
The files DontIncludeMe\ClassBaz.php
and DontIncludeMe\ClassRemoved.php
will be ignored.
Environment file
If you want to store the configuration in a different location you can set the PORTMAN_CONFIG_FILE
environment variable.
:tada: Usage
Just use Portman and check its commands:
Download-source
The download-source
command will download the source-code from packagist.
[!WARNING] This will overwrite the source-code directory, so make sure to backup!
Build
The build
command will merge all code into the output-directory.
Watch
The watch
command will watch for changes in any of the source/augmentation/addition directories and run the build process for the changed files.
To use watch
you will need to install chokidar-cli into the project folder
Or globally
Using the watch
command:
:pencil2: Contributing
Thank you for considering contributing to Portman! Please read the contribution guide to know how to behave, install and use Portman for contributors.
:book: Code of Conduct
In order to ensure that the Portman is welcoming to all, please review and abide by the Code of Conduct.
:bulb: Made possible by using
Nikic PHP-Parser
PHP-Parser is used to parse source and augmentation php classes, to merge them afterwards. Created by Nikita Popov
Laravel Zero
Laravel Zero is the command line utility base. Created by Nuno Maduro and Owen Voke.
Webmozart Glob
Webmozart Glob is used for finding and filtering files using Ant's glob.
Spatie Laravel-data
Spatie Laravel-data is used to validate and make the portman.config.php
files into handy DTO's.