Download the PHP package polysource/core without Composer

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

polysource/core

Core contracts and value objects for Polysource. Pure PHP 8.1+. Zero Symfony dependency.

The contract layer the rest of Polysource builds on — and the contract layer your extensions implement. 26 public types total. Coverage gate ≥ 90% (currently 99.17%).

The contracts

Tiny on purpose. If a contract grows past 5 methods we open an ADR (cf. ADR-010).

Contract Methods What it abstracts
DataSourceInterface 3 (search, find, count) Any read-only data source — Doctrine, Redis, Meilisearch, an HTTP API, your microservice
WritableDataSourceInterface extends + 3 (create, update, delete) Adds write — UI auto-detects and shows write affordances
ResourceInterface 5 What a Polysource Resource is — name, label, fields, actions, data source
FieldInterface n/a (DTO + trait) A column declaration
TextField / IdField / BooleanField / DateTimeField / CodeField static ::new($property, $label) Built-in concrete field types (v0.7.1) backed by the twig-theme field/*.html.twig templates
ActionInterface 4 Base action contract (inline / bulk / global specialise)
InlineActionInterface extends Per-record action (button on each row)
BulkActionInterface extends Multi-record action (selection-driven)
FilterInterface n/a (DTO) A filter declaration
PermissionInterface 1 (isGranted) Plug your auth backend (Symfony default, OPA, LDAP, custom)
AdminPluginInterface 3 metadata Self-contained capability bundle (cf. ADR-018)

Value objects

All final with readonly properties. Mutations return new instances via with*() methods. Named exception: FieldTrait is a fluent mutable builder — never share a single field instance between two resources.

Install

Requires PHP 8.1+ (cf. ADR-015).

Why "zero Symfony dependency"

You can use polysource/core in any PHP framework — Laravel, Slim, vanilla, anywhere. The Symfony wiring lives in polysource/symfony-bundle. The contracts here travel.

This is the line we won't cross: any PR adding a Symfony dependency to this package gets rejected on principle. See ADR-007 — PHP / Symfony version baseline.

Documentation

License

MIT


All versions of core with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
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 polysource/core contains the following files

Loading the files please wait ...