Download the PHP package skyzyx/strong-types without Composer

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

PHP Strong Types

Source Latest Stable Version Total Downloads Open Issues Build Status Coverage Status Code Climate Code Quality Dependency Status SensioLabsInsight HHVM Support Documentation Status License Author

Enables strong types for PHP. This allows for tighter validation, especially when accepting input from users.

Why would anyone do this? This can be useful when developing APIs, and you want to require strict types. By defining those types/shapes ahead of time as classes, you can enforce incoming/outgoing data types, but also access the native values after the vaidation step has occurred.

It intentionally rejects and avoid any kind of "type massaging". If you pass an integer to StringType, you will get an exception. All errors are thrown as Exceptions with useful error messages.

Features

DateTime is already strongly typed, so use that class for strong date/time types.

Examples

We can do simple validation enforcement, which can be valuable in PHP 5.x. (Use strict types instead in PHP 7.)

You can also extend the base types to create more specific data types (aka, data shapes).

Installation

Using Composer:

And include it in your scripts:

Testing

Firstly, run composer install -o to download and install the dependencies.

You can run the tests as follows:

Contributing

Here's the process for contributing:

  1. Fork PHP Strong Types to your GitHub account.
  2. Clone your GitHub copy of the repository into your local workspace.
  3. Write code, fix bugs, and add tests with 100% code coverage.
  4. Commit your changes to your local workspace and push them up to your GitHub copy.
  5. You submit a GitHub pull request with a description of what the change is.
  6. The contribution is reviewed. Maybe there will be some banter back-and-forth in the comments.
  7. If all goes well, your pull request will be accepted and your changes are merged in.

Authors, Copyright & Licensing

See also the list of contributors who participated in this project.

Licensed for use under the terms of the MIT license.

Coding Standards

PSR-0/1/2 are a solid foundation, but are not an entire coding style by themselves. I have taken the time to document all of the nitpicky patterns and nuances of my personal coding style. It goes well-beyond brace placement and tabs vs. spaces to cover topics such as docblock annotations, ternary operations and which variation of English to use. It aims for thoroughness and pedanticism over hoping that we can all get along.

https://github.com/skyzyx/php-coding-standards


All versions of strong-types with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
mabrahamde/idna-converter Version dev-master
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 skyzyx/strong-types contains the following files

Loading the files please wait ....