Download the PHP package porro/php-core without Composer

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

porro/php-core

Shared core for the Porro connectors: parsing site keys, signing reports, reading composer.lock, sending reports to Porro and the site health checks the connectors show in the control panel.

You don't install this directly. It comes with a connector:

Connector For
porro/laravel-connector Laravel 11–13
porro/filament-connector Filament 3–5
porro/statamic-connector Statamic 5–6
porro/craft-connector Craft 4–5

How requests are signed

A site key looks like porro_{site id}_{seed}. The seed is the private half of an Ed25519 key pair; Porro stores only the public half. Each request to Porro (a report, or reading findings) is signed over:

for example connector-v1\nPOST\n/api/v1/reports\n…, so a signature only works for the endpoint it was made for. It's sent with X-Porro-Site, X-Porro-Timestamp, X-Porro-Nonce and X-Porro-Signature headers. Porro rejects a request outside a 5-minute window or if it has seen the nonce before. Before 0.2.1 the signature was over {timestamp}\n{nonce}\n{sha256 of body} alone; Porro still accepts that for reports for now, but not for findings. If ext-sodium isn't available, paragonie/sodium_compat provides it in pure PHP.

Connecting from the control panel

A site can connect with no key to copy. The connector makes a key pair (SiteKey::generate()), asks to connect (ConnectClient::start()), and sends the person's browser to the page Porro answers with. Once someone signed in approves it there, the browser comes back to the site's return URL with porro_request, porro_grant and porro_next; the connector finishes with ConnectClient::complete(), which returns the site key to store. Both calls are signed with the new key, without X-Porro-Site. The key only becomes the site's when Porro accepts the grant, and the grant only ever goes to the site's own address.

Connectors must check the request is the one the signed-in person's session started, keep the key encrypted, and only send the browser on to porro_next when onPorro() says it's on the Porro they're set up for. ConnectError carries a reason and a message for each way it can fail.

What a report says about the server

Each report includes a system block, so Porro can flag an end-of-life OS and match Ubuntu and Debian security notices against the server's installed packages:

These are plain file reads, with no exec. Anything the PHP process can't read, such as files outside open_basedir on shared hosting, is left out: null, or false for reboot_required.

Site health checks

Porro\Core\Health runs the checks behind each connector's Site health panel, on the site itself and without a Porro account:

Network results go through the connector's own cache via Sources (failures for ten minutes), so a control panel page rarely waits on the network and an unreachable API never slows every page.

Suspicious activity and blocking

Porro\Core\Activity is what each connector's Activity and Blocking panels are built on. It works on the site alone, and IP addresses never leave it.

What a report says about the database

Connectors describe the site's default database connection with Database::describe($driver, $serverVersion, $host) and pass it to Report::database(), so Porro can flag an end-of-life MySQL, MariaDB or PostgreSQL:

The host, database name, user and credentials are never sent. If the connection can't be read, database is null.

Reviewing probe candidates

Every Monday .github/workflows/probe-sources.yml runs tools/probe-sources.php. It refreshes resources/probes/candidates.json with paths that public sources list and Probes doesn't match yet, then opens or updates one pull request, "Probe sources: ". Each path has a suggested category and a link to where it came from. The sources are:

Nothing reads the candidates at runtime, and the workflow never edits Probes::PATTERNS or merges anything. A false positive flags real visitors and can suggest blocking them, so a person moves each path in by hand:

  1. Check it against the must-not-match list (it('leaves real pages, routes and assets alone') in tests/ActivityTest.php). Drop anything a Laravel, Craft or Statamic site could really serve: login and account pages (/login, /user/sign_up, /customer/account/create), short API routes (/api/v1/...), single generic words, and CRS entries that are substrings rather than paths (.bash_, composer.json). Expect to drop most candidates. CRS and nuclei describe attacks on every kind of server, not just these sites.
  2. Add a test. Put the probe in the must-match list with its category. Add the nearest real-site lookalike to the must-not-match list, e.g. /shop/containers next to /containers/json.
  3. Move it into Probes::PATTERNS as a fixed shape anchored where the target lives (^/...\z), in the category that fits. The suggestion is only a guess. Run composer test.

Do the moves in their own PR. Merge the candidates PR unchanged: the committed file is the baseline, so the next one lists only what changed. Paths now matched by Probes drop out of the file on the next run.

Run it by hand with php tools/probe-sources.php --summary=body.md. A GITHUB_TOKEN in the environment lifts GitHub's API rate limit.

The workflow has two jobs. The job that downloads the sources and runs PHP holds only a read-only token. The job that opens the PR runs no PHP or Composer. It commits only candidates.json. For it to open PRs, do one of these:

Developing

Security

Please email [email protected] rather than opening an issue. We reply within one working day.

License

MIT


All versions of php-core with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
composer-runtime-api Version ^2.2
composer/semver Version ^3.4
maxmind-db/reader Version ^1.11
paragonie/sodium_compat Version ^1.21|^2.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 porro/php-core contains the following files

Loading the files please wait ...