Download the PHP package maslosoft/hedron without Composer

On this page you can find all versions of the php package maslosoft/hedron. 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 hedron

Hedron Logo Maslosoft Hedron

PHP source code class header applier

Latest Stable Version

License

Quick Install

Documentation

Full Hedron Documentation

Keeping class headers consitent

When developing projects, we ofter require that file containing PHP class should have some predefined comment header. This might include package information, licensing, homepage address etc.

Apply all at once

This tools provides facility to modify class headers in entire project in a safe way - using PHP Tokenizer, so that it will only modify file if it's 100% safe to change it.

Hedron helps you make your class headers up to date and consistent. It will apply predefined header to all files containing namespaced class definitions.

Instalation

composer require maslosoft/hedron --dev

Usage

Preview list of files to apply headers

vendor/bin/hedron preview

Display rendered template

vendor/bin/hedron show

Apply header to all class files.

Backup/commit your project before continue. This will write headers to files.

vendor/bin/hedron commit

Configuration

Configuration can be provided in yaml file .hedron.yml in root of your project. Hedron also uses composer.json to make your config easier, or even unnessesary.

Here is how config might look like with example values (see .hedron.example.yml):

# All paths are realtive to your project root
# Root path or paths with sources. If blank will use composer.autoload paths.
sources: ""
# Path to template file, if blank will use vendor/maslosoft/hedron/templates/default.html (no it's not html)
template: ""
# Filter configuration, by default empty. Below is some example filter.
filter:
    whitelist:
        include:
            - app/*
        exclude:
            - app/cache/*
    blacklist:
        include:
            - app/controllers/*
        exclude:
            - app/cache/CacheProvider.php
# Reserved 
# This contains composer.json as array
composer: ""
tmp: ""

All of this configuration is available in template.

Template

Template uses handlebars as templating engine. It contains all data from .hedron.yml and composer.json.

Here is example, default template:

This software package is licensed under {{composer.license}} license.

@package {{composer.name}}
@licence {{composer.license}}
{{#each composer.authors}}
@copyright Copyright (c) {{name}} <{{email}}>
{{/each}}
{{#if composer.homepage}}@link {{composer.homepage}}{{/if}}

And after rendering it looks like that:

/**
 * This software package is licensed under New BSD license.
 *
 * @package maslosoft/hedron
 * @licence New BSD
 *
 * @copyright Copyright (c) Peter Maselkowski <[email protected]>
 *
 * @link http://maslosoft.com/hedron/
 */

Replacing

This script modifies source files en masse. For safety and robustness it uses native php tokenizer and replaces everything before namespace token. Only that. If there is no namespace declaration file will not be modified.

Resources


All versions of hedron with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
symfony/console Version >=2.7 <7.0
symfony/finder Version >=2.7 <7.0
symfony/yaml Version >=2.7 <7.0
zordius/lightncandy Version ^1
maslosoft/cli-shared Version *
maslosoft/addendum Version *
ext-json Version *
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 maslosoft/hedron contains the following files

Loading the files please wait ....