Download the PHP package ernestdefoe/recruiting without Composer

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

FBSFB Recruiting

Floxum Version Downloads Review License

A Flarum 2 extension that pulls live college football recruiting rankings from the College Football Data API and displays them on a dedicated /recruiting page inside your Flarum forum.


Features

Mobile view

Requirements


Installation

Then enable the extension in Admin → Extensions.


Configuration

All settings are found in Admin → Extensions → FBSFB Recruiting.

Setting Description Default
API Key Your CFBD bearer token (required)
Recruiting Year Class year to display (e.g. 2026) Current calendar year
Team Filter Show only recruits committed to a specific team (e.g. Alabama). Leave blank for national rankings. (blank — national)
Page / Widget Title Heading shown above the widget and on /recruiting. Leave blank for "Top Recruits". (blank)
Max Recruits How many recruits to display (1–100) 25
Cache Duration Soft TTL for CFBD responses (minutes). After this expires the next request serves the cached data and dispatches a background refresh — see Caching & refresh strategy. 360 (6 hours)

How it works

  1. A forum member navigates to /recruiting (or clicks the Recruiting link in the sidebar nav).
  2. The JS frontend calls the internal API route GET /api/cfbd-recruits.
  3. The PHP controller reads your admin settings and checks Flarum's cache. If the cached payload is fresh it returns immediately. If it's past the soft TTL it dispatches a background refresh job and returns the cached (stale) data immediately — see Caching & refresh strategy.
  4. The refresh job (RefreshRecruitsJob) proxies a request to https://api.collegefootballdata.com/recruiting/players?year=…&team=…, sorts results by national ranking, transforms them into the JSON shape, and writes the new payload back to the cache envelope.
  5. Recruit records are enriched with On3 headshots (see below) and returned to the client.
  6. Player cards are rendered with national rank, stars, headshot, physical measurements, high school, hometown, and commitment pill.
  7. Client-side filters let users narrow by position, commitment status, or keyword search instantly without a second API call.

Caching & refresh strategy

The extension uses a stale-while-revalidate cache envelope so a CFBD round-trip (≤ 10 s) never blocks the user's request.

Cache shape

Refresh paths

State Behaviour
Fresh cache (within soft TTL) Return cached data. No network.
Stale cache, no refresh in flight Dispatch RefreshRecruitsJob, return cached data immediately. A 90 s "refreshing" lock prevents N concurrent requests from dispatching N jobs in a stampede.
Stale cache, refresh already in flight Return cached data immediately. The in-flight job will repopulate the cache for the next visitor.
No cache at all (first request ever, or cache:clear) Inline CFBD fetch. This is the ONE request that pays the API round-trip on the request thread.

Recommended: run a queue worker

By default Flarum 2 ships with the sync queue driver, which means RefreshRecruitsJob::dispatch() runs inline in the request — defeating the point of the stale-while-revalidate pattern (one unlucky stale request per soft-TTL window still pays the CFBD cost).

For zero-wait refresh, configure a real queue driver in config.php:

…then run a queue worker (typically under supervisor / systemd):

With a real driver the dispatch returns in <1 ms and the worker handles the CFBD fetch in the background. Every request — even the first one after the soft TTL expires — gets cached data instantly.


Player headshots

Headshots are sourced from On3, which maintains photos for thousands of current and historical high-school recruits.

How the image lookup works

On3's football rankings page (on3.com/rivals/rankings/player/football/{year}/) is fully server-rendered HTML containing 150+ ranked recruits, each with a profile link and headshot image URL embedded directly in the markup.

On the first API call after the cache is empty the extension:

  1. Fetches the On3 rankings page for the configured class year (one HTTP request).
  2. Parses the HTML to build a name → image URL map using positional matching between profile hrefs (/rivals/jared-curtis-159433/) and on3static.com image paths.
  3. Caches the map for 24 hours — subsequent requests read from cache with zero external HTTP calls.
  4. Matches each CFBD recruit to the map by normalised name slug (e.g. "Jared Curtis""jared-curtis").

Fallback avatars

When no On3 photo is available the card shows a coloured initials avatar whose background is coded by star rating:

Stars Colour
★★★★★ Gold
★★★★ Blue
★★★ Green
★★ / unrated Slate

Player card data

Each card displays:


Data sources

Data Source
Rankings, ratings, recruit details College Football Data API
Player headshots On3 rankings page

CFBD provides a free API key with generous rate limits. The extension caches all external responses to minimise outbound requests.


Support

Questions, bug reports, and feature requests:

License

MIT


All versions of recruiting with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
flarum/core Version ^2.0
guzzlehttp/guzzle Version ^7.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 ernestdefoe/recruiting contains the following files

Loading the files please wait ...