Download the PHP package prezly/prop-types without Composer

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

PropTypes.php

Complete PHP port of React PropTypes.

Runtime type checking for complex properties structures.

You can use prop-types to document the intended types of properties passed into your code. PropTypes will check props passed to your functions against those definitions, and throw an error if they don’t match.

Build status

Installation

Usage

PropTypes was originally exposed as part of the React core module, and is commonly used with React components. We've tried to bring the familiarity of React PropTypes into PHP.

You can call PropTypes::check() to validate an array of props, providing it with a props spec as below:

Difference from React PropTypes

  1. In this package we've split optional and nullabe checks into different traits:

    • Optional means a property can be omitted from the props object
    • Nullable means a property value can be set to null

    React PropTypes has less straightforward logic around required, nulls and undefined.

  2. As opposed to React PropTypes we don't have a separate checker for null (PropTypes::null()). Instead any property can become nullable by calling ->isNullable() on its checker:

  3. Unlike React PropTypes, all properties are required by default (meaning they cannot be omitted). Unless isOptional() is explicitly called on its type checker.

    This is done this way to closer match native PHP language semantics.

Changelog

All notable changes to this project will be documented in the CHANGELOG file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.


Brought to you with :heart: by Prezly.


All versions of prop-types with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
ext-mbstring 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 prezly/prop-types contains the following files

Loading the files please wait ....