Download the PHP package adhocore/phint without Composer

On this page you can find all versions of the php package adhocore/phint. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phint

adhocore/phint

Initializes new PHP project with sane defaults using templates. It scaffolds PHP library &/or project to boost your productivity and save time.

For already existing project, run with --sync flag to add missing stuffs, see phint init.

Once you have files in your src/ or lib/ you can run phint docs to generate API like documentation in .md format and phint test to generate basic test stubs with all the structures already maintained.

It helps you be even more lazier! phint is continuously evolving and the plan is to make it big.

Latest Version Travis Build Scrutinizer CI Codecov branch StyleCI Tweet Support

Phint Preview

Templating

Phint is powered by adhocore/cli

Installation

Requires PHP7.

Manual

Download phint.phar from latest release. And use it like so php /path/to/phint.phar [opts] [args]. Hmm not cool. See Command section below.

Command

Features

Autocompletion

The phint commands and options can be autocompleted if you use zsh shell with oh-my-zsh.

Setting up auto complete:

Dont forget to add ahccli into plugins=(... ...) list in ~/.zshrc file.

Usage

It can be used to quickly spin off new project containing all basic and default stuffs. The quick steps are as follows:

Commands

Each of the commands below should be used like so:

init

alias i

Create and Scaffold a bare new PHP project.

Parameters:

Dont be intimidated by long list of parameters, you are not required to enter any of them as arguments as they are interactively collected when required.

Also check config on how to create a reusable json config so you can use phint like a pro.

Example config

Parameters sent via command args will have higher precedence than values from config file (-C --config).

What can you put in config? Anything but we suggest you put only known options (check $ phint init --help)


update

alias u

Update Phint to lastest version or rollback to earlier locally installed version.

Parameters:


docs

alias d

Generate docs (.md) for all public classes and methods from their docblocks.

Ideally you would run it on existing project or after you create/update src/ files.

Parameters:

Sample docs

PHP code

Generated Markdown

Preview

Dummy

This is dummy class.

It does nothing as of now. Maybe you could fix it?

alpha()

Alpha beta.

Example:


test

alias t

Generate test files with proper classes and test methods analogous to their source counterparts. If a test class already exists, it is skipped. In future we may append test stubs for new methods.

Ideally you would run it on existing project or after you create/update src/ files.

Parameters:

Sample test

Generated tests/Dummy.php for Abc\Dummy above:


Templating

phint export --to ~/myphint

So you would like to have your own templates and customize phint to your taste!

First you need to create a directory root (of any name, eg: myphint) with structure that looks like:

Note that you dont need to have all the files there in new directory just pick the ones you would like to customize and start hacking.

Luckily you dont have to create these templates yourself, just run phint export --to ~/myphint!

Pro Tip You can actually introduce any new template as long as their extension is .twig. Such templates are only used by phint init command. Check Template variables.

After you are done customizing these templates you can use them in each of the phint commands like so

The short option name for --template is -x.

Template variables

Here's what parameters these templates would receive when run:

Metadata

Class metadata

Example metadata for Abc\Dummy above:

Todo

Including but not limited to:

License

© 2017-2020, Jitendra Adhikari | MIT

Credits

This library is release managed by please.


All versions of phint with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
adhocore/cli Version ^0.8.1
adhocore/json-comment Version ^0.1
crazyfactory/docblocks Version ^2.2
symfony/finder Version ^3.3.0
twig/twig Version ^2.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package adhocore/phint contains the following files

Loading the files please wait ....