Download the PHP package phil/listings without Composer

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

phil/listings

The core of listings: a classified ad, a job offer, a search for partners — written, moderated, answered and expired by the same rules.

phil/listings is the part every kind of listing shares. A listing has a title, typed criteria a search can meet, an area shown to everyone with an exact place shown only to the people its author accepts, and a minimum age. It is published at once or after a moderator's approval, hidden by enough reports, reminded before it expires, extended a bounded number of times and closed by its author. Members respond to it; a response carries no message, and only a response the author accepts lets the application put the two of them in touch, with the consent of each.

It is for any PHP application where members post offers or requests to one another: small classified ads between members, the job offers of a community, people looking for partners for an activity, a marketplace between members and sellers. Each of those is a kind of listing with its own KindPolicy — lifetime, reminder, extensions, moderation, reports, minimum age, open responses — and its own fields and screens, built on this core.

It is a plain PHP library whose requirements are ext-mbstring and psr/clock. Listings and responses are immutable: each transition takes the policy of the listing's kind and an instant, and returns a new value, so the whole life of a listing is tested to the second and stored as plain values. What the library cannot know is a port: who blocked whom (BlockList), how old a member is (MemberAges) and where the responses live (ResponseStore). Every value is bounded — titles, labels, criteria, choices, days, reports, responses — so that nothing a member types or a configuration says can make a listing unbounded.

Status

Part State
Identifiers, kinds, moderation reasons, titles, places Implemented and tested
Criteria — choices, integer ranges, flags — and their meeting with a search Implemented and tested
Kind policies, bounded, and their registry Implemented and tested
The life of a listing: draft, submission, moderation before or after publication, reports, edits, expiry, reminders, extensions, closing, removal Implemented and tested
Responses — pending, accepted, declined, withdrawn — and the Responder rules: visibility, own listing, blocks, minimum age, one open response per member, open responses per listing Implemented and tested
Persistence, forms, screens, notifications, conversations, payment Not in this library: they belong to the application or to a bundle built on it

Documentation

Document What it covers
Installation Requirements, installing, declaring the kinds.
Listings Titles, places, the minimum age, the statuses and every transition.
Criteria Choices, ranges and flags, and how a search meets a listing.
Moderation and expiry Moderation before or after publication, reports, expiry, reminders and extensions.
Responses Responding, accepting, declining, withdrawing, and the rules of the Responder.
Extension points The block list, the members' ages and the store of responses.
Exceptions ListingsException and its exceptions.
Testing The library's tests, mutation bar and benchmark, and how to test code built on it.
Reference Every type of the library, with its role.

Quick start

$blockList, $memberAges and $responseStore are the application's: see Extension points.

Requirements

PHP 8.5 or later, ext-mbstring and psr/clock.

Contributing

Contributions are welcome on the PHIL monorepo: read the contribution guide and the security policy explains, never in a public issue.

License

MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.


All versions of listings with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-mbstring Version *
psr/clock Version ^1.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 phil/listings contains the following files

Loading the files please wait ...